/* FREE号商机 · Dcat Admin 深色风格 */
:root {
  color-scheme: dark;
  --bg: #1a1d24;
  --bg-deep: #14161b;
  --sidebar: #16181e;
  --sidebar-hover: #1f222a;
  --card: #22262e;
  --card-head: #272b34;
  --surface-2: #2a2f39;
  --input: #1c1f26;
  --line: #2f3440;
  --line-strong: #3b4150;
  --text: #d5d9e0;
  --text-strong: #f1f3f6;
  --muted: #8a919e;
  --faint: #626a78;
  --primary: #586cb1;
  --primary-hover: #6b7fc4;
  --primary-soft: rgba(88, 108, 177, .16);
  --success: #21b978;
  --success-soft: rgba(33, 185, 120, .14);
  --danger: #ea5455;
  --danger-soft: rgba(234, 84, 85, .14);
  --warning: #dda451;
  --warning-soft: rgba(221, 164, 81, .15);
  --info: #3085d6;
  --info-soft: rgba(48, 133, 214, .15);
  --purple: #8e6fd8;
  --purple-soft: rgba(142, 111, 216, .15);
  --cyan: #36c2c9;
  --cyan-soft: rgba(54, 194, 201, .14);
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 60px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --mono: Consolas, "JetBrains Mono", "Cascadia Mono", monospace;
  font-family: "Nunito", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--line-strong) transparent; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; color: inherit; }
