:root {
  --bg: #070b12;
  --bg-elevated: #0e1522;
  --card: #121a2a;
  --card-border: #223047;
  --border: #202c42;
  --text: #e7ecf6;
  --text-muted: #8794ad;
  --text-dim: #5c6a85;
  --accent: #22d3ee;
  --accent-2: #7c5cff;
  --accent-soft: rgba(34, 211, 238, .12);
  --low: #2ecf7a;
  --medium: #f5a623;
  --high: #ef4c54;
  --error: #a855f7;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --glow-accent: 0 0 20px rgba(34, 211, 238, .22);
}

:root[data-theme="light"] {
  --bg: #eef1f8;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --card-border: #dde3f0;
  --border: #dde3f0;
  --text: #131a2a;
  --text-muted: #5b6479;
  --text-dim: #8993a8;
  --accent: #0891b2;
  --accent-2: #6d4dff;
  --accent-soft: rgba(8, 145, 178, .1);
  --glow-accent: 0 0 0 rgba(0, 0, 0, 0);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef1f8;
    --bg-elevated: #ffffff;
    --card: #ffffff;
    --card-border: #dde3f0;
    --border: #dde3f0;
    --text: #131a2a;
    --text-muted: #5b6479;
    --text-dim: #8993a8;
    --accent: #0891b2;
    --accent-2: #6d4dff;
    --accent-soft: rgba(8, 145, 178, .1);
    --glow-accent: 0 0 0 rgba(0, 0, 0, 0);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% -10%, rgba(34, 211, 238, .12), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .10), transparent 45%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 90%);
}

:root[data-theme="light"] .app-shell::before { opacity: .3; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .app-shell::before { opacity: .3; }
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 246px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.brand-icon { font-size: 26px; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: .01em; }
.brand-sub { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; font-family: var(--mono); }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all .15s ease;
}

.nav-item:hover { color: var(--text); background: var(--accent-soft); }

.nav-item.active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(34, 211, 238, .35);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.theme-toggle {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 14px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--mono);
  min-width: 0;
}

#status-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.status-dot.ok { background: var(--low); box-shadow: 0 0 8px var(--low); animation: pulse 2s infinite; }
.status-dot.down { background: var(--high); box-shadow: 0 0 8px var(--high); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; position: relative; z-index: 1; }

.topbar {
  padding: 22px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elevated), transparent);
}

.topbar-title { font-size: 19px; font-weight: 800; }
.topbar-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 3px; }

.container { max-width: 1080px; margin: 0 auto; padding: 26px 32px 60px; }

.panel { display: none; animation: fade-in .25s ease; }
.panel.active { display: block; }

@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hint { color: var(--text-muted); font-size: 13.5px; margin-top: 0; margin-bottom: 16px; }

textarea, input[type="text"], input[type="password"], input[type="email"] {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-mode {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}

.consent-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.consent-check .link-btn { font-size: inherit; }

.mfa-qr {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.mfa-qr svg {
  max-width: 200px;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}

.sidebar.nav-locked .nav-item:not([data-tab="account"]) {
  opacity: 0.35;
  pointer-events: none;
}

.btn {
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: var(--glow-accent);
}

:root[data-theme="light"] .btn.primary { color: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn.primary { color: #fff; } }

.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.primary:disabled { opacity: .55; cursor: wait; transform: none; }

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 12.5px;
  margin-top: 0;
}
.btn.ghost:hover { color: var(--text); border-color: var(--accent); }

.result { margin-top: 24px; }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-elevated));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .6);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Gauge ---------- */
.gauge {
  --gauge-deg: 0deg;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--gauge-color, var(--accent)) var(--gauge-deg), var(--border) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gauge-color, var(--accent)) 45%, transparent));
}

.gauge::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--card);
}

.gauge-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--mono);
  line-height: 1.05;
}

.gauge-score { font-size: 20px; font-weight: 800; color: var(--text); }
.gauge-max { font-size: 9.5px; color: var(--text-muted); }

