/* =========================================================
   Padanam web — tokens, base UI, forms, overlays
   ========================================================= */

/* ── Fonts ─────────────────────────────────────────────── */
@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/fonts/bricolage_600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/fonts/bricolage_700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm_sans_400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm_sans_500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm_sans_600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm_sans_700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/plex_mono_400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/plex_mono_500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Malayalam"; src: url("../assets/fonts/noto_malayalam_400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Malayalam"; src: url("../assets/fonts/noto_malayalam_600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }

/* ── Tokens ────────────────────────────────────────────── */
:root {
  --cloud: #F2F4F9;
  --white: #FFFFFF;
  --navy: #12172B;
  --ink: #12172B;
  --ink-soft: #2B3247;
  --muted: #5D6478;
  --placeholder: #8B91A3;
  --hairline: #E6E8F0;
  --hairline-strong: #D8DCE7;
  --track: #E4E7F0;
  --track-soft: #EDEFF6;
  --surface: #FFFFFF;
  --surface-muted: #F3F4F9;
  --surface-field: #F7F8FB;

  --indigo: #5B4BF6;
  --indigo-deep: #4A3AE2;
  --indigo-soft: #E9E7FE;
  --indigo-wash: #F1F0FE;
  --indigo-text: #2A2170;
  --indigo-pale: #B4AAFF;
  --indigo-mid: #8E7CFF;

  --success: #0F9E7E;
  --success-ink: #0B6B52;
  --success-soft: #E9F7F1;
  --success-wash: #EAF8F2;
  --success-bright: #7DE3C0;
  --amber: #F59E0B;
  --amber-deep: #D99000;
  --amber-ink: #8A5A00;
  --amber-soft: #FFF6E8;
  --orange: #F97316;
  --orange-soft: #FFF1E4;
  --danger: #D64545;
  --danger-ink: #973434;
  --danger-soft: #FDECEC;

  --card-top: #1E2544;
  --card-bottom: #12172B;
  --dark: #0B0E18;
  --dark-surface: #141A2E;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", monospace;
  --font-ml: "Noto Sans Malayalam", "Nirmala UI", sans-serif;

  --rail-w: 256px;
  --top-h: 64px;
  --tab-h: 72px;
  --radius: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --shadow-card: 0 26px 60px -52px rgba(18, 23, 43, .55);
  --shadow-pop: 0 34px 70px -30px rgba(18, 23, 43, .45);
  --ease: cubic-bezier(.2, .65, .3, 1);
}

/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cloud);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
::selection { background: var(--indigo-soft); color: var(--indigo-text); }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ── Utilities ────────────────────────────────────────── */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 22px; height: 22px; }

.mono { font-family: var(--font-mono); letter-spacing: .06em; }
.ml, [lang="ml"] { font-family: var(--font-ml); letter-spacing: 0; }
.muted { color: var(--muted); }
.faint { color: var(--placeholder); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.stretch { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s;
}
.skip-link:focus { transform: none; }

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger-ink);
  font-size: 13px;
  text-align: center;
}

/* ── Type ─────────────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 4px var(--indigo-soft);
  flex: none;
}
.page-title {
  margin-top: 8px;
  font-size: clamp(1.75rem, 2.7vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.page-sub {
  max-width: 60ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.section-title { font-size: 18px; letter-spacing: -.02em; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head .link {
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
  white-space: nowrap;
}
.section-head .link:hover { text-decoration: underline; text-underline-offset: 3px; }

.link {
  color: var(--indigo);
  font-weight: 600;
  text-decoration: none;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .16s, box-shadow .16s;
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .5;
  transform: none;
  pointer-events: none;
}

.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 12px 24px -18px rgba(18, 23, 43, .9); }
.btn-primary:hover { background: #1B2140; box-shadow: 0 18px 30px -20px rgba(18, 23, 43, .8); }
.btn-indigo { background: var(--indigo); color: #fff; box-shadow: 0 12px 24px -16px rgba(91, 75, 246, .8); }
.btn-indigo:hover { background: var(--indigo-deep); }
.btn-soft { background: var(--indigo-wash); color: var(--indigo-text); border-color: #E4E0FD; }
.btn-soft:hover { background: var(--indigo-soft); }
.btn-ghost { background: #fff; border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--hairline-strong); background: var(--surface-field); }
.btn-subtle { background: var(--surface-muted); color: var(--ink-soft); }
.btn-subtle:hover { background: var(--track-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger-ink); border-color: #F6D4D4; }
.btn-danger:hover { background: #FBE1E1; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #C33A3A; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #F3F4FA; }
.btn-dark-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.btn-dark-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 12px; border-radius: 11px; gap: 6px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 50px; padding: 0 20px; font-size: 14.5px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 11px; }
.btn-icon.btn-sm { width: 32px; height: 32px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-field); border-color: var(--hairline-strong); }
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn--bare { border-color: transparent; background: transparent; }
.icon-btn--bare:hover { background: var(--surface-muted); }

/* ── Chips / badges ───────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip .icon { width: 11px; height: 11px; }
.chip--indigo { background: var(--indigo-soft); color: var(--indigo-text); }
.chip--success { background: var(--success-soft); color: var(--success-ink); }
.chip--amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip--danger { background: var(--danger-soft); color: var(--danger-ink); }
.chip--orange { background: var(--orange-soft); color: #9A4710; }
.chip--dark { background: rgba(255, 255, 255, .1); color: #D9DEEC; }
.chip--plain { background: transparent; border: 1px solid var(--hairline); color: var(--muted); }
.chip--ml { font-family: var(--font-ml); text-transform: none; letter-spacing: 0; font-size: 9.5px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}
.dot--amber { background: var(--amber); }
.dot--danger { background: var(--danger); }
.dot--muted { background: var(--placeholder); }

/* ── Surfaces ─────────────────────────────────────────── */
.card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 22px; }
.card-pad-sm { padding: 16px; }
.dark-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--card-top), var(--card-bottom) 58%, var(--dark));
  color: #fff;
  box-shadow: 0 30px 60px -45px rgba(18, 23, 43, .9);
}
.dark-card::after {
  content: "";
  position: absolute;
  top: -100px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 75, 246, .4), transparent 66%);
  pointer-events: none;
}
.dark-card > * { position: relative; z-index: 1; }
.divider { height: 1px; background: var(--hairline); border: 0; margin: 0; }
.flat { border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface-field); }

