/* Emotio CRM — Emotio design system: teal #24BBB6 on ink #0C1110, Titillium Web + Urbanist */
:root {
  --ink: #0C1110; --ink-2: #141B1A; --ink-3: #1B2524;
  --text: #1F2A29; --text-2: #4F5F5D; --muted: #6B7B79; --ph: #9AA8A6;
  --on-dark: #D6E4E2; --on-dark-muted: #8CA09E;
  --canvas: #F3F5F5; --card: #fff; --subtle: #F8FAFA; --track: #F0F3F3;
  --border: #DCE4E3; --border-2: #E1E8E7; --divider: #EEF2F2; --input: #CBD5D4;
  --teal: #24BBB6; --teal-2: #5EB4B4; --teal-tint: #E6F5F4; --teal-text: #1D4F4E; --link: #1D7F7B;
  --green: #4CBB7F; --green-tint: #E8F7EF; --green-text: #1E7A4A;
  --amber: #E0913C; --amber-tint: #FCF1E4; --amber-text: #8A5214;
  --red: #E06060; --red-tint: #FBEAEA; --red-text: #A33636;
  --blue: #5B8DEF; --blue-tint: #EAF0FD; --blue-text: #2A4F99;
  --violet: #8B6FD6; --violet-tint: #F1ECFB; --violet-text: #563C9E;
  --h: 'Titillium Web', 'Segoe UI', system-ui, sans-serif;
  --b: 'Urbanist', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r: 12px; --shadow: 0 1px 2px rgba(12,17,16,.04), 0 4px 16px rgba(12,17,16,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--b); font-size: 14px; color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--h); color: var(--ink); margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); font-family: var(--h); }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.hidden { display: none !important; }
