/* Abstrora panel — modern SaaS look. Design tokens + components. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --border: #e6e8f0;
  --text: #14161f;
  --text-muted: #6b7086;
  --accent: #5b5ff0;
  --accent-hover: #4b4fe0;
  --accent-contrast: #ffffff;
  --green: #16a34a;
  --green-bg: #e9f8ef;
  --yellow: #b45309;
  --yellow-bg: #fef6e7;
  --red: #dc2626;
  --red-bg: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 31, 0.04), 0 8px 24px rgba(20, 22, 31, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #161923;
    --surface-2: #1b1e2a;
    --border: #262a38;
    --text: #eef0f7;
    --text-muted: #8b90a6;
    --accent: #7b7ff8;
    --accent-hover: #9295fa;
    --accent-contrast: #0f1117;
    --green: #4ade80;
    --green-bg: #103820;
    --yellow: #fbbf24;
    --yellow-bg: #3a2a0c;
    --red: #f87171;
    --red-bg: #3a1414;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Default size for every icon() macro svg (they carry no width/height of
   their own, just a viewBox) — a more specific rule (.btn svg, .nav-link
   svg, ...) already overrides this where one exists; this is only the
   fallback for an icon used in a plain container that never got one,
   which otherwise renders at the browser's intrinsic ~300x150 default. A
   chart's own <svg viewBox="..."> always sets its size via an inline
   style="width:100%..." attribute, which wins over this (or any) external
   stylesheet rule regardless of specificity, so those are unaffected. */
svg { width: 16px; height: 16px; flex-shrink: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

/* ---- sidebar ---- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand {
  font-weight: 700;
  font-size: 15px;
  padding: 8px 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand img { max-width: 100%; max-height: 40px; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--text-muted); font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.nav-link svg { width: 15px; height: 15px; margin-right: 9px; flex-shrink: 0; }
.nav-section-label { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); opacity: .7; margin: 16px 10px 4px; }
.nav-section-label:first-of-type { margin-top: 8px; }
.nav-link.disabled { color: var(--text-muted); opacity: .5; cursor: default; pointer-events: none; }
.nav-link .soon-badge { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.sidebar .spacer { flex: 1; }

/* ---- project picker (sidebar top) ---- */
.project-picker { padding: 6px 10px 14px; position: relative; }
.project-picker details { position: relative; }
.project-picker summary { list-style: none; cursor: pointer; }
.project-picker summary::-webkit-details-marker { display: none; }
.project-picker-current {
  display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2);
}
.project-picker-current-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.project-picker-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-picker-domain { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-picker-chevron { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.project-picker-gear {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  flex-shrink: 0;
}
.project-picker-gear:hover { color: var(--text); }
.project-picker-gear svg { width: 13px; height: 13px; }
.project-picker-menu {
  position: absolute; top: calc(100% + 6px); left: 10px; right: 10px; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; max-height: 340px; overflow-y: auto;
}
.project-picker-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 9px; border-radius: 8px; text-decoration: none; color: inherit;
}
.project-picker-item:hover { background: var(--surface-2); }
.project-picker-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.project-picker-item .project-picker-name { font-weight: 500; }
.project-picker-check { color: var(--accent); flex-shrink: 0; display: flex; }
.project-picker-check svg { width: 14px; height: 14px; }
.project-picker-divider { height: 1px; background: var(--border); margin: 6px 2px; }
.project-picker-action {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px;
  text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500;
}
.project-picker-action:hover { background: var(--surface-2); }
.project-picker-action svg { width: 15px; height: 15px; }

/* ---- main ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; }
.topbar .user { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 14px; }
.content { padding: 28px; max-width: 1100px; width: 100%; margin: 0 auto; }

/* ---- flash / alerts ---- */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: 13px; border: 1px solid var(--border); }
.flash svg { width: 14px; height: 14px; vertical-align: -2px; flex-shrink: 0; }
.flash.ok { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.flash.error { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }

/* ---- cards / stat grid ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.stat-tile .label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.stat-tile .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-tile .value.green { color: var(--green); }
.stat-tile .value.yellow { color: var(--yellow); }
.stat-tile .value.red { color: var(--red); }

.section { margin-bottom: 28px; scroll-margin-top: 20px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; }

/* ---- settings page intro (icon + title + subtitle, above the tabs) ---- */
.settings-subtitle { margin: -8px 0 20px; color: var(--text-muted); font-size: 13.5px; }

/* ---- tab bar (settings page): segmented-control style, filled active pill ---- */
.tabs {
  display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 28px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px;
}
.tab-btn {
  display: inline-flex; align-items: center; padding: 9px 15px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: none; border: none; border-radius: 9px;
  cursor: pointer; white-space: nowrap; font-family: inherit; text-decoration: none;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.tab-btn:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.tab-btn.active {
  color: var(--accent); background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 22, 31, 0.06), 0 1px 3px rgba(20, 22, 31, 0.08);
}
.tab-panel { display: none; animation: settings-fade-in .18s ease; }
.tab-panel.active { display: block; }
@keyframes settings-fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.danger-card { background: color-mix(in srgb, var(--red) 5%, var(--surface)); border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
#panel-danger-zone .icon-avatar { background: color-mix(in srgb, var(--red) 14%, var(--surface)); color: var(--red); }

.tab-btn svg { width: 15px; height: 15px; margin-right: 7px; }

/* ---- panel header: icon avatar + title + description ---- */
.panel-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.icon-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.icon-avatar svg { width: 20px; height: 20px; }
.panel-header h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: var(--text); }
.panel-header p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.55; }

