/* SparkFlow 2.3: Astra visual system for desktop and narrow layouts. */
:root {
  --bg: #0b1120;
  --surface: #111827;
  --surface-alt: #172033;
  --surface-soft: #1e293b;
  --border: #25324a;
  --border-strong: #3b4b68;
  --text: #f8fafc;
  --text-muted: #9caac0;
  --text-faint: #71809a;
  --primary: #6366f1;
  --primary-strong: #4f46e5;
  --primary-soft: rgba(99, 102, 241, .16);
  --accent: #38bdf8;
  --success: #2dd4bf;
  --success-soft: rgba(45, 212, 191, .14);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .14);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, .14);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .14);
  --focus: 0 0 0 3px rgba(99, 102, 241, .24);
  --fire-grad: linear-gradient(135deg, #38bdf8 0%, #6366f1 52%, #8b5cf6 100%);
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow: 0 12px 30px rgba(0, 0, 0, .16);
  --sidebar-width: 226px;
}
html[data-theme="light"] {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-soft: #edf2f7;
  --border: #e1e7f0;
  --border-strong: #c5cfdd;
  --text: #111827;
  --text-muted: #5f6b7d;
  --text-faint: #8491a3;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #0284c7;
  --success: #0f8f7e;
  --success-soft: #eafaf5;
  --warning: #b7791f;
  --warning-soft: #fff8e6;
  --danger: #c2415b;
  --danger-soft: #fff1f3;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --focus: 0 0 0 3px rgba(79, 70, 229, .16);
  --fire-grad: linear-gradient(135deg, #0ea5e9 0%, #4f46e5 54%, #7c3aed 100%);
  --shadow: 0 12px 30px rgba(15, 23, 42, .065), 0 2px 7px rgba(15, 23, 42, .025);
}
body { font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif; }
.sidebar {
  padding: 28px 17px 18px;
  gap: 34px;
  color: #eef2ff;
  background: #0f172a;
  border-right: 0;
  --text-muted: #a5b4cc;
  --text-faint: #71809a;
  --border: #26334b;
}
.brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 13px; }
.brand-title { font-size: 19px; letter-spacing: 1px; }
.brand-subtitle { margin-top: 6px; font-size: 9px; letter-spacing: 1.1px; }
.sidebar .brand { padding-left: 5px; }
.nav-groups { gap: 30px; }
.nav-group-title { margin-bottom: 10px; font-size: 10px; letter-spacing: 1.5px; }
.nav-group { gap: 6px; }
.nav-item { min-height: 43px; border-radius: 10px; font-weight: 500; }
.nav-item:hover { color: #fff; background: #1e293b; }
.nav-item.active { color: #c7d2fe; background: #252550; box-shadow: none; }
.nav-item.active svg { color: #818cf8; }
.sidebar-footer .button-quiet { color: #a5b4cc; background: transparent; border-color: #26334b; }
.sidebar-footer .button-quiet:hover { background: #1e293b; color: #fff; }
.user-avatar { border-radius: 50%; background: #334155; color: #dbeafe; text-transform: uppercase; }
.user-copy strong { font-weight: 600; }
.main-area { padding: 32px 32px 48px; }
.page-header { align-items: center; margin-bottom: 25px; }
.page-heading h1 { font-size: 28px; font-weight: 700; letter-spacing: -.7px; }
.page-heading p { margin-top: 9px; font-size: 12px; }
.page-header .button { min-height: 36px; padding: 8px 11px; font-size: 12px; }
.page-body, .dashboard-stack { gap: 20px; }
.button, .icon-button, input, select, textarea { border-radius: 10px; }
.button { font-weight: 600; transition: background .16s, box-shadow .16s; }
.button-primary { box-shadow: 0 4px 12px rgba(79, 70, 229, .18); }
.status-banner { border-radius: 10px; padding: 11px 15px; }
.status-banner strong { font-weight: 500; }
.overview-strip { border-radius: 16px; }
.overview-primary { background: var(--primary-soft); }
.overview-primary, .overview-cell { padding: 23px 20px; }
.progress-badge { width: 70px; height: 70px; background: var(--primary); }
.overview-value { font-size: 25px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.overview-help { margin-top: 9px; font-size: 11px; }
.metric-grid { gap: 14px; }
.metric-card { position: relative; padding: 20px; border-radius: 14px; overflow: hidden; }
.metric-card.success, .metric-card.warning, .metric-card.danger, .metric-card.info { border-top: 1px solid var(--border); }
.metric-card .metric-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.metric-label svg { width: 17px; height: 17px; }
.metric-card.success .metric-label svg { color: var(--success); }
.metric-card.warning .metric-label svg { color: var(--warning); }
.metric-card.danger .metric-label svg { color: var(--danger); }
.metric-card.info .metric-label svg { color: var(--info); }
.metric-value { margin-top: 14px; font-size: 32px; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric-help { margin-top: 8px; font-size: 11px; }
.section-title { font-size: 17px; }
.section-header { padding-top: 7px; }
.account-row { padding: 16px; border-radius: 12px; }
.account-avatar { border-radius: 12px; }
.empty-state.account-empty { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 23px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 14px; text-align: left; }
.account-empty-copy { display: flex; align-items: center; gap: 14px; }
.account-empty-copy > svg { width: 28px; height: 28px; color: var(--primary); }
.account-empty strong, .account-empty small { display: block; }
.account-empty strong { color: var(--text); font-size: 14px; font-weight: 600; }
.account-empty small { margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.collapsible-section > summary { padding: 19px 20px; }
.summary-copy { gap: 13px; }
.summary-copy strong { font-size: 14px; font-weight: 600; }
.summary-copy small { margin-top: 4px; font-size: 11px; }
.collapsible-body { padding: 0 20px 20px; }
.login-workspace-hint { padding: 13px 15px; background: var(--primary-soft); border-radius: 10px; }
.login-qr-panel { border-radius: 14px; }
.login-qr-panel img { border-radius: 12px; }
.login-page { grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr); }
.login-brand-panel { padding: 40px 52px 32px; background: #0f172a; color: #f8fafc; border-right: 0; gap: 34px; }
.login-brand-panel .brand-subtitle { color: #8291aa; }
.login-brand-copy { max-width: 420px; margin: 25px 0; }
.login-eyebrow { margin-bottom: 16px; font-size: 11px; letter-spacing: 2px; color: var(--text-muted); }
.login-brand-panel .login-eyebrow { color: #93a4c0; }
.login-brand-copy h1 { margin-bottom: 24px; font-size: clamp(36px, 4.3vw, 60px); line-height: 1.22; font-weight: 650; letter-spacing: -2px; }
.login-brand-copy h1 span { color: #a5b4fc; }
.login-brand-copy p { color: #9eacc3; font-size: 13px; line-height: 1.95; }
.login-features { margin-top: 32px; gap: 22px; }
.login-features li { gap: 15px; }
.login-features svg { width: 21px; height: 21px; color: #7dd3fc; }
.login-features strong, .login-features small { display: block; }
.login-features strong { color: #eef2ff; font-size: 13px; font-weight: 500; }
.login-features small { margin-top: 3px; color: #8fa0ba; font-size: 11px; }
.login-signature { color: #788aa6; font-size: 9px; letter-spacing: 1px; }
.login-signature span { margin-left: 16px; letter-spacing: 0; }
.login-form-panel { padding: 40px; background: var(--bg); }
.login-card { width: min(100%, 410px); padding: 34px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 20px 55px rgba(15, 23, 42, .09); }
.login-welcome-icon { display: inline-flex; padding: 13px; margin-bottom: 26px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); }
.login-welcome-icon svg { width: 25px; height: 25px; }
.login-card .login-eyebrow { margin-bottom: 8px; font-size: 10px; }
.login-card h2 { font-size: 28px; font-weight: 650; letter-spacing: -.5px; }
.login-card > p { margin: 10px 0 28px; font-size: 12px; }
.login-card .stack-form { gap: 20px; }
.login-card label > span { font-size: 12px; font-weight: 500; }
.login-card input { height: 46px; padding: 11px 13px; background: var(--surface-alt); }
.login-card .button-block { min-height: 46px; margin-top: 6px; justify-content: space-between; padding-inline: 17px; }
.remember-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.remember-note svg { flex: 0 0 17px; color: var(--success); margin-top: 2px; }
.remember-note small { font-size: 11px; color: var(--text-faint); }
.login-foot { margin-top: 20px; font-size: 10px; line-height: 1.7; }
.account-onboarding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding: 22px;
  border: 1px solid #dce3ff;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--primary-soft), var(--surface) 65%);
}
.account-onboarding-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
}
.account-onboarding-icon svg { width: 23px; height: 23px; }
.account-onboarding strong { font-size: 15px; font-weight: 650; }
.account-onboarding p { margin: 5px 0 0; color: var(--text-muted); font-size: 12px; }
.account-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.account-switcher {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.account-switcher:hover { border-color: #a5b4fc; transform: translateY(-1px); box-shadow: var(--shadow); }
.account-switcher strong, .account-switcher small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-switcher strong { font-size: 13px; font-weight: 600; }
.account-switcher small { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.account-switcher > svg { width: 15px; height: 15px; color: var(--text-faint); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.status-dot.success { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.account-editor:target { border-color: #a5b4fc; box-shadow: 0 0 0 3px var(--primary-soft); }
.login-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.login-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--surface-alt); }
.login-steps li > span { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 700; }
.login-steps strong, .login-steps small { display: block; }
.login-steps strong { font-size: 12px; font-weight: 600; }
.login-steps small { color: var(--text-muted); font-size: 10px; }
.login-primary-actions { margin-top: 2px; }
.login-primary-actions .button { flex: 1 1 130px; }
.login-primary-actions .login-desktop-close { flex: 0 0 auto; }
.login-help { border-top: 1px solid var(--border); padding-top: 10px; }
.login-help > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 11px; }
.login-help > summary::-webkit-details-marker { display: none; }
.login-help > summary svg { width: 14px; height: 14px; }
.login-help > summary svg:last-child { margin-left: auto; transition: transform .16s; }
.login-help[open] > summary svg:last-child { transform: rotate(180deg); }
.login-help .button-row { margin-top: 10px; }
.settings-shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.settings-shortcuts > a { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.settings-shortcuts > a:hover { border-color: #a5b4fc; box-shadow: var(--shadow); }
.settings-shortcuts > a > svg:first-child { width: 20px; height: 20px; color: var(--primary); }
.settings-shortcuts > a > svg:last-child { width: 15px; height: 15px; color: var(--text-faint); }
.settings-shortcuts strong, .settings-shortcuts small { display: block; }
.settings-shortcuts strong { font-size: 13px; font-weight: 600; }
.settings-shortcuts small { margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.backup-overview { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface-muted); }
.backup-overview > svg { width: 22px; height: 22px; color: var(--success); }
.backup-overview strong { display: block; margin-bottom: 5px; font-size: 13px; }
.schedule-toggle-card { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); }
.schedule-toggle-card small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.schedule-fields { transition: opacity .16s ease; }
.schedule-fields.is-disabled { opacity: .5; }
.dashboard-stack[data-dashboard-view="settings"] .settings-shortcuts { order: 1; }
.dashboard-stack[data-dashboard-view="settings"] .settings-users { order: 2; }
.dashboard-stack[data-dashboard-view="settings"] .advanced-grid { order: 3; }
@media (min-width: 1500px) { .main-area { padding-inline: 42px; } .dashboard-stack { gap: 24px; } }
@media (max-width: 1180px) {
  .main-area { padding: 26px 22px 36px; }
  .page-heading h1 { font-size: 24px; }
  .overview-primary, .overview-cell { padding: 18px; }
  .login-brand-panel { padding: 34px; }
  .login-form-panel { padding: 30px; }
  .account-switcher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { padding-top: 24px; }
  .page-header { align-items: flex-start; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 0; padding: 26px; }
  .login-brand-copy { margin: 0; }
  .login-brand-copy h1 { font-size: 34px; margin-bottom: 10px; }
  .login-brand-copy p, .login-features, .login-signature { display: none; }
  .login-brand-panel .login-eyebrow { margin-bottom: 10px; }
  .login-form-panel { padding: 28px 20px; }
  .login-card { width: min(100%, 440px); }
  .settings-shortcuts { grid-template-columns: 1fr; }
  .account-onboarding { grid-template-columns: auto minmax(0, 1fr); }
  .account-onboarding > .button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 620px) {
  .main-area { padding: 20px 14px 30px; }
  .metric-card { padding: 16px; }
  .metric-value { font-size: 28px; }
  .empty-state.account-empty { align-items: flex-start; flex-direction: column; }
  .login-card { padding: 28px; }
  .account-switcher-grid { grid-template-columns: 1fr; }
  .account-onboarding { display: flex; align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Astra command center surfaces. */
:root {
  --status-glass: rgba(17, 24, 39, .8);
  --overview-focus: #17172b;
  --metric-success-bg: #102523;
  --metric-warning-bg: #272315;
  --metric-danger-bg: #291923;
  --metric-info-bg: #132238;
  --section-shell: rgba(17, 24, 39, .58);
  --success-chip-bg: #12312c;
  --overview-label-accent: #a5b4fc;
  --soft-card-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  --soft-card-hover-shadow: 0 14px 32px rgba(0, 0, 0, .17);
}
html[data-theme="light"] {
  --bg: #f4f7fb;
  --surface-alt: #f8fafc;
  --surface-soft: #edf2f7;
  --border: #e1e7f0;
  --border-strong: #c5cfdd;
  --text: #111827;
  --text-muted: #5f6b7d;
  --text-faint: #8491a3;
  --primary-soft: #eef2ff;
  --shadow: 0 12px 30px rgba(15, 23, 42, .065), 0 2px 7px rgba(15, 23, 42, .025);
  --status-glass: rgba(255, 255, 255, .64);
  --overview-focus: #f3f4ff;
  --metric-success-bg: #f4fcfa;
  --metric-warning-bg: #fffbf2;
  --metric-danger-bg: #fff6f8;
  --metric-info-bg: #f3f8ff;
  --section-shell: rgba(255, 255, 255, .42);
  --success-chip-bg: #eefbf7;
  --overview-label-accent: #4f46e5;
  --soft-card-shadow: 0 2px 8px rgba(15, 23, 42, .035);
  --soft-card-hover-shadow: 0 14px 32px rgba(15, 23, 42, .09);
}

.sidebar {
  padding: 24px 15px 17px;
  gap: 30px;
  background: #0f172a;
  box-shadow: inset -1px 0 rgba(255, 255, 255, .035);
}

.sidebar-head {
  padding: 0 3px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sidebar .brand { padding-left: 1px; }
.brand-mark {
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(79, 70, 229, .28), inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.brand-title { font-size: 18px; font-weight: 680; letter-spacing: .4px; }
.brand-subtitle { color: #8291aa; font-size: 8px; letter-spacing: 1.35px; }
.nav-groups { gap: 25px; }
.nav-group-title { margin: 0 11px 8px; color: #64748b; font-size: 9px; letter-spacing: 1.7px; }
.nav-group { gap: 5px; }
.nav-item {
  position: relative;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #a5b4cc;
  font-size: 13px;
  font-weight: 580;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-item:hover { color: #f8fafc; background: #1e293b; transform: translateX(1px); }
.nav-item.active {
  color: #c7d2fe;
  background: #252550;
  border-color: rgba(129, 140, 248, .14);
  box-shadow: inset 3px 0 #818cf8;
}
.nav-item svg { width: 18px; height: 18px; }
.sidebar-footer { gap: 14px; border-color: rgba(255, 255, 255, .08); }
.sidebar-footer .button-quiet { border-color: rgba(255, 255, 255, .1); }
.user-avatar { width: 38px; height: 38px; flex-basis: 38px; border: 2px solid rgba(255, 255, 255, .1); }

.main-area { max-width: 1640px; width: 100%; margin-inline: auto; padding: 30px 34px 48px; }
.page-header { margin-bottom: 23px; align-items: flex-end; }
.page-heading { display: grid; }
.page-eyebrow {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.55px;
  text-transform: uppercase;
}
.page-heading h1 { font-size: 29px; font-weight: 680; letter-spacing: -.9px; line-height: 1.15; }
.page-heading p { margin-top: 8px; color: var(--text-muted); font-size: 12px; }
.page-header-actions { gap: 10px; }
.action-bar { gap: 9px; }
.page-header .button { min-height: 38px; padding-inline: 13px; }
.page-header .icon-button { width: 38px; height: 38px; background: var(--surface); box-shadow: var(--shadow); }
.button { letter-spacing: .02em; }
.button-primary { box-shadow: 0 7px 18px rgba(79, 70, 229, .22); }
.button-primary:hover { box-shadow: 0 10px 24px rgba(79, 70, 229, .28); }

.dashboard-stack[data-dashboard-view="dashboard"] { gap: 17px; }
.status-banner.system-status {
  position: relative;
  min-height: 42px;
  padding: 8px 10px 8px 15px;
  border-color: var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  background: var(--status-glass);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .03);
  backdrop-filter: blur(8px);
}
.status-banner.system-status strong { font-size: 12px; font-weight: 550; }
.status-banner.system-status.success strong > svg { color: var(--success); }
.status-banner.system-status.warning strong > svg { color: var(--warning); }
.status-banner.system-status.info strong > svg { color: var(--info); }
.status-banner.system-status .pill { min-height: 23px; padding-inline: 9px; font-size: 10px; }
.refresh-notice { border-radius: 12px; }

.dashboard-insights {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(330px, .92fr);
  gap: 14px;
  align-items: stretch;
}
.dashboard-insights .overview-strip {
  min-height: 256px;
  grid-template-columns: minmax(260px, 1.28fr) minmax(175px, .72fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.dashboard-insights .overview-primary {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  padding: 29px;
  align-content: center;
  gap: 20px;
  background: var(--overview-focus);
  overflow: hidden;
}
.dashboard-insights .overview-cell {
  padding: 17px 18px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dashboard-insights .overview-cell + .overview-cell { border-top: 1px solid var(--border); }
.progress-badge {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  background: var(--fire-grad);
  box-shadow: 0 12px 28px rgba(79, 70, 229, .26), inset 0 0 0 1px rgba(255, 255, 255, .24);
}
.progress-badge strong { font-size: 24px; font-weight: 720; }
.progress-badge small { margin-top: 4px; font-size: 9px; letter-spacing: .6px; }
.dashboard-insights .overview-label { font-size: 10px; font-weight: 650; letter-spacing: .45px; }
.dashboard-insights .overview-primary .overview-label { color: var(--overview-label-accent); }
.dashboard-insights .overview-primary .overview-value { margin-top: 7px; font-size: 37px; letter-spacing: -1.5px; }
.dashboard-insights .overview-cell .overview-value { margin-top: 6px; font-size: 20px; font-weight: 680; }
.dashboard-insights .overview-help { margin-top: 7px; font-size: 10px; line-height: 1.45; }

.dashboard-insights .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dashboard-insights .metric-card {
  min-height: 123px;
  padding: 17px 18px;
  border-top-width: 1px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.dashboard-insights .metric-card:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--soft-card-hover-shadow); }
.dashboard-insights .metric-card.success { background: var(--metric-success-bg); }
.dashboard-insights .metric-card.warning { background: var(--metric-warning-bg); }
.dashboard-insights .metric-card.danger { background: var(--metric-danger-bg); }
.dashboard-insights .metric-card.info { background: var(--metric-info-bg); }
.dashboard-insights .metric-label { font-size: 10px; font-weight: 650; }
.dashboard-insights .metric-label svg { width: 16px; height: 16px; }
.dashboard-insights .metric-value { margin-top: 4px; font-size: 30px; font-weight: 680; letter-spacing: -1px; }
.dashboard-insights .metric-help { margin-top: 3px; font-size: 10px; }

.account-overview-section {
  gap: 13px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--section-shell);
}
.account-overview-section .section-header { align-items: center; padding: 1px 2px 4px; }
.account-overview-section .section-title { font-size: 16px; font-weight: 670; letter-spacing: -.2px; }
.account-overview-section .section-header p { font-size: 11px; }
.section-header-side { display: flex; align-items: center; gap: 14px; }
.section-count {
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(45, 212, 191, .26);
  border-radius: 999px;
  color: var(--success);
  background: var(--success-chip-bg);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.account-summary-list { gap: 9px; }
.account-row {
  min-height: 74px;
  padding: 14px 15px;
  border-radius: 14px;
  box-shadow: var(--soft-card-shadow);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.account-row:hover { transform: translateY(-1px); border-color: #a5b4fc; box-shadow: var(--soft-card-hover-shadow); }
.account-row > svg { width: 16px; height: 16px; color: var(--text-faint); }
.account-avatar { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; background: var(--fire-grad); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.account-name strong { font-size: 13px; font-weight: 650; }
.account-name small { margin-top: 4px; font-size: 10px; }
.progress-track { height: 6px; background: var(--surface-soft); }
.progress-track i { border-radius: inherit; }
.summary-value { min-width: 62px; }
.summary-value strong { font-size: 15px; font-weight: 680; }
.summary-value small { font-size: 9px; }

.collapsible-section,
.panel,
.profile-card,
.account-editor { border-radius: 16px; box-shadow: var(--shadow); }
.collapsible-section { overflow: clip; }
.collapsible-section > summary { min-height: 66px; transition: background .16s ease; }
.collapsible-section > summary:hover { background: var(--surface-alt); }
.settings-shortcuts > a,
.account-switcher {
  box-shadow: var(--soft-card-shadow);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.settings-shortcuts > a:hover,
.account-switcher:hover { transform: translateY(-2px); border-color: #a5b4fc; box-shadow: var(--soft-card-hover-shadow); }
.settings-shortcuts > a { min-height: 84px; padding: 18px; border-radius: 15px; }
.settings-shortcuts > a > svg:first-child {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
}
.account-onboarding { border-radius: 18px; box-shadow: var(--shadow); }

@media (max-width: 1220px) {
  .dashboard-insights { grid-template-columns: minmax(0, 1.42fr) minmax(292px, .88fr); }
  .dashboard-insights .overview-strip { grid-template-columns: minmax(220px, 1.15fr) minmax(155px, .85fr); }
  .dashboard-insights .overview-primary { padding: 23px; gap: 15px; }
  .progress-badge { width: 72px; height: 72px; flex-basis: 72px; }
  .dashboard-insights .overview-primary .overview-value { font-size: 32px; }
  .account-row { grid-template-columns: minmax(180px, 1.12fr) minmax(135px, .88fr) repeat(3, minmax(46px, 58px)) 18px; gap: 10px; }
}

@media (max-width: 1080px) {
  .dashboard-insights { grid-template-columns: 1fr; }
  .dashboard-insights .overview-strip { min-height: 220px; grid-template-columns: minmax(260px, 1.3fr) minmax(180px, .7fr); }
  .dashboard-insights .metric-card { min-height: 108px; }
}

@media (max-width: 900px) {
  .page-eyebrow { margin-bottom: 5px; }
  .dashboard-insights .overview-strip { min-height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .dashboard-insights .overview-primary { grid-column: 1 / -1; grid-row: auto; min-height: 150px; }
  .dashboard-insights .overview-cell { min-height: 98px; border-top: 1px solid var(--border); }
  .dashboard-insights .overview-cell:nth-child(2),
  .dashboard-insights .overview-cell:nth-child(4) { border-left: 0; }
  .dashboard-insights .metric-card { min-height: 112px; }
  .section-header-side { width: 100%; justify-content: space-between; }
}

@media (max-width: 620px) {
  .main-area { padding-top: 18px; }
  .page-header { margin-bottom: 19px; }
  .page-heading h1 { font-size: 25px; }
  .page-header-actions,
  .action-bar { width: 100%; }
  .action-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-bar > form,
  .action-bar > .button,
  .action-bar > a { min-width: 0; width: 100%; }
  .action-bar > form .button,
  .action-bar > a { width: 100%; justify-content: center; }
  .action-bar > form:last-child { grid-column: 1 / -1; }
  .status-banner.system-status { align-items: center; flex-direction: row; }
  .dashboard-insights .overview-strip,
  .dashboard-insights .metric-grid { grid-template-columns: 1fr; }
  .dashboard-insights .overview-primary { grid-column: auto; min-height: 142px; padding: 21px; }
  .dashboard-insights .overview-cell { min-height: 84px; border-left: 0; }
  .progress-badge { width: 68px; height: 68px; flex-basis: 68px; }
  .dashboard-insights .metric-card { min-height: 100px; }
  .account-overview-section { padding: 14px; border-radius: 15px; }
  .section-header-side { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section-count { display: none; }
  .account-row { min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .account-row,
  .metric-card,
  .settings-shortcuts > a,
  .account-switcher { transform: none !important; }
}
