/* Agent ONE – Kundenplattform. Cockpit mit Seitenleiste, Plus Jakarta Sans,
   „Nacht & Champagner“ (dunkel) und „Champagner hell“ (hell). Weiterentwicklung des Designs vom 28.11.2026. */
:root {
  --bg: #F7F5F1; --bg2: #EFECE6; --surface: #FFFFFF; --surface2: #FBFAF7; --ink: #1B1A18; --muted: #69635B; --faint: #8E877D;
  --line: #E3DED6; --line2: #C9C2B7; --accent: #8A6A3E; --accent-ink: #6F5430; --tint: #EEE8DE; --tint2: #F4EFE7;
  --btn-bg: #1B1A18; --btn-fg: #FFFFFF; --on-accent: #FFFFFF;
  --pos: #2E6B4E; --pos-bg: #E5F0EA; --neg: #A4472F; --neg-bg: #F7E6E0; --warn: #8A5A00; --warn-bg: #FBF0D9;
  --glass: rgba(247, 245, 241, 0.88);
  --radius: 16px; --radius-s: 10px; --shadow: 0 1px 2px rgba(27, 26, 24, .04), 0 8px 24px rgba(27, 26, 24, .05);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171A; --bg2: #111214; --surface: #202226; --surface2: #1B1D20; --ink: #ECE8E1; --muted: #A39B91; --faint: #7D766D;
    --line: #2C2E33; --line2: #45484F; --accent: #C9A97C; --accent-ink: #DCC29C; --tint: #26282C; --tint2: #222428;
    --btn-bg: #C9A97C; --btn-fg: #16171A; --on-accent: #16171A;
    --pos: #7FC29B; --pos-bg: #1E2E25; --neg: #E8957D; --neg-bg: #33221D; --warn: #E7C27A; --warn-bg: #332A17;
    --glass: rgba(22, 23, 26, 0.86); --shadow: 0 1px 2px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16171A; --bg2: #111214; --surface: #202226; --surface2: #1B1D20; --ink: #ECE8E1; --muted: #A39B91; --faint: #7D766D;
  --line: #2C2E33; --line2: #45484F; --accent: #C9A97C; --accent-ink: #DCC29C; --tint: #26282C; --tint2: #222428;
  --btn-bg: #C9A97C; --btn-fg: #16171A; --on-accent: #16171A;
  --pos: #7FC29B; --pos-bg: #1E2E25; --neg: #E8957D; --neg-bg: #33221D; --warn: #E7C27A; --warn-bg: #332A17;
  --glass: rgba(22, 23, 26, 0.86); --shadow: 0 1px 2px rgba(0, 0, 0, .25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden], .hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typografie ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Bausteine ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.line:hover { border-color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn.ghost:hover { color: var(--ink); background: var(--tint); }
.btn.danger { background: transparent; color: var(--neg); border-color: var(--neg); }
.btn.danger:hover { background: var(--neg); color: #fff; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--muted); white-space: nowrap; }
.badge.pos { background: var(--pos-bg); color: var(--pos); }
.badge.neg { background: var(--neg-bg); color: var(--neg); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.acc { background: var(--tint); color: var(--accent-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.note { padding: 12px 14px; border-radius: var(--radius-s); background: var(--tint2); border: 1px solid var(--line); font-size: 14px; }
.note.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.note.neg { background: var(--neg-bg); border-color: transparent; color: var(--neg); }
.note.pos { background: var(--pos-bg); border-color: transparent; color: var(--pos); }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0; }
.empty b { color: var(--ink); display: block; font-weight: 600; margin-bottom: 4px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--tint) 0, var(--tint2) 50%, var(--tint) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label, .lbl { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line2); border-radius: var(--radius-s); background: var(--surface); font-size: 16px; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; gap: 2px; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 30px; }
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }

/* Tabellen / Listen */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.item:last-child { border-bottom: 0; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.item-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.item:hover .item-title, button.item:hover .item-title { color: var(--accent-ink); }
button.item { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: inherit; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--tint2); }

/* Toast + Dialog */
#toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--neg); color: #fff; }
dialog.dlg { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.dlg::backdrop { background: rgba(10, 10, 12, .45); backdrop-filter: blur(2px); }
.dlg-in { padding: 22px 24px; overflow-y: auto; max-height: calc(100vh - 40px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; font-size: 13px; }

/* ---------- Layout: Seitenleiste + Inhalt ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px; }
.top-logo img, .side-logo img { display: block; height: 26px; width: auto; filter: brightness(.78) saturate(1.15); }
.top-title { font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius-s); display: grid; place-items: center; background: transparent; cursor: pointer; padding: 0; color: var(--ink); flex: none; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg, .side svg, .tabbar svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.main { max-width: 1320px; margin: 0 auto; padding: 22px 16px calc(100px + var(--safe-b)); overflow-wrap: break-word; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding: 0 4px var(--safe-b); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; font-size: 10.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar a.on { color: var(--accent-ink); }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-s); font-size: 14.5px; font-weight: 500; color: var(--muted); background: transparent; border: 0; cursor: pointer; width: 100%; text-align: left; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { color: var(--ink); background: var(--tint); }
.side-nav a.on, .side-foot a.on { color: var(--ink); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.side-nav a .pill { margin-left: auto; font-size: 11.5px; font-weight: 700; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: inline-grid; place-items: center; }
.side-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 20px 12px 6px; }
.side-logo { display: block; padding: 4px 12px 8px; }
.side-logo img { height: 32px; }
.side-org { padding: 0 12px 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side-org b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-user { display: flex; gap: 10px; align-items: center; padding: 10px 12px 4px; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.side-user .who { min-width: 0; font-size: 13px; line-height: 1.3; }
.side-user .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { color: var(--muted); }
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 25; background: var(--bg2); border-right: 1px solid var(--line); padding: 22px 14px 16px; overflow-y: auto; }
  .shell { padding-left: 248px; }
  .top, .tabbar { display: none; }
  .main { padding: 34px 32px 60px; }
}
.theme-ic .sun { display: none; }
:root[data-theme="dark"] .theme-ic .sun { display: block; } :root[data-theme="dark"] .theme-ic .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-ic .sun { display: block; } :root:not([data-theme]) .theme-ic .moon { display: none; } }
:root[data-theme="dark"] .top-logo img, :root[data-theme="dark"] .side-logo img { filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top-logo img, :root:not([data-theme="light"]) .side-logo img { filter: none; } }

/* Kopf einer Seite */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head .h1 + p { margin-top: 6px; color: var(--muted); max-width: 70ch; }

/* Übersicht */
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grid.g2, .grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow); }
@media (min-width: 720px) { .tile { min-height: 230px; } }
.tile-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.tile-head h2 { font-size: 15.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.tile-head h2 svg { width: 17px; height: 17px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-head a { font-size: 13px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.tile .item { padding: 9px 0; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.bar { height: 6px; background: var(--tint); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar.warn i { background: var(--warn); } .bar.neg i { background: var(--neg); }

/* Aufgaben */
.task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line2); background: transparent; cursor: pointer; flex: none; margin-top: 1px; display: grid; place-items: center; padding: 0; }
.tick:hover { border-color: var(--accent); }
.tick.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tick svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.task.done .item-title { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.add-row { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .add-row { grid-template-columns: minmax(0, 1fr) 150px 160px auto; } }
.chip-due.over { color: var(--neg); font-weight: 600; }
.chip-due.today { color: var(--warn); font-weight: 600; }

/* Notizen */
.notes-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .notes-layout { grid-template-columns: 320px minmax(0, 1fr); } }
.note-editor .title-in { font-size: 22px; font-weight: 600; border: 0; background: transparent; width: 100%; padding: 4px 0; letter-spacing: -0.01em; }
.note-editor .title-in:focus { outline: none; }
.note-editor textarea { min-height: 50vh; border: 0; padding: 4px 0; background: transparent; resize: vertical; width: 100%; font-size: 15.5px; line-height: 1.65; }
.note-editor textarea:focus { outline: none; }
.note-editor[data-readonly] .title-in, .note-editor[data-readonly] textarea { pointer-events: none; }
button.item.sel { background: var(--tint2); }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; min-height: 45vh; }
.msg { max-width: min(760px, 92%); padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.composer { position: sticky; bottom: calc(70px + var(--safe-b)); display: flex; gap: 8px; align-items: flex-end; padding: 10px; background: var(--surface); border: 1px solid var(--line2); border-radius: 22px; box-shadow: var(--shadow); margin-top: 12px; }
@media (min-width: 900px) { .composer { bottom: 16px; } }
.composer textarea { flex: 1; border: 0; resize: none; background: transparent; min-height: 24px; max-height: 200px; padding: 8px 8px; font-size: 16px; line-height: 1.45; }
.composer textarea:focus { outline: none; }

/* Mail */
.mail-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .mail-layout { grid-template-columns: 400px minmax(0, 1fr); } }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.6; }
.unread .item-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

/* Anmeldeseite */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.auth-art { display: none; position: relative; overflow: hidden; background: #16171A; color: #ECE8E1; padding: 48px 56px; flex-direction: column; justify-content: space-between; }
@media (min-width: 980px) { .auth-art { display: flex; } }
.auth-art::before { content: ''; position: absolute; inset: -20% -10% auto auto; width: 70%; aspect-ratio: 1; background: radial-gradient(circle, rgba(201, 169, 124, .22), transparent 65%); }
.auth-art::after { content: ''; position: absolute; inset: auto auto -25% -15%; width: 65%; aspect-ratio: 1; background: radial-gradient(circle, rgba(201, 169, 124, .12), transparent 60%); }
.auth-art > * { position: relative; }
.auth-art img { height: 40px; width: auto; }
.auth-art h2 { font-size: clamp(30px, 3vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; max-width: 14ch; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; color: #A39B91; font-size: 15px; }
.auth-art li { display: flex; gap: 12px; align-items: center; }
.auth-art li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #C9A97C; flex: none; }
.auth-art .foot { font-size: 12.5px; color: #7D766D; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px calc(40px + var(--safe-b)); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo-sm { display: block; margin-bottom: 36px; }
.auth-card .logo-sm img { height: 30px; filter: brightness(.78) saturate(1.15); }
:root[data-theme="dark"] .auth-card .logo-sm img { filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-card .logo-sm img { filter: none; } }
@media (min-width: 980px) { .auth-card .logo-sm { display: none; } }
.auth-card .h1 { font-size: 30px; margin-bottom: 8px; }
.auth-card form { margin-top: 26px; }
.auth-card .btn { width: 100%; min-height: 48px; font-size: 15px; }
.auth-err { min-height: 22px; font-size: 14px; color: var(--neg); margin: 4px 0 10px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 76px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.code-in { letter-spacing: .4em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.auth-theme { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }

/* Admin */
.perm-grid { display: grid; gap: 0; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.perm-row:last-child { border-bottom: 0; }
.perm-row .nm { font-weight: 600; font-size: 14px; }
.perm-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.mod-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mod-card:last-child { border-bottom: 0; }
.mod-card .item-main small { color: var(--muted); font-size: 13px; display: block; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; inset: 0; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line2); transition: .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.qr svg { width: 180px; height: 180px; background: #fff; border-radius: 10px; padding: 6px; }
code.k { font-size: 13px; background: var(--tint); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
