/* The look of the whole app.

   Colours, corners, shadows and sizes are "variables" at the top (the lines
   that start with --). Change one there and it changes everywhere.
   The administrator's main colour, header colour and font (Admin > Look)
   are filled in by the page itself and win over the values here. */

:root {
  /* Colours */
  --bg:#f6f7f9; --card:#ffffff; --text:#1d2330; --muted:#667085; --line:#e4e7ec; --field:#ffffff;
  --soft:#eef2ff; --danger:#c0362c; --ok:#1f7a4d; --ok-bg:#e8f5ee; --bad-bg:#fdecea; --warn-bg:#fff6e0; --warn-line:#f3d58a;
  --accent:#2f5bd3; --on-accent:#ffffff;
  --look-header:var(--card); --look-on-header:var(--text); --look-on-header-muted:var(--muted);   /* the header, unless the administrator chose a colour */
  --header:var(--look-header); --on-header:var(--look-on-header); --on-header-muted:var(--look-on-header-muted);
  --font:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Shapes and sizes */
  --font-size:16px; --h1-size:22px;
  --radius-lg:10px; --radius:8px; --radius-sm:6px; --radius-pill:99px;   /* rounded corners: cards, fields and buttons, small things, labels */
  --card-border:1px solid var(--line); --card-pad:24px; --shadow:none;
  --header-border:1px solid var(--line);
  --th-bg:transparent; --th-text:var(--muted); --th-size:13px; --th-case:none; --th-spacing:normal;   /* table headings */
  --cell-pad:10px 8px;
  --page-width:960px; --page-pad:32px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display:none !important; }
