/* Notice Monitor — calm, dense workspace UI (Geist, warm neutrals, hairline borders) */

@font-face { font-family: "Geist"; src: url("/static/fonts/geist-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/static/fonts/geist-mono-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Devanagari"; src: url("/static/fonts/noto-sans-devanagari-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
  --bg: #fbfaf8;           /* page + sidebar */
  --surface: #ffffff;      /* cards */
  --subtle: #f5f4f1;       /* hover, wells */
  --track: #eeede9;        /* segmented control, progress track */
  --line: #e9e7e2;         /* card borders */
  --line-soft: #f0eeea;    /* row dividers */
  --line-strong: #dad7d0;  /* inputs, secondary buttons */
  --text: #1d1c1a;
  --text-2: #57544e;
  --text-3: #8a867e;
  --primary: #4b5bd6;
  --primary-hover: #4150c4;
  --primary-soft: #eceefb;
  --ok: #2f7a43;   --ok-soft: #eaf4ec;
  --warn: #8f5e0e; --warn-soft: #fbf3e2;
  --err: #b4322b;  --err-soft: #fbecea;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-xs: 0 1px 2px rgba(28, 25, 20, .05);
  --sidebar-w: 248px;
  --font: "Geist", "Noto Sans Devanagari", ui-sans-serif, -apple-system, system-ui, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412; --surface: #1b1b19; --subtle: #232320; --track: #262623;
    --line: #2c2b28; --line-soft: #252422; --line-strong: #3a3935;
    --text: #ecebe8; --text-2: #b0ada6; --text-3: #7f7c75;
    --primary: #7482f0; --primary-hover: #8591f3; --primary-soft: #262a45;
    --ok: #6cc583; --ok-soft: #1c2b20; --warn: #e0b157; --warn-soft: #2e2617; --err: #f0857d; --err-soft: #331d1b;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13.5px/1.45 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 23px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 13.5px; font-weight: 600; margin: 0; }
p { margin: 0 0 10px; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--subtle); border: 1px solid var(--line-soft); border-radius: 4px; padding: 0 4px; }
pre.code { background: var(--subtle); border: 1px solid var(--line); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 15px; user-select: all; margin: 8px 0 12px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.center { text-align: center; }
.inline { display: inline; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- icons ---------- */
.icon { width: 15px; height: 15px; flex: none; vertical-align: -3px; stroke-width: 1.75; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); padding: 8px 8px 10px; overflow-y: auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
.workspace { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: 14px; }
.workspace:hover { background: var(--subtle); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--text); color: var(--bg); flex: none; }
.brand-mark .icon { width: 13px; height: 13px; }
.brand-mark.lg { width: 36px; height: 36px; border-radius: 9px; }
.brand-mark.lg .icon { width: 19px; height: 19px; }
.sidebar-close { display: none; }
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13.5px; }
.nav-item .icon { color: var(--text-2); }
.nav-item:hover { background: var(--subtle); text-decoration: none; }
.nav-item.active { background: var(--surface); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); font-weight: 500; }
.nav-item.active .icon { color: var(--text); }
.nav-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 16px 8px 5px; }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 6px 4px 2px 8px; }
.user-chip form { margin-left: auto; }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-meta b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 9.5px; font-weight: 600; letter-spacing: .02em; }
.avatar:hover { text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.crumb-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--text); color: var(--surface); }
.crumb-mark .icon { width: 11px; height: 11px; }
.crumb-sep { color: var(--text-3); }
.crumb-current { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-search { display: flex; align-items: center; gap: 6px; height: 28px; width: 220px; padding: 0 6px 0 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text-3); }
.top-search:focus-within { border-color: var(--primary); background: var(--surface); }
.top-search input { border: 0; outline: 0; background: transparent; padding: 0; height: 100%; font-size: 12.5px; color: var(--text); width: 100%; }
.top-search input:focus { outline: 0; }
.top-search kbd { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: var(--surface); }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text-2); cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--subtle); color: var(--text); text-decoration: none; }
.nav-toggle { display: none; }
.top-avatar { width: 26px; height: 26px; font-size: 10px; }

.content { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 32px 64px; }
.sidebar-scrim { display: none; }

