:root {
  --bg: #060b16;
  --bg-2: #0a1222;
  --panel: #0d1729;
  --panel-2: #111d33;
  --line: #1b2942;
  --line-2: #24375a;
  --text: #e7edf8;
  --text-2: #a9b6cf;
  --muted: #6f7f9f;
  --accent: #4d8dff;
  --accent-2: #2f6bff;
  --accent-soft: rgba(77, 141, 255, .14);
  --green: #2fd18b;
  --green-soft: rgba(47, 209, 139, .14);
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, .14);
  --red: #ff5d6c;
  --red-soft: rgba(255, 93, 108, .14);
  --violet: #a184ff;
  --violet-soft: rgba(161, 132, 255, .15);
  --cyan: #3cc8e8;
  --cyan-soft: rgba(60, 200, 232, .14);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Playfair Display', Georgia, 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; overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
svg { flex: none; }
.action-group-head svg, .tag svg, .score svg { width: 13px; height: 13px; }
.tag svg { margin-right: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.right { margin-left: auto; }
.center { text-align: center; }

/* ── Buttons & inputs ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: #172642; border-color: #31497a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #5b97ff, var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(47, 107, 255, .35); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--red); border-color: rgba(255, 93, 108, .35); background: transparent; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn svg { width: 16px; height: 16px; }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f7f9f' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 22px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(18px); }

/* ── Login ────────────────────────────────────────────── */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 500px at 50% -10%, rgba(47, 107, 255, .22), transparent 70%), var(--bg);
}
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 22px; margin: 22px 0 4px; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.login-error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #6ea4ff, var(--accent-2)); box-shadow: 0 6px 18px rgba(47, 107, 255, .4);
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1; }
.brand-sub { font-size: 9px; letter-spacing: 3.2px; color: var(--accent); margin-top: 3px; }

