/*
  7DS CRM design tokens. Layout follows the 7DS Social admin (white collapsible sidebar, light canvas,
  white cards); colour is a CRM blue on navy rather than Social's Instagram palette. Status colours are
  fixed per status and used the same way on every page, so the pipeline reads at a glance.
  Hand-written rather than a Tailwind build: one file, no tooling to install, nothing to purge.
*/
:root {
  --ink: #0f172a;
  --navy: #0b1b33;
  --muted: #5b6577;
  --subtle: #8a93a5;
  --canvas: #f4f6fa;
  --surface: #ffffff;
  --line: #e4e8f0;
  --line-strong: #cfd6e2;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eef3ff;
  --accent-ring: rgb(37 99 235 / 0.25);
  --whatsapp: #128c4a;
  --whatsapp-soft: #e8f6ee;
  --instagram: #c13584;
  --instagram-soft: #fbeef5;
  --success: #047857;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgb(16 24 40 / 0.04), 0 1px 3px rgb(16 24 40 / 0.06);
  --shadow-pop: 0 12px 32px -8px rgb(16 24 40 / 0.18), 0 2px 6px rgb(16 24 40 / 0.06);
  --sidebar: 248px;
  --sidebar-collapsed: 72px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-feature-settings: 'cv11', 'ss01'; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--canvas); accent-color: var(--accent); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------- Shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line);
  transition: width .18s ease, transform .2s ease;
}
.brand { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #1e3a8a); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.brand-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; flex-shrink: 0; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.brand-name { font-weight: 650; font-size: 15px; line-height: 1.15; }
.brand-sub { font-size: 11.5px; color: var(--muted); }
.nav { flex: 1; overflow-y: auto; padding: 14px 10px; display: grid; gap: 2px; align-content: start; }
.nav-section { padding: 14px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: #f3f5f9; color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; text-align: center; }
.nav .count.warn { background: #dc2626; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 10px; display: grid; gap: 2px; }
.sidebar-foot .user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.sidebar-foot button, .sidebar-foot a {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-radius: 9px;
  background: none; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; text-align: left;
}
.sidebar-foot button:hover, .sidebar-foot a:hover { background: #f3f5f9; color: var(--ink); }

.collapsed .sidebar { width: var(--sidebar-collapsed); }
.collapsed .label, .collapsed .brand-text, .collapsed .nav-section, .collapsed .nav .count, .collapsed .user-text { display: none; }
.collapsed .nav a, .collapsed .sidebar-foot button, .collapsed .sidebar-foot a { justify-content: center; }
.collapsed .brand { padding: 0; justify-content: center; }
.collapsed .collapse-icon { transform: rotate(180deg); }

.main { padding-left: var(--sidebar); min-height: 100dvh; transition: padding-left .18s ease; }
.collapsed .main { padding-left: var(--sidebar-collapsed); }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 28px;
  background: rgb(255 255 255 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 17px; font-weight: 600; }
.topbar .menu-btn { display: none; }
.search { position: relative; margin-left: auto; width: min(340px, 40vw); }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--subtle); }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); font: inherit; }
.search input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring); }
.content { max-width: 1240px; margin: 0 auto; padding: 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--muted); }
.scrim { display: none; }

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar); }
  .nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(15 23 42 / .35); }
  .main, .collapsed .main { padding-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .collapse-btn { display: none !important; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
}

/* ---------- Building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.stack { display: grid; gap: 20px; align-content: start; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 1023px) { .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgb(37 99 235 / .3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: #f6f8fb; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f6; color: var(--ink); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #0e7a40; color: #fff; }
.btn-instagram { background: linear-gradient(100deg, #833ab4, #c13584 55%, #e1306c); color: #fff; }
.btn-instagram:hover { filter: brightness(.95); color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1c4c4; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-icon { width: 38px; padding: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.field { display: grid; gap: 6px; }
.field label, .label-text { font-size: 12.5px; font-weight: 600; color: #344054; }
.field .hint { font-size: 12px; color: var(--subtle); }
.input, select.input, textarea.input {
  width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; font: inherit; color: var(--ink);
}
textarea.input { resize: vertical; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 16px; height: 16px; }

/* Status badges: one colour per status, everywhere. */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.tone-slate { background: #f1f4f8; color: #475569; }
.tone-blue { background: #eaf1ff; color: #1d4ed8; }
.tone-violet { background: #f3edff; color: #6d28d9; }
.tone-amber { background: #fff6e5; color: #b45309; }
.tone-teal { background: #e6f7f6; color: #0f766e; }
.tone-green { background: #e8f8ef; color: #047857; }
.tone-red { background: #fdeeee; color: #b91c1c; }
.tone-gray { background: #f1f2f4; color: #6b7280; }
.tone-dark { background: #1f2937; color: #f9fafb; }
.tier { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.tier-A { background: #e8f8ef; color: #047857; }
.tier-B { background: #eaf1ff; color: #1d4ed8; }
.tier-C { background: #f1f4f8; color: #64748b; }

.chip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; }
.chip.wa { background: var(--whatsapp-soft); color: var(--whatsapp); }
.chip.ig { background: var(--instagram-soft); color: var(--instagram); }
.chip.mail { background: var(--accent-soft); color: var(--accent); }
.chip.off { background: #f3f4f6; color: #c2c8d2; }
.chip.wrong { background: #fdeeee; color: #dc2626; position: relative; }
.chip.wrong::after { content: ""; position: absolute; width: 20px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 1px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--subtle); text-align: left; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table .name { font-weight: 600; color: var(--ink); }
.table .name:hover { color: var(--accent); }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; color: var(--subtle); margin-bottom: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid #c5eedb; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #f7e3b5; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #f5cccc; }
.alert-info { background: var(--accent-soft); color: #1e3a8a; border: 1px solid #d6e2ff; }

/* ---------- Today and Dashboard ---------- */
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 20px; }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis, .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 18px 20px; }
.kpi .kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .kpi-value { margin-top: 8px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .kpi-hint { margin-top: 6px; font-size: 12.5px; color: var(--subtle); display: flex; gap: 6px; align-items: center; }
.delta { font-weight: 600; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.delta.up { background: var(--success-soft); color: var(--success); }
.delta.down { background: var(--danger-soft); color: var(--danger); }
.kpi-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }

.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; margin-bottom: 20px; border-radius: var(--radius); color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #2f6bff 0%, #1e40af 45%, #0b1b33 100%);
  box-shadow: 0 14px 30px -14px rgb(30 64 175 / .55);
}
.hero h2 { font-size: 20px; font-weight: 650; }
.hero p { color: rgb(255 255 255 / .82); margin-top: 4px; }
.hero .stats { display: flex; gap: 26px; flex-wrap: wrap; }
.hero .stat-value { font-size: 22px; font-weight: 700; }
.hero .stat-label { font-size: 12px; color: rgb(255 255 255 / .75); }

.due-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.due-row:last-child { border-bottom: 0; }
.due-row .due-name { font-weight: 600; flex: 1; min-width: 180px; }
.due-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: #f3f5f9; color: var(--muted); }
.pill.wa { background: var(--whatsapp-soft); color: var(--whatsapp); }
.pill.ig { background: var(--instagram-soft); color: var(--instagram); }
.pill.fu { background: var(--accent-soft); color: var(--accent); }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { font-size: 12.5px; color: var(--muted); }
.date-box { display: grid; place-items: center; width: 44px; height: 46px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); line-height: 1.05; flex-shrink: 0; }
.date-box .d { font-size: 17px; font-weight: 700; }
.date-box .m { font-size: 10.5px; font-weight: 600; text-transform: uppercase; }

.feed-item { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; background: #f1f4f8; color: var(--muted); }
.feed-dot.wa { background: var(--whatsapp-soft); color: var(--whatsapp); }
.feed-dot.ig { background: var(--instagram-soft); color: var(--instagram); }
.feed-dot.status { background: var(--accent-soft); color: var(--accent); }

.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 140px 1fr 48px; gap: 12px; align-items: center; font-size: 13px; }
.funnel-bar { height: 10px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 99px; }
.bar-slate { background: #94a3b8; } .bar-blue { background: #3b82f6; } .bar-violet { background: #8b5cf6; }
.bar-amber { background: #f59e0b; } .bar-teal { background: #14b8a6; } .bar-green { background: #10b981; }
.bar-red { background: #ef4444; } .bar-gray { background: #cbd5e1; } .bar-dark { background: #334155; }

.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 46px; gap: 12px; align-items: center; padding: 9px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.rate-row:last-child { border-bottom: 0; }
.chart-box { position: relative; height: 260px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: #eceff4; }
.segmented a, .segmented button { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; border: 0; background: none; cursor: pointer; font-family: inherit; }
.segmented .on { background: #fff; color: var(--ink); box-shadow: var(--shadow-card); }

/* ---------- Leads ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.filters .input { width: auto; min-width: 150px; height: 36px; min-height: 36px; padding: 6px 10px; }
.filters .grow { flex: 1; min-width: 200px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.lead-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.lead-logo { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, #e0e9ff, #c7d6fe); color: #1e3a8a; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.facts { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 6px; }
.facts span { display: inline-flex; gap: 5px; align-items: center; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.enrollment { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.enrollment:last-child { border-bottom: 0; }
.timeline { position: relative; padding: 8px 20px 12px; }
.timeline-item { position: relative; display: flex; gap: 14px; padding: 10px 0; }
.timeline-item::before { content: ''; position: absolute; left: 13px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-text { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: #f7f9fc; border: 1px solid var(--line); white-space: pre-wrap; font-size: 13px; color: #334155; }

/* ---------- Outreach ---------- */
.channel-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.channel-tab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font: inherit; }
.channel-tab:hover { border-color: var(--line-strong); }
.channel-tab.on.wa { border-color: var(--whatsapp); background: var(--whatsapp-soft); }
.channel-tab.on.ig { border-color: var(--instagram); background: var(--instagram-soft); }
.channel-tab.on.call { border-color: var(--accent); background: var(--accent-soft); }
.channel-tabs.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) { .channel-tabs.three { grid-template-columns: 1fr; } }
.chip.call { background: var(--accent-soft); color: var(--accent); }
.channel-tab .t { font-weight: 650; }
.channel-tab .s { font-size: 12.5px; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: #e9edf3; overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.meter.warn span { background: #f59e0b; } .meter.over span { background: #ef4444; }
.round-dots { display: flex; gap: 6px; }
.round-dots i { width: 26px; height: 6px; border-radius: 99px; background: #e2e7ef; }
.round-dots i.done { background: var(--accent); }
.send-card { padding: 22px 24px; }
.send-card textarea { min-height: 260px; font-size: 13.5px; }
.send-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.break-panel { text-align: center; padding: 44px 24px; }
.break-timer { font-size: 54px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 10px 0 6px; color: var(--navy); }
.up-next { display: grid; }
.up-next .list-item { padding: 10px 16px; }
.up-next .list-item.current { background: var(--accent-soft); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 12px 16px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 500; box-shadow: var(--shadow-pop); transform: translateY(20px); opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { transform: none; opacity: 1; }
.toast.action { display: flex; align-items: center; gap: 14px; bottom: 76px; pointer-events: auto; }
.toast.action:not(.show) { pointer-events: none; }
.toast.action button { border: 0; border-radius: 7px; padding: 5px 12px; background: rgb(255 255 255 / .16); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.toast.action button:hover { background: rgb(255 255 255 / .26); }

/* ---------- Login ---------- */
.auth { display: grid; min-height: 100dvh; grid-template-columns: 1.05fr 1fr; }
.auth-art { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: #fff; background: radial-gradient(120% 120% at 0% 100%, #2f6bff 0%, #1e40af 40%, #0b1b33 100%); }
.auth-art h2 { font-size: 30px; line-height: 1.2; font-weight: 650; max-width: 440px; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; color: rgb(255 255 255 / .88); }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-logo { width: 168px; height: 168px; border-radius: 28px; background: #fff; object-fit: contain; padding: 6px; box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45); }
.auth-logo-small { display: none; width: 96px; height: 96px; object-fit: contain; }
.auth-form { display: grid; place-items: center; padding: 40px 20px; background: #fff; }
.auth-form form { width: 100%; max-width: 360px; display: grid; gap: 18px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-logo-small { display: block; } }

/* Campaign step editor */
.step-card { display: grid; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.step-card:last-child { border-bottom: 0; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.step-summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.step-list { display: grid; gap: 10px; }
.step-list .step-row { display: flex; gap: 10px; align-items: baseline; }
.step-list .step-row .day { min-width: 64px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* Busy buttons (data-busy forms) */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
button[aria-busy="true"] { opacity: .8; cursor: progress; gap: 8px; }

/* Lead owners */
.owner-chip { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.assign-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }

/* Dialog: a native <dialog> opened with showModal(), so focus and Escape are handled by the browser. */
.dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 22px; width: min(440px, calc(100vw - 32px)); color: var(--ink); }
.dialog::backdrop { background: rgb(15 23 42 / .35); }
.choices { display: grid; gap: 6px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); margin: 0; }
.text-danger { color: var(--danger); font-weight: 600; }
