/* Notalic v3, layered on emerald.css: a soft canvas with large rounded cards, a floating menu,
   one emerald gradient card per page, pill rows, sentence-case labels, and on phones a floating
   dark menu bar. Dark is the default theme; light is the switch. */

:root {
  --desk: #edf2ef; --paper: #ffffff; --paper-2: #f5f8f6; --rule: #e2e9e5; --rule-strong: #c9d6cf;
  --r-card: 22px; --rail: 272px; --rail-mini: 96px;
  --shadow: 0 1px 2px rgba(12, 40, 30, .04), 0 8px 24px rgba(12, 40, 30, .06);
  --shadow-lift: 0 2px 6px rgba(12, 40, 30, .06), 0 16px 36px rgba(12, 40, 30, .1);
  --grad-hero: radial-gradient(160px 160px at 88% 8%, rgba(170, 255, 215, .32), transparent 70%),
    radial-gradient(70% 90% at 100% 0%, rgba(132, 238, 190, .3), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(0, 30, 20, .55), transparent 65%),
    linear-gradient(140deg, #003f2a 0%, #005c3e 45%, #00764f 100%);
  --pill-row: color-mix(in srgb, var(--pen-wash) 55%, var(--paper));
  --segment-on: #13201c; --segment-on-ink: #ffffff;
  --nav-bar: #13201c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #070d0b; --paper: #0f1815; --paper-2: #14201c; --rule: #1d2b27; --rule-strong: #2c3f39;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .35);
    --pill-row: #14211d; --segment-on: #e5eeeb; --segment-on-ink: #0b1411; --nav-bar: #16231f;
  }
}
:root[data-theme="dark"] {
  --desk: #070d0b; --paper: #0f1815; --paper-2: #14201c; --rule: #1d2b27; --rule-strong: #2c3f39;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .35);
  --pill-row: #14211d; --segment-on: #e5eeeb; --segment-on-ink: #0b1411; --nav-bar: #16231f;
}
body { background: var(--desk); }

/* --- floating menu --------------------------------------------------------------- */
.rail { position: sticky; top: 16px; height: calc(100vh - 32px); margin: 16px 0 16px 16px; padding: 22px 16px 16px; border: 0; border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
:root[data-theme="dark"] .rail { box-shadow: 0 0 0 1px var(--rule); }
.rail .brand { padding: 0 6px 26px; }
.rail .brand b { color: var(--ink); font-size: 20px; }
.navlink { min-height: 48px; border-radius: 999px; padding: 0 16px; }
.navlink[aria-current="page"] { box-shadow: 0 8px 20px rgba(0, 102, 68, .28); }
.rail .system { border: 0; border-radius: 18px; background: var(--paper-2); box-shadow: none; }

/* --- header: title left, theme and person right ------------------------------------- */
.topbar { min-height: 92px; padding: 22px 32px 10px; background: color-mix(in srgb, var(--desk) 86%, transparent); backdrop-filter: blur(10px); border: 0; }
.topbar h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.topbar .sub { font-size: 14.5px; margin-top: 4px; }
.head-tools { display: flex; align-items: center; gap: 10px; margin-left: 6px; }
.theme-toggle.icon-only { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); box-shadow: var(--shadow); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle.icon-only:hover { color: var(--pen); }
.theme-toggle.icon-only svg { width: 20px; height: 20px; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 4px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow); }
.user-chip .avatar { width: 40px; height: 40px; }
.user-chip .who-text { display: grid; line-height: 1.2; }
.user-chip .who-text b { font-size: 13.5px; }
.user-chip .who-text span { font-size: 12px; color: var(--pencil); }
.user-chip.compact { padding: 0; background: none; box-shadow: none; }
.apphead { display: none; }
.page { padding: 18px 32px 64px; }