/* ── Shell ────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-2); border-right: 1px solid var(--line); padding: 18px 12px;
}
.sidebar .brand { padding: 0 8px 18px; }
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: 1.4px; color: var(--muted); padding: 14px 10px 6px; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; text-decoration: none; position: relative;
}
.nav a svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-2); background: var(--panel-2); border-radius: 20px; padding: 1px 8px; }
.nav .count.hot { background: var(--accent); color: #fff; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(135deg, #8a7dff, #4d8dff);
}
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 28px; background: rgba(6, 11, 22, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 700; }
.search-trigger {
  margin-left: auto; display: flex; align-items: center; gap: 8px; height: 36px; width: 280px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); color: var(--muted); cursor: pointer;
}
.search-trigger svg { width: 15px; height: 15px; }
.search-trigger kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--line-2); border-radius: 5px; padding: 0 6px; }
.content { padding: 24px 28px 60px; max-width: 1400px; width: 100%; }
.mobile-nav { display: none; }

/* ── Cards, KPIs ──────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-body { padding: 16px 18px 18px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: 1.4fr 1fr; }
.halves { grid-template-columns: 1fr 1fr; }
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 28px; font-weight: 750; letter-spacing: -.5px; margin-top: 6px; }
.kpi .delta { font-size: 12px; margin-top: 2px; color: var(--muted); }
.kpi .delta .up { color: var(--green); font-weight: 700; }
.kpi .delta .down { color: var(--red); font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
  border: 1px solid rgba(255, 181, 71, .35); background: var(--amber-soft); color: #ffd59a; font-size: 13px;
}
.banner.info { border-color: rgba(77, 141, 255, .35); background: var(--accent-soft); color: #bcd3ff; }
.banner svg { width: 18px; height: 18px; flex: none; }

.greeting { margin: 0 0 18px; }
.greeting h2 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.greeting p { margin: 4px 0 0; color: var(--muted); }

/* ── Action list ──────────────────────────────────────── */
.action-group + .action-group { border-top: 1px solid var(--line); }
.action-group-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px 6px; font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .8px; }
.action-item { display: flex; align-items: center; gap: 12px; padding: 9px 18px; cursor: pointer; }
.action-item:hover { background: var(--panel-2); }
.action-item .who { min-width: 0; flex: 1; }
.action-item .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-item .who span { font-size: 12px; color: var(--muted); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty svg { width: 28px; height: 28px; opacity: .6; margin-bottom: 6px; }

/* ── Pills ────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; }
.st-new      { background: var(--accent-soft); color: #9cc0ff; } .st-new .dot { background: var(--accent); }
.st-contacted{ background: var(--cyan-soft); color: #8fe3f5; } .st-contacted .dot { background: var(--cyan); }
.st-trial    { background: var(--amber-soft); color: #ffd08a; } .st-trial .dot { background: var(--amber); }
.st-converted{ background: var(--green-soft); color: #7deab7; } .st-converted .dot { background: var(--green); }
.st-lapsed   { background: var(--violet-soft); color: #c6b5ff; } .st-lapsed .dot { background: var(--violet); }
.st-churned  { background: var(--red-soft); color: #ff9aa4; } .st-churned .dot { background: var(--red); }
.st-nofit    { background: rgba(111, 127, 159, .16); color: var(--text-2); } .st-nofit .dot { background: var(--muted); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 11px; color: var(--text-2); }
.score { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12px; }
.score.hot { color: #ff8f5d; }
.score.warm { color: var(--amber); }
.score.cold { color: var(--muted); }

/* ── Tables ───────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { width: 260px; }
.toolbar .select { width: auto; min-width: 130px; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: default; user-select: none; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text-2); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .1s; }
.table tbody tr:hover { background: var(--panel-2); }
.table tbody tr.selected { background: rgba(77, 141, 255, .08); }
.table td.check-cell, .table th.check-cell { width: 36px; padding-right: 0; cursor: default; }
.lead-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.lead-cell .avatar { width: 30px; height: 30px; font-size: 11px; }
.lead-cell b { display: block; font-weight: 600; }
.lead-cell span { display: block; font-size: 12px; color: var(--muted); }
.bulkbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 16px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
}
.bulkbar .select { width: auto; height: 30px; }

/* ── Pipeline ─────────────────────────────────────────── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 420px; }
.col-head { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.col-head b { font-size: 13px; }
.col-head .count { font-size: 11px; color: var(--muted); font-weight: 700; }
.col-head .val { margin-left: auto; font-size: 11px; color: var(--muted); }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; transition: background .15s; border-radius: 0 0 var(--radius) var(--radius); }
.col-body.drop { background: var(--accent-soft); }
.deal { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: grab; transition: border-color .15s, transform .1s; }
.deal:hover { border-color: var(--line-2); }
.deal.dragging { opacity: .45; }
.deal b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal .meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.countdown { font-weight: 700; }
.countdown.soon { color: var(--amber); }
.countdown.over { color: var(--red); }

/* ── Drawer ───────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(2, 5, 12, .62); z-index: 50; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); z-index: 51; background: var(--panel);
  border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-title { display: flex; align-items: flex-start; gap: 14px; }
.drawer-title h2 { margin: 0; font-size: 19px; line-height: 1.3; word-break: break-word; }
.drawer-title .email { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tabs { display: flex; gap: 2px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.tab { padding: 11px 12px; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--accent); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.fact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.fact .k { font-size: 11px; color: var(--muted); font-weight: 600; }
.fact .v { font-weight: 650; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }

/* Timeline */
.timeline { position: relative; margin-left: 6px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; display: flex; gap: 12px; padding: 8px 0; }
.tl-icon { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; flex: none; z-index: 1; background: var(--panel-2); border: 1px solid var(--line-2); }
.tl-icon svg { width: 12px; height: 12px; }
.tl-icon.blue { background: #13254a; border-color: #2b4a85; color: #8db6ff; }
.tl-icon.green { background: #0f3326; border-color: #1f6b4c; color: var(--green); }
.tl-icon.amber { background: #3a2a10; border-color: #6e5120; color: var(--amber); }
.tl-icon.red { background: #3a1419; border-color: #6e2731; color: var(--red); }
.tl-icon.violet { background: #251b45; border-color: #47387f; color: var(--violet); }
.tl-main { min-width: 0; flex: 1; padding-top: 2px; }
.tl-main .t { font-weight: 550; font-size: 13px; word-break: break-word; }
.tl-main .b { margin-top: 4px; color: var(--text-2); font-size: 13px; white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-word; }
.tl-main .m { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.note-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.note-box .textarea { min-height: 64px; }

/* Email list */
.mail { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mail:last-child { border-bottom: 0; }
.mail .s { flex: 1; min-width: 0; }
.mail .s b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail .s span { font-size: 12px; color: var(--muted); }
.mstat { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: capitalize; }
.mstat.sent, .mstat.delivered { background: var(--panel-2); color: var(--text-2); }
.mstat.opened { background: var(--accent-soft); color: #9cc0ff; }
.mstat.clicked { background: var(--green-soft); color: var(--green); }
.mstat.bounced, .mstat.complained, .mstat.failed { background: var(--red-soft); color: var(--red); }

/* ── Modal ────────────────────────────────────────────── */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(2, 5, 12, .66); animation: fade .15s; overflow-y: auto; }
.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); animation: pop .18s ease-out; }
.modal.wide { max-width: 980px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; }
.compose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.preview-frame { width: 100%; height: 440px; border: 1px solid var(--line-2); border-radius: 10px; background: #f4f6fb; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; }
.vars button { font-size: 11px; height: 22px; padding: 0 8px; border-radius: 5px; border: 1px dashed var(--line-2); background: none; color: var(--text-2); cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.vars button:hover { border-color: var(--accent); color: var(--accent); }
.vars.blocks button { font-family: var(--font); border-style: solid; background: var(--panel-2); color: var(--text); font-weight: 600; }
.preview-frame { height: 560px; }

/* ── Command palette ──────────────────────────────────── */
.palette { position: fixed; inset: 0; z-index: 70; background: rgba(2, 5, 12, .6); display: flex; justify-content: center; padding: 12vh 16px 16px; animation: fade .12s; }
.palette-box { width: 100%; max-width: 560px; height: fit-content; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.palette-box .input { height: 52px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 15px; padding: 0 18px; background: transparent; box-shadow: none; }
.palette-results { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.palette-item.active, .palette-item:hover { background: var(--accent-soft); }

/* ── Sequences ────────────────────────────────────────── */
.seq { margin-bottom: 16px; }
.seq-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seq-head h3 { margin: 0; font-size: 15px; }
.seq-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.step { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-day { width: 64px; flex: none; text-align: center; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 6px 0; }
.step-day b { display: block; font-size: 16px; color: #fff; }
.step .s { flex: 1; min-width: 0; }
.step .s b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .s span { font-size: 12px; color: var(--muted); }
.step-stats { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.step-stats b { color: var(--text); display: block; font-size: 14px; }
.step.off { opacity: .5; }

/* ── Health ───────────────────────────────────────────── */
.health { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.health:last-child { border-bottom: 0; }
.health .dot { width: 9px; height: 9px; }
.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.bad { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

/* ── Toast ────────────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 240px; max-width: 360px; padding: 11px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px; animation: pop .2s; display: flex; gap: 10px; align-items: center; }
.toast.ok { border-color: rgba(47, 209, 139, .4); box-shadow: var(--shadow); background: #0e2a22; }
.toast.err { border-color: rgba(255, 93, 108, .45); background: #2c1218; }

.chart-box { position: relative; height: 260px; }
.funnel-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.funnel-row .lbl { width: 110px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.funnel-bar { height: 30px; border-radius: 7px; display: flex; align-items: center; padding: 0 10px; font-weight: 700; font-size: 12px; min-width: 40px; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2), #182746, var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two, .halves { grid-template-columns: 1fr; }
  .compose-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; height: 56px; }
  .search-trigger { width: auto; }
  .search-trigger .lbl, .search-trigger kbd { display: none; }
  .content { padding: 16px 16px 90px; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg-2); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around;
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 4px 6px; text-decoration: none; }
  .mobile-nav a.active { color: var(--accent); }
  .mobile-nav svg { width: 20px; height: 20px; }
  .toolbar .input { width: 100%; }
  .field-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none !important; }
  .step-stats { display: none; }
  .bulkbar { left: 12px; right: 12px; transform: none; bottom: 76px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 22px; }
  .topbar h1 { font-size: 16px; }
}