/* ── Forms ────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-soft);
}
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.input, .textarea, .select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface-field);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--hairline-strong); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--indigo);
  background: #fff;
  box-shadow: 0 0 0 3px var(--indigo-wash);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D6478' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.input[lang="ml"], .textarea[lang="ml"] { font-family: var(--font-ml); }
.input-icon { position: relative; }
.input-icon .icon {
  position: absolute;
  top: 50%; left: 12px;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--placeholder);
  pointer-events: none;
}
.input-icon .input { padding-left: 38px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .field + .field { margin-top: 0; }
.form-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 180px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }

.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--muted); }
.check-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--indigo); }

/* ── Progress & scores ────────────────────────────────── */
.progress {
  height: 6px;
  border-radius: 10px;
  background: var(--track-soft);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--indigo);
  transition: width .45s var(--ease);
}
.progress--dark { background: rgba(255, 255, 255, .14); }
.progress--dark > span { background: linear-gradient(90deg, var(--indigo-mid), var(--indigo-pale)); }
.progress--success > span { background: var(--success); }
.progress--amber > span { background: var(--amber); }
.progress--slim { height: 4px; }

.ring {
  --pct: 0;
  --ring-color: var(--indigo);
  --ring-track: #E7E8F1;
  position: relative;
  display: grid;
  place-items: center;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--ring-track) 0);
  flex: none;
}
.ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}
.ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.ring-inner strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
.ring-inner small { margin-top: 3px; font-family: var(--font-mono); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder); }
.ring--sm { width: 52px; height: 52px; }
.ring--sm::after { inset: 5px; }
.ring--sm .ring-inner strong { font-size: 13px; }
.ring--sm .ring-inner small { display: none; }
.ring--lg { width: 144px; height: 144px; }
.ring--lg::after { inset: 11px; }
.ring--lg .ring-inner strong { font-size: 40px; }
.ring--lg .ring-inner small { font-size: 8px; margin-top: 5px; }
.ring--success { --ring-color: var(--success); }
.ring--danger { --ring-color: var(--danger); }
.ring--amber { --ring-color: var(--amber); }

.stat-tile {
  padding: 15px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: #fff;
}
.stat-tile strong { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; }
.stat-tile span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.stat-tile .icon { width: 15px; height: 15px; color: var(--indigo); margin-bottom: 8px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ── Segmented control ────────────────────────────────── */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--surface-muted);
}
.segmented button, .segmented a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.segmented button:hover, .segmented a:hover { color: var(--navy); }
.segmented .is-active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(18, 23, 43, .14);
}
.segmented--dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
.segmented--dark button { color: #A9B1C9; }
.segmented--dark .is-active { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.segmented[lang="ml"] button { font-family: var(--font-ml); font-size: 11px; }

/* ── Avatar ───────────────────────────────────────────── */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--indigo-mid), var(--indigo));
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  flex: none;
  box-shadow: 0 8px 16px -10px rgba(91, 75, 246, .8);
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 64px; height: 64px; font-size: 24px; }

/* ── Empty state ──────────────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--indigo-wash);
  color: var(--indigo);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { font-size: 19px; }
.empty p { max-width: 44ch; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty .btn { margin-top: 18px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ── Modal ────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 14, 24, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
.modal {
  width: min(520px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  animation: modalIn .22s var(--ease);
}
.modal--wide { width: min(720px, 100%); }
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  background: #fff;
  border-bottom: 1px solid transparent;
}
.modal-head h3 { font-size: 20px; letter-spacing: -.025em; }
.modal-head p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-body { padding: 4px 22px 20px; }
.modal-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  background: linear-gradient(transparent, #fff 30%);
  flex-wrap: wrap;
}
.modal-foot .spacer { flex: 1; }
.modal-close { flex: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* ── Toast ────────────────────────────────────────────── */
.toast-root {
  position: fixed;
  z-index: 150;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
  animation: toastIn .22s var(--ease);
  pointer-events: auto;
}
.toast .icon { width: 16px; height: 16px; margin-top: 1px; color: var(--success); }
.toast--error .icon { color: var(--danger); }
.toast--info .icon { color: var(--indigo); }
.toast strong { display: block; font-size: 12.5px; color: var(--navy); }
.toast p { margin-top: 2px; color: var(--muted); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Boot ─────────────────────────────────────────────── */
.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18vh 20px;
  color: var(--muted);
  font-size: 13px;
}
.boot img { border-radius: 14px; box-shadow: var(--shadow-card); }

/* ── Small screens: base ──────────────────────────────── */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .page-title { font-size: clamp(1.6rem, 7vw, 2rem); }
  .page-sub { font-size: 13px; }
  .card-pad { padding: 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid .field + .field { margin-top: 0; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { border-radius: 20px; max-height: 92vh; width: 100%; }
  .modal-head { padding: 17px 18px 12px; }
  .modal-body { padding: 4px 18px 16px; }
  .modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .toast-root { right: 12px; bottom: calc(12px + var(--tab-h) + env(safe-area-inset-bottom)); left: 12px; width: auto; }
  .btn { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
