/* ==========================================================================
   RRMS — design system
   Pure CSS3. No framework, no CDN, no icon font. Mobile-first from 320px.
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  --primary:        #0f3d6e;
  --primary-600:    #0c3159;
  --primary-700:    #092444;
  --primary-100:    #e5eefa;
  --secondary:      #c8102e;
  --secondary-100:  #fdeaed;

  --background:     #f4f6fa;
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --surface-3:      #eef2f7;
  --text:           #14213d;
  --text-2:         #3d4a63;
  --muted:          #6b7a90;
  --border:         #dfe5ee;
  --border-strong:  #c6d0de;

  --success:        #0b7a5a;
  --success-bg:     #e4f5ee;
  --warning:        #9a6200;
  --warning-bg:     #fdf2dd;
  --danger:         #c0182c;
  --danger-bg:      #fdeaec;
  --info:           #0d5f8a;
  --info-bg:        #e4f1f9;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 30, 54, .06);
  --shadow:    0 2px 8px rgba(16, 30, 54, .08);
  --shadow-md: 0 8px 24px rgba(16, 30, 54, .10);
  --shadow-lg: 0 18px 48px rgba(16, 30, 54, .16);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
          "Noto Sans Devanagari", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 60px;
  --bottomnav-h: 62px;
  --sidebar-w: 264px;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --speed: .18s;
}

/* Dark mode: follows the device, or a stored preference on <html data-theme>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background:    #0d1320;
    --surface:       #131b2b;
    --surface-2:     #182234;
    --surface-3:     #1f2b40;
    --text:          #e8edf6;
    --text-2:        #c2ccdd;
    --muted:         #93a1b8;
    --border:        #253148;
    --border-strong: #35435e;
    --primary:       #4d90d8;
    --primary-600:   #3d7cc0;
    --primary-100:   #17273c;
    --secondary:     #ef4a63;
    --secondary-100: #33161c;
    --success-bg:    #102b23;
    --warning-bg:    #2e2410;
    --danger-bg:     #331419;
    --info-bg:       #102836;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow:    0 2px 8px rgba(0, 0, 0, .45);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --background:    #0d1320;
  --surface:       #131b2b;
  --surface-2:     #182234;
  --surface-3:     #1f2b40;
  --text:          #e8edf6;
  --text-2:        #c2ccdd;
  --muted:         #93a1b8;
  --border:        #253148;
  --border-strong: #35435e;
  --primary:       #4d90d8;
  --primary-600:   #3d7cc0;
  --primary-100:   #17273c;
  --secondary:     #ef4a63;
  --secondary-100: #33161c;
  --success-bg:    #102b23;
  --warning-bg:    #2e2410;
  --danger-bg:     #331419;
  --info-bg:       #102836;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg, video { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

small { font-size: .82rem; }

code, kbd, pre { font-family: var(--mono); font-size: .88em; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 26px; height: 26px; }

.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: absolute; left: -999px; top: 8px; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------------ layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 760px; }
.container--wide   { max-width: 1440px; }

.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }

.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row--between { justify-content: space-between; align-items: center; }
.row--center { align-items: center; }
.row--end { justify-content: flex-end; }
.row--tight { gap: 8px; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.grid--sidebar { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .grid--sidebar-left { grid-template-columns: 320px minmax(0, 1fr); }
}

.spacer { flex: 1 1 auto; }

.text-muted { color: var(--muted); }
.text-small { font-size: .85rem; }
.text-xs { font-size: .78rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-mono { font-family: var(--mono); }
.text-bold { font-weight: 700; }
.text-upper { text-transform: uppercase; letter-spacing: .06em; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }
@media (max-width: 767px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .hide-desktop { display: none !important; } }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.site-header__inner {
  display: flex; align-items: center; gap: 14px;
  min-height: var(--header-h);
}
/* min-width:0 lets the brand shrink inside the header flex row. Without it a
   long organisation name — or an uploaded logo — forces the header wider than
   the viewport on a 320px phone and the whole page scrolls sideways. */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text);
         min-width: 0; overflow: hidden; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 800;
  letter-spacing: .02em;
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

/* An uploaded organisation logo is usually wider than it is tall. Cropping one
   into the 36px square reduces it to an unreadable fragment, so when the mark
   holds a real logo it becomes a flexible box that shows the whole image. */
