/* ---------- tokens ---------- */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dfe3ea;
  --text: #17233b;
  --muted: #5d6b82;
  --ink: #17233b;          /* sidebar */
  --ink-text: #c9d2e3;
  --ink-hover: #22314f;
  --accent: #f2b632;       /* Power BI-like amber, used sparingly */
  --primary: #1f5fbf;
  --primary-hover: #194f9f;
  --primary-soft: #e6eefb;
  --ok: #1c7c4d; --ok-soft: #e3f4ea;
  --warn: #9a6200; --warn-soft: #fdf1d9;
  --danger: #b4232f; --danger-soft: #fbe5e7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 35, 59, .06), 0 4px 16px rgba(23, 35, 59, .06);
  --shadow-lg: 0 20px 60px rgba(10, 18, 35, .25);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522; --surface: #161e2e; --surface-2: #1c2638; --border: #2a3650;
    --text: #e6ebf4; --muted: #95a3bb; --ink: #0b1019; --ink-text: #b6c1d6; --ink-hover: #18233a;
    --primary: #5b9bf0; --primary-hover: #7aaff3; --primary-soft: #1b2c47;
    --ok: #4cc38a; --ok-soft: #14301f; --warn: #f0b44a; --warn-soft: #3a2c10; --danger: #f07178; --danger-soft: #3a1619;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .85em; }