/* ---- form + side info card, two-column ---- */
.settings-grid { display: grid; grid-template-columns: 1fr 270px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .settings-grid { grid-template-columns: 1fr; } }

.settings-grid .card.form-card {
  box-shadow: 0 1px 2px rgba(20, 22, 31, 0.04), 0 10px 28px rgba(20, 22, 31, 0.05);
}

.info-card {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 18px 20px;
}
.info-card .icon-avatar { margin-bottom: 12px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.info-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text); }
.info-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ---- feature teaser card (paid/upcoming feature upsell) ---- */
.feature-teaser-card { padding: 26px 28px; }
.feature-teaser-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.feature-teaser-badge { color: var(--accent); margin-bottom: 12px; }
.feature-teaser-badge svg { width: 13px; height: 13px; }
.feature-teaser-head h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.feature-teaser-head p { margin: 0; max-width: 620px; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }
.feature-teaser-head .btn { flex-shrink: 0; }
.feature-teaser-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border);
}
@media (max-width: 780px) { .feature-teaser-grid { grid-template-columns: 1fr; } }
.feature-teaser-item .icon-avatar { margin-bottom: 14px; }
.feature-teaser-item h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.feature-teaser-item p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ---- icon inside a field input ---- */
.field-icon-wrap { position: relative; }
.field-icon-wrap .field-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; }
.field-icon-wrap .field-icon svg { width: 16px; height: 16px; }
.field.field-icon-wrap input, .field .field-icon-wrap input { padding-left: 39px !important; }