.brand__mark--image {
  width: auto; min-width: 36px; max-width: 148px;
  background: none; border-radius: 0; padding: 0;
}
.brand__mark--image img {
  width: auto; max-width: 148px; height: 36px;
  object-fit: contain; border-radius: 0;
}
@media (max-width: 480px) {
  .brand__mark--image, .brand__mark--image img { max-width: 104px; }
}
@media (max-width: 380px) {
  .brand__mark--image, .brand__mark--image img { max-width: 76px; }
  .brand__mark--image img { height: 30px; }
}
/* The admin sidebar is a fixed 264px and also carries the organisation name and
   "Control panel", so the logo gets a smaller share of it than in a page header
   that has the whole width to play with. */
.sidebar__head .brand__mark--image,
.sidebar__head .brand__mark--image img { max-width: 96px; }
.sidebar__head .brand__mark--image img { height: 32px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__tag  { font-size: .7rem; font-weight: 500; color: var(--muted);
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-nav { display: none; gap: 4px; margin-left: 12px; }
@media (min-width: 900px) { .site-nav { display: flex; } }
.site-nav a {
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-2);
  font-weight: 600; font-size: .92rem; transition: background var(--speed) var(--ease);
}
.site-nav a:hover { background: var(--surface-3); text-decoration: none; }
.site-nav a.is-active { color: var(--primary); background: var(--primary-100); }

/* ------------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 42px;
  font: inherit; font-weight: 600; font-size: .92rem;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
              background var(--speed) var(--ease), opacity var(--speed) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.btn--primary   { --btn-bg: var(--primary);   --btn-fg: #fff; --btn-bd: var(--primary); }
.btn--secondary { --btn-bg: var(--secondary); --btn-fg: #fff; --btn-bd: var(--secondary); }
.btn--success   { --btn-bg: var(--success);   --btn-fg: #fff; --btn-bd: var(--success); }
.btn--danger    { --btn-bg: var(--danger);    --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--ghost     { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); box-shadow: none; }
.btn--outline   { --btn-bg: transparent; --btn-fg: var(--primary); --btn-bd: var(--primary); }
.btn--sm { padding: 6px 12px; min-height: 34px; font-size: .84rem; }
.btn--lg { padding: 14px 24px; min-height: 52px; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 8px; min-height: 38px; width: 38px; }

.btn-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }

.btn.is-loading::after {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.card__header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.card__title { margin: 0; font-size: 1rem; font-weight: 700; }
.card__body { padding: 18px; }
.card__footer { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.card--flush .card__body { padding: 0; }
.card--hover { transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Metric tiles */
.stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat__label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat__value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.stat__meta  { font-size: .8rem; color: var(--muted); }
.stat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat__icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-100); color: var(--primary); flex: none;
}
.stat--success .stat__icon { background: var(--success-bg); color: var(--success); }
.stat--warning .stat__icon { background: var(--warning-bg); color: var(--warning); }
.stat--danger  .stat__icon { background: var(--danger-bg);  color: var(--danger); }
.stat--info    .stat__icon { background: var(--info-bg);    color: var(--info); }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: .76rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.badge--info    { background: var(--info-bg);    color: var(--info); }
.badge--muted   { background: var(--surface-3);  color: var(--muted); }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: .84rem; font-weight: 600; color: var(--text-2);
}
.pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ------------------------------------------------------------------ forms */
.field { margin-bottom: 16px; }
.field__label {
  display: block; margin-bottom: 6px;
  font-size: .86rem; font-weight: 600; color: var(--text-2);
}
.field__label .req { color: var(--secondary); }
.field__hint { margin-top: 5px; font-size: .78rem; color: var(--muted); }
.field__error { margin-top: 5px; font-size: .8rem; color: var(--danger); font-weight: 600; }

.input, .select, .textarea {
  width: 100%; padding: 11px 13px; min-height: 44px;
  font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  appearance: none;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
  outline: none;
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-3); color: var(--muted); }

.select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' 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; background-size: 18px;
  padding-right: 38px;
}

.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }

.field-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .field-row--2 { grid-template-columns: 1fr 1fr; }
  .field-row--3 { grid-template-columns: repeat(3, 1fr); }
}

.check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; cursor: pointer; font-size: .92rem;
}
.check input[type="checkbox"], .check input[type="radio"] {
  width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: none; cursor: pointer;
}

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.choice {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); cursor: pointer; background: var(--surface);
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
  font-weight: 600; font-size: .9rem;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover { border-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-100); color: var(--primary); }

fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 700; padding: 0 0 8px; }

