:root {
  --bg: #0a0f1a;
  --sidebar: #07101b;
  --card: #0f1d2f;
  --card-2: #122338;
  --border: #1a2d45;
  --border-strong: #274064;
  --gold: #d5b46a;
  --gold-2: #e4c88a;
  --gold-dim: rgba(213, 180, 106, 0.16);
  --green: #4ade80;
  --red: #f87171;
  --muted: #8899aa;
  --text: #e8eef6;
  --text-strong: #f7fafc;
  --watch: #fbbf24;
  --info: #4ade80;
  --high: #f87171;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --side-w: 260px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(213, 180, 106, 0.08), transparent 52%),
    radial-gradient(900px 480px at 100% 0%, rgba(59, 110, 180, 0.08), transparent 48%),
    var(--bg);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  background: var(--gold);
  color: #07101e;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.shell {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}

.side {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 8px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #2a2214, #161109);
  border: 1px solid rgba(213, 180, 106, 0.45);
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
  flex: 0 0 auto;
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-strong);
}
.brand-text span { color: var(--gold); }

.side-tagline {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
}

.nav-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: #b9c7dc;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-align: left;
  width: 100%;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.12s ease;
  text-decoration: none;
}
.nav-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.nav-btn:hover { background: #122338; color: white; }
.nav-btn.active {
  background: linear-gradient(90deg, rgba(213, 180, 106, 0.16), #14243b 40%);
  color: white;
  box-shadow: inset 3px 0 0 var(--gold);
}
.nav-btn:active { transform: scale(0.98); }

/* Security nav link style fix */
.nav-link { display: flex; align-items: center; }

.side-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ── Sidebar user card ── */
.user-info {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 12px;
  background: #0a0f1a;
  border-radius: 12px;
  border: 1px solid #1a2d45;
  margin-bottom: 5px;
  position: relative;
}
.user-info-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  padding: 2px 4px;
  transition: background 0.15s ease;
}
.user-info-main:hover { background: rgba(255,255,255,0.04); }

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #d5b46a, #b8973f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #07101e;
  flex-shrink: 0;
}
.user-info-text { min-width: 0; }
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e8eef6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-sub { font-size: 11px; color: #8899aa; }

.verified-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #8899aa;
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-shrink: 0;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.logout-btn:hover { color: var(--red); background: rgba(248, 113, 113, 0.1); }

.badge {
  background: #111d31;
  border: 1px solid #2a3f5c;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  color: #91a1bb;
  width: fit-content;
}

main {
  padding: 28px 36px 48px;
  overflow-x: hidden;
  min-width: 0;
}

h1 {
  margin: 0 0 4px;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: var(--text-strong);
}
h2 {
  margin: 0 0 14px;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.section-label {
  margin: 8px 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
code {
  background: #09131f;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.asof {
  border: 1px solid var(--border);
  background: rgba(15, 29, 47, 0.7);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.hero {
  background: linear-gradient(135deg, #172944, #101827 55%, #2d2412);
  border: 1px solid #2d3c59;
  border-radius: 26px;
  padding: 26px 28px;
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(213, 180, 106, 0.18), transparent 70%);
  pointer-events: none;
}
.hero strong {
  display: block;
  font-size: 52px;
  letter-spacing: -0.06em;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
}
.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-health {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-health strong { font-size: 32px; }

.grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
}
.grade-A { background: #0d3320; color: #7cffb2; }
.grade-B { background: #1a3318; color: #7cffb2; }
.grade-C { background: #332e0e; color: #d5b46a; }
.grade-D { background: #3b1a10; color: #ff9d6f; }
.grade-F { background: #3d1010; color: #ff7c7c; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-3 { grid-template-columns: repeat(3, 1fr); }

.stat-card {
  position: relative;
  background: linear-gradient(180deg, #122338 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.2s ease;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(213, 180, 106, 0.4), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.stat-card strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.grid-charts {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
}
.chart-wrap canvas {
  display: block;
  width: 100%;
  height: 180px;
}
.donut-wrap { min-height: 200px; }
.donut-wrap canvas { height: 200px; }

.donut-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
}

.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.legend .swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
}
.legend .legend-left { display: flex; align-items: center; color: var(--text); }
.legend .legend-val { color: var(--muted); font-variant-numeric: tabular-nums; }

.insight-list { display: grid; gap: 10px; }
.insight {
  display: grid;
  gap: 4px;
  padding: 13px 14px 13px 16px;
  border: 1px solid var(--border);
  background: #111f35;
  border-radius: 13px;
  border-left-width: 3px;
}
.insight.info { border-left-color: var(--info); }
.insight.watch { border-left-color: var(--watch); }
.insight.high { border-left-color: var(--high); }
.insight b {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.insight.info b { color: var(--info); }
.insight.watch b { color: var(--watch); }
.insight.high b { color: var(--high); }
.insight span { font-weight: 650; }
.insight small { color: var(--muted); font-size: 12px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 11px 10px;
  font-size: 13px;
}
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.amount-neg { color: var(--red); font-weight: 650; }
.amount-pos { color: var(--green); font-weight: 650; }

select, input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #09131f;
  color: var(--text-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
select:hover, input:hover, textarea:hover { border-color: var(--border-strong); }
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  resize: vertical;
  min-height: 140px;
}
label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.field { margin-bottom: 12px; }
.field.grow { flex: 1; min-width: 180px; }
.field-error {
  display: block;
  color: var(--red);
  font-size: 12px;
  min-height: 16px;
  margin-top: 4px;
}
.field.invalid input, .field.invalid select { border-color: var(--red); }

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--gold);
  color: #07101e;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, filter 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 8px 20px rgba(213, 180, 106, 0.18);
}
.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.97); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: #122338; filter: none; }
.btn-danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(248, 113, 113, 0.2);
}
.btn-danger:hover { filter: brightness(1.08); }
.btn-danger:disabled { opacity: 0.55; }

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: #09131f;
  color: var(--text);
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.icon-btn:hover { background: #122338; border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.96); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: #111d31;
  border: 1px solid #2a3f5c;
  color: #b9c7dc;
  text-transform: capitalize;
}
.chip.manual { background: #0d2918; border-color: #1b5432; color: #7cffb2; }
.chip.automatic { background: #111d31; }
.chip.personal { background: #132238; }
.chip.business { background: #2a2214; border-color: rgba(213, 180, 106, 0.35); color: var(--gold); }
.chip.ready { background: #0d2918; border-color: #1b5432; color: #7cffb2; }
.chip.research { background: #332e0e; border-color: #5a4a14; color: var(--watch); }
.chip.pending { background: #1a2740; border-color: #2a3f5c; color: #91a1bb; }
.chip-gold { background: #2a2214; border-color: rgba(213, 180, 106, 0.35); color: var(--gold); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.entity-card {
  background: linear-gradient(180deg, #122338 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  animation: fadeUp 0.35s var(--ease);
  transition: transform 0.18s var(--ease), border-color 0.18s ease;
}
.entity-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.entity-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.entity-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #09131f;
  border: 1px solid var(--border);
  font-size: 20px;
}
.entity-card h3 {
  margin: 4px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.entity-type {
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}
.entity-value {
  margin-top: auto;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.entity-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.entity-meta b {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-top: 2px;
}

.progress-bar {
  height: 8px;
  background: #1a2d45;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d5b46a, #e4c88a);
  width: 0;
  transition: width 0.7s var(--ease);
}

.health-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: center;
}
.gauge-block {
  position: relative;
  width: 240px;
  height: 240px;
}
.gauge-block canvas {
  width: 240px;
  height: 240px;
  display: block;
}
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gauge-center strong {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.05em;
}
.health-copy p {
  font-size: 18px;
  margin: 6px 0 0;
  max-width: 520px;
}

.component-list { display: grid; gap: 12px; }
.component-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}
.component-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.component-head h3 { margin: 0; font-size: 15px; }
.component-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.component-weight {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-bar .field { margin: 0; min-width: 180px; }

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

.plan-controls {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.slider-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: center;
}
input[type="range"] {
  padding: 0;
  height: 6px;
  accent-color: var(--gold);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.plan-stat {
  background: #09131f;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.plan-stat span { color: var(--muted); font-size: 12px; }
.plan-stat strong { display: block; font-size: 20px; margin-top: 5px; }
.plan-stat.gold strong { color: var(--gold); }

.import-help ol {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
}
.import-help li { margin: 6px 0; }
.preview-title { margin-top: 8px; }
.preview-table { margin-bottom: 8px; min-height: 60px; }

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.report-card h2 { margin-bottom: 8px; }
.report-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #09131f;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.report-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Empty state (generic) ── */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(15, 29, 47, 0.4);
}
.empty svg {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  display: block;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.4;
}
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }

/* ── Enhanced empty state card with CTA ── */
.empty-state-card {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: 20px;
  background: rgba(15, 29, 47, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 4px;
}
.empty-state-card h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-strong);
}
.empty-state-card p { max-width: 380px; margin: 0; }
.empty-state-wrap { margin-bottom: 12px; }

/* ── Get started guide (overview) ── */
.get-started-guide {
  margin-bottom: 24px;
  animation: fadeUp 0.4s var(--ease);
}
.get-started-header {
  margin-bottom: 16px;
}
.get-started-header h2 { margin-bottom: 4px; }
.get-started-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.get-started-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.18s ease, transform 0.18s var(--ease);
}
.get-started-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.gs-icon { font-size: 32px; }
.get-started-card h3 { margin: 0; font-size: 16px; color: var(--text-strong); }
.get-started-card p { margin: 0; }

/* ── Profile section ── */
.profile-hero-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px;
}
.profile-avatar-block { flex-shrink: 0; }
.profile-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #d5b46a, #b8973f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #07101e;
  border: 3px solid rgba(213, 180, 106, 0.4);
}
.profile-hero-info { flex: 1; min-width: 0; }
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.profile-full-name { margin: 0; font-size: 22px; }
.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--green);
  background: #0d3320;
  border: 1px solid #1b5432;
  border-radius: 999px;
  padding: 3px 8px;
}
.profile-email { font-size: 14px; margin-bottom: 12px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* ── Password strength ── */
.pw-strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0;
}

/* ── Preferences ── */
.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.region-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
  width: 42px;
}
.toggle-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8899aa;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.toggle-switch input:checked + .toggle-track { background: rgba(213,180,106,0.25); border-color: var(--gold); }
.toggle-switch input:checked + .toggle-track::before {
  transform: translateX(18px);
  background: var(--gold);
}

/* ── Danger zone ── */
.danger-zone { border-color: rgba(248, 113, 113, 0.2); }
.danger-actions { display: grid; gap: 16px; margin-top: 12px; }
.danger-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.danger-action-row:last-child { border-bottom: none; }
.danger-delete-row .btn { flex-shrink: 0; }

/* ── Activity timeline ── */
.timeline-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.timeline-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(213, 180, 106, 0.15);
}
.timeline-content { flex: 1; min-width: 0; }
.timeline-action { font-size: 14px; color: var(--text); font-weight: 500; }
.timeline-meta { margin-top: 2px; }
.timeline-ip { font-family: ui-monospace, monospace; font-size: 11px; }
.activity-loading { padding: 12px 0; }

/* ── Quick links ── */
.profile-quicklinks { margin-top: 4px; }
.quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.quicklink-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  transition: border-color 0.18s ease, transform 0.18s var(--ease), background 0.18s ease;
}
.quicklink-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  background: #122338;
}
.quicklink-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #09131f;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.quicklink-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quicklink-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-strong);
  margin-bottom: 2px;
}
.quicklink-arrow {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #0c1726;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.25s var(--ease);
}
.modal-box h2 { margin-bottom: 12px; }

/* ── Drawer ── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, 0.62);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.drawer-backdrop.show { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #0c1726;
  border-left: 1px solid var(--border);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h2 { margin: 0; }
.drawer-body { padding: 18px; overflow-y: auto; }

/* ── Toasts ── */
.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 70;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
}
.toast {
  background: #122338;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s var(--ease);
  font-size: 13px;
  transition: opacity 0.25s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--gold); }

