/* SurveyHub — dashboard styles inspired by the CampaignHub v0 template
   (compact, shadcn-like surfaces, blue→purple accent, collapsible sidebar). */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e6e8ef;
  --border-strong: #d6d9e4;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --accent: #7c3aed;
  --gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 45%, #8b5cf6 100%);
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --success: #15803d;
  --success-50: #f0fdf4;
  --warning: #b45309;
  --warning-50: #fffbeb;
  --info-50: #eff6ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px -10px rgba(79, 70, 229, .25);
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 68px;
  --header-h: 60px;

  /* chart slots (validated reference palette, light mode) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-neutral: #cbd5e1;
  --bar: #6366f1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- Shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width .2s ease, transform .2s ease;
}
.sidebar-brand {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--border); overflow: hidden;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--gradient);
  display: grid; place-items: center; color: #fff; flex-shrink: 0; box-shadow: var(--shadow-lg);
}
.brand-mark .icon { width: 18px; height: 18px; }
.brand-text { font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.brand-text small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); margin-top: -2px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; overflow-x: hidden; }
.nav-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 12px 10px 6px; white-space: nowrap;
}
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin-bottom: 2px;
  border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; white-space: nowrap;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--primary-50); color: var(--primary); }
.nav-link.active .icon { color: var(--primary); }
.sidebar-footer { border-top: 1px solid var(--border); padding: 12px; }
.role-card {
  border-radius: 10px; padding: 10px 12px; background: var(--gradient); color: #fff;
  font-size: 12px; white-space: nowrap; overflow: hidden;
}
.role-card strong { display: block; font-size: 13px; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; transition: margin-left .2s ease; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.content { padding: 24px; max-width: 1440px; margin: 0 auto; }

body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-link span,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .role-card { display: none; }
body.sidebar-collapsed .nav-link { justify-content: center; padding: 9px; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }

.sidebar-backdrop { display: none; }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; }
  .main { margin-left: 0 !important; }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 35; }
  body.sidebar-collapsed .brand-text, body.sidebar-collapsed .nav-link span,
  body.sidebar-collapsed .nav-label, body.sidebar-collapsed .role-card { display: revert; }
  body.sidebar-collapsed .nav-link { justify-content: flex-start; padding: 8px 10px; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* user menu */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 10px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.user-menu summary.btn { padding: 0 14px; border-radius: var(--radius-sm); gap: 7px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.soft { background: var(--primary-50); color: var(--primary); }
.user-meta { line-height: 1.2; }
.user-meta .name { font-weight: 600; font-size: 13px; }
.user-meta .role { font-size: 11.5px; color: var(--muted); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15,23,42,.12); padding: 6px; z-index: 50;
}
.menu-panel .menu-head { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none;
  font: inherit; color: var(--text-2); border-radius: 7px; cursor: pointer; text-align: left;
}
.menu-item:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 640px) { .user-meta { display: none; } }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:focus-visible, .input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { filter: brightness(1.05); color: #fff; background: var(--gradient); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.btn-group a { display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; height: 34px; color: var(--text-2); font-weight: 500; }
.btn-group a + a { border-left: 1px solid var(--border-strong); }
.btn-group a.active { background: var(--primary-50); color: var(--primary); }
form.inline { display: inline; }

/* ---------------------------------------------------------------- Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

/* ---------------------------------------------------------------- Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-body { padding: 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: grid; gap: 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-main { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 500; font-size: 13px; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.stat-icon.violet { background: #f5f3ff; color: #7c3aed; }
.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.green { background: #f0fdf4; color: #16a34a; }
.stat-icon.amber { background: #fffbeb; color: #d97706; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--gradient); border-radius: 99px; }
.updated-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }

/* survey cards */
.survey-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.survey-card { display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s, transform .15s; }
.survey-card:hover { border-color: var(--primary-100); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.survey-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.survey-card-title { display: flex; gap: 12px; align-items: flex-start; }
.survey-card-title h3 { font-size: 15px; color: var(--text); }
.survey-card-title a:hover h3 { color: var(--primary); }
.survey-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--gradient); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.mini-stats strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
.rate-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.badge-primary { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
.badge-gray { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-green { background: var(--success-50); color: var(--success); border-color: #bbf7d0; }
.badge-amber { background: var(--warning-50); color: var(--warning); border-color: #fde68a; }
.badge-red { background: var(--danger-50); color: var(--danger); border-color: #fecaca; }
.rate { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-weight: 600; }
.rate::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--series-neutral); }
.rate-high::before { background: #16a34a; }
.rate-mid::before { background: #d97706; }
.rate-low::before { background: #dc2626; }

/* ---------------------------------------------------------------- Tables */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; }
.search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search .input { padding-left: 32px; width: 260px; max-width: 100%; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:hover td { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border-strong); border-bottom: 0; }
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--text); }
.table th[data-sort]::after { content: "↕"; opacity: .35; margin-left: 5px; font-size: 11px; }
.table th[data-dir="asc"]::after { content: "↑"; opacity: 1; color: var(--primary); }
.table th[data-dir="desc"]::after { content: "↓"; opacity: 1; color: var(--primary); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; font-weight: 600; color: var(--primary-600); background: var(--primary-50); padding: 2px 7px; border-radius: 6px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 38px; height: 38px; color: var(--border-strong); margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.no-match { display: none; }
.pagination { display: flex; gap: 6px; align-items: center; }

/* tabs */
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.tab { border: 0; background: none; font: inherit; font-weight: 500; font-size: 13px; color: var(--text-2); padding: 6px 12px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab .count { font-size: 11px; background: var(--primary-50); color: var(--primary); border-radius: 99px; padding: 0 6px; }
[data-panel][hidden] { display: none; }

/* ---------------------------------------------------------------- Charts */
.bars { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.bar-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row .label { color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 14px; position: relative; }
.bar-fill { position: absolute; left: 0; top: 2px; bottom: 2px; min-width: 2px; background: var(--bar); border-radius: 0 4px 4px 0; }
.bar-row:hover .bar-fill { filter: brightness(1.12); }
.bar-row .value { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.axis-note { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; margin: 6px 66px 0 100px; }

.stackbar { display: flex; gap: 2px; height: 22px; margin: 6px 0 14px; }
.stackbar > span { display: block; height: 100%; min-width: 2px; }
.stackbar > span:first-child { border-radius: 4px 0 0 4px; }
.stackbar > span:last-child { border-radius: 0 4px 4px 0; }
.seg-serious, .key-serious { background: var(--series-1); }
.seg-other, .key-other { background: var(--series-2); }
.seg-none, .key-none { background: var(--series-neutral); }
.legend { display: grid; gap: 10px; }
.legend-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.legend-item .key { width: 12px; height: 12px; border-radius: 3px; }
.legend-item .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.legend-item .v small { font-weight: 500; color: var(--muted); margin-left: 6px; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; background: #0f172a; color: #fff;
  font-size: 12px; padding: 6px 9px; border-radius: 7px; box-shadow: 0 8px 20px rgba(15,23,42,.25);
  white-space: pre-line; max-width: 280px; opacity: 0; transition: opacity .08s;
}
.tooltip.show { opacity: 1; }

/* ---------------------------------------------------------------- Report */
.report-box { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.report-box .file-icon { width: 44px; height: 44px; border-radius: 10px; background: #fee2e2; color: #dc2626; display: grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 800; }
.report-box .meta { flex: 1; min-width: 0; }
.report-box .meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dropzone input[type=file] { flex: 1; min-width: 180px; }

/* ---------------------------------------------------------------- Forms */
.form-card { max-width: 680px; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field .errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: 12.5px; }
.input, .field input[type=text], .field input[type=email], .field input[type=number], .field input[type=search],
.field select, .field textarea, .field input[type=file] {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input { width: auto; height: 36px; }
select.input { padding-right: 28px; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input[type=file] { padding: 6px; height: auto; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-check { display: flex; gap: 10px; align-items: flex-start; }
.field-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.field-check label { margin: 0; font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.radio-list > div { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; margin: 0; }
.radio-list label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.radio-list input { accent-color: var(--primary); margin-top: 3px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px; }
.callout { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.callout.danger { border-color: #fecaca; background: var(--danger-50); color: #7f1d1d; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
pre.sample { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 10px; font-size: 12px; overflow-x: auto; margin: 10px 0 0; }

/* ---------------------------------------------------------------- Messages */
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--success-50); border-color: #bbf7d0; color: #14532d; }
.alert-error { background: var(--danger-50); border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: var(--warning-50); border-color: #fde68a; color: #78350f; }
.alert-info { background: var(--info-50); border-color: #bfdbfe; color: #1e3a8a; }
.alert .close { margin-left: auto; border: 0; background: none; cursor: pointer; color: inherit; opacity: .6; font-size: 16px; line-height: 1; }

/* ---------------------------------------------------------------- Auth pages */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-art {
  background: var(--gradient); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-art::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; bottom: -200px;
  background: rgba(255,255,255,.08); box-shadow: 0 0 0 80px rgba(255,255,255,.05), 0 0 0 160px rgba(255,255,255,.03);
}
.auth-art h2 { font-size: 30px; font-weight: 700; line-height: 1.2; max-width: 420px; }
.auth-art p { opacity: .85; margin-top: 12px; max-width: 420px; font-size: 15px; }
.auth-art .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.auth-feature { display: flex; gap: 10px; align-items: center; margin-top: 10px; opacity: .92; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; }
.auth-card > p { color: var(--muted); margin: 6px 0 24px; }
.btn-google { height: 42px; width: 100%; font-weight: 600; gap: 10px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0; text-transform: uppercase; letter-spacing: .06em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-card .btn-primary { height: 42px; }
.auth-foot { margin-top: 22px; font-size: 12.5px; color: var(--muted); text-align: center; }
.big-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 18px; }
.big-icon .icon { width: 28px; height: 28px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* error pages */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page .code-big { font-size: 64px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