/* --- the base pieces, rounder --------------------------------------------------------- */
.sheet, .card { border-radius: var(--r-card); border-color: transparent; box-shadow: var(--shadow); }
:root[data-theme="dark"] .sheet, :root[data-theme="dark"] .card, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .stat { border-color: var(--rule); }
.btn { border-radius: 999px; padding: 0 18px; }
.btn.small { border-radius: 999px; }
.input, select.input, textarea.input { border-radius: 14px; }
.search .input { border-radius: 999px; min-height: 46px; padding-left: 42px; box-shadow: var(--shadow); border-color: transparent; }
.search svg { left: 16px; top: 15px; }
.segmented { border-radius: 999px; padding: 5px; box-shadow: var(--shadow); }
.segmented button { border-radius: 999px; padding: 10px 16px; }
.segmented button[aria-pressed="true"] { background: var(--segment-on); color: var(--segment-on-ink); box-shadow: none; }
.stamp { text-transform: none; letter-spacing: 0; font: 600 12.5px/1.2 var(--text); }
.daygroup td { text-transform: none; letter-spacing: 0; font-size: 13px; }
.daygroup td .muted { text-transform: none; }
dialog { border-radius: 24px; }

/* Headline cards on every other page, laid out like the dashboard's: a round icon beside the label,
   a big figure under it, the explanation below, the chart in the corner. */
.stats { gap: 18px; margin-bottom: 22px; }
.stat { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 10px; row-gap: 10px; min-height: 152px; padding: 20px 22px; border-radius: var(--r-card); border-color: transparent; align-items: center; }
.stat::before, .stat::after { display: none; }
.stat-icon { grid-row: 1; grid-column: 1; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--tone) 14%, var(--paper)); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-label { grid-row: 1; grid-column: 2; text-transform: none; letter-spacing: 0; font: 550 14px/1.3 var(--text); color: var(--ink); }
.stat-value { grid-row: 2; grid-column: 1 / -1; font-size: 34px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.stat-sub { grid-row: 3; grid-column: 1 / -1; align-self: start; margin-top: 0; color: var(--pencil); }
.stat:has(.stat-viz) .stat-sub { max-width: 15ch; }
.stat-viz { right: 18px; bottom: 16px; }
.stat-viz:has(.ring) { top: auto; bottom: 16px; transform: none; }
.stat[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--tone), var(--shadow-lift); }
button.stat:hover { transform: translateY(-2px); }

/* Tables on every page: rows as soft rounded pills, like the dashboard's list. */
.sheet > .table-wrap > table.grid, .sheet > div > .table-wrap > table.grid { border-collapse: separate; border-spacing: 0 6px; padding: 0 10px; }
.sheet > .table-wrap > table.grid th, .sheet > div > .table-wrap > table.grid th { background: transparent; border: 0; color: var(--pencil); font-weight: 550; }
.sheet > .table-wrap > table.grid td, .sheet > div > .table-wrap > table.grid td { border: 0; background: var(--pill-row); }
.sheet > .table-wrap > table.grid tr > td:first-child, .sheet > div > .table-wrap > table.grid tr > td:first-child { border-radius: 16px 0 0 16px; }
.sheet > .table-wrap > table.grid tr > td:last-child, .sheet > div > .table-wrap > table.grid tr > td:last-child { border-radius: 0 16px 16px 0; }
.sheet > .table-wrap > table.grid tr > td:only-child, .sheet > div > .table-wrap > table.grid tr > td:only-child { border-radius: 16px; }
.sheet table.grid tbody tr.daygroup td { background: transparent; padding-top: 14px; padding-bottom: 4px; }
.sheet > .table-wrap > table.grid tbody tr:not(.daygroup):hover td, .sheet > div > .table-wrap > table.grid tbody tr:not(.daygroup):hover td { background: color-mix(in srgb, var(--pen-wash) 85%, var(--paper)); }