/* ── Skeletons ── */
.skeleton {
  background: linear-gradient(90deg, #122338 0%, #1a2d45 50%, #122338 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 14px;
}
.hero-skel { height: 120px; margin-bottom: 16px; }
.stat-skel { height: 88px; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #1a2d45;
  border-top-color: #07101e;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.section-enter { animation: fadeUp 0.35s var(--ease); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .grid-charts, .health-hero, .donut-layout, .plan-controls, .report-grid {
    grid-template-columns: 1fr;
  }
  .gauge-block, .gauge-block canvas { margin: 0 auto; }
  .get-started-grid { grid-template-columns: 1fr; }
  .profile-hero-card { flex-direction: column; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 72px 1fr; }
  .side { padding: 16px 10px; }
  .brand-copy, .nav-label, .side-footer, .side-tagline { display: none; }
  .nav-btn { justify-content: center; padding: 12px 8px; }
  .nav-btn.active { box-shadow: inset 0 0 0 1px rgba(213, 180, 106, 0.35); }
  main { padding: 20px 16px 40px; }
  h1 { font-size: 24px; }
  .kpi-grid, .kpi-3 { grid-template-columns: 1fr 1fr; }
  .hero strong { font-size: 36px; }
  .quicklinks-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .kpi-grid, .kpi-3, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 18px; gap: 16px; }
  .filter-bar .field { min-width: 100%; width: 100%; }
  .slider-row { grid-template-columns: 1fr; }
  .get-started-grid { grid-template-columns: 1fr; }
  .danger-action-row { flex-direction: column; align-items: flex-start; }
  .profile-form-grid { grid-template-columns: 1fr; }
}


/* ── Provider cards ───────────────────────────────────────────────────────── */
.provider-card { display:flex; flex-direction:column; }
.provider-footer { margin-top:auto; padding-top:14px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.provider-coverage { list-style:none; padding:0; margin:10px 0 0; display:flex; flex-wrap:wrap; gap:6px; }
.provider-coverage li { font-size:11px; color:#8899aa; background:#07101b; border:1px solid #1a2d45; border-radius:6px; padding:3px 8px; }
.status-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; box-shadow:0 0 6px currentColor; }
.btn-ghost { background:transparent; border:1px solid #1a2d45; color:#8899aa; }
.btn-ghost:hover { border-color:#d5b46a40; color:#e8eef6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