/* ---- status line (replaces the old plain-text hint under a save form) ---- */
.status-line { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.status-line svg { width: 14px; height: 14px; flex-shrink: 0; }
.status-line.ok { color: var(--green); }
.btn svg { width: 15px; height: 15px; }
.btn { transition: background .15s ease, transform .1s ease, box-shadow .15s ease; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary { box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---- badges / pills ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ---- user avatar (initials circle) ---- */
.user-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent);
}
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .who { min-width: 0; }
.user-cell .name { font-weight: 600; }
.user-cell .email { color: var(--text-muted); font-size: 12px; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
td { padding: 10px 10px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-card table { margin: 0; }
.table-card th, .table-card td { padding: 12px 16px; }

/* ---- approval cards ---- */
.approval-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.approval-card.focused { outline: 2px solid var(--accent); outline-offset: 1px; }
kbd { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.approval-card .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.approval-card .head .url { font-weight: 600; }
.approval-card .head .meta { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.diff { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-bottom: 8px; }
.diff .old { color: var(--red); }
.diff .new { color: var(--green); }
.rationale { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; }

/* ---- buttons / forms ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { opacity: .85; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

form.inline { display: inline; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px; font-family: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field .hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-card { max-width: 420px; }

/* ---- auth pages ---- */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-card { width: 380px; padding: 32px; }
.auth-card h1 { font-size: 18px; margin: 0 0 4px; }
.auth-card p.sub { color: var(--text-muted); font-size: 13px; margin: 0 0 22px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 18px; }

/* ---- empty state ---- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty svg { width: 40px; height: 40px; margin-bottom: 10px; opacity: .5; }

/* ---- key reveal ---- */
.key-reveal { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; word-break: break-all; }

@media (max-width: 720px) {
  .sidebar { display: none; }
  .content { padding: 18px; }
}

/* ---- full-screen layout (onboarding): no sidebar, minimal top bar ---- */
.full-screen-topbar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 24px 20px 0; font-weight: 700; font-size: 15px; position: relative;
}
.full-screen-topbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.full-screen-account {
  position: absolute; right: 24px; top: 20px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  text-decoration: none;
}
.full-screen-content { min-height: calc(100vh - 70px); }

/* ---- onboarding wizard ---- */
.onboarding-shell { display: flex; justify-content: center; padding: 24px 0 48px; }
.onboarding-card { width: 100%; max-width: 620px; padding: 36px 40px; }
.onboarding-progress { display: flex; gap: 6px; margin-bottom: 28px; }
.onboarding-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.onboarding-progress span.done { background: var(--accent); }
.onboarding-card h2 { font-size: 24px; margin: 0 0 8px; font-weight: 700; }
.onboarding-card p.sub { color: var(--text-muted); font-size: 14px; margin: 0 0 26px; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.chip-option { position: relative; }
.chip-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-option label {
  display: flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip-option input:checked + label {
  border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-weight: 600;
}
.chip-option .chip-mark {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chip-option input:checked + label .chip-mark { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.chip-option input:checked + label .chip-mark svg { width: 11px; height: 11px; }
.chip-option[data-shape="radio"] .chip-mark { border-radius: 50%; }
.chip-option[data-shape="checkbox"] .chip-mark { border-radius: 5px; }

.onboarding-subquestion {
  margin: -2px 0 16px; padding: 16px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border);
}
.onboarding-subquestion p { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }

.onboarding-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; }
.onboarding-footer .left { display: flex; align-items: center; gap: 18px; }
.onboarding-footer a.back, .onboarding-footer a.skip { color: var(--text-muted); font-size: 14px; text-decoration: none; font-weight: 600; }
.onboarding-footer a.back:hover, .onboarding-footer a.skip:hover { color: var(--text); }

.onboarding-agent-icons { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 22px; font-size: 13px; color: var(--text-muted); }
.onboarding-agent-icons span { white-space: nowrap; }

.onboarding-mcp-box { padding: 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 20px; }
.onboarding-mcp-box code { display: block; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 12.5px; word-break: break-all; margin-top: 8px; }

/* ---- client dashboard: "Set up your workspace" checklist ---- */
.setup-task-list { display: flex; flex-direction: column; }
.setup-task {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-top: 1px solid var(--border);
  text-decoration: none; color: inherit; cursor: pointer; transition: background .15s ease;
}
.setup-task:first-child { border-top: none; }
.setup-task:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.setup-task.no-link { cursor: default; }
.setup-task.no-link:hover { background: none; }
.setup-task-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted);
}
.setup-task-icon svg { width: 16px; height: 16px; }
.setup-task-icon.done { background: var(--green-bg); border-color: transparent; color: var(--green); }
.setup-task-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.setup-task-title { font-size: 13.5px; font-weight: 600; }
.setup-task.completed .setup-task-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 50%, transparent); }
.setup-task-desc { font-size: 12px; color: var(--text-muted); }
.setup-task-chevron { font-size: 12.5px; color: var(--accent); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.setup-task-progress { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--green); font-weight: 600; }
.setup-task-progress svg { width: 14px; height: 14px; }
.setup-task-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.setup-task-skip-form { flex-shrink: 0; }
.setup-task-skip {
  background: none; border: none; padding: 4px 2px; font-size: 12px; color: var(--text-muted);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text-muted) 40%, transparent);
  cursor: pointer; white-space: nowrap;
}
.setup-task-skip:hover { color: var(--text); }
.setup-task-skipped-badge {
  font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; text-decoration: none; margin-left: 4px;
  vertical-align: middle;
}