button { cursor: pointer; }
/* app.js matches many buttons by event.target.id; children must not steal the click target. */
button * { pointer-events: none; }
[hidden] { display: none !important; }
::selection { background: rgba(88, 108, 177, .45); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #4a5162; }
::-webkit-scrollbar-corner { background: transparent; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.icon, .nav-icon, .stat-icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
svg.icon { width: 16px; height: 16px; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); transition: grid-template-columns .22s var(--ease); }
.sidebar-collapsed .shell { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }

.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--sidebar); border-right: 1px solid #0f1115; box-shadow: 2px 0 10px rgba(0, 0, 0, .18); }
.brand { height: var(--topbar-h); flex: 0 0 auto; display: flex; align-items: center; gap: 11px; padding: 0 15px; border-bottom: 1px solid #23262e; white-space: nowrap; }
.brand-logo { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; box-shadow: 0 4px 14px rgba(88, 108, 177, .35); }
.brand-text { min-width: 0; transition: opacity .18s var(--ease); }
.brand-text strong { display: block; color: var(--text-strong); font-size: 16px; font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
.brand-text strong b { margin-right: 2px; background: linear-gradient(90deg, #8fa0ec, #4fd1d6); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; letter-spacing: 1px; }
.brand-text small { display: block; margin-top: 2px; color: var(--faint); font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; }
.nav-caption { padding: 18px 22px 8px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.side-nav { display: grid; gap: 3px; padding: 0 10px; overflow-y: auto; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: #a8afbc; font-size: 14px; text-align: left; white-space: nowrap; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--sidebar-hover); color: var(--text-strong); }
.nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-item.active { background: linear-gradient(90deg, var(--primary), rgba(88, 108, 177, .72)); color: #fff; box-shadow: 0 4px 14px rgba(88, 108, 177, .35); }
.nav-icon { width: 18px; height: 18px; }
.nav-label { transition: opacity .18s var(--ease); }
.sidebar-status { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 14px 22px; border-top: 1px solid #23262e; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #6b7280; box-shadow: 0 0 0 3px rgba(107, 114, 128, .18); }
.dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(33, 185, 120, .2); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(33, 185, 120, .2); } 50% { box-shadow: 0 0 0 6px rgba(33, 185, 120, .05); } }

.sidebar-collapsed .brand { justify-content: center; padding: 0; }
.sidebar-collapsed .brand-text,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-caption,
.sidebar-collapsed .sidebar-status-text { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.sidebar-collapsed .nav-caption { height: 14px; padding: 0; }
.sidebar-collapsed .nav-item { justify-content: center; gap: 0; padding: 0; }
.sidebar-collapsed .sidebar-status { justify-content: center; gap: 0; padding: 14px 0; }
.sidebar-backdrop { display: none; }

/* ---------- Main / Topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; background: rgba(34, 38, 46, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text-strong); }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.icon-btn .icon { width: 19px; height: 19px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.breadcrumb-home { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb-home .icon { width: 14px; height: 14px; }
.breadcrumb-sep { color: var(--faint); }
.breadcrumb-current { color: var(--text-strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.top-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.top-divider { width: 1px; height: 18px; background: var(--line-strong); }
.top-time { display: inline-flex; align-items: center; gap: 6px; }
.top-time .icon { width: 14px; height: 14px; }
.identity-summary { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 12px; }
.identity-summary .btn { margin-left: 2px; }

.content-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 22px 24px 4px; }
.content-header h1 { color: var(--text-strong); font-size: 20px; font-weight: 700; }
.content-header p { color: var(--muted); font-size: 13px; }

.view { display: none; padding: 14px 24px 28px; animation: view-in .22s var(--ease); }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view > * + * { margin-top: 18px; }

/* ---------- Identity / CDK ---------- */
.auth-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; overflow: auto; background: var(--bg-deep); }
.auth-screen::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: rgba(88, 108, 177, .05); }
.auth-card { position: relative; width: min(100%, 430px); padding: 28px; border: 1px solid var(--line-strong); border-radius: calc(var(--radius) + 2px); background: var(--card); box-shadow: 0 24px 60px rgba(0, 0, 0, .42); }
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.auth-brand img { flex: 0 0 auto; }
.auth-brand strong { display: block; color: var(--text-strong); font-size: 18px; }
.auth-brand strong b { color: #9eabe7; }
.auth-brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.auth-tab { min-height: 34px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--card); color: var(--text-strong); box-shadow: 0 1px 4px rgba(0, 0, 0, .28); }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-submit { width: 100%; margin-top: 2px; }
.auth-message { min-height: 20px; margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-message.bad { color: #f27a7b; }
.auth-message.good { color: #3fd394; }
.identity-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.identity-stat { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .12); }
.identity-stat span { display: block; color: var(--muted); font-size: 12px; }
.identity-stat strong { display: block; margin-top: 7px; overflow: hidden; color: var(--text-strong); font-size: 14px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.identity-inline-form { display: flex; align-items: end; gap: 12px; }
.identity-inline-form .field { flex: 1 1 320px; }
.identity-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.identity-cdk-output { min-height: 180px; resize: vertical; }
.identity-plan-summary { min-height: 40px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .12); color: var(--muted); font-size: 12px; line-height: 1.55; }
.subscription-notice { margin-bottom: 18px; padding: 12px 14px; border: 1px solid rgba(234, 84, 85, .48); border-left: 4px solid var(--danger); border-radius: var(--radius-sm); background: rgba(234, 84, 85, .1); color: #f5c2c4; font-size: 13px; line-height: 1.5; }
.identity-user-actions { display: grid; grid-template-columns: minmax(118px, 1fr) auto; gap: 6px; min-width: 250px; }
.identity-user-actions .field { min-width: 0; }
.identity-user-actions input { min-width: 0; height: 31px; padding: 5px 8px; }
.identity-user-actions .identity-action-row { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.identity-user-actions .btn { min-height: 30px; }
.identity-user-actions .field-hint { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-footer { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.page-footer b { color: var(--muted); margin-right: 1px; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; gap: 16px; }
.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .18s var(--ease), border-color .18s; }
.stat-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.stat-icon { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 50%; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-body { min-width: 0; }
.stat-body span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-body strong { display: block; margin-top: 2px; color: var(--text-strong); font-size: 22px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tone-primary { background: var(--primary-soft); color: #8d9de0; }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warning { background: var(--warning-soft); color: var(--warning); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-info { background: var(--info-soft); color: #5aa6ee; }
.tone-purple { background: var(--purple-soft); color: #a98ce8; }
.tone-cyan { background: var(--cyan-soft); color: var(--cyan); }

/* ---------- Cards ---------- */
.card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 20px; background: var(--card-head); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.card-heading { min-width: 0; }
.card-title { display: flex; align-items: center; gap: 8px; color: var(--text-strong); font-size: 15px; font-weight: 700; }
.card-title .icon { color: #8d9de0; }
.card-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.card-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.card-tool { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--muted); transition: background .15s, color .15s, transform .2s; }
.card-tool:hover { background: var(--surface-2); color: var(--text-strong); }
.card-tool .icon { transition: transform .2s var(--ease); }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.card-body.stack { display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; }
.card-footer { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .08); border-radius: 0 0 var(--radius) var(--radius); }
.card-footer.actions { justify-content: flex-end; flex-wrap: wrap; }
.card.is-collapsed > :not(.card-header) { display: none !important; }
.card.is-collapsed > .card-header { border-bottom-color: transparent; border-radius: var(--radius); }
.card.is-collapsed [data-card-collapse] .icon { transform: rotate(-90deg); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 18px; align-items: end; }
.config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; align-items: end; }
.span-2 { grid-column: span 2; }
.span-all, .form-section-title, .form-actions, .split-controls { grid-column: 1 / -1; }
.form-section-title { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-section-title:first-child { margin-top: 0; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { color: #b4bac5; font-size: 12px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

input:not([type="checkbox"]), select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--input); color: var(--text); outline: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
input:not([type="checkbox"]), select { height: 38px; padding: 0 12px; }
textarea { min-height: 110px; padding: 10px 12px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:not([type="checkbox"]):hover, select:hover, textarea:hover { border-color: #4a5162; }
input:not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--primary); background: #1e2129; box-shadow: 0 0 0 3px rgba(88, 108, 177, .22); }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
input[readonly] { background: var(--bg-deep); color: var(--muted); }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px var(--input) inset; caret-color: var(--text); }
input[type="number"]::-webkit-inner-spin-button { opacity: .35; }
select { appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a919e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; }
select option { background: var(--card); color: var(--text); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); cursor: pointer; }

/* Checkboxes */
input[type="checkbox"] { appearance: none; width: 16px; height: 16px; flex: 0 0 16px; margin: 0; display: inline-grid; place-items: center; border: 1px solid #4a5162; border-radius: 3px; background: var(--input); cursor: pointer; transition: background .15s, border-color .15s; vertical-align: middle; }
input[type="checkbox"]::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .12s var(--ease); }
input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
input[type="checkbox"]:indeterminate { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:indeterminate::after { width: 8px; height: 0; border-left: 0; border-bottom: 2px solid #fff; transform: none; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input[type="checkbox"]:hover:not(:checked) { border-color: var(--primary); }

/* Switches (checkbox kept in DOM, visually replaced) */
.switch-field { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 38px; cursor: pointer; user-select: none; }
.switch-field input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch { position: relative; width: 38px; height: 21px; flex: 0 0 38px; border-radius: 21px; background: #3a404d; transition: background .18s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #c9ced8; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .18s var(--ease), background .18s; }
.switch-field input:checked + .switch { background: var(--primary); }
.switch-field input:checked + .switch::after { transform: translateX(17px); background: #fff; }
.switch-field input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(88, 108, 177, .35); }
.switch-field input:disabled + .switch { opacity: .45; }
.switch-field:hover .switch { filter: brightness(1.12); }
.switch-text { color: var(--text); font-size: 13px; }
.switch-list { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .12); }
.switch-list .switch-field { min-height: 34px; }

.split-controls { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 320px); gap: 10px 18px; align-items: end; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(88, 108, 177, .06); }
.help-text { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.toolbar .selection-meta { margin-left: auto; }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s; }
.btn:hover { background: #333948; border-color: #4a5162; color: var(--text-strong); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(88, 108, 177, .4); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(88, 108, 177, .3); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.success { background: var(--success-soft); border-color: rgba(33, 185, 120, .45); color: #3fd394; }
.btn.success:hover { background: var(--success); border-color: var(--success); color: #fff; }
.btn.warning { background: var(--warning-soft); border-color: rgba(221, 164, 81, .45); color: #ebb76a; }
.btn.warning:hover { background: var(--warning); border-color: var(--warning); color: #1a1d24; }
.btn.info { background: var(--info-soft); border-color: rgba(48, 133, 214, .45); color: #6db1f1; }
.btn.info:hover { background: var(--info); border-color: var(--info); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #f06a6b; border-color: #f06a6b; }
.btn.danger.outline, .btn.compact.danger { background: var(--danger-soft); border-color: rgba(234, 84, 85, .45); color: #f27a7b; }
.btn.danger.outline:hover, .btn.compact.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.compact { min-height: 30px; padding: 0 12px; font-size: 12px; }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.2); }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.btn-group.joined { gap: 0; }
.btn-group.joined .btn { border-radius: 0; margin-left: -1px; }
.btn-group.joined .btn:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group.joined .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group.joined .btn:hover { z-index: 1; }
.selection-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 9px; border: 1px solid transparent; border-radius: 11px; background: rgba(138, 145, 158, .14); color: #aab1bd; font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.good { background: var(--success-soft); border-color: rgba(33, 185, 120, .3); color: #3fd394; }
.badge.bad { background: var(--danger-soft); border-color: rgba(234, 84, 85, .3); color: #f27a7b; }
.badge.neutral { border-color: rgba(138, 145, 158, .22); }
.badge-group { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; }
.badge-group .badge::before { display: none; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow: auto; }
.table-wrap.bordered { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th, .data-table td { height: 44px; padding: 0 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.data-table th { position: sticky; top: 0; z-index: 1; height: 42px; background: #252932; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: rgba(88, 108, 177, .08); }
.data-table tbody tr:has(input[type="checkbox"]:checked) { background: rgba(88, 108, 177, .13); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.data-table td:has(> .badge-group) { padding-top: 8px; padding-bottom: 8px; }
.col-check { width: 44px; }
td.mono, .mono { font-family: var(--mono); font-size: 12.5px; color: #c6cbe0; }
.empty { padding: 34px 16px !important; text-align: center !important; color: var(--faint) !important; font-size: 13px; }
td.empty { height: auto !important; }

/* ---------- Pager ---------- */
.pager { justify-content: space-between; flex-wrap: wrap; }
.pager-size { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.pager-size select { width: auto; min-width: 118px; height: 30px; font-size: 12px; }
.pager-buttons { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.pager-label { min-width: 86px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Event log ---------- */
.event-log { height: 360px; overflow: auto; background: #121419; border-radius: 0 0 var(--radius) var(--radius); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.event { display: flex; align-items: flex-start; gap: 10px; padding: 6px 16px; border-bottom: 1px solid #1b1e25; border-left: 3px solid transparent; animation: event-in .2s var(--ease); }
.event:hover { background: #181b22; }
.event time { flex: 0 0 64px; color: var(--faint); font-variant-numeric: tabular-nums; }
.event p { flex: 1 1 auto; min-width: 0; color: #c9ced8; overflow-wrap: anywhere; }
.log-level, .log-cat, .log-ctx { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 38px; height: 19px; padding: 0 6px; border-radius: 3px; font-size: 11px; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-weight: 700; line-height: 1; white-space: nowrap; }
.log-level { background: rgba(88, 108, 177, .18); color: #9fb0f0; }
.log-cat { background: rgba(138, 145, 158, .14); color: #aab1bd; font-weight: 600; }
.log-ctx { border: 1px solid rgba(54, 194, 201, .35); background: rgba(54, 194, 201, .1); color: #6fd8dd; font-family: var(--mono); font-weight: 600; cursor: pointer; }
.log-ctx:hover { background: rgba(54, 194, 201, .25); color: #fff; }
.event.info { border-left-color: rgba(88, 108, 177, .55); }
.event.success { border-left-color: var(--success); }
.event.success .log-level { background: var(--success-soft); color: #3fd394; }
.event.success p { color: #7fe3b7; }
.event.warning { border-left-color: var(--warning); }
.event.warning .log-level { background: var(--warning-soft); color: #ebb76a; }
.event.warning p { color: #ebb76a; }
.event.error { border-left-color: var(--danger); background: rgba(234, 84, 85, .05); }
.event.error .log-level { background: var(--danger-soft); color: #f27a7b; }
.event.error p { color: #f48f90; }
.event.debug p { color: var(--muted); }
.event.ctx-hidden { display: none; }
.event-log[data-filter="problems"] .event:not([data-level="warning"]):not([data-level="error"]),
.event-log[data-filter="error"] .event:not([data-level="error"]),
.event-log[data-filter="success"] .event:not([data-level="success"]) { display: none; }
.event-log .empty { font-family: inherit; }
.log-filter { width: auto; min-width: 128px; height: 30px; font-size: 12px; }
.log-filter-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: rgba(54, 194, 201, .08); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.log-filter-bar b { color: #6fd8dd; font-family: var(--mono); }
.log-filter-bar .btn { margin-left: auto; }
.binding-toolbar-right { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.binding-toolbar-right .badge { margin-bottom: 0; }
@keyframes event-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tabs (mail) ---------- */
.tab-bar { display: flex; gap: 4px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.mail-tab { min-height: 36px; padding: 0 20px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: background .15s, color .15s; }
.mail-tab:hover { background: var(--surface-2); color: var(--text-strong); }
.mail-tab.active { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(88, 108, 177, .3); }
.mail-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mail-panel { display: none; }
.mail-panel.active { display: block; animation: view-in .2s var(--ease); }
#mail-panel-custom.active > * + * { margin-top: 18px; }

/* Mail scan results (rendered by app.js) */
.mail-scan { margin-top: 20px; padding: 16px; border: 1px solid rgba(88, 108, 177, .4); border-radius: var(--radius); background: rgba(88, 108, 177, .07); }
.mail-scan-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.mail-scan-head strong { color: #9fb0f0; font-size: 14px; }
.mail-scan-head span { color: var(--muted); font-size: 12px; }
.mail-scan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.mail-scan-grid label { display: grid; gap: 7px; color: #b4bac5; font-size: 12px; font-weight: 600; }
.mail-scan-grid [data-mail-apply-scan] { grid-column: 1 / -1; justify-self: end; min-width: 150px; }
.mail-scan-note { margin-top: 12px; color: var(--muted); font-size: 12px; }
.mail-scan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mail-scan-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font-size: 12px; transition: border-color .15s; }
.mail-scan-item:hover { border-color: var(--primary); }
.mail-scan-item strong, .mail-scan-item span { display: block; }
.mail-scan-item strong { color: var(--text-strong); }
.mail-scan-item span { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }

.pool-toolbar { display: grid; grid-template-columns: minmax(160px, 280px) minmax(220px, 1fr); gap: 16px; margin-bottom: 16px; }
.filters select { width: auto; min-width: 120px; height: 30px; font-size: 12px; }

/* ---------- Binding / upload ---------- */
.binding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.upload-card { display: flex; flex-direction: column; }
.binding-config-card { grid-column: 1 / -1; }
.binding-config-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-message { min-height: 34px; display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .14); color: var(--muted); font-size: 12px; }
.form-message::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.binding-config-card .form-message { margin-top: 18px; }
.form-message.testing { border-color: rgba(221, 164, 81, .35); background: var(--warning-soft); color: #ebb76a; }
.form-message.testing::before { animation: pulse-dot 1s ease-in-out infinite; }
.form-message.success { border-color: rgba(33, 185, 120, .35); background: var(--success-soft); color: #3fd394; }
.form-message.bad { border-color: rgba(234, 84, 85, .35); background: var(--danger-soft); color: #f27a7b; }
@keyframes pulse-dot { 50% { opacity: .2; } }

/* ---------- Account center ---------- */
.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px)); gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.filter-bar select, .filter-bar input { height: 36px; }
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; top: 50%; left: 11px; width: 15px; height: 15px; color: var(--faint); transform: translateY(-50%); pointer-events: none; }
.input-icon input { padding-left: 34px; }
.action-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 12px 20px 6px; }
.action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.action-label { color: var(--faint); font-size: 12px; font-weight: 700; }
.action-bar .selection-meta { margin-left: auto; padding: 4px 10px; border-radius: 11px; background: var(--primary-soft); color: #9fb0f0; font-weight: 600; }
.action-hint { padding: 0 20px 12px; color: var(--faint); font-size: 12px; border-bottom: 1px solid var(--line); }

/* ---------- Task results summary ---------- */
.result-body { display: grid; gap: 12px; padding: 16px 20px; }
.result-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.result-chip { position: relative; display: flex; align-items: baseline; gap: 8px; min-width: 110px; padding: 9px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .14); }
.result-chip span { color: var(--muted); font-size: 12px; }
.result-chip strong { color: var(--text-strong); font-size: 18px; font-variant-numeric: tabular-nums; }
.result-chip.good strong { color: #3fd394; }
.result-chip.bad strong { color: #f27a7b; }
.result-rate { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(234, 84, 85, .35); }
.result-rate b { display: block; height: 100%; background: var(--success); }
.result-reasons-head { color: var(--muted); font-size: 12px; font-weight: 700; }
.result-reasons { display: grid; gap: 6px; }
.reason-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 32%) 40px 44px; align-items: center; gap: 12px; font-size: 12.5px; }
.reason-text { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.reason-bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(138, 145, 158, .14); }
.reason-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ea5455, #f08a5d); }
.reason-row b { color: var(--text-strong); text-align: right; font-variant-numeric: tabular-nums; }
.reason-row small { color: var(--faint); text-align: right; }
.result-empty { color: var(--faint); font-size: 12.5px; }
.result-detail-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.result-detail-bar .selection-meta { margin-left: auto; }
.result-filter .btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.result-detail { max-height: 340px; border-top: 1px solid var(--line); }
.result-reason { max-width: 420px; overflow: hidden; text-overflow: ellipsis; color: #f48f90; }
.log-ctx.static { cursor: default; }
@media (max-width: 640px) {
  .reason-row { grid-template-columns: minmax(0, 1fr) 70px 30px; }
  .reason-row small { display: none; }
}

/* ---------- Modals ---------- */
dialog.modal { margin: auto; max-width: none; max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal[open] { display: flex; animation: modal-in .2s var(--ease); }
dialog.modal::backdrop { background: rgba(6, 8, 12, .66); backdrop-filter: blur(2px); animation: fade-in .2s var(--ease); }
.modal-xl { width: min(1140px, calc(100vw - 32px)); }
.modal-lg { width: min(920px, calc(100vw - 32px)); }
.modal-content { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--card-head); border-bottom: 1px solid var(--line); }
.modal-title { color: var(--text-strong); font-size: 16px; font-weight: 700; }
.modal-header p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.modal-close { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 22px; line-height: 1; transition: background .15s, color .15s; }
.modal-close:hover { background: var(--danger-soft); color: #f27a7b; }
.modal-close:focus-visible { outline: 2px solid var(--primary); }
.modal-body { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 18px 20px; overflow: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .1); }
.modal-footer .btn { min-width: 110px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.alert { padding: 10px 14px; border: 1px solid rgba(48, 133, 214, .35); border-left-width: 3px; border-radius: var(--radius-sm); background: var(--info-soft); color: #9cc8f3; font-size: 12.5px; line-height: 1.6; }
.alert.bad { border-color: rgba(234, 84, 85, .45); background: var(--danger-soft); color: #f48f90; }

.checkout-probe-proxy-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: end; }
.checkout-probe-proxy-entry .btn { min-height: 38px; min-width: 100px; }
.checkout-probe-proxy-entry .selection-meta { align-self: center; padding-top: 22px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .14); }
.mini-stats > div, .mini-stats > span { min-width: 0; padding: 10px 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.mini-stats > :last-child { border-right: 0; }
.mini-stats > div span { display: block; }
.mini-stats strong { display: block; margin-top: 4px; color: var(--text-strong); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-stats > .tone-success { background: transparent; color: var(--muted); }
.mini-stats > .tone-success strong { color: #3fd394; }
.mini-stats > .tone-danger { background: transparent; color: var(--muted); }
.mini-stats > .tone-danger strong { color: #f27a7b; }
.checkout-probe-proxy { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.checkout-probe-table-wrap { min-height: 0; max-height: min(44vh, 440px); scrollbar-gutter: stable; }
.checkout-probe-table-wrap table { min-width: 860px; }
.checkout-probe-account small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.checkout-probe-failure { display: block; margin-top: 3px; color: var(--warning) !important; font-size: 10.5px; }

.binding-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.binding-toolbar .field { width: 200px; }
.binding-toolbar .badge { margin-bottom: 8px; }
.binding-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.binding-log { height: 360px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ---------- Toast ---------- */
.toast { position: fixed; inset: auto; top: calc(var(--topbar-h) + 14px); right: 22px; z-index: 1000; margin: 0; overflow: visible; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 12px 16px 12px 14px; border: 1px solid rgba(33, 185, 120, .4); border-left: 4px solid var(--success); border-radius: var(--radius); background: #1f2a27; color: #b9eed6; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast::before { content: "✓"; width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: #fff; font-size: 12px; font-weight: 800; }
.toast.show { opacity: 1; transform: none; }
.toast.bad { border-color: rgba(234, 84, 85, .45); border-left-color: var(--danger); background: #2c1f22; color: #f6c0c1; }
.toast.bad::before { content: "!"; background: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 1500px) {
  .stat-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .binding-config-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .identity-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-grid, .mail-scan-grid, .mail-scan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .binding-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .binding-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .input-icon { grid-column: 1 / -1; }
  .identity-admin-grid { grid-template-columns: 1fr; }
  .identity-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .shell, .sidebar-collapsed .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .24s var(--ease); }
  .sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(6, 8, 12, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-collapsed .brand { justify-content: flex-start; padding: 0 15px; }
  .sidebar-collapsed .brand-text, .sidebar-collapsed .nav-label, .sidebar-collapsed .nav-caption, .sidebar-collapsed .sidebar-status-text { opacity: 1; width: auto; overflow: visible; pointer-events: auto; }
  .sidebar-collapsed .nav-caption { height: auto; padding: 18px 22px 8px; }
  .sidebar-collapsed .nav-item { justify-content: flex-start; gap: 12px; padding: 0 14px; }
  .sidebar-collapsed .sidebar-status { justify-content: flex-start; gap: 9px; padding: 14px 22px; }
  .topbar { padding: 0 16px; }
  .top-status-label, .top-divider { display: none; }
  .content-header { padding: 18px 16px 2px; }
  .view { padding: 12px 16px 24px; }
  .page-footer { padding: 12px 16px; }
}

@media (max-width: 640px) {
  .stat-grid-4, .stat-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .stat-body strong { font-size: 18px; }
  .form-grid, .config-grid, .binding-config-grid, .mail-scan-grid, .mail-scan-list, .pool-toolbar, .field-row, .split-controls, .filter-bar { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .card-header { flex-wrap: wrap; padding: 12px 14px; }
  .card-body { padding: 14px; }
  .card-footer { padding: 10px 14px; }
  .breadcrumb-home, .breadcrumb-sep { display: none; }
  .top-time { display: none; }
  .event { flex-wrap: wrap; gap: 4px 8px; padding: 7px 12px; }
  .event p { flex-basis: 100%; }
  .action-bar { padding: 12px 14px 6px; }
  .action-bar .selection-meta { margin-left: 0; }
  .action-hint { padding: 0 14px 10px; }
  .checkout-probe-proxy-entry { grid-template-columns: 1fr; }
  .checkout-probe-proxy-entry .selection-meta { padding-top: 0; }
  .mini-stats, .binding-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-stats > * { border-bottom: 1px solid var(--line); }
  .binding-toolbar { flex-direction: column; align-items: stretch; }
  .binding-toolbar .field { width: 100%; }
  .modal-body { padding: 14px; }
  .page-footer { flex-direction: column; gap: 2px; }
  .toast { left: 16px; right: 16px; max-width: none; }
  .auth-screen { padding: 16px; }
  .auth-card { padding: 22px 18px; }
  .identity-summary { max-width: 150px; overflow: hidden; }
  .identity-summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .identity-inline-form { align-items: stretch; flex-direction: column; }
  .identity-summary-grid { grid-template-columns: 1fr; }
  .identity-user-actions { min-width: 220px; }
}

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