.break { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.boot { display: grid; place-items: center; height: 100vh; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--ink-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; }
.main { padding: 32px clamp(16px, 3vw, 40px) 48px; min-width: 0; outline: none; }
.topbar { display: none; }
.scrim { display: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #17233b; }
.brand-name { font-weight: 700; color: #fff; letter-spacing: -.01em; }
.brand-sub { font-size: .78rem; opacity: .7; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 18px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-text); text-decoration: none; font-size: .92rem; }
.nav-link:hover { background: var(--ink-hover); color: #fff; }
.nav-link.active { background: var(--ink-hover); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #2f4166; color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; }
.me-text { min-width: 0; }
.me-name { color: #fff; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: .78rem; opacity: .7; }
.me-actions { display: flex; gap: 6px; }
.sidebar .btn-ghost { color: var(--ink-text); border-color: rgba(255, 255, 255, .12); flex: 1; justify-content: center; }
.sidebar .btn-ghost:hover { background: var(--ink-hover); color: #fff; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 10px 12px; position: sticky; top: 0; z-index: 20; }
  .topbar .icon-btn { color: #fff; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 30; }
  .main { padding: 20px 16px 40px; }
}

/* ---------- page parts ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin-top: 4px; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar > select { width: auto; min-width: 150px; }
.search-box { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-box .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 34px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.section-title { font-size: 1rem; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.row-sm { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; padding: 9px 15px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2; transition: background .12s, border-color .12s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: .84rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.tone-danger { color: var(--danger) !important; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.tone-danger:hover { background: var(--danger-soft); }
.icon-btn.tone-warn { color: var(--warn); } .icon-btn.tone-warn:hover { background: var(--warn-soft); }
.icon-btn.tone-ok { color: var(--ok); } .icon-btn.tone-ok:hover { background: var(--ok-soft); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--primary); text-decoration: underline; }

.input { width: 100%; font: inherit; font-size: .92rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
textarea.input { resize: vertical; min-height: 70px; }
select.input { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-inline { flex-direction: row; align-items: center; gap: 12px; }
.field-inline select { width: auto; }
.label { font-weight: 600; font-size: .88rem; }
.req { color: var(--danger); }
.hint { font-size: .8rem; color: var(--muted); }
.sub-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.field-error { font-size: .82rem; color: var(--danger); }
.form-alert { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.form-alert ul { margin: 6px 0 0; padding-left: 18px; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fieldset legend { padding: 0 6px; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio, .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio input, .check input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.check .muted { margin-left: auto; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; width: fit-content; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 8px 18px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--primary); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }

.url-status { font-size: .84rem; min-height: 1px; }
.url-status span { display: inline-flex; gap: 6px; align-items: center; }
.url-status .ok { color: var(--ok); } .url-status .warn { color: var(--warn); } .url-status .bad { color: var(--danger); }

.thumb-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.thumb-preview { width: 120px; height: 76px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--primary); overflow: hidden; flex: none; }
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; }
.icon-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-opt { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-opt.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.chip-removable button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; padding: 2px; border-radius: 50%; }
.chip-removable button:hover { background: var(--border); }
.lookup-wrap { position: relative; }
.lookup { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; }
.lookup-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.lookup-item:hover:not(:disabled) { background: var(--surface-2); }
.lookup-item:disabled { opacity: .45; cursor: default; }
.lookup-empty { padding: 8px; }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-off { background: var(--surface-2); color: var(--muted); }
.badge-info { background: var(--primary-soft); color: var(--primary); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.url-wrap { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- table ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.panel .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 11px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.nowrap { white-space: nowrap; }
.table .icon-btn { width: 30px; height: 30px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cell-title { display: flex; gap: 10px; align-items: center; min-width: 180px; max-width: 300px; }
.mini-thumb { width: 38px; height: 38px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; overflow: hidden; flex: none; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.url-cell { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.url-cell:hover { color: var(--primary); text-decoration: underline; }
.td-actions { width: 1%; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Table becomes cards on narrow screens */
@media (max-width: 1180px) {
  .table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; padding: 6px 4px; box-shadow: var(--shadow); }
  .rtable td { border: 0; padding: 6px 12px; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
  .rtable td[data-label]::before { content: attr(data-label); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); flex: none; }
  .rtable td:first-child { display: block; }
  .rtable td:first-child::before { display: none; }
  .rtable .cell-title { max-width: none; }
  .rtable .td-actions { width: auto; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
  .rtable .row-actions { justify-content: flex-start; flex-wrap: wrap; }
}

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: .88rem; }
.pager-btns { display: flex; gap: 8px; align-items: center; }
.pager-page { color: var(--muted); }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }

/* ---------- My Dashboards cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(23, 35, 59, .12); }
.card-thumb { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; background: var(--surface-2); }
.card-thumb-icon { display: grid; place-items: center; color: var(--primary); background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); }
.dash-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; align-items: flex-start; }
.dash-card-body .btn { margin-top: auto; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; min-height: 2.6em; }

/* ---------- viewer ---------- */
.viewer { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 80px); min-height: 520px; }
.viewer-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.viewer-heading { flex: 1; min-width: 200px; }
.viewer-title { font-size: 1.3rem; }
.viewer-meta { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: .88rem; flex-wrap: wrap; }
.viewer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.viewer-frame { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow); }
.viewer-frame iframe, .viewer-frame .pbi-container { width: 100%; height: 100%; border: 0; display: block; }
.viewer-frame .pbi-container iframe { border: 0; }
.viewer-note { font-size: .8rem; }
.embed-error { max-width: 520px; text-align: center; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.embed-error .empty-icon { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 960px) { .viewer { height: calc(100vh - 110px); } }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 16, 30, .5); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: rise .18s ease; }
.modal-wide { width: min(780px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 10px; }
.modal-head h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.modal-body { padding: 8px 20px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@media (max-width: 640px) {
  .overlay { padding: 0; place-items: end stretch; }
  .modal, .modal-wide { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-foot .btn { flex: 1; justify-content: center; }
}

.details { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0; font-size: .92rem; }
.details dt { color: var(--muted); font-weight: 600; }
.details dd { margin: 0; min-width: 0; }
@media (max-width: 560px) { .details { grid-template-columns: 1fr; gap: 2px; } .details dd { margin-bottom: 10px; } }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }

/* ---------- users ---------- */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.role-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.role-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- activity ---------- */
.integrity { display: flex; align-items: center; gap: 4px; }
.audit-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.audit-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.audit-item:last-child { border-bottom: 0; }
.audit-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.audit-danger .audit-dot { background: var(--danger); } .audit-warn .audit-dot { background: var(--warn); } .audit-info .audit-dot { background: var(--primary); }
.audit-main { min-width: 0; }
.audit-details { margin-top: 6px; background: var(--surface-2); border-radius: 6px; padding: 6px 9px; color: var(--muted); }
.audit-id { white-space: nowrap; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 40%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 10px; }
.auth-card form { margin-top: 12px; }
.auth-brand { padding: 0 0 10px; }
.auth-brand .brand-name { color: var(--text); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: .9rem; animation: rise .2s ease; transition: opacity .3s; }
.toast .icon { color: var(--ok); margin-top: 1px; }
.toast-error { border-left-color: var(--danger); } .toast-error .icon { color: var(--danger); }
.toast.leaving { opacity: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