/* ------------------------------------------------------------------ steps */
.steps {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.steps::-webkit-scrollbar { display: none; }
.step {
  display: flex; align-items: center; gap: 8px; flex: 1 0 auto;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600; color: var(--muted);
  background: var(--surface-3); white-space: nowrap;
}
.step__num {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border-strong);
}
.step.is-current { background: var(--primary); color: #fff; }
.step.is-current .step__num { background: #fff; color: var(--primary); border-color: #fff; }
.step.is-done { background: var(--success-bg); color: var(--success); }
.step.is-done .step__num { background: var(--success); color: #fff; border-color: var(--success); }

.progress {
  height: 8px; border-radius: var(--radius-pill);
  background: var(--surface-3); overflow: hidden;
}
.progress__bar {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  transition: width .35s var(--ease);
}

/* ------------------------------------------------------------------ alerts */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: .9rem;
}
.alert__body { flex: 1; min-width: 0; }
.alert--success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.alert--warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 30%, transparent); color: var(--warning); }
.alert--danger  { background: var(--danger-bg);  border-color: color-mix(in srgb, var(--danger) 30%, transparent);  color: var(--danger); }
.alert--info    { background: var(--info-bg);    border-color: color-mix(in srgb, var(--info) 30%, transparent);    color: var(--info); }

/* Toasts */
.toast-host {
  position: fixed; z-index: 300; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + 14px); display: flex; flex-direction: column; gap: 8px;
  width: min(94vw, 420px); pointer-events: none;
}
@media (min-width: 768px) { .toast-host { left: auto; right: 20px; bottom: 20px; transform: none; } }
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); font-size: .9rem;
  animation: toast-in .26s var(--ease);
}
.toast--success { border-left: 4px solid var(--success); }
.toast--danger  { border-left: 4px solid var(--danger); }
.toast--warning { border-left: 4px solid var(--warning); }
.toast--info    { border-left: 4px solid var(--info); }
.toast.is-leaving { animation: toast-out .22s var(--ease) forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ------------------------------------------------------------------ tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: left; vertical-align: middle; }
.table thead th {
  background: var(--surface-2); color: var(--muted);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
.table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--speed) var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child { border-bottom: 0; }
.table a { font-weight: 600; }

/* On small screens each row becomes a card (§97). */
@media (max-width: 767px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr {
    margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); padding: 6px 0; box-shadow: var(--shadow-xs);
  }
  .table--cards td { display: flex; justify-content: space-between; gap: 14px; padding: 8px 14px; border: 0; }
  .table--cards td::before {
    content: attr(data-label); font-size: .74rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; flex: none;
  }
  .table--cards td[data-label=""]::before { content: none; }
}

.list-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 0;
}
.list-toolbar .input, .list-toolbar .select { min-width: 0; }
.filter-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: end; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 14px 0; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2); font-size: .88rem; font-weight: 600;
}
.pagination a:hover { background: var(--surface-3); text-decoration: none; }
.pagination .is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .is-gap { border: 0; background: transparent; }

/* ------------------------------------------------------------------ empty & loading */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 20px; text-align: center; color: var(--muted);
}
.empty__icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
}
.empty__title { font-weight: 700; color: var(--text-2); font-size: 1rem; }

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  min-height: 14px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--border-strong); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}

/* ------------------------------------------------------------------ modal */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: flex-end; justify-content: center;
  background: rgba(10, 18, 32, .55); padding: 0;
  backdrop-filter: blur(2px);
}
.modal.is-open { display: flex; animation: fade-in .18s var(--ease); }
@media (min-width: 640px) { .modal { align-items: center; padding: 20px; } }
.modal__panel {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg); animation: sheet-up .24s var(--ease);
}
@media (min-width: 640px) { .modal__panel { border-radius: var(--radius-lg); animation: pop-in .2s var(--ease); } }
.modal__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal__title { margin: 0; font-size: 1.05rem; }
.modal__body { padding: 18px; }
.modal__footer { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } }
@keyframes pop-in { from { transform: scale(.96); opacity: .5; } }

/* ------------------------------------------------------------------ dropdown */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 80;
  min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  display: none;
}
.dropdown__menu.is-open { display: block; animation: pop-in .14s var(--ease); }
.dropdown__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: 0; background: none; border-radius: var(--radius-sm);
  font: inherit; font-size: .9rem; color: var(--text-2); text-align: left; cursor: pointer;
}
.dropdown__item:hover { background: var(--surface-3); text-decoration: none; }
.dropdown__divider { height: 1px; background: var(--border); margin: 5px 0; }