/* ---- select-dropdown (Domain Overview's mode/country/sort pickers) ---- */
.select-dropdown { position: relative; }
.select-dropdown details { position: relative; }
.select-dropdown summary { list-style: none; cursor: pointer; }
.select-dropdown summary::-webkit-details-marker { display: none; }
.select-dropdown-trigger {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px;
  min-width: 150px; white-space: nowrap;
}
.select-dropdown details[open] .select-dropdown-trigger {
  border-color: var(--text); box-shadow: 0 0 0 1px var(--text);
}
.select-dropdown-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.select-dropdown-chevron { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.select-dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 260px; max-width: 340px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; max-height: 360px; overflow-y: auto;
}
.select-dropdown-menu-rich { min-width: 300px; max-width: 360px; padding: 8px; }
.select-dropdown-search { padding: 4px 4px 8px; }
.select-dropdown-search-input {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px; box-sizing: border-box;
}
.select-dropdown-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.select-dropdown-options { max-height: 280px; overflow-y: auto; }
.select-option {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.select-option:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.select-option.selected { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.select-option-simple { align-items: center; font-size: 13.5px; }
.select-option-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.select-option-title { font-size: 13.5px; font-weight: 600; }
.select-option-desc { font-size: 12px; color: var(--text-muted); }
.select-option-example { font-size: 11.5px; color: var(--text-muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; margin-top: 2px; }
.select-option-check { color: var(--accent); flex-shrink: 0; display: flex; margin-top: 2px; }
.select-option-check svg { width: 15px; height: 15px; }

/* ---- client dashboard: search performance / GA 2-column row ---- */
.dashboard-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .dashboard-2col { grid-template-columns: 1fr; } }
.metric-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.metric-2x2-label { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: 4px; }
.metric-2x2-value { font-size: 24px; font-weight: 700; }
.metric-2x2-delta { font-size: 12px; font-weight: 600; margin-top: 2px; }

/* ---- "New project" modal (sidebar project picker) ---- */
dialog.modal {
  padding: 0; border: none; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
}
dialog.modal::backdrop { background: rgba(20, 22, 31, .55); }
dialog.modal[open] { animation: modal-in .15s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.modal-card { padding: 28px; overflow-y: auto; }
.modal-title { margin: 0 0 20px; font-size: 20px; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---- toggle switch (Keyword Research's "Clickstream-refined volumes") ---- */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.toggle-switch-track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .15s ease; }
.toggle-switch-track::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease;
}
.toggle-switch input:checked ~ .toggle-switch-track { background: var(--accent); }
.toggle-switch input:checked ~ .toggle-switch-track::before { transform: translateX(16px); }

/* ---- disabled pagination link (a.btn used where a <button disabled> can't be, e.g. Prev/Next) ---- */
a.btn.disabled { pointer-events: none; opacity: .45; }

/* Analysis pages (Paid search, Content performance): tabs, status pickers, KPI grids */
.po-change { margin-top:4px; }
.po-split { display:inline-flex; }
.po-split .btn:first-child { border-top-right-radius:0; border-bottom-right-radius:0; }
.po-split .btn:last-child { border-top-left-radius:0; border-bottom-left-radius:0; margin-left:-1px; }
.po-change .btn-sm { padding:3px 8px; font-size:12px; }
.po-auto { display:flex; align-items:center; gap:6px; margin:0; }
.po-auto select { padding:7px 9px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:13px; }
.po-tabs { display:flex; gap:4px; margin-top:18px; border-bottom:1px solid var(--border); }
.po-tab { padding:9px 14px; font-size:14px; font-weight:600; color:var(--text-muted); text-decoration:none;
          border-bottom:2px solid transparent; margin-bottom:-1px; display:inline-flex; gap:6px; align-items:center; }
.po-tab:hover { color:var(--text); }
.po-tab.active { color:var(--text); border-bottom-color:var(--accent, #6258e8); }
.po-count { font-size:11px; padding:1px 7px; border-radius:999px; background:var(--surface-2); color:var(--text-muted); border:1px solid var(--border); }
.po-count.off { color:var(--red); }
.po-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; margin-top:16px; }
.po-dq { margin-top:16px; border-left:3px solid var(--yellow); background:var(--yellow-bg); }
.po-num { font-variant-numeric:tabular-nums; }
.po-audit { display:inline-flex; flex-wrap:wrap; gap:4px; }
.po-audit .badge { font-size:11px; white-space:nowrap; }
.po-status { white-space:nowrap; }
.po-status .badge { margin-right:4px; }
.po-status-form { display:inline; margin:0; }
.po-status-select { padding:3px 6px; border-radius:6px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:12px; }
.po-status-select.s-reviewed { border-color:#6258e8; color:#6258e8; }
.po-status-select.s-fixed { border-color:var(--green); color:var(--green); }
.po-status-select.s-dismissed { color:var(--text-muted); }
.po-since { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:baseline; margin-top:8px; font-size:13px; }
.po-up { color:var(--green); } .po-down { color:var(--red); }
.po-history table td, .po-history table th { font-size:13px; }

.archived-delete summary::-webkit-details-marker { display: none; }
