/* ReachPilot — design tokens */
:root {
  color-scheme: dark;
  --bg: #070a18;
  --surface: #0e1428;
  --surface-2: #141b36;
  --surface-3: #1b2444;
  --line: rgba(148, 163, 216, 0.14);
  --line-strong: rgba(148, 163, 216, 0.26);
  --text: #eef1fb;
  --text-2: #aab2d0;
  --muted: #7680a3;
  --accent: #5b84ff;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(91, 132, 255, 0.14);
  --grad: linear-gradient(135deg, #4f7cff 0%, #7c5cff 100%);
  --good: #34d399;
  --good-soft: rgba(52, 211, 153, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.13);
  --info-soft: rgba(56, 189, 248, 0.13);
  --info: #38bdf8;
  /* chart roles (validated against --surface) */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-critical: #d03b3b;
  --status-neutral: #56607f;
  --grid: rgba(148, 163, 216, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(79, 124, 255, 0.17), transparent 62%),
    radial-gradient(760px 520px at -6% 104%, rgba(139, 92, 246, 0.13), transparent 60%);
  pointer-events: none;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(91, 132, 255, 0.4); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232c50; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px 16px;
  background: rgba(10, 14, 30, 0.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 22px -6px rgba(91, 132, 255, 0.7);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-tag { font-size: 11px; color: var(--muted); margin-top: -2px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent; cursor: pointer; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(148, 163, 216, 0.08); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: #fff; border-color: rgba(91, 132, 255, 0.32); }
.nav-item.active svg { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-2); background: rgba(148, 163, 216, 0.12); padding: 1px 7px; border-radius: 20px; }
.sidebar-foot { margin-top: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(20, 27, 54, 0.6); font-size: 12px; color: var(--text-2); }
.sidebar-foot strong { color: var(--text); }

.main { min-width: 0; padding: 26px 32px 60px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; }
.page-sub { color: var(--text-2); margin-top: 4px; max-width: 70ch; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 13px; margin-bottom: 8px; }

/* ---------- primitives ---------- */
.card { background: linear-gradient(180deg, rgba(20, 27, 54, 0.72), rgba(14, 20, 40, 0.92)); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 20px; }
.card.solid { background: var(--surface); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card-sub { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.card-body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 24px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.tabular { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(148, 163, 216, 0.07);
  color: var(--text); font-weight: 650; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
}
.btn:hover { background: rgba(148, 163, 216, 0.14); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 26px -10px rgba(91, 132, 255, 0.85); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(148, 163, 216, 0.1); color: var(--text); }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); background: var(--bad-soft); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.icon { width: 34px; height: 34px; padding: 0; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 650; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: rgba(7, 10, 24, 0.65); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 120px; padding: 11px 12px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: #56608a; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 132, 255, 0.2); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23aab2d0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select option { background: #101632; }
.input.sm, .select.sm { height: 34px; font-size: 13px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 38px; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { flex: none; width: 38px; height: 22px; border-radius: 22px; background: #26305a; position: relative; transition: background 0.15s; margin-top: 1px; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-title { font-weight: 650; font-size: 13.5px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: rgba(148, 163, 216, 0.13); color: var(--text-2); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: #9db5ff; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pulse .dot { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.on { background: var(--accent-soft); border-color: rgba(91, 132, 255, 0.5); color: #fff; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: rgba(148, 163, 216, 0.12); color: var(--text-2); font-size: 11.5px; font-weight: 600; }

.alert { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; line-height: 1.5; }
.alert svg { flex: none; margin-top: 1px; }
.alert.warn { border-color: rgba(251, 191, 36, 0.35); background: var(--warn-soft); }
.alert.warn svg { color: var(--warn); }
.alert.bad { border-color: rgba(248, 113, 113, 0.35); background: var(--bad-soft); }
.alert.bad svg { color: var(--bad); }
.alert.info { border-color: rgba(91, 132, 255, 0.35); background: var(--accent-soft); }
.alert.info svg { color: var(--accent); }
.alert.good { border-color: rgba(52, 211, 153, 0.35); background: var(--good-soft); }
.alert.good svg { color: var(--good); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: rgba(148, 163, 216, 0.05); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.selected { background: rgba(91, 132, 255, 0.09); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.checkbox { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.cell-title { font-weight: 650; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--surface-3); border: 1px solid var(--line); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1; min-width: 200px; max-width: 340px; }
.bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: rgba(91, 132, 255, 0.1); border-bottom: 1px solid rgba(91, 132, 255, 0.3); font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }

.empty { text-align: center; padding: 54px 24px; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(91, 132, 255, 0.3); }
.empty h3 { font-size: 17px; font-weight: 750; }
.empty p { color: var(--text-2); margin: 6px auto 18px; max-width: 46ch; }

/* ---------- KPI tiles & charts ---------- */
.kpi { padding: 18px 20px; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.kpi-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 10px; line-height: 1.1; }
.kpi-foot { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; top: 0; pointer-events: none; min-width: 148px; padding: 10px 12px; border-radius: 10px; background: #0a0f22; border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 12.5px; z-index: 2; }
.chart-tip b { display: block; margin-bottom: 6px; }
.chart-tip div { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); }
.chart-tip div span:last-child { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 96px; align-items: center; gap: 12px; font-size: 13px; }
.bar-track { height: 12px; border-radius: 4px; background: rgba(148, 163, 216, 0.09); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; transition: width 0.5s ease; }
.segbar { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: hidden; }
.segbar span { min-width: 3px; }
.progress { height: 6px; border-radius: 6px; background: rgba(148, 163, 216, 0.13); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width 0.4s ease; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(148, 163, 216, 0.1); color: var(--text-2); }
.feed-dot.open { background: var(--info-soft); color: var(--info); }
.feed-dot.click { background: var(--accent-soft); color: var(--accent); }
.feed-dot.reply, .feed-dot.hunt, .feed-dot.import { background: var(--good-soft); color: var(--good); }
.feed-dot.unsubscribe, .feed-dot.bounce, .feed-dot.error { background: var(--bad-soft); color: var(--bad); }

/* ---------- hero / quick start ---------- */
.hero { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 18px; border: 1px solid rgba(91, 132, 255, 0.35); background: radial-gradient(600px 260px at 100% 0%, rgba(124, 92, 255, 0.28), transparent 70%), linear-gradient(135deg, rgba(79, 124, 255, 0.2), rgba(14, 20, 40, 0.9) 55%); }
.hero h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.hero p { color: var(--text-2); margin-top: 6px; max-width: 62ch; }
.hero-form { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 10px; margin-top: 18px; max-width: 760px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(14, 20, 40, 0.7); color: inherit; }
.step:hover { border-color: var(--accent); text-decoration: none; }
.step-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: rgba(148, 163, 216, 0.14); color: var(--text-2); }
.step.done .step-num { background: var(--good-soft); color: var(--good); }
.step.done .step-title { color: var(--text-2); }
.step-title { font-weight: 700; font-size: 13.5px; }
.step-text { color: var(--muted); font-size: 12px; margin-top: 1px; }

/* ---------- hunter ---------- */
.hunter-grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; }
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pipe { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(7, 10, 24, 0.5); }
.pipe.active { border-color: rgba(91, 132, 255, 0.6); background: var(--accent-soft); }
.pipe.done { border-color: rgba(52, 211, 153, 0.35); }
.pipe-label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 6px; }
.pipe.active .pipe-label { color: #9db5ff; }
.pipe.done .pipe-label { color: var(--good); }
.pipe-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.console { height: 300px; overflow-y: auto; padding: 14px 16px; border-radius: 12px; background: #050816; border: 1px solid var(--line); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; line-height: 1.75; color: #9aa5cc; }
.console .warn { color: var(--warn); }
.console .error { color: var(--bad); }
.console .ok { color: var(--good); }
.console time { color: #4a557f; margin-right: 10px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.spinner.accent { border-color: rgba(91, 132, 255, 0.25); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.radar { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; border: 1px solid rgba(91, 132, 255, 0.35); background: radial-gradient(circle, rgba(91, 132, 255, 0.16), transparent 70%); }
.radar::before, .radar::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(91, 132, 255, 0.25); }
.radar::before { inset: 20px; }
.radar::after { inset: 42px; background: var(--accent); border: 0; box-shadow: 0 0 22px var(--accent); }

/* ---------- campaign editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.editor-side { position: sticky; top: 18px; }
.section-num { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--accent-soft); color: #9db5ff; }
.seq-step { border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 10, 24, 0.45); }
.seq-step.focused { border-color: rgba(91, 132, 255, 0.55); }
.seq-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.seq-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.seq-link { display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 26px; color: var(--text-2); font-size: 13px; position: relative; }
.seq-link::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
.seq-link .input { width: 68px; height: 32px; text-align: center; }
.mergetags { display: flex; gap: 6px; flex-wrap: wrap; }
.mergetag { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; border: 1px dashed var(--line-strong); background: none; color: var(--text-2); cursor: pointer; }
.mergetag:hover { color: #fff; border-color: var(--accent); background: var(--accent-soft); }
.preview-frame { width: 100%; height: 440px; border: 0; background: #fff; border-radius: 0 0 12px 12px; display: block; }
.preview-meta { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-meta .subject { font-weight: 700; color: var(--text); margin-top: 2px; word-break: break-word; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; }
.tab { padding: 12px 12px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 650; font-size: 13.5px; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--accent); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(3, 5, 14, 0.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; overflow-y: auto; animation: fade 0.15s ease; }
.modal { width: 100%; max-width: 540px; background: #0f1530; border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); animation: rise 0.18s ease; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(480px, 100vw); background: #0f1530; border-left: 1px solid var(--line-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide 0.2s ease; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: flex-start; gap: 10px; max-width: 400px; padding: 12px 15px; border-radius: 12px; background: #131a36; border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 13.5px; animation: rise 0.2s ease; }
.toast svg { flex: none; margin-top: 1px; color: var(--good); }
.toast.error svg { color: var(--bad); }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.code { display: block; padding: 12px 14px; border-radius: 10px; background: #050816; border: 1px solid var(--line); font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.6; color: #b7c1e6; white-space: pre-wrap; word-break: break-all; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 30px; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(148, 163, 216, 0.07), rgba(148, 163, 216, 0.14), rgba(148, 163, 216, 0.07)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preset { padding: 11px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; text-align: left; font-weight: 650; font-size: 13px; }
.preset small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; margin-top: 1px; }
.preset:hover { border-color: var(--accent); }
.preset.on { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .editor, .hunter-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 8px 0 0; }
  .brand-name, .brand-tag, .nav-label, .sidebar-foot, .nav-count { display: none; }
  .nav-item { width: auto; white-space: nowrap; }
  .main { padding: 18px 16px 48px; }
  .cols-2, .cols-3, .cols-4, .cols-5, .steps, .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-form { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 76px minmax(0, 1fr) 70px; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .steps, .preset-grid { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