/* ------------------------------------------------------------------ tabs */
.tabs {
  display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 15px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted);
  border-bottom: 2.5px solid transparent; white-space: nowrap;
  transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; padding-top: 18px; }
.tab-panel.is-active { display: block; animation: fade-in .2s var(--ease); }

/* ------------------------------------------------------------------ tooltip */
.tip { position: relative; display: inline-flex; }
.tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 6px 10px; border-radius: 6px; font-size: .76rem; white-space: nowrap;
  background: var(--text); color: var(--surface); opacity: 0; pointer-events: none;
  transition: opacity var(--speed) var(--ease); z-index: 90;
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; }

/* ------------------------------------------------------------------ avatars, media */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--primary-100); color: var(--primary);
  font-weight: 700; font-size: .85rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 68px; height: 68px; font-size: 1.2rem; }
.avatar--xl { width: 104px; height: 104px; font-size: 1.6rem; }

.media-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
.media-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-3); aspect-ratio: 4 / 3;
}
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item__actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.media-item__btn {
  width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(12, 20, 34, .72); color: #fff; display: grid; place-items: center;
}
.media-item__caption {
  position: absolute; inset: auto 0 0 0; padding: 5px 8px; font-size: .72rem;
  background: linear-gradient(transparent, rgba(10, 16, 28, .8)); color: #fff;
}
.media-item.is-featured { outline: 3px solid var(--primary); outline-offset: -3px; }

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 26px 16px; text-align: center; color: var(--muted);
  background: var(--surface-2); cursor: pointer;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary); background: var(--primary-100); color: var(--primary); }

.upload-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.upload-row__bar { flex: 1; }
.upload-actions { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }

/* ------------------------------------------------------------------ timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline__item { position: relative; padding: 0 0 18px; }
.timeline__item::before {
  content: ""; position: absolute; left: -22px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--primary);
}
.timeline__item--success::before { border-color: var(--success); }
.timeline__item--danger::before  { border-color: var(--danger); }
.timeline__item--warning::before { border-color: var(--warning); }
.timeline__time { font-size: .76rem; color: var(--muted); }
.timeline__title { font-weight: 600; font-size: .92rem; }

/* Definition lists for record views */
.dl { display: grid; gap: 0; }
.dl__row {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
}
.dl__row:last-child { border-bottom: 0; }
@media (min-width: 560px) { .dl__row { grid-template-columns: 190px 1fr; gap: 12px; align-items: baseline; } }
.dl__key { font-size: .82rem; color: var(--muted); font-weight: 600; }
.dl__val { font-size: .94rem; }

/* ------------------------------------------------------------------ charts (§87) */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; max-height: 300px; display: block; overflow: visible; }
.chart__bar { transition: opacity var(--speed) var(--ease); }
.chart__bar:hover { opacity: .78; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 10px; font-size: .8rem; color: var(--muted); }
.chart-legend__key { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend__swatch { width: 11px; height: 11px; border-radius: 3px; }
.chart-empty { padding: 30px; text-align: center; color: var(--muted); font-size: .88rem; }

.bar-list { display: grid; gap: 10px; }
.bar-list__row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.bar-list__track { height: 10px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.bar-list__fill { height: 100%; border-radius: inherit; background: var(--primary); transition: width .5s var(--ease); }

/* ------------------------------------------------------------------ app shell */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.app__main { flex: 1; padding: 18px 0 calc(var(--bottomnav-h) + 24px); }
@media (min-width: 900px) { .app__main { padding-bottom: 32px; } }

.page-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.page-head__title { margin: 0; font-size: 1.35rem; }
.page-head__sub { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }

/* Bottom navigation (§27) */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 70;
  display: flex; height: var(--bottomnav-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(16, 30, 54, .07);
}
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: .68rem; font-weight: 600; text-decoration: none;
  transition: color var(--speed) var(--ease);
}
.bottom-nav__item:hover { text-decoration: none; }
.bottom-nav__item.is-active { color: var(--primary); }
.bottom-nav__item.is-active .icon { transform: translateY(-1px); }
.bottom-nav__item--accent .icon {
  width: 40px; height: 40px; padding: 9px; border-radius: 50%; margin-top: -18px;
  background: var(--primary); color: #fff; box-shadow: var(--shadow-md);
}

/* Sidebar (desktop admin) */
.shell { display: block; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
}
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 120; width: min(84vw, var(--sidebar-w));
  background: var(--surface); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .24s var(--ease);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .sidebar { position: sticky; top: 0; height: 100dvh; transform: none; width: auto; } }
