/* fingb v2 base styles.
 * Reskin by changing the tokens in :root only; components never use raw colours.
 * No inline styles anywhere (CSP style-src-attr 'none'). */

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/roboto-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url("../vendor/fonts/roboto-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --font: Roboto, system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --gap: 16px;
  --topbar-h: 56px;
  --sidebar-w: 256px;
  --rail-w: 238px;
  --logo-filter: none;   /* the logo goes white on the dark theme, as in the template */

  /* Palette from the design template (fingb_v2_template): plum accent on a cool grey-blue ground. */
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --surface-3: #e7edf5;
  --text: #1b2836;
  --muted: #536274;
  --muted-2: #8390a1;
  --border: #dde4ec;
  --border-strong: #c3cedc;
  --primary: #650355;
  --primary-hover: #4e0242;
  --primary-ink: #ffffff;
  --primary-soft: #f4e7f1;
  --accent-ink: #4a0240;
  --danger: #d32b32;
  --danger-soft: #fce8e9;
  --ok: #0e9f4f;
  --ok-soft: #e2f5ea;
  --warn: #b4700a;
  --warn-soft: #fcf0db;
  --info: #1f6fd4;
  --info-soft: #e4effc;
  --focus: #9b3e8b;
  --shadow: 0 1px 2px rgb(27 40 54 / 7%), 0 1px 3px rgb(27 40 54 / 5%);
  --shadow-md: 0 6px 16px rgb(27 40 54 / 10%), 0 2px 4px rgb(27 40 54 / 5%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --logo-filter: brightness(0) invert(1);
    --bg: #060b13;
    --surface: #0f1826;
    --surface-2: #152134;
    --surface-3: #1d2c42;
    --text: #e6edf6;
    --muted: #9fb0c4;
    --muted-2: #72849a;
    --border: #1f2e44;
    --border-strong: #2c3f5a;
    --primary: #d07fc0;
    --primary-hover: #e2a2d6;
    --primary-ink: #2a0b25;
    --primary-soft: #2c1228;
    --accent-ink: #f4daee;
    --danger: #f0676c;
    --danger-soft: #2e1517;
    --ok: #2bbe6b;
    --ok-soft: #0b2a19;
    --warn: #dfa24a;
    --warn-soft: #2a2011;
    --info: #6ba1f6;
    --info-soft: #12213c;
    --focus: #e2a2d6;
    --shadow: 0 1px 2px rgb(0 0 0 / 50%);
    --shadow-md: 0 6px 18px rgb(0 0 0 / 45%);
  }
}
:root[data-theme="dark"] {
    --logo-filter: brightness(0) invert(1);
    --bg: #060b13;
    --surface: #0f1826;
    --surface-2: #152134;
    --surface-3: #1d2c42;
    --text: #e6edf6;
    --muted: #9fb0c4;
    --muted-2: #72849a;
    --border: #1f2e44;
    --border-strong: #2c3f5a;
    --primary: #d07fc0;
    --primary-hover: #e2a2d6;
    --primary-ink: #2a0b25;
    --primary-soft: #2c1228;
    --accent-ink: #f4daee;
    --danger: #f0676c;
    --danger-soft: #2e1517;
    --ok: #2bbe6b;
    --ok-soft: #0b2a19;
    --warn: #dfa24a;
    --warn-soft: #2a2011;
    --info: #6ba1f6;
    --info-soft: #12213c;
    --focus: #e2a2d6;
    --shadow: 0 1px 2px rgb(0 0 0 / 50%);
    --shadow-md: 0 6px 18px rgb(0 0 0 / 45%);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: 1.05rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.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; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* --- Buttons & forms --------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-small { min-height: 30px; padding: 0 10px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.icon-btn { background: none; border: 0; padding: 8px; cursor: pointer; color: inherit; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input, .field select, .toolbar input, .locale-switch select {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); min-height: 40px; padding: 0 12px; width: 100%; }
.hint { font-weight: 400; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
.toolbar { display: flex; gap: 8px; margin-bottom: var(--gap); max-width: 480px; }
.locale-switch select { min-height: 32px; width: auto; padding: 0 8px; }

.alert { border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: var(--gap); }
.alert ul { margin: 0; padding-left: 18px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* small helpers used by the admin tables and forms */
form.inline { display: inline; margin: 0; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.badge-job-done { background: var(--ok-soft); color: var(--ok); }
.badge-job-failed { background: var(--danger-soft); color: var(--danger); }
.badge-job-running, .badge-job-queued { background: var(--warn-soft); color: var(--warn); }
.job-progress { width: 100%; max-width: 480px; height: 14px; }
.badge-imported { background: var(--ok-soft); color: var(--ok); }
.badge-not_covered { background: var(--danger-soft); color: var(--danger); }
.field.narrow input, .field.narrow select { max-width: 200px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; background: var(--surface-2); }
.badge-active { background: var(--ok-soft); color: var(--ok); }
.badge-suspended, .badge-closed { background: var(--danger-soft); color: var(--danger); }

/* --- Cards & tables ---------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: var(--gap); }
.card-narrow { max-width: 480px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.grid-2 { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* --- Auth pages -------------------------------------------------------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.rail-help { border-top: 1px solid var(--border); padding: 8px 8px 0; display: grid; gap: 2px; }
.auth-logo { text-align: center; margin-bottom: 18px; }
.auth-logo img { max-width: 100%; height: auto; display: inline-block; filter: var(--logo-filter); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.auth-title { font-size: 1.3rem; margin: 12px 0 16px; }
.auth-links { margin: 16px 0 0; text-align: center; }
.auth-foot { margin-top: 20px; display: flex; justify-content: center; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand-lg { font-size: 1.6rem; color: var(--primary); }

/* --- App shell: the Console (Phase 7.10) -------------------------------- */
.console { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.console-main { min-width: 0; display: flex; flex-direction: column; }
.ic { width: 20px; height: 20px; flex: none; }

/* the left rail: logo, the business, a filter, the menu, who is signed in */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 0; background: var(--surface); border-right: 1px solid var(--border); z-index: 30; }
.rail-head { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.rail-logo { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  background: linear-gradient(160deg, #8a1f75, var(--primary)); box-shadow: 0 2px 6px rgb(101 3 85 / 35%), inset 0 1px 0 rgb(255 255 255 / 30%); }
.rail-logo-sm { display: none; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand-lg { font-size: 1.6rem; color: var(--primary); }
.rail-biz { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.rail-biz-l { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.rail-biz-n { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-find { position: relative; display: block; }
.rail-find .ic { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--muted-2); pointer-events: none; }
.rail-find input { width: 100%; height: 36px; padding: 0 12px 0 36px; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.rail-find input::placeholder { color: var(--muted-2); }
.rail-nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 12px; scrollbar-width: thin; }
.rail-none { margin: 12px 8px; color: var(--muted); font-size: .9rem; }
.nav-link, .nav-group > summary { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; cursor: pointer; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-link .ic, .nav-group > summary .ic:first-child { color: var(--muted); }
.nav-link:hover, .nav-group > summary:hover { background: var(--surface-2); }
.nl-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-link.is-active .ic { color: var(--primary); }
.nav-link.is-active::before { content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-group > summary > .ic:last-child { width: 15px; height: 15px; color: var(--muted-2); transition: transform .15s; }
.nav-group[open] > summary > .ic:last-child { transform: rotate(90deg); }
.nav-child { padding-left: 44px; font-size: .93rem; font-weight: 400; }
.nav-child.is-active::before { left: 28px; top: 50%; bottom: auto; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; }
.nav-hide { display: none !important; }
.rail-foot { display: flex; align-items: center; gap: 4px; padding: 10px 0 12px; border-top: 1px solid var(--border); }
.rail-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 10px; color: var(--text); text-decoration: none; }
.rail-user:hover { background: var(--surface-2); }
.rail-av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; font-size: .85rem; background: linear-gradient(160deg, #5b8def, #2f66d8); }
.rail-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rail-who b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-who small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-out { margin: 0; }
.rail-out .icon-btn { border-radius: 10px; color: var(--muted); }
.rail-out .icon-btn:hover { background: var(--surface-2); color: var(--danger); }
.rail-scrim { display: none; }

/* the top bar: the jump box, what the business has left, the language */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-spacer { flex: 1; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.jump { flex: 0 1 380px; min-width: 0; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.jump:hover { border-color: var(--border-strong); }
.jump .ic { width: 17px; height: 17px; }
.jump-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jump kbd { font: 600 .72rem var(--mono); padding: 2px 6px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted-2); background: var(--surface); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip .ic { width: 16px; height: 16px; color: var(--muted); }
a.chip:hover { background: var(--surface-2); }
.chip-warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.feed-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--gap); }
.feed-tabs form { margin: 0; }
.expiry-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.expiry-quick input[type="date"] { width: auto; }
.expiry-quick button.chip { border-radius: 999px; font-family: inherit; cursor: pointer; }
a.chip.is-on { background: var(--primary-soft, var(--surface-2)); border-color: var(--primary, var(--border)); color: var(--primary, var(--text)); }
.chip-warn .ic { color: var(--warn); }
.chip-bad { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.chip-bad .ic { color: var(--danger); }
.seg { display: inline-flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.seg button { min-width: 38px; padding: 5px 10px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.seg button.is-on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

.content { flex: 1; min-width: 0; padding: 24px 16px 48px; }
@media (min-width: 720px) { .content { padding: 28px 32px 48px; } }
.page-title { font-size: 1.5rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.crumb { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }

.nav-toggle { display: none; }
@media (max-width: 1100px) { .chip-licence { display: none; } .jump kbd { display: none; } }
@media (max-width: 899px) {
  .console { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-flex; }
  .rail-logo-sm { display: grid; }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-md); z-index: 40; }
  body.nav-open .rail { transform: none; }
  .rail-scrim { position: fixed; inset: 0; z-index: 35; background: rgb(10 16 26 / 45%); }
  body.nav-open .rail-scrim { display: block; }
  .topbar { padding: 0 10px; gap: 8px; }
  .jump { flex: 1; }
  .topbar-spacer { display: none; }
  .chip-credits { display: none; }
}
@media (max-width: 520px) { .jump-t { display: none; } .jump { flex: none; width: 40px; justify-content: center; padding: 0; } .topbar-spacer { display: block; } }

.theme-btn { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-btn .ic-sun { display: none; }
:root[data-theme="dark"] .theme-btn .ic-sun { display: block; }
:root[data-theme="dark"] .theme-btn .ic-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .ic-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .ic-moon { display: none; } }

/* --- Command palette ---------------------------------------------------- */
.palette { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 12px 0; background: rgb(10 16 26 / 48%); backdrop-filter: blur(3px); }
.palette[hidden] { display: none; }
.palette-box { width: min(580px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-md); overflow: hidden; }
.palette-in { width: 100%; height: 54px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; }
.palette-in:focus { outline: none; }
.palette-h { padding: 10px 18px 4px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.palette-list { list-style: none; margin: 0; padding: 4px 6px 8px; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette-list li.is-active { background: var(--primary-soft); color: var(--primary); }
.palette-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.is-active .palette-ic { background: var(--surface); color: var(--primary); }
.palette-n { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-g { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.palette-none { margin: 0; padding: 22px 18px; color: var(--muted); }

/* --- Placeholders ------------------------------------------------------ */
.placeholder-card p { max-width: 60ch; }
.placeholder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.ph { height: 90px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ph-wide { grid-column: 1 / -1; }
.ph-tall { height: 180px; }

/* --- Pagination (CI4 default pager markup) ----------------------------- */
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; }
.pagination a { display: block; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; }
.pagination .active a { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* "choose a plan" (Plans) */
.plans { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin: 12px 0; }
.plan-card { margin: 0; }
.plan-price { font-size: 1.5rem; font-weight: 800; margin: 4px 0; }

/* website sign-up: the field only a bot fills stays out of sight (Signup) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.btn-google { text-align: center; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }

/* --- The shell in the metrics of the design template (fingb_v2_template): the rail and the top bar ------------------------------------------------------------ */
.rail { gap: 0; padding: 0; }
.rail-head { padding: 16px 16px 12px; }
.rail-brand { display: block; line-height: 0; }
.rail-logo-img { height: 30px; width: auto; display: block; filter: var(--logo-filter); }
.rail-biz { position: relative; margin: 0 12px 12px; padding: 9px 11px 9px 26px; border-radius: 9px; }
.rail-biz::before { content: ""; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 99px; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.rail-biz-l { font-size: 9.5px; letter-spacing: .1em; }
.rail-biz-n { font-size: 13px; }
.rail-find { margin: 0 12px 8px; }
.rail-find .ic { left: 10px; width: 15px; height: 15px; margin-top: -7.5px; }
.rail-find input { height: auto; padding: 7px 10px 7px 30px; font-size: 12.5px; border-radius: 8px; }
.rail-nav { margin: 0; padding: 2px 12px 16px; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.nav-link, .nav-group > summary { gap: 11px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; }
.nav-link .ic, .nav-group > summary .ic:first-child { width: 17px; height: 17px; opacity: .7; }
.nav-link.is-active { color: var(--accent-ink); }
.nav-link.is-active .ic { opacity: 1; }
.nav-link.is-active::before { left: -12px; top: 7px; bottom: 7px; }
.nav-child { padding: 6px 9px 6px 38px; font-size: 12.5px; color: var(--muted); }
.nav-child.is-active { color: var(--primary); font-weight: 700; }
.nav-child.is-active::before { left: 24px; }
.rail-help { margin: 0 12px; padding: 8px 0 0; }
.rail-foot { display: block; padding: 10px 12px; }
.rail-foot-row { display: flex; align-items: center; gap: 4px; }
.rail-av { width: 30px; height: 30px; font-size: 12px; background: linear-gradient(140deg, var(--info), var(--primary)); }
.rail-user { padding: 8px; border-radius: 9px; gap: 10px; }
.rail-who b { font-size: 13px; }
.rail-who small { font-size: 11px; }
.rail-licence { padding: 6px 8px 2px; font-size: 10.5px; line-height: 1.45; color: var(--muted-2); font-weight: 600; }
.rail-licence span { display: block; font-weight: 400; opacity: .85; }

.topbar { height: auto; min-height: 60px; padding: 11px 20px; }
.jump { height: auto; padding: 8px 12px; border-radius: 9px; font-size: 13px; }
@media (min-width: 521px) { .jump { flex: 1 1 auto; max-width: 430px; } }
.chip { padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500; }
.chip b { font-weight: 700; }
.seg { padding: 2px; border-radius: 8px; background: var(--surface-3); }
.seg button { padding: 5px 10px; border-radius: 6px; font-size: 12px; }
.theme-btn { width: 34px; height: 34px; border-radius: 8px; }

/* the expiry chip and the bell, as in the template */
.chip-expiry { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 11px; background: var(--surface-2); }
.chip-expiry .xl { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; line-height: 1.2; }
.chip-expiry .xv { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.chip-expiry.expiry-soon { border-color: var(--warn); background: var(--warn-soft); }
.chip-expiry.expiry-soon .xv { color: var(--warn); }
.chip-expiry.expiry-over { border-color: var(--danger); background: var(--danger-soft); }
.chip-expiry.expiry-over .xv { color: var(--danger); }
.notif { position: relative; }
.notif-btn { position: relative; }
.notif-pip { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 99px; background: var(--danger); border: 2px solid var(--surface); box-sizing: content-box; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; z-index: 50; }
.notif-panel[hidden] { display: none; }
.notif-h { margin: 0; padding: 8px 10px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.notif-n { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--danger-soft); color: var(--danger); }
.notif-none { margin: 0; padding: 10px; color: var(--muted); font-size: 13px; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.notif-i { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; line-height: 1.4; }
.notif-i:hover { background: var(--surface-2); }
.notif-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 99px; background: var(--info); }
.notif-warn .notif-dot { background: var(--warn); }
.notif-crit .notif-dot { background: var(--danger); }
@media (max-width: 899px) { .chip-expiry { display: none; } }

/* --- Phones (mobile audit 2026-10-29, docs/MOBILE_AUDIT.md) --------------- */
/* long addresses, keys and codes wrap instead of pushing the page sideways */
.card a, .card code, .content code { overflow-wrap: anywhere; }
@media (max-width: 899px) {
  /* 16px text in fields: below that, iPhones zoom the page in on every tap */
  :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea):not([type=hidden]) { font-size: 16px; }
  /* header buttons big enough for a thumb */
  .nav-toggle { min-width: 40px; min-height: 40px; justify-content: center; align-items: center; }
  .seg button { min-height: 34px; }
}