/* --- inbox dashboard ------------------------------------------------------------------ */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; grid-template-areas: "kpis side" "queue side"; gap: 20px 22px; align-items: start; }
.queue .cell-sub.hide-phone, .queue .col-lines { display: none; }
.queue .who bdi { min-width: 0; }
.queue td:nth-child(3) { min-width: 180px; }
.dash > .notice { grid-column: 1 / -1; }
.kpis { grid-area: kpis; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dash-side { grid-area: side; display: grid; gap: 20px; }
.queue { grid-area: queue; min-width: 0; }

.kpi { position: relative; display: grid; align-content: start; gap: 10px; min-height: 152px; padding: 20px 22px; border-radius: var(--r-card); border: 1px solid transparent; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.kpi-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 550; color: var(--ink); }
.kpi-label svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--pen-wash); color: var(--pen); flex: none; }
.kpi-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kpi-row b { font-size: 34px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.kpi-viz { position: absolute; right: 16px; bottom: 14px; color: var(--pen); }
.trend { display: inline-flex; align-items: center; gap: 3px; justify-self: start; padding: 3px 9px 3px 6px; border-radius: 999px; font: 650 12.5px/1.3 var(--text); }
.trend svg { width: 14px; height: 14px; }
.trend.up { background: var(--ledger-wash); color: var(--ledger); }
.trend.down { background: var(--stamp-wash); color: var(--stamp); }
.trend.flat { background: var(--paper-2); color: var(--pencil); padding: 3px 10px; }

.work-card { position: relative; overflow: hidden; padding: 22px; border-radius: 26px; background: var(--grad-hero); color: #fff; box-shadow: 0 18px 40px -12px rgba(0, 70, 45, .55); isolation: isolate; }
.work-card::after { content: ""; position: absolute; right: 18px; top: 18px; width: 72px; height: 44px; background-image: radial-gradient(rgba(255, 255, 255, .45) 1.2px, transparent 1.3px); background-size: 9px 9px; z-index: -1; opacity: .8; }
.work-card h2 { font-size: 17px; font-weight: 650; color: #fff; margin-bottom: 16px; }
.work-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-tile { display: grid; gap: 6px; text-align: left; padding: 16px; min-height: 104px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; backdrop-filter: blur(6px);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease; }
.work-tile span { font-size: 13.5px; font-weight: 550; color: #fff; }
.work-tile b { font-size: 32px; font-weight: 750; letter-spacing: -.03em; line-height: 1; align-self: end; }
.work-tile:hover { background: rgba(255, 255, 255, .17); transform: translateY(-2px); }
.work-tile[aria-pressed="true"] { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .55); }
.work-tile:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.dash-card { padding: 20px 22px; background: var(--paper); }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dash-head h2 { font-size: 16px; font-weight: 650; }
.dash-head a { color: var(--pen); font-weight: 600; text-decoration: none; }
.dash-head a:hover { text-decoration: underline; }
.dash-big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; font-size: 13.5px; }
.dash-big b { font-size: 28px; font-weight: 750; letter-spacing: -.03em; }
.pillbars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; height: 140px; align-items: end; }
.pillbar { position: relative; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--pen-wash) 70%, var(--paper)); }
.pillbar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--pen) 38%, var(--paper)); transition: height 600ms var(--ease); }
.pillbar.peak i { background: linear-gradient(180deg, #19b37f, #006644); box-shadow: 0 8px 18px -6px rgba(0, 102, 68, .6); }
.pillbar em { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #00563a; font: 700 11px/1 var(--text); font-style: normal; }
.pillbar-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--pencil); }

.toplist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.toplist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--pill-row); }
.toplist li.first { background: linear-gradient(110deg, #005c3e, #00815a); color: #fff; box-shadow: 0 10px 22px -10px rgba(0, 92, 62, .7); }
.toplist .avatar { width: 36px; height: 36px; }
.toplist li.first .avatar { background: #1f7458 !important; color: #fff !important; }
.toplist-main { display: grid; gap: 6px; min-width: 0; }
.toplist-main bdi { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00815a, #3fd39d); }
.toplist li.first .meter { background: rgba(255, 255, 255, .25); }
.toplist li.first .meter i { background: #fff; }
.toplist-val { display: grid; justify-items: end; gap: 2px; }
.toplist-val b { font-size: 14px; }
.toplist li.first .muted { color: rgba(255, 255, 255, .85); }

/* The work list: rows as rounded pills, the selected row in emerald. */
.queue .toolbar { margin-bottom: 12px; }
.queue .sheet { padding: 6px 12px 10px; }
.queue table.grid { border-collapse: separate; border-spacing: 0 6px; }
.queue table.grid th { background: transparent; border: 0; padding: 12px 14px 6px; color: var(--pencil); font-weight: 550; }
.queue table.grid td { border: 0; background: var(--pill-row); padding: 14px; }
.queue table.grid td:first-child { border-radius: 16px 0 0 16px; }
.queue table.grid td:last-child { border-radius: 0 16px 16px 0; }
.queue table.grid tbody tr:hover td { background: color-mix(in srgb, var(--pen-wash) 85%, var(--paper)); }
.queue table.grid tbody tr[aria-selected="true"] td { background: #006644; color: #fff; }
.queue table.grid tbody tr[aria-selected="true"] { box-shadow: 0 10px 22px -12px rgba(0, 92, 62, .8); }
.queue tr[aria-selected="true"] :is(a, .muted, .cell-sub, .state, .small, .num, bdi) { color: #fff !important; }
.queue tr[aria-selected="true"] .state i { background: #fff; }
.queue tr[aria-selected="true"] .hint.warn { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; }
.queue tr[aria-selected="true"] .avatar { background: #1f7458 !important; color: #fff !important; }

/* --- tablets --------------------------------------------------------------------------- */
@media (min-width: 761px) and (max-width: 1180px) {
  .rail { padding: 20px 12px 16px; }
  .navlink { border-radius: 18px; }
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "kpis" "side" "queue"; }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-card { grid-column: 1 / -1; }
  .work-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topbar, .page { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1181px) and (max-width: 1320px) {
  .dash { grid-template-columns: minmax(0, 1fr) 320px; }
  .kpi-row b { font-size: 28px; }
}

/* --- phones: app header, floating dark menu bar ------------------------------------------ */
@media (max-width: 760px) {
  .apphead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 2px; }
  .apphead .brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; }
  .apphead .brand b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
  .apphead .grow { flex: 1; }
  .apphead .avatar { width: 44px; height: 44px; }
  .head-tools { display: none; }
  .topbar { position: static; min-height: 0; padding: 14px 16px 6px; background: none; backdrop-filter: none; flex-wrap: wrap; }
  .topbar h1 { font-size: 27px; }
  .topbar .sub { display: block; font-size: 14px; }
  .topbar .title { flex: 1 1 100%; }
  .page { padding: 10px 16px 120px; }

  .rail, .shell.mini .rail { position: fixed; z-index: 30; top: auto; left: 50%; right: auto; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; max-width: calc(100vw - 24px); height: auto; margin: 0;
    flex-direction: row; justify-content: center; gap: 4px; padding: 7px; border-radius: 999px; background: var(--nav-bar); backdrop-filter: none; box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .06); }
  .navlink, .shell.mini .navlink { flex: none; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; justify-content: center; color: rgba(255, 255, 255, .78); }
  .navlink:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .navlink svg { width: 21px; height: 21px; }
  .navlink > span:not(.count), .shell.mini .navlink > span:not(.count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .navlink[aria-current="page"] { background: linear-gradient(140deg, #19b37f, #006644); color: #fff; box-shadow: 0 8px 18px -4px rgba(0, 150, 100, .6); }
  .navlink .count { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; font-size: 11px; line-height: 19px; box-shadow: 0 0 0 2px var(--nav-bar); }
  .decision { bottom: 84px; }
  .toasts { bottom: 96px; }

  .dash { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; gap: 16px; }
  .dash-side { display: contents; }
  .kpis { grid-area: auto; order: 1; display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { scroll-snap-align: start; min-height: 136px; padding: 16px 18px; }
  .kpi-row b { font-size: 28px; }
  .work-card { order: 2; padding: 18px; }
  .work-tile { min-height: 92px; padding: 14px; }
  .work-tile b { font-size: 28px; }
  .queue { grid-area: auto; order: 3; }
  .stats { gap: 12px; }
  .stat { min-height: 0; padding: 14px 16px; row-gap: 8px; }
  .stat-icon { width: 30px; height: 30px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-label { font-size: 13px; }
  .stat-value { font-size: clamp(22px, 7vw, 28px); }
  .dash-card:has(.pillbars) { order: 4; }
  .dash-card:has(.toplist) { order: 5; }
  /* Each LPO becomes a small card: status and time, customer and total, LPO number. */
  .queue .sheet { padding: 8px; }
  .queue .table-wrap { overflow: visible; }
  .queue table.grid, .queue table.grid tbody { display: block; }
  .queue table.grid thead { display: none; }
  .queue table.grid tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 14px; margin-bottom: 8px; border-radius: 18px; background: var(--pill-row); }
  .queue table.grid tbody tr:last-child { margin-bottom: 0; }
  .queue table.grid td { display: block; padding: 0; background: none !important; border-radius: 0 !important; min-width: 0 !important; }
  .queue table.grid td.hide-phone { display: none; }
  .queue table.grid td:nth-child(1) { grid-area: 1 / 1; }
  .queue table.grid td:nth-child(7) { grid-area: 1 / 2; justify-self: end; }
  .queue table.grid td:nth-child(3) { grid-area: 2 / 1; }
  .queue table.grid td:nth-child(5) { grid-area: 2 / 2; justify-self: end; text-align: right; }
  .queue table.grid td:nth-child(2) { grid-area: 3 / 1 / 4 / 3; }
  .queue table.grid td:nth-child(2) a { font-size: 13px; }
  .queue table.grid tbody tr[aria-selected="true"] { background: #006644; }
  .queue table.grid tbody tr:hover { background: color-mix(in srgb, var(--pen-wash) 85%, var(--paper)); }
  .queue table.grid tbody tr[aria-selected="true"]:hover { background: #006644; }
  .queue .who { gap: 10px; }
  .queue .who bdi { font-weight: 600; }
  .search .input { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .work-tile, .pillbar i { transition: none; } }

/* --- Onboarding v2: sign-in buttons, more options, document switches --------------------- */
.mail-signin { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.signin-btn { display: flex; align-items: center; gap: 14px; justify-content: flex-start; min-height: 64px; padding: 12px 18px;
  border-radius: 16px; border: 1.5px solid var(--rule-strong); background: var(--paper); color: var(--ink); text-align: left; text-decoration: none; }
.signin-btn:hover { border-color: var(--pen); box-shadow: var(--shadow); }
.signin-btn b { display: block; font-size: 15px; }
.signin-btn small { display: block; color: var(--pencil); font-size: 13px; font-weight: 450; }
.signin-logo { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--rule); }
.signin-logo svg { width: 20px; height: 20px; }
.more-options { border: 1px solid var(--rule); border-radius: 16px; background: var(--paper-2); }
.more-options > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--ink); list-style-position: inside; }
.more-options[open] > summary { border-bottom: 1px solid var(--rule); }
.more-options > .stack, .more-options > .more-body { padding: 16px; }
.onboard-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-switches { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.doc-switches legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.doc-switch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); cursor: pointer; }
.doc-switch b { display: block; }
.doc-switch small { display: block; color: var(--pencil); font-size: 13px; }
.doc-switch input[role="switch"] { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 13px; margin: 0;
  background: var(--rule-strong); position: relative; cursor: pointer; transition: background .15s; }
.doc-switch input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.doc-switch input[role="switch"]:checked { background: #006644; }
.doc-switch input[role="switch"]:checked::after { transform: translateX(18px); }
.doc-switch input[role="switch"]:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.importing { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.importing .spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--rule-strong); border-top-color: #006644; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .importing .spinner { animation-duration: 3s; } .doc-switch input[role="switch"], .doc-switch input[role="switch"]::after { transition: none; } }

/* --- lines across the top: support view, maintenance, announcements ------------------------------ */
.banners { display: grid; gap: 8px; padding: 14px 32px 0; }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.banner.info { background: var(--ledger-wash); color: var(--ledger); }
.banner.warning { background: #fff3d6; color: #6b4300; }
.banner.support { background: #1d2733; color: #fff; }
.banner.support .btn { background: #fff; color: #1d2733; border-color: transparent; }
:root[data-theme="dark"] .banner.warning { background: #3a2c0c; color: #ffd98a; }
:root[data-theme="dark"] .banner.support { background: #e8eef5; color: #101820; }
:root[data-theme="dark"] .banner.support .btn { background: #101820; color: #fff; }
.auth + .banners, body > #app > .banners { padding: 12px 16px 0; }
@media (max-width: 760px) { .banners { padding: 10px 16px 0; } }

/* The logo (see /static/brand/brand.css). The narrow menu shows the N alone. */
.brand .logo { --logo-h: 30px; }
.rail .brand .logo { --logo-h: 34px; }
.shell.mini .rail .logo-word { display: none; }
@media (min-width: 761px) and (max-width: 1180px) { .rail .logo-word { display: none; } }
@media (max-width: 760px) { .apphead .brand .logo { --logo-h: 28px; } }