body { margin:0; font:var(--font-size)/1.5 var(--font); background:var(--bg); color:var(--text); min-height:100vh; display:flex; flex-direction:column; }
body > main { flex:1 0 auto; width:100%; }
a { color:var(--accent); }
header { background:var(--header); border-bottom:var(--header-border); }
header .bar { display:flex; align-items:center; gap:16px; padding-block:12px; }
header .brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px; text-decoration:none; color:var(--on-header); margin-right:auto; }
header .brand img { max-height:36px; max-width:160px; display:block; }
header .who, header button.link { color:var(--on-header-muted); font-size:14px; opacity:.85; }
.tabs { display:flex; gap:4px; overflow-x:auto; }
.tabs a { padding:10px 14px; color:var(--on-header-muted); opacity:.8; text-decoration:none; font-weight:600; font-size:15px; border-bottom:3px solid transparent; white-space:nowrap; }
.tabs a:hover { opacity:1; }
.tabs a[aria-current=page] { color:var(--on-header); opacity:1; border-bottom-color:var(--accent); }
:root:not([data-header]) .tabs a[aria-current=page] { color:var(--accent); }
.tabs .admin-tab { margin-left:auto; }
.tabs .admin-tab ~ .admin-tab { margin-left:0; }
.switcher { display:flex; align-items:center; gap:6px; font-size:14px; color:var(--on-header-muted); }
.switcher select { padding:5px 8px; font-size:14px; max-width:200px; }
.acting { background:var(--warn-bg); border-bottom:1px solid var(--warn-line); font-size:14px; }
.acting .wrap { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding-block:6px; }
.lang-picker { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
.lang-picker button { background:none; color:var(--muted); padding:2px 6px; font-weight:500; font-size:14px; }
.lang-picker button[aria-pressed=true] { color:var(--accent); font-weight:700; }
.subnav .app-version { margin-left:auto; align-self:center; font-size:13px; color:var(--muted); white-space:nowrap; }
.subnav .menu-label { font-size:13px; color:var(--muted); font-weight:600; align-self:center; margin-right:4px; }
.text-row td { vertical-align:top; }
.text-row textarea { width:100%; min-height:40px; padding:6px 8px; border:1px solid var(--line); border-radius:var(--radius-sm); font:inherit; font-size:14px; background:var(--field); color:var(--text); resize:vertical; }
.text-row textarea.changed { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset; }
.text-key { font-size:14px; max-width:260px; word-break:break-word; }
.lang-status { display:inline-flex; gap:4px; flex-wrap:wrap; }
.subnav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.subnav a { padding:6px 12px; border-radius:var(--radius-pill); background:var(--card); border:1px solid var(--line); color:var(--text); text-decoration:none; font-size:14px; }
.subnav a[aria-current=page] { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:16px; }
.stat { font-size:28px; font-weight:700; }
.row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.row > * { flex:1 1 200px; }
.actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.linkbox { width:100%; font-family:ui-monospace, monospace; font-size:13px; }
.ok { color:var(--ok); } .bad { color:var(--danger); }
.warn { background:var(--warn-bg); border:1px solid var(--warn-line); border-radius:var(--radius); padding:12px 14px; }
select { padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); font:inherit; background:var(--field); color:var(--text); }
input[type=checkbox] { width:18px; height:18px; margin:0 6px 0 0; accent-color:var(--accent); vertical-align:middle; }
.check label { display:inline; font-weight:500; }
.wrap { max-width:var(--page-width); margin:0 auto; padding-inline:16px; }
main { padding-block:var(--page-pad); }
.card { background:var(--card); border:var(--card-border); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:var(--card-pad); margin-bottom:20px; }
.narrow { max-width:420px; margin-inline:auto; }
h1 { font-size:var(--h1-size); margin:0 0 16px; }
h2 { font-size:17px; margin:0 0 12px; }
label { display:block; font-size:14px; font-weight:600; margin:12px 0 4px; }
input:not([type=checkbox]):not([type=file]):not([type=hidden]):not([type=radio]):not([type=color]) { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); font:inherit; background:var(--field); color:var(--text); }
input[type=color] { width:56px; height:40px; padding:2px; border:1px solid var(--line); border-radius:var(--radius); background:var(--field); }
button, .button { display:inline-block; background:var(--accent); color:var(--on-accent); border:0; border-radius:var(--radius); padding:10px 16px; font:inherit; font-weight:600; cursor:pointer; text-decoration:none; }
button:disabled { opacity:.45; cursor:not-allowed; }
button.secondary, .button.secondary { background:transparent; color:var(--accent); border:1px solid var(--line); }
button.danger { background:transparent; color:var(--danger); padding:4px 8px; font-weight:500; }
button.danger.solid, .button.danger.solid { background:var(--danger); color:#fff; padding:10px 16px; font-weight:600; }
button.link { background:none; padding:0; font-weight:400; }
form.inline { display:inline; }
main button.link { color:var(--accent); margin-left:10px; font-size:inherit; }
main button.link.danger { color:var(--danger); }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; margin-bottom:20px; }
.grid2 > .card { margin:0; }
@media (max-width: 860px) { .grid2 { grid-template-columns:1fr; } }
.mt { margin-top:16px; }
.muted { color:var(--muted); font-size:14px; }
.errorlist { color:var(--danger); font-size:14px; margin:4px 0; padding-left:18px; }
.messages { list-style:none; padding:0; margin:0 0 20px; }
.messages li { padding:10px 14px; border-radius:var(--radius); margin-bottom:8px; background:var(--soft); }
.messages .success { background:var(--ok-bg); color:var(--ok); }
.messages .error { background:var(--bad-bg); color:var(--danger); }
.messages .warning { background:var(--warn-bg); }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:var(--cell-pad); border-bottom:1px solid var(--line); vertical-align:middle; }
th { font-size:var(--th-size); color:var(--th-text); background:var(--th-bg); font-weight:600; text-transform:var(--th-case); letter-spacing:var(--th-spacing); }
td.pick, th.pick { width:36px; padding-right:0; }
tr.selected td { background:var(--soft); }
.tag { font-size:12px; padding:2px 8px; border-radius:var(--radius-pill); background:var(--soft); color:var(--accent); }
.meter { height:8px; border-radius:99px; background:var(--line); overflow:hidden; margin:6px 0; }
.meter > span { display:block; height:100%; background:var(--accent); }
.meter.full > span { background:var(--danger); }
.codes { columns:2; font-family:ui-monospace, monospace; font-size:18px; padding-left:20px; }
.qr { width:200px; height:200px; display:block; margin:12px 0; background:#fff; padding:8px; border-radius:var(--radius); }
code.secret { word-break:break-all; background:var(--bg); padding:4px 6px; border-radius:var(--radius-sm); }
.swatches { display:flex; flex-wrap:wrap; gap:8px; }
.swatch { display:flex; align-items:center; gap:8px; padding:6px 10px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); color:var(--text); font-weight:500; font-size:14px; }
.swatch i { width:18px; height:18px; border-radius:50%; display:inline-block; }
.doc-layout { display:grid; grid-template-columns:minmax(0, 1fr); gap:20px; align-items:start; }
.doc-layout.has-preview { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
.crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:var(--h1-size); font-weight:700; margin:0 0 16px; }
.crumbs a { color:var(--accent); text-decoration:none; }
.crumbs a:hover { text-decoration:underline; }
.crumbs .sep { color:var(--muted); font-weight:400; }
.toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.toolbar .grow { flex:1 1 220px; }
details.pop { position:relative; display:inline-block; }
details.pop > summary { list-style:none; cursor:pointer; }
details.pop > summary::-webkit-details-marker { display:none; }
details.pop > div { position:absolute; z-index:5; top:calc(100% + 6px); left:0; width:min(320px, 80vw); background:var(--card); border:1px solid var(--line); border-radius:var(--radius-lg); padding:14px; box-shadow:0 6px 24px rgba(0,0,0,.15); }
details.pop.right > div { left:auto; right:0; }
details.pop label:first-child { margin-top:0; }
.upload-box { border:1px dashed var(--line); border-radius:var(--radius-lg); padding:14px; margin-top:16px; }
.upload-box.dragging { border-color:var(--accent); background:var(--soft); }
.upload-box .row > * { flex:0 1 auto; }
.space-picker { display:flex; align-items:center; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.space-picker label { margin:0; }
.space-picker select { padding:7px 10px; max-width:420px; }
.notice { background:var(--warn-bg); border:1px solid var(--warn-line); border-radius:var(--radius-lg); padding:10px 14px; margin-bottom:16px; font-size:14px; }
.folder-strip { list-style:none; display:flex; flex-wrap:wrap; gap:10px; margin:-6px 0 16px; padding:0; }
.folder-tile { position:relative; background:var(--card); border:var(--card-border); box-shadow:var(--shadow); border-radius:var(--radius-lg); padding:8px 34px 8px 12px; min-width:150px; max-width:280px; }
.folder-tile:hover { border-color:var(--accent); }
.folder-tile > a:first-child { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; text-decoration:none; color:var(--text); font-weight:600; }
.folder-tile > a:first-child .name { overflow-wrap:anywhere; }
.folder-tile > a:first-child .small { font-weight:400; flex-basis:100%; padding-left:26px; }
.folder-tile .props-link { position:absolute; top:8px; right:10px; }
.location { font-size:14px; }
.location .sep { color:var(--muted); }
main .location button.link { margin-left:0; }
.backup-fields { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:0 16px; margin-bottom:12px; }
.props { display:none; font-size:13px; margin-top:3px; }
.props > span { display:inline-block; margin-right:12px; }
.show-props .props { display:block; }
.switch { display:inline-flex; align-items:center; gap:6px; margin:0; font-weight:500; font-size:14px; white-space:nowrap; cursor:pointer; }
.row-links { white-space:nowrap; }
.props-link { margin-left:10px; text-decoration:none; font-size:16px; }
dl.meta { display:grid; grid-template-columns:minmax(110px, max-content) 1fr; gap:6px 16px; margin:0; }
dl.meta dt { color:var(--muted); }
dl.meta dd { margin:0; overflow-wrap:anywhere; }
@media (max-width: 640px) { dl.meta { grid-template-columns:1fr; } dl.meta dd { margin-bottom:6px; } }
.selbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:16px; }
.selbar select { padding:7px 10px; max-width:240px; }
.selbar button { padding:7px 12px; font-size:14px; }
.selbar button.danger { border:1px solid var(--line); }
tr.folder-row a { font-weight:600; text-decoration:none; color:var(--text); }
tr.folder-row a:hover { color:var(--accent); }
.icon { display:inline-block; width:1.4em; text-align:center; margin-right:4px; }
.small { font-size:13px; }
.site-footer { border-top:1px solid var(--line); background:var(--card); color:var(--muted); font-size:14px; padding:16px 0; }
.site-footer p { margin:4px 0; }
fieldset { border:1px solid var(--line); border-radius:var(--radius); padding:4px 16px 16px; margin:16px 0 0; }
legend { font-weight:600; padding:0 6px; }
.radios { display:flex; flex-direction:column; gap:6px; }
form div[id$="_role"] label { display:flex; gap:8px; align-items:center; font-weight:500; margin:6px 0; }
label.radio { display:flex; gap:8px; align-items:center; font-weight:500; margin:0; }
ol.steps li { margin-bottom:6px; }
.editor { border:1px solid var(--line); border-radius:var(--radius); background:var(--field); overflow:hidden; }
.editor-bar { display:flex; flex-wrap:wrap; gap:4px; padding:6px; border-bottom:1px solid var(--line); background:var(--bg); align-items:center; }
.editor-bar button { background:var(--card); color:var(--text); border:1px solid var(--line); padding:4px 9px; font-size:13px; font-weight:500; border-radius:var(--radius-sm); }
.editor-bar button.on { background:var(--accent); color:var(--on-accent); }
.editor-bar select { padding:4px 6px; font-size:13px; border-radius:var(--radius-sm); }
.editor-group { display:inline-flex; gap:2px; padding-right:6px; margin-right:2px; border-right:1px solid var(--line); }
.editor-color { position:relative; display:inline-flex; align-items:center; justify-content:center; width:30px; height:28px; margin:0; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--card); font-weight:700; cursor:pointer; }
.editor-color input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.editor-color .hl { background:#fff3a0; color:#111; padding:0 3px; }
.editor-area img, .email-preview img { max-width:100%; height:auto; }
.editor-area img.editor-picked { outline:3px solid var(--accent); }
.editor-status { margin:0; padding:6px 12px; border-top:1px solid var(--line); }
.editor-area, .editor-code { min-height:220px; padding:12px 14px; outline:none; color:var(--text); }
.editor-code { width:100%; border:0; font-family:ui-monospace, monospace; font-size:13px; background:var(--field); resize:vertical; }
.email-preview { border:1px solid var(--line); border-radius:var(--radius); padding:16px; background:#fff; color:#111; }
.nowrap { white-space:nowrap; }
.table-scroll { overflow-x:auto; }
table.audit td { font-size:14px; }
.tag.bad-tag { background:var(--bad-bg); color:var(--danger); }
.inline-label { display:flex; align-items:center; gap:6px; margin:0; font-weight:500; }
.inline-label input { width:auto !important; padding:8px 10px !important; }
.health td:first-child { width:40%; }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.dot-ok { background:var(--ok); } .dot-warn { background:#d97706; } .dot-bad { background:var(--danger); }
.doc-layout .card { margin-bottom:0; }
.preview { position:sticky; top:16px; display:flex; flex-direction:column; height:calc(100vh - 32px); min-height:420px; padding:16px; }
.preview-head { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.preview-head h2 { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.preview-head .button { padding:6px 12px; font-size:14px; }
.preview-body { flex:1; display:flex; align-items:center; justify-content:center; background:var(--bg); border-radius:var(--radius); overflow:hidden; }
.preview-body iframe { width:100%; height:100%; border:0; background:#fff; }
.preview-body img { max-width:100%; max-height:100%; object-fit:contain; }
tr.previewing td { background:var(--soft); }
body.wide .wrap { max-width:1400px; }
@media (max-width:1300px) { .doc-layout .hide-md { display:none; } }
@media (max-width:1000px) { .doc-layout.has-preview { grid-template-columns:1fr; } .preview { display:none !important; } }
@media (max-width:600px) { .hide-sm { display:none; } }

/* ---------------------------------------------------------------------------
   Styles. Each block below changes the variables above (and a few rules) for
   one style. The page picks a style with <html data-look="...">.
   --------------------------------------------------------------------------- */

/* In the business styles, links in lists are only underlined when you point at them. */
:root:not([data-look=standard]) td a { text-decoration:none; }
:root:not([data-look=standard]) td a:hover { text-decoration:underline; }

/* Corporate: dark blue header, white cards with a soft shadow, square-ish corners. */
:root[data-look=corporate] {
  --bg:#eef1f5; --line:#dde2e9; --muted:#5f6b7a;
  --look-header:#13294b; --look-on-header:#ffffff; --look-on-header-muted:#c5cfdd;
  --font-size:15px; --h1-size:21px;
  --radius-lg:4px; --radius:4px; --radius-sm:3px; --radius-pill:3px;
  --card-border:0; --shadow:0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --header-border:0;
  --th-bg:#f4f6f9; --th-text:#475467; --th-size:12px; --th-case:uppercase; --th-spacing:.04em;
  --page-width:1080px;
}
:root[data-look=corporate] .tabs a[aria-current=page] { color:var(--on-header); }
:root[data-look=corporate] .tabs a { padding-block:12px; }
:root[data-look=corporate] h1, :root[data-look=corporate] .crumbs { font-weight:600; }

/* Sidebar: the menu on the left, like many office programs. */
:root[data-look=sidebar] .tabs a[aria-current=page] { color:var(--on-header); }
:root[data-look=sidebar] {
  --bg:#f3f4f6; --line:#e2e5ea;
  --look-header:#1f2633; --look-on-header:#ffffff; --look-on-header-muted:#aab3c2;
  --font-size:15px; --h1-size:21px;
  --radius-lg:6px; --radius:5px; --radius-sm:4px; --radius-pill:4px;
  --card-border:1px solid var(--line); --shadow:none;
  --header-border:0;
  --th-bg:#f7f8fa; --th-size:12px; --th-case:uppercase; --th-spacing:.04em;
  --page-width:1180px; --page-pad:28px;
}
@media (min-width: 861px) {
  :root[data-look=sidebar] body { display:grid; grid-template-columns:232px minmax(0, 1fr); grid-template-rows:auto 1fr auto; min-height:100vh; }
  :root[data-look=sidebar] body > header { grid-row:1 / -1; position:sticky; top:0; height:100vh; overflow-y:auto; display:flex; flex-direction:column; gap:10px; padding:20px 12px; }
  :root[data-look=sidebar] body > :not(header) { grid-column:2; }
  :root[data-look=sidebar] main { width:100%; }
  :root[data-look=sidebar] header .bar { display:contents; }
  :root[data-look=sidebar] header .brand { order:0; margin:0 4px 16px; }
  :root[data-look=sidebar] .tabs { order:1; flex-direction:column; gap:2px; padding:0; margin:0; max-width:none; width:100%; }
  :root[data-look=sidebar] .switcher { order:2; margin-top:auto; flex-direction:column; align-items:stretch; padding:0 4px; }
  :root[data-look=sidebar] .switcher select { max-width:none; }
  :root[data-look=sidebar] header .who { order:3; padding:0 4px; font-size:13px; }
  :root[data-look=sidebar] header .bar > form.inline { order:4; padding:0 4px; }
  :root[data-look=sidebar] header .bar > .who:first-of-type { margin-top:auto; }
  :root[data-look=sidebar] .switcher ~ .who { margin-top:0; }
  :root[data-look=sidebar] .tabs a { border:0; border-left:3px solid transparent; border-radius:4px; padding:9px 12px; }
  :root[data-look=sidebar] .tabs a[aria-current=page] { color:var(--on-header); background:rgba(255,255,255,.08); border-left-color:var(--accent); }
  :root[data-look=sidebar] .tabs .admin-tab { margin:0; }
  :root[data-look=sidebar] .tabs a:not(.admin-tab) + .admin-tab { margin-top:16px; }
}

/* Minimal: white and calm, thin lines, very little colour. */
:root[data-look=minimal] {
  --bg:#ffffff; --line:#eaecf0; --soft:#f5f7fa; --muted:#6b7280;
  --font-size:15px; --h1-size:24px;
  --radius-lg:2px; --radius:2px; --radius-sm:2px; --radius-pill:2px;
  --card-border:1px solid var(--line); --card-pad:24px 0; --shadow:none;
  --th-size:12px; --th-case:uppercase; --th-spacing:.06em;
  --page-width:1040px; --page-pad:40px;
}
:root[data-look=minimal] .card { border-width:1px 0 0; background:transparent; }
:root[data-look=minimal] h1, :root[data-look=minimal] .crumbs { font-weight:600; letter-spacing:-.01em; }
:root[data-look=minimal] button.secondary, :root[data-look=minimal] .button.secondary { color:var(--text); }

/* Classic: graphite top bar, grey menu bar below it, compact tables with stripes. */
:root[data-look=classic] {
  --bg:#f2f2f2; --line:#d0d4d9; --muted:#5b6370; --soft:#e8eef7;
  --look-header:#2d3239; --look-on-header:#ffffff; --look-on-header-muted:#c9ced6;
  --font-size:14px; --h1-size:19px;
  --radius-lg:0; --radius:2px; --radius-sm:2px; --radius-pill:2px;
  --card-border:1px solid var(--line); --card-pad:18px 20px; --shadow:none;
  --header-border:1px solid var(--line);
  --th-bg:#e9ecef; --th-text:#30363d; --th-size:13px; --stripe:#f7f8fa; --menu-bar:#e4e7eb;
  --cell-pad:7px 8px;
  --page-width:1200px; --page-pad:20px;
}
:root[data-look=classic] .tabs { background:var(--menu-bar); box-shadow:0 0 0 100vmax var(--menu-bar); clip-path:inset(0 -100vmax); }
:root[data-look=classic] .tabs a, :root[data-look=classic] .tabs a[aria-current=page] { color:var(--text); opacity:1; padding:8px 14px; font-size:14px; }
:root[data-look=classic] .tabs a[aria-current=page] { background:var(--card); border-bottom-color:var(--accent); }
:root[data-look=classic] tbody tr:nth-child(even) td { background:var(--stripe); }
:root[data-look=classic] h1, :root[data-look=classic] h2 { font-weight:600; }

/* Dark colours: for theme "dark", and for "automatic" when the device is in dark mode. */
:root[data-theme=dark] {
  --bg:#0f1115; --card:#181b21; --text:#e7e9ee; --muted:#9aa3b2; --line:#2a2f38; --field:#11141a; --soft:#22283a;
  --danger:#f87171; --ok:#4ade80; --ok-bg:#12261a; --bad-bg:#2c1414; --warn-bg:#2a2210; --warn-line:#5c4a1a;
  --th-bg:#1f232b; --th-text:var(--muted); --stripe:#1c2027; --menu-bar:#22262e; color-scheme:dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme=auto] {
    --bg:#0f1115; --card:#181b21; --text:#e7e9ee; --muted:#9aa3b2; --line:#2a2f38; --field:#11141a; --soft:#22283a;
    --danger:#f87171; --ok:#4ade80; --ok-bg:#12261a; --bad-bg:#2c1414; --warn-bg:#2a2210; --warn-line:#5c4a1a;
  --th-bg:#1f232b; --th-text:var(--muted); --stripe:#1c2027; --menu-bar:#22262e; color-scheme:dark;
  }
}
