/* Charka's look: FOBD-1 শান্ত (Shanto), FOB Digital Labs' own style for every app and website (the owner's decision of 27 November 2026:
   "as it is, the earlier design goes"). Source of the rules: D:\E-Health hackathon\design\styles\FOBD-1-shanto.md and its design system
   (tokens checked there for contrast: every text pair above 4.5:1, lines and focus above 3:1, in both modes). Calm and flat: about 90% of
   the screen neutral grey, colour only where it means something; flat cards with a thin edge, no shadow, glass or gradient; slim pill
   buttons drawn as outlines (the main action gets a light wash), with a 48px touch area; day and night made with the same care.
   Everything is local (no CDN, R-13): Noto Sans Bengali for Bengali, Inter for Latin. Shared by the dashboard, the login and setup pages. */

@font-face {
  font-family: "Noto Sans Bengali";
  src: url("/assets/fonts/NotoSansBengali-Regular.ttf") format("truetype");
  font-weight: 400 500; font-style: normal; font-display: swap;
  unicode-range: U+0980-09FF, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Noto Sans Bengali";
  src: url("/assets/fonts/NotoSansBengali-Bold.ttf") format("truetype");
  font-weight: 600 800; font-style: normal; font-display: swap;
  unicode-range: U+0980-09FF, U+200C-200D, U+25CC;
}
@font-face { font-family: Inter; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

/* ---- FOBD-1 শান্ত tokens, day ---- */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --surface: #f4f5f7; --surface-raised: #ffffff; --surface-sunken: #eceef1; --surface-high: #e4e7eb;
  --line: #dfe2e6; --line-strong: #7b8490; --ink: #15191e; --ink-muted: #525a65;
  --primary: #24544d; --on-primary: #ffffff; --primary-soft: #e3eae8;
  --engine: #2b5766; --engine-soft: #e0e8eb; --insight: #5c636d; --insight-soft: #e8eaed;
  --care: #885837; --care-soft: #f4eee9; --seal: #4b5882; --seal-soft: #eceef2;
  --danger: #ac3342; --danger-soft: #f8edef; --on-danger: #ffffff;
  --warning: #755a11; --warning-soft: #f2eddb; --success: #2d5a3f; --success-soft: #e8eeea;
  --focus: #2f5bd3;
  --scrim: rgba(21, 25, 30, 0.45);
}
/* ---- night: the phone or computer's own setting, or the theme button ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #16181b; --surface-raised: #1e2125; --surface-sunken: #272b30; --surface-high: #2f343a;
  --line: #30353b; --line-strong: #858e99; --ink: #e7eaee; --ink-muted: #a4acb6;
  --primary: #5daea4; --on-primary: #06201c; --primary-soft: #283938;
  --engine: #8cccd4; --engine-soft: #27333a; --insight: #ccd1d8; --insight-soft: #2f3439;
  --care: #dbb996; --care-soft: #382f29; --seal: #bbc7e8; --seal-soft: #292d38;
  --danger: #f19da3; --danger-soft: #3b2628; --on-danger: #2a0b0e;
  --warning: #ddbb32; --warning-soft: #403921; --success: #8cc9a5; --success-soft: #29372f;
  --focus: #9db8f0;
  --scrim: rgba(0, 0, 0, 0.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #16181b; --surface-raised: #1e2125; --surface-sunken: #272b30; --surface-high: #2f343a;
    --line: #30353b; --line-strong: #858e99; --ink: #e7eaee; --ink-muted: #a4acb6;
    --primary: #5daea4; --on-primary: #06201c; --primary-soft: #283938;
    --engine: #8cccd4; --engine-soft: #27333a; --insight: #ccd1d8; --insight-soft: #2f3439;
    --care: #dbb996; --care-soft: #382f29; --seal: #bbc7e8; --seal-soft: #292d38;
    --danger: #f19da3; --danger-soft: #3b2628; --on-danger: #2a0b0e;
    --warning: #ddbb32; --warning-soft: #403921; --success: #8cc9a5; --success-soft: #29372f;
    --focus: #9db8f0;
    --scrim: rgba(0, 0, 0, 0.55);
  }
}
:root {
  --font-display: "Noto Sans Bengali", Inter, system-ui, sans-serif;
  --font-body: Inter, "Noto Sans Bengali", system-ui, sans-serif;
  --font-latin: Inter, "Noto Sans Bengali", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius-sm: 10px; --radius-md: 16px; --radius-lg: 20px; --radius-pill: 999px;
  --target-min: 48px; --target-dense: 40px; --control-h: 36px; --control-h-main: 40px; --voice-size: 42px;
}

/* ---- base ---- */
* { box-sizing: border-box; }
html { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--surface);
       -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.4; margin: 0; }
h1 { font-size: 20px; font-weight: 700; margin-bottom: 0.4rem; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 0.7rem; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.45; }
p { margin: 0 0 0.8rem; max-width: 70ch; }
a { color: var(--primary); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-sunken); padding: 0.1em 0.4em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* ---- buttons: slim pills drawn as outlines; the main action has a light wash; filled only for danger ---- */
button, input, select, textarea { font: inherit; color: inherit; }
button, a.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--control-h);
  padding: 0 18px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: var(--radius-pill);
  cursor: pointer; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; transition: background-color .15s, border-color .15s;
}
/* slim to the eye, but the touch area stays 48px: an invisible layer above and below */
button::before, a.btn::before { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: var(--target-min);
  transform: translateY(-50%); border-radius: var(--radius-pill); }
button:hover:not(:disabled), a.btn:hover { background: var(--surface-sunken); }
button.primary, a.btn.primary { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); min-height: var(--control-h-main); }
button.primary:hover:not(:disabled) { background: var(--primary-soft); filter: brightness(0.97); }
button.ghost { border-color: transparent; color: var(--primary); padding: 0 10px; }
button.danger { background: var(--danger); color: var(--on-danger); border-color: var(--danger); }
button.danger:hover:not(:disabled) { background: var(--danger); filter: brightness(0.95); }
button.small, a.btn.small { min-height: 32px; padding: 0 14px; font-size: 14px; }
button.small::before, a.btn.small::before { height: var(--target-dense); }
button.primary.small { min-height: 32px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- fields ---- */
input, select, textarea {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised);
}
select { max-width: 100%; }
textarea { padding: 10px 14px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { min-height: 0; padding: 0; accent-color: var(--primary); width: 1.1rem; height: 1.1rem; }
input[type="color"] { min-height: 36px; width: 48px; padding: 2px; }
input[type="range"] { min-height: 0; padding: 0; accent-color: var(--primary); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--primary-soft); }

/* ---- messages: always with words; danger has an edge, warning and success only a light background ---- */
.banner { background: var(--warning-soft); color: var(--ink); padding: 0.75rem 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; }
.error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); padding: 0.75rem 1rem;
         border-radius: var(--radius-md); margin-bottom: 0.9rem; }
.note { background: var(--surface-sunken); padding: 0.75rem 1rem; border-radius: var(--radius-md); font-size: 15px; }
.muted { color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
                           transition-duration: 0.01ms !important; }
}