.sidebar__head { padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar__nav { padding: 10px; flex: 1; }
.sidebar__group { margin-bottom: 12px; }
.sidebar__label {
  padding: 8px 12px 4px; font-size: .7rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: .9rem; font-weight: 600;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.sidebar__link:hover { background: var(--surface-3); text-decoration: none; }
.sidebar__link.is-active { background: var(--primary); color: #fff; }
.sidebar__link .badge { margin-left: auto; }
.sidebar__foot { padding: 12px; border-top: 1px solid var(--border); }

.scrim {
  position: fixed; inset: 0; z-index: 110; background: rgba(10, 18, 32, .5);
  display: none; backdrop-filter: blur(1px);
}
.scrim.is-open { display: block; animation: fade-in .18s var(--ease); }
@media (min-width: 900px) { .scrim { display: none !important; } }

/* Notification bell */
.bell { position: relative; }
.bell__count {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-pill); background: var(--secondary); color: #fff;
  font-size: .68rem; font-weight: 800; display: grid; place-items: center;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--secondary) 55%, transparent); }
  60%      { box-shadow: 0 0 0 7px transparent; }
}
.notif-list { max-height: 380px; overflow-y: auto; }
.notif {
  display: flex; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
}
.notif:last-child { border-bottom: 0; }
.notif.is-unread { background: var(--primary-100); }
.notif__icon { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; flex: none; }
.notif__title { font-weight: 600; font-size: .88rem; }
.notif__time { font-size: .74rem; color: var(--muted); }

/* ------------------------------------------------------------------ rich text */
.rte { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.rte__toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 6px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: sticky; top: var(--header-h); z-index: 10;
}
.rte__btn {
  min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 6px;
  background: none; color: var(--text-2); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700;
}
.rte__btn:hover { background: var(--surface-3); }
.rte__btn.is-active { background: var(--primary); color: #fff; }
.rte__area {
  min-height: 220px; padding: 14px; outline: none; line-height: 1.7; font-size: 1rem;
}
.rte__area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rte__area h2 { font-size: 1.25rem; }
.rte__area h3 { font-size: 1.08rem; }
.rte__area blockquote {
  margin: 0 0 1em; padding: 8px 14px; border-left: 3px solid var(--primary);
  background: var(--surface-2); color: var(--text-2);
}
.rte__area ul, .rte__area ol { padding-left: 22px; }
.rte__count { padding: 6px 12px; border-top: 1px solid var(--border); font-size: .76rem; color: var(--muted); }

.prose { line-height: 1.75; font-size: 1rem; }
.prose h2, .prose h3 { margin-top: 1.2em; }
.prose blockquote { margin: 0 0 1em; padding: 8px 14px; border-left: 3px solid var(--primary); background: var(--surface-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose img { border-radius: var(--radius-sm); margin: 12px 0; }

/* ------------------------------------------------------------------ public site */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--primary-700), var(--primary) 55%, #14538f);
  color: #fff; padding: 52px 0 60px;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -40% -10%; height: 180px;
  background: var(--background); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: .35em; }
.hero p { font-size: clamp(.95rem, 2.4vw, 1.1rem); opacity: .92; max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .btn--primary { --btn-bg: #fff; --btn-fg: var(--primary-700); --btn-bd: #fff; }
.hero .btn--outline { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .6); }

.section { padding: 42px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.section__head p { color: var(--muted); }

.feature { display: flex; gap: 14px; padding: 18px; }
.feature__icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--primary-100); color: var(--primary);
}
.feature h3 { font-size: 1rem; margin-bottom: .25em; }
.feature p { color: var(--muted); font-size: .9rem; }

.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 30px 0; margin-top: 40px; color: var(--muted); font-size: .88rem;
}
.site-footer a { color: var(--text-2); }
.footer-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer-links { display: flex; flex-direction: column; gap: 7px; }

/* Verification result */
.verify-card { max-width: 520px; margin: 0 auto; }
.verify-banner {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  color: #fff; background: var(--success);
}
.verify-banner--danger { background: var(--danger); }
.verify-banner--warning { background: var(--warning); }
.verify-banner__title { font-weight: 800; font-size: 1.05rem; }

