/* Borrowstyle admin · the shell and the kit, wearing the website's tokens (site/site-tokens.css, copied and
   hash-checked from Borrowstyle/web/site.css). Light only, like the site. Mobile first: 390 px is the main size.
   No divider lines anywhere (build.py lints for border sides, <hr>, dashed and dotted): space and tint separate. */

:root {
  --adm-side: 240px;
  --adm-tabbar: 64px;
  --adm-zebra: #F6F7FB;
  --adm-blue: #2B7FE6;          /* the site's button blue: installs, money */
  --adm-orange: #EB6834;        /* removals (validated against the blue: CVD ΔE 26) */
  --adm-ok: var(--ok, #1E7A45);
  --adm-ok-soft: var(--ok-soft, #E3F6EC);
  --adm-bad: var(--err, #B42318);
  --adm-bad-soft: #FDECEA;
  --adm-warn: #7A5200;
  --adm-warn-soft: #FFF3D6;
  --adm-field: #EEF0F6;
  --adm-safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.adm-body {
  margin: 0; min-height: 100vh; background: var(--page); color: var(--ink);
  font: 400 16px/1.45 Gantari, system-ui, sans-serif; letter-spacing: .01em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-booting .adm-main { opacity: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.adm-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 999px; box-shadow: var(--sh-card); }
.adm-skip:focus { left: 8px; }
.adm-noscript { padding: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.adm-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.adm-press { cursor: pointer; transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), background-color .15s; }
.adm-press:active { transform: scale(.98); }

/* ---------------------------------------------------------------- brand, top bar, sidebar, tabs */
.adm-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 17px; }
.adm-mark { width: 30px; height: 30px; border-radius: 9px; box-shadow: var(--sh-blue); }
.adm-brand-tag { font-size: 13px; font-weight: 600; color: var(--label, #174F95); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }

.adm-top {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand actions" "range range";
  gap: 10px 12px; align-items: center; padding: 12px 16px 10px; background: rgba(243, 244, 249, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.adm-top-brand { grid-area: brand; }
.adm-top-actions { grid-area: actions; justify-self: end; display: flex; gap: 8px; align-items: center; }
.adm-range { grid-area: range; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: var(--sh-pill); }
.adm-range.is-idle { display: none; }
.adm-top.is-no-range { grid-template-areas: "brand actions"; }
.adm-range-btn { border: 0; background: transparent; border-radius: 999px; height: 34px; padding: 0 6px; font-size: 14px; font-weight: 500; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.adm-range-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.adm-icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--sh-pill); cursor: pointer; color: var(--ink); }
.adm-icon-btn.is-spin .adm-ico { animation: adm-spin .6s ease; }
@keyframes adm-spin { to { transform: rotate(360deg); } }
.adm-signout { display: none; }

.adm-side { display: none; }
.adm-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px calc(6px + var(--adm-safe-b)); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 -6px 24px rgba(20, 30, 60, .07);
}
.adm-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 0; background: transparent; border-radius: 14px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; cursor: pointer; }
.adm-tab[aria-current="page"], .adm-tab.is-current { color: var(--ink); }
.adm-tab[aria-current="page"] .adm-ico, .adm-tab.is-current .adm-ico { color: var(--adm-blue); }

.adm-main { padding: 6px 16px calc(var(--adm-tabbar) + 28px + var(--adm-safe-b)); max-width: 1180px; transition: opacity .2s; }
.adm-main:focus { outline: none; }
.adm-main.is-signin { padding: 0; max-width: none; }

/* ---------------------------------------------------------------- page head, banners */
.adm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 10px 0 16px; }
.adm-page-title { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.015em; }
.adm-head-sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.adm-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; background: var(--adm-warn-soft); color: var(--adm-warn); }
.adm-banner .btn { margin-left: auto; }
.adm-banner.is-sample { background: var(--accent-soft); color: var(--label, #174F95); }

/* ---------------------------------------------------------------- cards and tiles */
.adm-stack { display: grid; gap: 14px; }
.adm-card { background: var(--card); border-radius: var(--r1); box-shadow: var(--sh-card); padding: 18px; min-width: 0; }
.adm-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.adm-card-title { font-size: 17px; font-weight: 600; }
.adm-card-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.adm-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-words { font-size: 15px; color: var(--ink2); }
.adm-words.is-quiet { color: var(--muted); padding: 6px 2px; }
.adm-grid-2 { display: grid; gap: 14px; }

.adm-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-kpi { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; border-radius: var(--r2); background: var(--card); box-shadow: var(--sh-card); text-decoration: none; }
.adm-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.adm-kpi-label { font-size: 13.5px; font-weight: 500; color: var(--ink2); }
.adm-kpi-info { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -6px -6px -6px 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.adm-kpi-info .adm-ico { width: 18px; height: 18px; }
.adm-kpi-value { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.adm-kpi .adm-kpi-value.is-words, .adm-kpi.is-big .adm-kpi-value.is-words, .adm-kpis.is-3 .adm-kpi-value.is-words { font-size: 15px; line-height: 1.35; font-weight: 500; letter-spacing: 0; color: var(--muted); padding-top: 4px; }
.adm-kpi-sub { font-size: 13px; color: var(--muted); }
.adm-kpi.is-big .adm-kpi-value { font-size: 34px; }
.adm-kpis.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adm-kpis.is-3 .adm-kpi { padding: 12px; }
.adm-kpis.is-3 .adm-kpi-value { font-size: 22px; }
.adm-kpis.is-3 .adm-kpi-label { font-size: 12.5px; }
.adm-kpis.is-inside { margin-bottom: 10px; }
.adm-kpis.is-inside .adm-kpi { box-shadow: none; background: var(--adm-zebra); padding: 12px; }
.adm-kpis.is-inside.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.adm-kpis.is-inside .adm-kpi-value { font-size: 22px; }
.adm-kpis.is-inside .adm-kpi-label { font-size: 12.5px; }

/* the money headline: one hero number with the split under it */
.adm-hero-num { font-size: 44px; line-height: 1.05; font-weight: 600; letter-spacing: -.03em; }
.adm-hero-num.is-words { font-size: 17px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.adm-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.adm-split-item { border: 0; background: var(--adm-zebra); border-radius: var(--r3); padding: 10px 12px; min-width: 0; text-align: left; font: inherit; color: inherit; }
.adm-split-label { display: block; font-size: 12.5px; color: var(--muted); }
.adm-split-value { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.adm-split-value.is-words { font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* health line */
.adm-page > .adm-health { margin-bottom: 14px; }
.adm-health { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r2); text-decoration: none; font-weight: 500; }
.adm-health.is-ok { background: var(--adm-ok-soft); color: var(--adm-ok); }
.adm-health.is-bad { background: var(--adm-bad-soft); color: var(--adm-bad); }
.adm-health .adm-row-chev { margin-left: auto; }
.adm-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------------------------------------------------------------- ranked bars and row lists (tints, no rules) */
.adm-bars { display: grid; gap: 6px; }
.adm-bar { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 12px; overflow: hidden; background: var(--adm-zebra); }
.adm-bar-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--share) * 100%); background: var(--accent-soft); border-radius: 12px; }
.adm-bar-label, .adm-bar-value { position: relative; font-size: 14.5px; }
.adm-bar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-bars-more { font-size: 13px; color: var(--muted); padding: 4px 2px; }

.adm-rows { display: grid; gap: 4px; }
.adm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 14px; background: transparent; text-align: left; min-width: 0; }
.adm-row:nth-child(odd) { background: var(--adm-zebra); }
button.adm-row:hover { background: var(--accent-soft); }
.adm-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.adm-row-title { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.adm-row-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.adm-row-value { font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-row-chev { width: 18px; height: 18px; color: var(--muted); }
.adm-row.is-bad .adm-row-title { color: var(--adm-bad); }
.adm-row.is-warn .adm-row-title { color: var(--adm-warn); }
.adm-row-note { font-size: 14.5px; color: var(--ink2); margin-top: 4px; overflow-wrap: anywhere; }

.adm-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.adm-chip.is-soft { background: var(--adm-zebra); color: var(--ink2); }
.adm-chip.is-blue { background: var(--accent-soft); color: var(--label, #174F95); }
.adm-chip.is-ok { background: var(--adm-ok-soft); color: var(--adm-ok); }
.adm-chip.is-bad { background: var(--adm-bad-soft); color: var(--adm-bad); }
.adm-chip.is-warn { background: var(--adm-warn-soft); color: var(--adm-warn); }

/* keep table (numbers only, zebra) */
.adm-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
.adm-table th { font-weight: 500; color: var(--muted); text-align: right; padding: 0 8px 2px; font-size: 12.5px; }
.adm-table th:first-child, .adm-table td:first-child { text-align: left; }
.adm-table td { padding: 9px 8px; text-align: right; font-variant-numeric: tabular-nums; background: var(--adm-zebra); }
.adm-table td:first-child { border-radius: 12px 0 0 12px; }
.adm-table td:last-child { border-radius: 0 12px 12px 0; }
.adm-table .is-none { color: var(--muted); }

/* ---------------------------------------------------------------- segmented control, switch, search */
.adm-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--adm-field); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.adm-seg::-webkit-scrollbar { display: none; }
.adm-seg-btn { border: 0; background: transparent; border-radius: 999px; height: 34px; padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.adm-seg-btn[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--sh-pill); }

.adm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; font-weight: 500; user-select: none; }
.adm-switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-switch-track { width: 42px; height: 26px; border-radius: 999px; background: #D5D9E3; position: relative; transition: background .18s; flex: none; }
.adm-switch-dot { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 60, .25); transition: transform .18s cubic-bezier(.3, 1.4, .5, 1); }
.adm-switch-input:checked + .adm-switch-track { background: var(--adm-blue); }
.adm-switch-input:checked + .adm-switch-track .adm-switch-dot { transform: translateX(16px); }
.adm-switch-input:focus-visible + .adm-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.adm-search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 999px; background: var(--card); box-shadow: var(--sh-pill); }
.adm-search .adm-ico { color: var(--muted); width: 20px; height: 20px; }
.adm-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 16px Gantari, system-ui, sans-serif; color: var(--ink); }
.adm-search input:focus { outline: none; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.adm-select { height: 38px; padding: 0 30px 0 14px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--sh-pill); font: 500 14px Gantari, system-ui, sans-serif; color: var(--ink); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 15px top 17px, right 10px top 17px; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------------------------------------------------------------- the chart */
.adm-chart { position: relative; }
.adm-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; font-size: 13.5px; color: var(--ink2); }
.adm-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.adm-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.adm-key.is-blue { background: var(--adm-blue); }
.adm-key.is-orange { background: var(--adm-orange); }
.adm-chart-plot { position: relative; height: var(--h); touch-action: pan-y; }
.adm-chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.adm-chart-bar.is-blue { fill: var(--adm-blue); }
.adm-chart-bar.is-orange { fill: var(--adm-orange); }
.adm-chart-group.is-on .adm-chart-bar { filter: brightness(1.12); }
.adm-chart-peak { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -125%); font-size: 12.5px; font-weight: 600; color: var(--ink2); pointer-events: none; white-space: nowrap; }
.adm-chart-days { position: relative; height: 22px; margin-top: 6px; }
.adm-chart-day { position: absolute; left: var(--x); transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.adm-chart-tip { position: absolute; top: 0; left: var(--x); transform: translateX(-50%); z-index: 2; display: grid; gap: 2px; min-width: 132px; padding: 9px 11px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; pointer-events: none; box-shadow: var(--sh-big); }
.adm-chart-tip.is-left { transform: translateX(-92%); }
.adm-chart-tip.is-right { transform: translateX(-8%); }
.adm-chart-tip-row { display: inline-flex; align-items: center; gap: 7px; }
.adm-chart-empty { padding: 30px 0; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- facts, sheets, drawer, toast */
.adm-facts { display: grid; gap: 4px; margin: 0; }
.adm-fact { display: flex; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; }
.adm-fact:nth-child(odd) { background: var(--adm-zebra); }
.adm-fact dt { color: var(--muted); }
.adm-fact dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; min-width: 0; }

dialog { color: var(--ink); }
.adm-sheet, .adm-drawer { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.adm-sheet::backdrop, .adm-drawer::backdrop { background: rgba(18, 18, 18, .38); }
.adm-sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.adm-sheet-box { width: 100%; max-height: 88vh; overflow: auto; background: var(--card); border-radius: 28px 28px 0 0; padding: 18px 18px calc(22px + var(--adm-safe-b)); box-shadow: var(--sh-big); animation: adm-rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes adm-rise { from { transform: translateY(24px); opacity: .4; } }
.adm-sheet-head, .adm-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.adm-sheet-title, .adm-drawer-title { font-size: 20px; font-weight: 600; }
.adm-sheet-body { display: grid; gap: 12px; }
.adm-sheet-text { font-size: 15.5px; color: var(--ink2); }
.adm-sheet-quiet { font-size: 14px; color: var(--muted); }
.adm-sheet-actions { display: grid; gap: 8px; margin-top: 6px; }
.adm-sheet-actions .btn { width: 100%; }
.adm-whatis-value { font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.adm-whatis-value.is-words { font-size: 17px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.adm-sheet-close { box-shadow: none; background: var(--adm-zebra); }

.adm-drawer[open] { display: flex; justify-content: flex-end; }
.adm-drawer-box { width: 100%; height: 100%; overflow: auto; background: var(--page); padding: 16px 16px calc(28px + var(--adm-safe-b)); animation: adm-rise .22s cubic-bezier(.2, .8, .2, 1); }
.adm-drawer-body { display: grid; gap: 14px; }
.adm-drawer-head .adm-icon-btn { flex: none; }

.adm-toasts { position: fixed; left: 50%; bottom: calc(var(--adm-tabbar) + 20px + var(--adm-safe-b)); transform: translateX(-50%); z-index: 60; pointer-events: none; }
.adm-toast { padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: var(--sh-big); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; white-space: nowrap; }
.adm-toast.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- the More sheet */
.adm-more-list { display: grid; gap: 4px; }
.adm-more-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; font-weight: 500; }
.adm-more-row:nth-child(odd) { background: var(--adm-zebra); }
.adm-more-row .adm-row-chev { margin-left: auto; }
.adm-more-row[aria-current="page"] { color: var(--adm-blue); }

/* ---------------------------------------------------------------- errors, skeleton */
.adm-error { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 30px 20px; }
.adm-error-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--adm-bad-soft); color: var(--adm-bad); }
.adm-error-words { font-size: 16px; color: var(--ink2); max-width: 420px; }
.adm-skel { display: grid; gap: 14px; margin-top: 12px; }
.adm-skel-line, .adm-skel-tile, .adm-skel-block { background: var(--skel); border-radius: var(--r2); animation: adm-pulse 1.2s ease-in-out infinite; }
.adm-skel-line.is-title { width: 40%; height: 30px; }
.adm-skel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.adm-skel-tile { height: 96px; }
.adm-skel-block { height: 220px; }
@keyframes adm-pulse { 50% { opacity: .55; } }

/* ---------------------------------------------------------------- sign-in */
.adm-signin { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background: radial-gradient(70% 45% at 50% 0%, rgba(67, 148, 237, .16), transparent 70%), var(--page); }
.adm-signin-box { width: 100%; max-width: 400px; background: var(--card); border-radius: 28px; box-shadow: var(--sh-big); padding: 28px 22px; display: grid; gap: 18px; }
.adm-signin-brand { display: flex; align-items: center; gap: 10px; }
.adm-signin-title { font-size: 26px; font-weight: 600; letter-spacing: -.015em; }
.adm-signin-sub { font-size: 15px; color: var(--muted); margin-top: 4px; }
.adm-form { display: grid; gap: 14px; }
.adm-field { display: grid; gap: 6px; }
.adm-label { font-size: 14px; font-weight: 500; color: var(--ink2); }
.adm-input { width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--adm-field); font: 400 16px Gantari, system-ui, sans-serif; color: var(--ink); }
.adm-input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(67, 148, 237, .18); background: #fff; }
.adm-pw { position: relative; }
.adm-pw .adm-input { padding-right: 74px; }
.adm-pw-eye { position: absolute; right: 6px; top: 7px; height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--card); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.adm-form .btn { width: 100%; height: 50px; }
.adm-msg { min-height: 21px; font-size: 14.5px; color: var(--adm-bad); }
.adm-msg.is-quiet { color: var(--muted); }
.adm-code { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.adm-code-box { width: 100%; height: 52px; border: 0; border-radius: 12px; background: var(--adm-field); text-align: center; font: 600 22px Gantari, system-ui, sans-serif; color: var(--ink); }
.adm-code-box:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); background: #fff; }
.adm-meter { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.adm-meter-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 120px; }
.adm-meter-bar { height: 6px; border-radius: 3px; background: var(--adm-field); }
.adm-meter[data-level="1"] .adm-meter-bar:nth-child(-n+1) { background: var(--adm-bad); }
.adm-meter[data-level="2"] .adm-meter-bar:nth-child(-n+2) { background: var(--adm-orange); }
.adm-meter[data-level="3"] .adm-meter-bar:nth-child(-n+3) { background: var(--adm-blue); }
.adm-meter[data-level="4"] .adm-meter-bar { background: var(--adm-ok); }
button.adm-quiet-link { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 500; }
.adm-quiet-link { justify-self: start; font-size: 14.5px; color: var(--label, #174F95); text-decoration: none; font-weight: 500; }
.adm-quiet-link:hover { text-decoration: underline; }
.is-shake { animation: adm-shake .32s; }
@keyframes adm-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------------------------------------------------------------- wider screens */
@media (min-width: 720px) {
  .adm-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .adm-kpis.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .adm-card { padding: 22px; }
  .adm-split-value { font-size: 18px; }
  .adm-sheet[open] { align-items: center; }
  .adm-sheet-box { max-width: 440px; border-radius: 28px; padding-bottom: 22px; }
  .adm-drawer-box { max-width: 520px; box-shadow: var(--sh-big); }
}

@media (min-width: 1024px) {
  .adm-side {
    position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--adm-side); display: flex; flex-direction: column; gap: 22px; padding: 22px 16px;
    background: var(--card); box-shadow: 4px 0 24px rgba(20, 30, 60, .05);
  }
  .adm-side[hidden] { display: none; }
  body.is-in { background: linear-gradient(to right, var(--card) var(--adm-side), var(--page) var(--adm-side)); }
  .adm-nav { display: grid; gap: 2px; }
  .adm-nav-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-weight: 500; color: var(--ink2); }
  .adm-nav-link:hover { background: var(--adm-zebra); }
  .adm-nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
  .adm-nav-link[aria-current="page"] .adm-ico { color: var(--adm-blue); }
  .adm-side-foot { margin-top: auto; display: grid; gap: 12px; }
  .adm-side-note { font-size: 13px; color: var(--muted); }
  .adm-top { margin-left: var(--adm-side); grid-template-columns: 1fr auto; grid-template-areas: "range actions"; padding: 16px 28px; }
  .adm-top-brand { display: none; }
  .adm-range { justify-self: start; display: inline-flex; }
  .adm-top.is-no-range { grid-template-areas: "range actions"; }
  .adm-range-btn { padding: 0 16px; }
  .adm-signout { display: inline-flex; }
  .adm-tabs { display: none; }
  .adm-main { margin-left: var(--adm-side); padding: 4px 28px 48px; }
  .adm-toasts { bottom: 28px; }
  .adm-page-title { font-size: 32px; }
  .adm-grid-2.is-wide-first { grid-template-columns: 1.5fr 1fr; }
  .adm-grid-2.is-today { grid-template-columns: 1fr 1.4fr; }
}

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