.score-meta { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12.5px;
  font-family: var(--mono);
  color: #fff;
  width: fit-content;
}

.badge.basso, .badge.info { background: var(--low); box-shadow: 0 0 14px rgba(46, 207, 122, .35); }
.badge.medio { background: var(--medium); color: #26241a; box-shadow: 0 0 14px rgba(245, 166, 35, .3); }
.badge.alto { background: var(--high); box-shadow: 0 0 14px rgba(239, 76, 84, .4); }
.badge.errore { background: var(--error); box-shadow: 0 0 14px rgba(168, 85, 247, .35); }

.meaning { color: var(--text-muted); font-size: 13px; margin: 0; }

dl.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  font-size: 13px;
  margin: 14px 0 0;
}

dl.details dt { color: var(--text-muted); }
dl.details dd { margin: 0; word-break: break-all; font-family: var(--mono); font-size: 12.5px; }

.findings { list-style: none; padding: 0; margin: 14px 0 0; }
.findings li {
  padding: 10px 12px;
  border-left: 3px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 0 8px 8px 0;
  margin-bottom: 8px;
  font-size: 13px;
}
.findings li .indicator { font-weight: 600; }
.findings li .explanation { color: var(--text-muted); display: block; margin-top: 2px; }

.subresult-title {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--mono);
}

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
  margin: 2px 4px 2px 0;
}

.leak-record {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
}

.leak-record .field { margin-bottom: 2px; }
.leak-record .field b { color: var(--text-muted); font-weight: 600; margin-right: 6px; }

.advice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 13px;
}

.error-box {
  color: var(--high);
  font-size: 14px;
  padding: 14px;
  border: 1px solid var(--high);
  border-radius: var(--radius);
}

.spinner { color: var(--text-muted); font-size: 14px; }
.spinner::before { content: "◌ "; }

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 20px;
}

.download-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- Dashboard ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: linear-gradient(180deg, var(--card), var(--bg-elevated));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.stat-value { font-family: var(--mono); font-size: 27px; font-weight: 800; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }

.stat-card.accent-total .stat-value { color: var(--accent); }
.stat-card.accent-high .stat-value { color: var(--high); }
.stat-card.accent-medium .stat-value { color: var(--medium); }
.stat-card.accent-low .stat-value { color: var(--low); }

.dash-columns {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

@media (max-width: 860px) { .dash-columns { grid-template-columns: 1fr; } }

.risk-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12.5px; }
.risk-bar-row:last-child { margin-bottom: 0; }
.risk-bar-label { width: 60px; color: var(--text-muted); font-family: var(--mono); flex-shrink: 0; }
.risk-bar-track { flex: 1; height: 9px; border-radius: 999px; background: var(--border); overflow: hidden; }
.risk-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.risk-bar-count { width: 30px; text-align: right; font-family: var(--mono); color: var(--text-muted); flex-shrink: 0; }

.activity-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.activity-feed li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
}
.activity-feed .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.activity-feed .kind { font-family: var(--mono); color: var(--text-muted); }
.activity-feed time { margin-left: auto; color: var(--text-dim); font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}
.qa-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- IOC extractor ---------- */
.ioc-group { margin-bottom: 18px; }
.ioc-group:last-child { margin-bottom: 0; }
.ioc-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ioc-group h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 0;
}
.ioc-chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.ioc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  font-family: var(--mono);
  font-size: 12px;
  max-width: 100%;
}

.ioc-chip .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }

.ioc-chip button {
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
  font-family: inherit;
}
.ioc-chip button:hover { background: var(--accent); color: #04121a; }
.ioc-chip button:disabled { opacity: .5; cursor: wait; }

.ioc-chip .mini-result { flex-shrink: 0; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ioc-chip .mini-result.basso { background: rgba(46, 207, 122, .18); color: var(--low); }
.ioc-chip .mini-result.medio { background: rgba(245, 166, 35, .18); color: var(--medium); }
.ioc-chip .mini-result.alto { background: rgba(239, 76, 84, .18); color: var(--high); }
.ioc-chip .mini-result.errore { background: rgba(168, 85, 247, .18); color: var(--error); }
.ioc-chip .mini-result.found { background: rgba(239, 76, 84, .18); color: var(--high); }
.ioc-chip .mini-result.clean { background: rgba(46, 207, 122, .18); color: var(--low); }

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ---------- Account / quota / admin ---------- */
.quota-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 12.5px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.quota-badge.warn { background: rgba(245, 166, 35, .12); }
.quota-badge .btn { margin-top: 0; padding: 6px 14px; font-size: 12px; }

.plan-card {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: all .15s ease;
}
.plan-card:hover { border-color: var(--accent); }
.plan-card .plan-name { font-weight: 700; font-size: 13.5px; }
.plan-card .plan-price { font-family: var(--mono); color: var(--accent); font-size: 15px; }
.plan-card .plan-note { color: var(--text-muted); font-size: 11px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table th { color: var(--text-muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table select { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; font-size: 12px; font-family: inherit; }
.admin-table .btn.ghost { padding: 4px 10px; margin-left: 6px; }
.admin-table .btn.danger { padding: 4px 10px; margin-left: 6px; font-size: 11.5px; }
.admin-table label.toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; cursor: pointer; }
.admin-table input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

.admin-create-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-create-row input[type="text"], .admin-create-row input[type="password"] { flex: 1 1 180px; width: auto; }
.admin-create-row select { background: var(--card); color: var(--text); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 11px 12px; font-size: 14px; font-family: inherit; }
.admin-create-row .btn { margin-top: 0; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 8px 0 24px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--card), var(--bg-elevated));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .6);
  transition: transform .15s ease, border-color .15s ease;
}

.pricing-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--glow-accent), 0 10px 30px -20px rgba(0, 0, 0, .7);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--mono);
}

:root[data-theme="light"] .pricing-badge { color: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .pricing-badge { color: #fff; } }

.pricing-name { font-size: 15px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-family: var(--mono); }
.pricing-price { font-size: 34px; font-weight: 800; margin-top: 10px; font-family: var(--mono); }
.pricing-suffix { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.pricing-period { font-size: 12px; color: var(--text-muted); margin-top: 2px; margin-bottom: 18px; }

.pricing-features { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.pricing-features li { font-size: 13.5px; margin-bottom: 10px; line-height: 1.4; }

.pricing-cta { width: 100%; text-align: center; }

/* ---------- Danger zone / legal ---------- */
.danger-zone { border-color: rgba(239, 76, 84, .35); }
.btn.danger { background: transparent; border: 1px solid var(--high); color: var(--high); }
.btn.danger:hover { background: var(--high); color: #fff; }
.btn.danger:disabled { opacity: .55; cursor: wait; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.legal-doc h3 { margin: 26px 0 10px; font-size: 16px; }
.legal-doc h3:first-child { margin-top: 0; }
.legal-doc h4 { margin: 18px 0 6px; font-size: 13.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-family: var(--mono); }
.legal-doc p, .legal-doc li { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.legal-doc ul { margin: 6px 0; padding-left: 20px; }
.legal-placeholder {
  background: rgba(245, 166, 35, .12);
  border: 1px solid rgba(245, 166, 35, .35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--medium);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    overflow-x: auto;
    gap: 10px;
  }
  .brand { border-bottom: none; padding: 0 12px 0 0; margin: 0 10px 0 0; border-right: 1px solid var(--border); flex-shrink: 0; }
  .nav { flex-direction: row; flex: none; }
  .nav-item { white-space: nowrap; }
  .sidebar-footer { flex-shrink: 0; border-top: none; padding-top: 0; margin-left: auto; padding-left: 10px; }
  #status-label { display: none; }
  .container { padding: 20px 18px 48px; }
  .topbar { padding: 18px 20px; }
}