.grow { flex: 1; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .row.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: var(--on-dark); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-family: var(--h); font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.brand span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-2); font-family: var(--h); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--on-dark); font-weight: 600; font-size: 14px; text-decoration: none; }
.nav a svg { width: 18px; height: 18px; opacity: .75; flex: none; }
.nav a:hover { background: var(--ink-3); }
.nav a.active { background: var(--teal); color: var(--ink); }
.nav a.active svg { opacity: 1; }
.nav .badge { margin-left: auto; background: var(--teal); color: var(--ink); border-radius: 99px; font-size: 11px; padding: 1px 7px; font-family: var(--h); }
.nav a.active .badge { background: var(--ink); color: #fff; }
.nav-label { font-family: var(--h); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); padding: 18px 10px 6px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--ink-3); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: var(--ink); display: grid; place-items: center; font-family: var(--h); font-weight: 700; font-size: 13px; flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 11px; color: var(--on-dark-muted); text-transform: capitalize; }
.icon-btn { background: transparent; border: 0; color: var(--on-dark-muted); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--ink-3); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(243,245,245,.92); backdrop-filter: blur(8px); padding: 14px 32px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border-2); }
.search { position: relative; flex: 1; max-width: 520px; }
.search input[type=search] { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 0 12px 0 36px; }
.search input:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: transparent; }
.search > svg { position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; color: var(--ph); }
.search kbd { position: absolute; right: 10px; top: 9px; font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--subtle); font-family: var(--b); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 40px rgba(12,17,16,.14); padding: 6px; max-height: 70vh; overflow: auto; }
.search-results .grp { font-family: var(--h); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--teal-tint); }
.content { padding: 26px 32px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .kicker { font-family: var(--h); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--link); font-weight: 600; margin-bottom: 4px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- components ---------- */
.card { background: var(--card); border: 1px solid var(--border-2); border-radius: var(--r); padding: 22px 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { flex: 1; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; font-family: var(--b); display: block; margin-top: 2px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1180px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-1-2, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .g2 { grid-template-columns: 1fr; } .content, .topbar { padding-left: 16px; padding-right: 16px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--input); background: #fff; color: var(--ink); font-family: var(--h); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #253230; }
.btn.teal { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.btn.teal:hover { background: #1fa9a4; }
.btn.danger { color: var(--red-text); border-color: #E9B9B9; }
.btn.danger:hover { background: var(--red-tint); border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--track); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-group { display: inline-flex; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-family: var(--h); font-weight: 600; font-size: 13px; color: var(--ink); }
.field .help { font-size: 12px; color: var(--muted); }
.input, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=tel], input[type=url], input[type=search], select, textarea {
  height: 38px; border: 1px solid var(--input); border-radius: 8px; padding: 0 11px; background: #fff; width: 100%; min-width: 0; }
textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: transparent; }
select { appearance: none; background: #fff 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='%236B7B79' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

.toggle { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.toggle .t { flex: 1; } .toggle .t b { display: block; font-family: var(--h); font-weight: 600; font-size: 13px; } .toggle .t span { font-size: 12px; color: var(--muted); }
.switch { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--input); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(16px); }

.seg { display: inline-flex; background: var(--track); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 7px; font-family: var(--h); font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.seg button .n { opacity: .6; margin-left: 4px; font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-family: var(--h); font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--teal); }

.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 2px 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-family: var(--h); background: var(--track); color: var(--text-2); white-space: nowrap; }
.tag.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-new { background: var(--blue-tint); color: var(--blue-text); }
.s-attempting { background: var(--amber-tint); color: var(--amber-text); }
.s-contacted, .s-qualified { background: var(--teal-tint); color: var(--teal-text); }
.s-callback { background: var(--violet-tint); color: var(--violet-text); }
.s-appointment, .s-converted { background: var(--green-tint); color: var(--green-text); }
.s-converted { background: var(--green); color: #fff; }
.s-not_interested, .s-unreachable { background: var(--track); color: var(--muted); }
.s-invalid, .s-dnc { background: var(--red-tint); color: var(--red-text); }
.st-live { background: var(--green-tint); color: var(--green-text); } .st-draft { background: var(--track); color: var(--muted); }
.st-paused { background: var(--amber-tint); color: var(--amber-text); } .st-completed { background: var(--blue-tint); color: var(--blue-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--track); font-size: 12px; font-weight: 600; color: var(--text-2); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.callout { border-left: 3px solid var(--teal); background: var(--teal-tint); border-radius: 0 12px 12px 0; padding: 12px 16px; color: var(--teal-text); font-size: 13px; }
.callout.amber { border-color: var(--amber); background: var(--amber-tint); color: var(--amber-text); }
.callout.red { border-color: var(--red); background: var(--red-tint); color: var(--red-text); }
.callout.green { border-color: var(--green); background: var(--green-tint); color: var(--green-text); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--subtle); font-family: var(--h); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-2); white-space: nowrap; position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #F7FBFB; }
.tbl tbody tr.sel td { background: var(--teal-tint); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow: auto; border: 1px solid var(--border-2); border-radius: 10px; background: #fff; }
.card.flush .tbl-wrap { border: 0; border-radius: 0; }
.tbl td .name { font-weight: 600; color: var(--ink); }
.tbl td .sub { font-size: 12px; color: var(--muted); }
.cb { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }

.kpi { background: #fff; border: 1px solid var(--border-2); border-radius: var(--r); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k { font-family: var(--h); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--h); font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .up { color: var(--green-text); font-weight: 700; } .kpi .down { color: var(--red-text); font-weight: 700; }
.kpi .spark { position: absolute; right: 12px; bottom: 12px; opacity: .9; }
.kpi.dark { background: var(--ink); border-color: var(--ink); }
.kpi.dark .k { color: var(--teal-2); } .kpi.dark .v { color: #fff; } .kpi.dark .d { color: var(--on-dark-muted); }

.dark-panel { background: var(--ink); border-radius: var(--r); padding: 20px 22px; color: var(--on-dark); }
.dark-panel .kicker { font-family: var(--h); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-2); font-weight: 600; }
.dark-panel .big { font-family: var(--h); font-size: 34px; font-weight: 700; color: #fff; line-height: 1.1; }
.bar { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; }
.dark-panel .bar { background: var(--ink-3); }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h3 { margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); color: var(--text); text-decoration: none !important; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover .li-title { color: var(--link); }
.li-title { font-weight: 600; color: var(--ink); }
.li-sub { font-size: 12px; color: var(--muted); }
.dotc { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* campaign cards */
.camp-card { background: #fff; border: 1px solid var(--border-2); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.camp-card:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.camp-card .cc-top { display: flex; gap: 10px; align-items: flex-start; }
.camp-card h3 { font-size: 16px; }
.camp-card .cc-client { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.camp-card .cc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.camp-card .cc-stats div b { display: block; font-family: var(--h); font-size: 20px; color: var(--ink); }
.camp-card .cc-stats div span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-family: var(--h); font-weight: 600; }

/* lead page */
.lead-head { display: flex; gap: 18px; align-items: center; }
.lead-head .avatar { width: 54px; height: 54px; font-size: 19px; }
.contact-line { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.timeline { position: relative; }
.tl-item { display: flex; gap: 14px; padding: 12px 0; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 15px; top: 44px; bottom: -12px; width: 2px; background: var(--divider); }
.tl-item:last-child::before { display: none; }
.tl-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--track); color: var(--text-2); }
.tl-ico svg { width: 16px; height: 16px; }
.tl-ico.call { background: var(--teal-tint); color: var(--teal-text); } .tl-ico.email { background: var(--blue-tint); color: var(--blue-text); }
.tl-ico.note { background: var(--amber-tint); color: var(--amber-text); } .tl-ico.win { background: var(--green); color: #fff; }
.tl-ico.submission { background: var(--violet-tint); color: var(--violet-text); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-weight: 600; color: var(--ink); }
.tl-meta { font-size: 12px; color: var(--muted); }
.tl-notes { margin-top: 6px; background: var(--subtle); border: 1px solid var(--divider); border-radius: 8px; padding: 9px 12px; white-space: pre-wrap; font-size: 13px; }
.outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.outcome { border: 1.5px solid var(--border-2); border-radius: 10px; padding: 10px 12px; background: #fff; text-align: left; cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.outcome:hover { border-color: var(--teal-2); }
.outcome.on { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-text); }
.outcome i { width: 8px; height: 8px; border-radius: 50%; background: var(--ph); flex: none; }
.outcome.contact i { background: var(--teal); }
.outcome.win i { background: var(--green); }
.outcome.bad i { background: var(--red); }
.script { white-space: pre-wrap; font-size: 14px; line-height: 1.6; background: var(--subtle); border-radius: 10px; padding: 14px 16px; border: 1px solid var(--divider); max-height: 340px; overflow: auto; }
.pipeline { display: flex; gap: 4px; flex-wrap: wrap; }
.pipeline button { border: 1px solid var(--border-2); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-2); font-family: var(--h); }
.pipeline button:hover { border-color: var(--ink); }
.pipeline button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* queue */
.queue-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.qs { background: var(--ink-3); border-radius: 10px; padding: 10px 14px; min-width: 110px; }
.qs b { display: block; font-family: var(--h); font-size: 24px; color: #fff; } .qs span { font-size: 11px; color: var(--on-dark-muted); text-transform: uppercase; letter-spacing: .1em; font-family: var(--h); font-weight: 600; }
.phone-big { font-family: var(--h); font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: .02em; text-decoration: none !important; }
.timer { font-family: var(--h); font-size: 22px; font-variant-numeric: tabular-nums; color: var(--ink); }

/* field builder */
.fb-row { display: grid; grid-template-columns: 26px minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr) auto auto 34px; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--divider); background: #fff; }
.fb-row.core { background: var(--subtle); color: var(--muted); }
.fb-row.drag-over { box-shadow: inset 0 2px 0 var(--teal); }
.fb-handle { cursor: grab; color: var(--ph); display: grid; place-items: center; }
.fb-row .opts { grid-column: 2 / -1; }
.mini-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; cursor: pointer; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(12,17,16,.45); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 860px; }
.modal-head { padding: 20px 24px 0; display: flex; align-items: center; gap: 12px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px 24px; }
.modal-foot { padding: 14px 24px 20px; display: flex; gap: 8px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: fade .15s; }
.toast.err { background: var(--red-text); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--ink); color: var(--on-dark); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { color: #fff; font-size: 40px; max-width: 460px; }
.login-art p { color: var(--on-dark-muted); font-size: 16px; max-width: 440px; line-height: 1.6; }
.login-art .ring { position: absolute; right: -160px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(36,187,182,.12); }
.login-form { display: grid; place-items: center; padding: 40px; }
.login-form form { width: 100%; max-width: 360px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* charts */
.chart { width: 100%; }
.chart text { font-family: var(--b); font-size: 11px; fill: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 70px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar .trk { height: 10px; background: var(--track); border-radius: 99px; overflow: hidden; }
.hbar .trk i { display: block; height: 100%; border-radius: 99px; background: var(--teal); }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 120px; gap: 12px; align-items: center; padding: 6px 0; }
.funnel-row .fb { height: 30px; background: var(--teal); border-radius: 6px; min-width: 2px; display: flex; align-items: center; padding-left: 10px; color: var(--ink); font-family: var(--h); font-weight: 700; font-size: 13px; }
.funnel-row .fl { font-family: var(--h); font-weight: 600; font-size: 13px; color: var(--ink); }
.funnel-row .fp { font-size: 12px; color: var(--muted); text-align: right; }
.heat { display: grid; grid-template-columns: 34px repeat(12, 1fr); gap: 3px; font-size: 11px; }
.heat .hc { height: 26px; border-radius: 4px; display: grid; place-items: center; font-size: 10px; color: var(--ink); font-weight: 600; }
.heat .hl { color: var(--muted); display: flex; align-items: center; font-family: var(--h); font-weight: 600; }
.heat .hh { color: var(--muted); text-align: center; font-family: var(--h); font-weight: 600; }
.tip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 8px; z-index: 300; box-shadow: 0 6px 20px rgba(0,0,0,.2); white-space: nowrap; }
.tip b { font-family: var(--h); }

.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--muted); }
.bulkbar { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bulkbar select { width: auto; height: 32px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.filters select, .filters input { width: auto; height: 34px; font-size: 13px; }
.filters input[type=search] { min-width: 220px; flex: 1; }
.code-box { display: flex; gap: 8px; align-items: center; background: var(--subtle); border: 1px solid var(--border-2); border-radius: 8px; padding: 6px 6px 6px 12px; }
.code-box code { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
pre.code { background: var(--ink); color: var(--on-dark); padding: 14px 16px; border-radius: 10px; font-size: 12px; overflow: auto; margin: 0; line-height: 1.5; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 38px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-text); display: grid; place-items: center; font-family: var(--h); font-weight: 700; font-size: 13px; }
.demo-banner { background: var(--amber-tint); color: var(--amber-text); padding: 8px 32px; font-size: 13px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #F1DABF; }
@media print { .side, .topbar, .no-print, .demo-banner { display: none !important; } .shell { display: block; } .content { padding: 0; } .card { break-inside: avoid; } body { background: #fff; } }