/* ---------- page header ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--text-2); margin: 0; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.heading h1 { margin: 0; }
.content > h1 { margin-bottom: 16px; }
.content > h1 + .muted { margin-top: -10px; }

/* ---------- cards / sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card > h2, .card > header h2 { margin-bottom: 12px; }
.card > h2 { display: flex; align-items: center; gap: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { display: flex; align-items: center; gap: 7px; }
.panel-head .count { color: var(--text-3); font-weight: 400; }
.panel-body { padding: 14px; }
.panel-foot { padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.panel .notices { margin: 0; }
.empty { padding: 28px 16px; text-align: center; color: var(--text-2); }
.empty .icon { width: 22px; height: 22px; color: var(--text-3); display: block; margin: 0 auto 8px; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 6px; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.stat { position: relative; padding: 14px 16px; border-right: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); display: flex; flex-direction: column; gap: 4px; min-height: 96px; color: var(--text); }
.stat:hover { text-decoration: none; }
a.stat:hover { background: var(--bg); }
.stat:last-child { border-right: 0; }
.stat .stat-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.stat .stat-label .icon { color: var(--text-3); width: 14px; height: 14px; }
.stat b { font-size: 23px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.stat small { font-size: 12px; color: var(--text-3); }
.stat small.ok { color: var(--ok); } .stat small.warn { color: var(--warn); } .stat small.bad { color: var(--err); }
.stat.bad b { color: var(--err); }
.stat.warn b { color: var(--warn); }
/* legacy stat markup: icon + b + span */
.stat > .stat-icon { position: absolute; top: 15px; left: 16px; width: 14px; height: 14px; color: var(--text-3); }
.stat > .stat-icon ~ b { order: 2; }
.stat > .stat-icon ~ span { order: 1; padding-left: 21px; font-size: 12.5px; color: var(--text-2); }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 13.5px; }
input, select, textarea { font: inherit; font-size: 13.5px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); width: 100%; box-shadow: var(--shadow-xs); }
textarea { height: auto; padding: 8px 10px; }
input[type=checkbox] { width: 15px; height: 15px; padding: 0; box-shadow: none; accent-color: var(--primary); }
input.tiny { width: 64px; height: 26px; font-size: 12px; padding: 0 6px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input::placeholder { color: var(--text-3); }
details > summary { cursor: pointer; color: var(--text-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.hint { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.hint code { font-size: 1em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-xs); }
.btn:hover { background: var(--subtle); text-decoration: none; }
.btn .icon { width: 14px; height: 14px; }
.btn.primary { background: var(--primary); border-color: transparent; color: #fff; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--subtle); color: var(--text); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.ai { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--line-strong)); }
.btn.ai:hover { background: var(--primary-soft); }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.actions.bar { margin-bottom: 16px; }
.more { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; font-size: 12.5px; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; color: inherit; padding: 0; }

/* ---------- segmented control ---------- */
.segmented { display: inline-flex; gap: 2px; padding: 2px; background: var(--track); border-radius: var(--radius-sm); }
.segmented a, .segmented button { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 5px; color: var(--text-2); font-size: 12px; font-weight: 500; border: 0; background: transparent; cursor: pointer; }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.segmented .n { color: var(--text-3); font-weight: 400; }

/* ---------- flash ---------- */
.flash { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.flash > .icon { margin-top: 1px; color: var(--primary); }
.flash.success { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-soft); }
.flash.success > .icon { color: var(--ok); }
.flash.error { border-color: color-mix(in srgb, var(--err) 30%, var(--line)); background: var(--err-soft); color: var(--err); }
.flash.error > .icon { color: var(--err); }
.flash.info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, var(--line)); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.panel .table-wrap { border: 0; border-radius: 0; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-2); padding: 9px 8px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 14px; }
th:last-child, td:last-child { padding-right: 14px; }
tbody tr:hover td { background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; }
td .actions { flex-wrap: nowrap; }
table.compact td { padding: 8px 6px; }
table.compact td:first-child { padding-left: 0; }
table.compact td:last-child { padding-right: 0; }
table.compact tbody tr:hover td, table.compact tr:hover td { background: transparent; }

/* ---------- badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--text); background: var(--surface); white-space: nowrap; }
.badge .icon { display: none; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.badge.ok::before { background: var(--ok); }
.badge.err { color: var(--err); } .badge.err::before { background: var(--err); }
.badge.warn::before { background: #d39b2a; }
.badge.muted { color: var(--text-2); }
.badge.pdf { color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, var(--line)); background: var(--err-soft); height: 18px; padding: 0 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.badge.pdf::before { display: none; }
.ok-text { color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- favicons / site cells ---------- */
.favicon { width: 16px; height: 16px; flex: none; border-radius: 4px; object-fit: contain; }
.favicon.md { width: 28px; height: 28px; border-radius: 7px; padding: 5px; background: var(--surface); border: 1px solid var(--line); }
.favicon.lg { width: 40px; height: 40px; border-radius: 9px; padding: 7px; background: var(--surface); border: 1px solid var(--line); }
.favicon.placeholder { display: inline-grid; place-items: center; color: var(--text-3); }
.favicon.placeholder .icon { width: 100%; height: 100%; }
.favicon.placeholder.md, .favicon.placeholder.lg { background: var(--subtle); }
.site-cell { display: flex; gap: 10px; align-items: center; min-width: 0; }
.site-cell b { font-weight: 500; }
.site-cell a.muted { color: var(--text-3); }
h1.site-cell { margin: 0; }
.site { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }

/* ---------- notice list ---------- */
.notices { list-style: none; padding: 0; margin: 0; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.notice:hover { background: var(--bg); }
.notice:last-child { border-bottom: 0; }
.card .notice, .card.notices .notice { padding-left: 0; padding-right: 0; }
.card .notice:hover { background: transparent; }
.notice-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--subtle); color: var(--text-2); }
.notice-icon .icon { width: 14px; height: 14px; }
.notice-icon.pdf { color: var(--err); background: var(--err-soft); }
.notice-body { min-width: 0; flex: 1; }
.notice-title { display: flex; align-items: baseline; gap: 6px; line-height: 1.45; }
.notice-title a { color: var(--text); }
.notice-title a:hover { color: var(--primary); }
.notice .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.notice .meta .site { color: var(--text-2); }
.dot { color: var(--text-3); }
ul.notices.card { padding: 0; overflow: hidden; }
ul.notices.card .notice { padding: 10px 14px; }

/* ---------- filters / pager ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { width: auto; flex: 1 1 200px; height: 30px; }
.filters label.check { flex: none; white-space: nowrap; font-size: 12.5px; }
.pager { display: flex; gap: 12px; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 12.5px; padding: 4px 2px; }

/* ---------- misc components ---------- */
.preview { margin: 0; padding-left: 18px; }
.preview li { margin-bottom: 6px; word-break: break-word; }
.ai-result { border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.ai-result.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.ai-result.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.ai-result h2 { flex-wrap: wrap; }
.ai-result h2 .icon { color: var(--primary); }
.links { margin-top: 14px; font-size: 12.5px; }
ul { padding-left: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; }

/* ---------- auth pages ---------- */
.auth-wrap { max-width: 400px; margin: 0 auto; padding: 10vh 16px 40px; }
.auth-wrap .card { padding: 24px; box-shadow: 0 1px 3px rgba(28, 25, 20, .04), 0 8px 24px -12px rgba(28, 25, 20, .08); }
.auth-wrap h1 { font-size: 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.auth-brand h1 { margin: 0; }
.auth-wrap .btn.primary { height: 34px; }
.auth-wrap input { height: 34px; }

/* legacy containers */
.container { max-width: none; padding: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .top-search { width: 160px; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 270px; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); background: var(--bg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20, 18, 15, .3); }
  .sidebar-close, .nav-toggle { display: inline-grid; }
  .crumb-root, .crumb-sep, .crumb-mark, .top-search, .top-avatar { display: none; }
  .content { padding: 18px 14px 48px; }
  h1 { font-size: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { min-height: 84px; }
  .stat:nth-child(2n) { border-right: 0; }
  td.actions .actions { flex-wrap: wrap; }
}
[data-plain] { color: inherit; }
[data-plain]:hover { text-decoration: none; color: var(--primary); }
[data-right] { text-align: right; }
.w500 { font-weight: 500; }
.actions.end { justify-content: flex-end; }
td.actions { display: table-cell; text-align: right; }
td.actions > form, td.actions > a { display: inline-flex; vertical-align: middle; margin-left: 4px; }
td.actions > form > .btn, td.actions > a.btn { margin: 0; }
.nowrap, td.small { white-space: nowrap; }
.btn.icon-only { width: 26px; padding: 0; }
.row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }
.row-actions form { margin: 0; display: inline-flex; }
.url-sub { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-3); }
.notice .meta .pub { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 500; }
.notice .meta .pub .icon { width: 12px; height: 12px; color: var(--text-3); }
.qr { display: inline-block; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 6px 0 12px; }
.qr svg { display: block; }
.code-input { font-family: var(--mono); font-size: 18px; letter-spacing: .18em; height: 40px; text-align: center; }
.recovery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.recovery-grid code { font-size: 14px; padding: 8px 10px; text-align: center; background: var(--subtle); }
.recovery-copy { font-size: 12px; }
#security { scroll-margin-top: 60px; }
/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 1px; }
.settings-nav .nav-item.danger, .settings-nav .nav-item.danger .icon { color: var(--err); }
.settings-body { min-width: 0; max-width: 720px; }
.narrow-form { max-width: 420px; }
.panel h3 { font-size: 13px; font-weight: 600; margin: 0; }
.identity { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.identity b { font-weight: 600; font-size: 14px; }
.avatar.xl { width: 44px; height: 44px; font-size: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.row-between p { margin: 0; flex: 1 1 260px; }
.switch-row { flex-direction: row; align-items: flex-start; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-weight: 400; cursor: pointer; }
.switch-row input, .toggle input { margin-top: 2px; }
.toggle { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; font-weight: 400; font-size: 12.5px; cursor: pointer; }
.danger-zone { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.danger-zone .panel-head h2 { color: var(--err); }
@media (max-width: 820px) {
  .settings { grid-template-columns: 1fr; gap: 12px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; }
  .settings-nav .nav-item { flex: none; }
}
.sso-btn { width: 100%; height: 36px; margin: 6px 0 4px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 14px 0 10px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