/* ------------------------------------------------------------------ ID card (§22) */
.idcard-stage { display: grid; gap: 22px; justify-items: center; }
@media (min-width: 820px) { .idcard-stage { grid-template-columns: 1fr 1fr; } }

.idcard {
  --card-primary: #0f3d6e;
  --card-secondary: #c8102e;
  width: 336px; height: 212px; position: relative; overflow: hidden;
  border-radius: 12px; background: #fff; color: #12203a;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0, 0, 0, .12);
  font-size: 11px; line-height: 1.35;
}
.idcard * { box-sizing: border-box; }
.idcard__top {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--card-primary); color: #fff;
}
.idcard__logo { width: 30px; height: 30px; border-radius: 6px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.idcard__logo img { width: 100%; height: 100%; object-fit: contain; }
.idcard__org { font-weight: 800; font-size: 12px; letter-spacing: .01em; }
.idcard__type { font-size: 8.5px; text-transform: uppercase; letter-spacing: .14em; opacity: .92; }
.idcard__stripe { height: 4px; background: var(--card-secondary); }
.idcard__body { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 8px 10px 0; }
.idcard__photo {
  width: 72px; height: 86px; border-radius: 5px; overflow: hidden;
  border: 1.5px solid var(--card-primary); background: #eef2f7;
  display: grid; place-items: center; color: #8592a6; font-size: 20px; font-weight: 700;
}
.idcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.idcard__name { font-size: 13px; font-weight: 800; line-height: 1.2; margin-bottom: 1px; }
.idcard__desig { font-size: 9.5px; color: var(--card-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.idcard__rows { margin-top: 5px; display: grid; gap: 1.5px; }
.idcard__row { display: grid; grid-template-columns: 52px 1fr; gap: 5px; font-size: 9.5px; }
.idcard__row b { color: #5b6a80; font-weight: 600; }
.idcard__foot {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 8px; padding: 4px 10px 7px;
}
.idcard__qr { width: 46px; height: 46px; }
.idcard__qr svg { width: 100%; height: 100%; }
.idcard__sign { text-align: center; font-size: 8px; color: #5b6a80; }
.idcard__sign img { height: 22px; margin: 0 auto 1px; object-fit: contain; }
.idcard__sign b { display: block; font-size: 8.5px; color: #12203a; }
.idcard__watermark {
  position: absolute; right: -14px; bottom: 46px; font-size: 46px; font-weight: 900;
  color: rgba(15, 61, 110, .045); letter-spacing: -.04em; pointer-events: none; user-select: none;
}
.idcard--back { padding: 9px 10px; display: flex; flex-direction: column; gap: 4px; }
.idcard--back h4 { font-size: 10px; margin: 0 0 2px; text-transform: uppercase; letter-spacing: .08em; color: var(--card-primary); }
.idcard--back ol { margin: 0; padding-left: 13px; font-size: 7.8px; line-height: 1.42; color: #3d4a63; }
.idcard--back .idcard__contact { font-size: 7.9px; line-height: 1.35; color: #3d4a63; }
.idcard__backfoot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }

.idcard-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* The card keeps its exact 336x212 geometry so it prints true to size; on very
   narrow phones it is scaled down visually rather than reflowed. */
@media (max-width: 400px) {
  .idcard {
    transform: scale(.82);
    transform-origin: top left;
    margin-right: -60px;
    margin-bottom: -38px;
  }
}

/* ------------------------------------------------------------------ misc */
.copy-field {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); font-family: var(--mono); font-size: .86rem; word-break: break-all;
}
.qr-block { display: grid; gap: 10px; justify-items: center; text-align: center; }
.qr-block svg { border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.qr-fallback { color: var(--muted); font-size: .8rem; }

.kv-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--muted); }
.kv-strip b { color: var(--text); font-weight: 600; }

.file-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.file-preview img { width: 62px; height: 62px; object-fit: cover; border-radius: 6px; }

.doc-thumb {
  display: block; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-3); aspect-ratio: 16/10;
}
.doc-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.count-up { font-variant-numeric: tabular-nums; }

.divider-text {
  display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 16px 0;
}
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }

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

/* ------------------------------------------------------------------ print */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .bottom-nav, .sidebar, .scrim,
  .no-print, .btn, .toast-host, .page-head__actions { display: none !important; }
  .app__main { padding: 0; }
  .card { border: 0; box-shadow: none; }
  a[href]::after { content: ""; }
}
