/* Next Bank web console — a browser twin of the macOS banker app.
   The palette mirrors the native `Palette` (brand #1A7CFF, ink/slate/mist grays). */

:root {
  --brand: #1A7CFF;
  --brand-pressed: #0B5BFF;
  --blue-ink: #0B5BFF;
  --blue-wash: #E8F1FF;
  --ink: #101828;
  --ink-soft: #2E3A4E;
  --slate: #51607A;
  --mist: #93A1B7;
  --fill: #E9EEF5;
  --border: #E2E8F0;
  --panel: #FFFFFF;
  --canvas: #F6F8FB;
  --violet: #7C3AED;
  --violet-wash: #F1EAFE;
  --amber: #B7791F;
  --amber-wash: #FCF3E3;
  --green: #1D7A46;
  --green-wash: #E7F5EC;
  --red: #DC2626;
  --red-wash: #FDECEC;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .06);
  --radius: 12px;
  font-size: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea, select { font: inherit; }
.hidden { display: none !important; }
.clickable { cursor: pointer; }
.muted { color: var(--mist); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0E1B3A 0%, #14224A 60%, #0B5BFF 160%);
}
.gate-card {
  width: 340px; background: rgba(255,255,255,.97); border-radius: 18px;
  padding: 34px 30px; text-align: center; box-shadow: 0 24px 70px rgba(2, 12, 40, .45);
}
.gate-mark {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 13px;
  background: var(--brand); color: #fff; font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.gate-card h1 { font-size: 19px; margin: 0 0 6px; }
.gate-card p { color: var(--slate); font-size: 13px; margin: 0 0 18px; }
.gate-card form { display: flex; flex-direction: column; gap: 10px; }
.gate-card input {
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; text-align: center;
  font-size: 15px; letter-spacing: 2px;
}
.gate-card input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.gate-card button {
  background: var(--brand); color: #fff; border-radius: 9px; padding: 10px; font-weight: 600;
}
.gate-card button:hover { background: var(--brand-pressed); }
.gate-error { color: var(--red) !important; font-size: 12px !important; margin-top: 10px !important; }

/* ---------- Layout ---------- */
.app { display: flex; flex-direction: column; height: 100vh; }
.main { flex: 1; display: grid; grid-template-columns: 300px 1fr 380px; min-height: 0; }
.sidebar { border-right: 1px solid var(--border); background: var(--panel); overflow-y: auto; min-height: 0; }
.center { overflow-y: auto; min-height: 0; padding: 18px 22px 30px; }
.stream { border-left: 1px solid var(--border); background: var(--panel); min-height: 0; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border);
}
.tabs { display: flex; gap: 4px; background: var(--canvas); border-radius: 10px; padding: 3px; }
.tab {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--mist);
}
.tab.selected { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.tab .badge {
  min-width: 17px; height: 17px; border-radius: 9px; background: #FF6B6B; color: #fff;
  font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.topbar .spacer { flex: 1; }
.pill-btn {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--canvas); border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px;
}
.pill-btn:hover { background: var(--fill); }
.banker-chip { display: flex; align-items: center; gap: 9px; text-align: left; }
.banker-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-ink);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.banker-chip .nm { font-size: 13px; font-weight: 600; line-height: 1.15; }
.banker-chip .tt { font-size: 11px; color: var(--mist); }

/* Menus */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 210px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; max-height: 60vh; overflow-y: auto;
}
.menu.left { right: auto; left: 0; }
.menu .section { font-size: 10.5px; font-weight: 700; color: var(--mist); text-transform: uppercase; letter-spacing: .5px; padding: 7px 10px 3px; }
.menu .item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 8px; font-size: 13px; text-align: left;
}
.menu .item:hover { background: var(--blue-wash); }
.menu .item .check { width: 14px; color: var(--brand); font-weight: 700; }
.menu .item .sub { color: var(--mist); font-size: 11.5px; margin-left: auto; }

/* ---------- Alert bar ---------- */
.alertbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  font-size: 12.5px; border-bottom: 1px solid var(--border);
}
.alertbar.high { background: var(--red-wash); }
.alertbar.normal { background: var(--amber-wash); }
.alertbar .kick { font-weight: 700; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; }
.alertbar.high .kick { color: var(--red); }
.alertbar.normal .kick { color: var(--amber); }
.alertbar .open-link { color: var(--blue-ink); font-weight: 600; }
.alertbar .close { margin-left: auto; color: var(--mist); font-size: 15px; }

/* ---------- Sidebar ---------- */
.side-pad { padding: 14px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--canvas);
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; margin-bottom: 12px;
}
.search-box input { border: none; outline: none; background: none; flex: 1; font-size: 13px; }
.side-label { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; color: var(--mist); margin: 10px 2px 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500;
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; background: #fff; color: var(--ink-soft);
}
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--blue-wash); border-color: var(--brand); color: var(--blue-ink); font-weight: 600; }
.filter-row { display: flex; gap: 6px; margin-top: 8px; }
.scopebar {
  margin-top: 10px; font-size: 11.5px; color: var(--blue-ink); background: var(--blue-wash);
  border-radius: 8px; padding: 6px 9px; display: flex; align-items: center; gap: 6px;
}
.scopebar .clear { margin-left: auto; font-weight: 600; }

.stats { display: flex; gap: 8px; margin: 12px 0; }
.stat {
  flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fff;
}
.stat.sel { border-color: var(--brand); }
.stat .k { font-size: 9.5px; font-weight: 700; letter-spacing: .5px; color: var(--mist); display: flex; align-items: center; gap: 4px; }
.stat .k .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.stat .v { font-size: 17px; font-weight: 700; margin-top: 2px; }

.roster { padding: 0 8px 20px; }
.cust-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border-radius: 10px; padding: 8px 10px; text-align: left;
}
.cust-row:hover { background: var(--canvas); }
.cust-row.sel { background: var(--brand); color: #fff; }
.cust-row.sel .sub, .cust-row.sel .when { color: rgba(255,255,255,.75); }
.cust-row .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--fill); color: var(--slate); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.cust-row.sel .avatar { background: rgba(255,255,255,.25); color: #fff; }
.cust-row .avatar .live {
  position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); border: 2px solid #fff;
}
.cust-row .who { flex: 1; min-width: 0; }
.cust-row .nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-row .sub { font-size: 11px; color: var(--mist); }
.cust-row .when { font-size: 10.5px; color: var(--mist); flex: none; }

.interactions { margin: 2px 6px 8px 30px; border-left: 2px solid var(--fill); padding-left: 10px; }
.int-row { padding: 5px 0; font-size: 11.5px; color: var(--ink-soft); }
.int-row .meta { font-size: 10.5px; color: var(--mist); }

/* ---------- Center columns ---------- */
.col-title { font-size: 11px; font-weight: 700; letter-spacing: .7px; color: var(--mist); margin: 4px 0 10px; }
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.detail-head .avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.detail-head h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.detail-head .seg { font-size: 11px; font-weight: 600; color: var(--violet); background: var(--violet-wash); border-radius: 999px; padding: 3px 9px; }
.detail-head .sub { font-size: 12px; color: var(--mist); }
.detail-head .gear { margin-left: auto; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; background: var(--blue-wash); color: var(--blue-ink);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.card h4 { margin: 0 0 4px; font-size: 13.5px; }
.card .note { font-size: 12px; color: var(--slate); }
.empty-note { font-size: 12.5px; color: var(--slate); }

.jr { border-bottom: 1px solid var(--fill); padding: 10px 0; }
.jr:last-child { border-bottom: none; }
.jr .top { display: flex; align-items: baseline; gap: 8px; }
.jr .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; position: relative; top: -1px; }
.jr .nm { font-size: 13px; font-weight: 600; flex: 1; }
.jr .pct { font-size: 13px; font-weight: 700; }
.jr .bar { height: 5px; border-radius: 3px; background: var(--fill); margin: 7px 0 6px; overflow: hidden; }
.jr .bar i { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.jr .ev { font-size: 11px; color: var(--mist); }
.jr .row2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.badge-soft {
  font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 3px 9px;
  background: var(--green-wash); color: var(--green); display: inline-flex; align-items: center; gap: 4px;
}
.btn-soft {
  font-size: 11.5px; font-weight: 600; background: var(--canvas); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px;
}
.btn-soft:hover:not(:disabled) { border-color: var(--brand); color: var(--blue-ink); }
.btn-soft:disabled { opacity: .45; cursor: default; }

.offer-card .tag-line { display: flex; align-items: center; gap: 8px; font-size: 10.5px; margin-bottom: 6px; }
.offer-card .linked { color: var(--blue-ink); font-weight: 600; background: var(--blue-wash); border-radius: 999px; padding: 2.5px 8px; }
.offer-card .lastday { margin-left: auto; color: var(--mist); }
.offer-card .lastday.hot { color: var(--amber); font-weight: 600; }
.offer-card .src {
  margin: 8px 0; padding: 8px 10px; border-radius: 9px; background: var(--blue-wash); font-size: 12px;
}
.offer-card .src .k { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--blue-ink); display: block; margin-bottom: 2px; }
.offer-card .talk { font-size: 11.5px; color: var(--slate); }
.offer-card .talk .k { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--mist); display: block; margin-bottom: 2px; }
.offer-card .foot { display: flex; align-items: center; margin-top: 8px; }
.offer-card .channel { font-size: 11px; color: var(--mist); }
.offer-card .outcome { margin-left: auto; position: relative; }
.offer-card.resolved { opacity: .55; }
.offer-card .res-note { margin-top: 8px; font-size: 11.5px; color: var(--slate); background: var(--canvas); border-radius: 8px; padding: 7px 9px; }

.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--fill); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--slate); }
.kv .v { font-weight: 600; }
.big-value .k { font-size: 12px; color: var(--slate); }
.big-value .v { font-size: 26px; font-weight: 800; margin-top: 2px; }
.sec-label { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; color: var(--mist); margin: 14px 2px 6px; }
.prod-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--fill); font-size: 12.5px; }
.prod-row:last-child { border-bottom: none; }
.prod-row .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--blue-wash); color: var(--blue-ink); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.prod-row .who { flex: 1; min-width: 0; }
.prod-row .nm { font-weight: 600; }
.prod-row .sub { font-size: 11px; color: var(--mist); }
.prod-row .amt { font-weight: 600; }
.bankcard {
  border-radius: 13px; padding: 13px 15px; color: #fff; margin-bottom: 8px;
  background: linear-gradient(120deg, #2A86FF, #0B5BFF);
}
.bankcard.dark { background: linear-gradient(120deg, #3A4353, #232A36); }
.bankcard .t { display: flex; justify-content: space-between; font-weight: 700; font-size: 13.5px; }
.bankcard .k { font-size: 10px; opacity: .75; margin-top: 10px; }
.bankcard .v { font-size: 15px; font-weight: 700; }
.bankcard .tier { float: right; font-size: 10.5px; opacity: .8; }

/* ---------- Stream (right panel) ---------- */
.stream-tabs { display: flex; gap: 6px; padding: 10px 12px 0; }
.stream-tab {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 6px 11px; border-radius: 999px; color: var(--mist);
}
.stream-tab.selected { background: var(--blue-wash); color: var(--blue-ink); }
.stream-tab .badge { background: var(--green-wash); color: var(--green); border-radius: 999px; font-size: 10px; padding: 1px 6px; }
.stream-head { padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.stream-body { flex: 1; overflow-y: auto; min-height: 0; padding: 12px 14px; }
.stream-foot { border-top: 1px solid var(--border); padding: 10px 12px; }

.procs { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; }
.procs .hd { display: flex; align-items: center; font-size: 11.5px; font-weight: 700; }
.procs .hd .n { margin-left: auto; color: var(--mist); font-weight: 500; font-size: 10.5px; }
.procs .none { font-size: 11px; color: var(--mist); margin-top: 4px; }
.proc { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; padding: 4px 0; width: 100%; text-align: left; }
.proc .box { width: 14px; height: 14px; border: 1.5px solid var(--mist); border-radius: 4px; flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #fff; }
.proc.done .box { background: var(--green); border-color: var(--green); }
.proc.done .t { text-decoration: line-through; color: var(--mist); }

.mirror-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.mirror-card .eyebrow { font-size: 9px; font-weight: 800; letter-spacing: .5px; color: var(--violet); }
.mirror-card .eyebrow.progress { color: var(--blue-ink); }
.mirror-card h5 { margin: 3px 0 4px; font-size: 14px; }
.mirror-card .body { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.mirror-card .amounts { display: flex; align-items: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.amount-chip { font-size: 12px; font-weight: 700; background: var(--canvas); border: 1px solid var(--border); border-radius: 8px; padding: 3px 9px; }
.amount-chip.hot { background: var(--blue-wash); border-color: transparent; color: var(--blue-ink); }
.mirror-card .ctas { display: flex; gap: 7px; margin-top: 10px; }
.cta-pill { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 5px 12px; background: var(--brand); color: #fff; pointer-events: none; }
.cta-pill.sec { background: var(--canvas); color: var(--ink-soft); border: 1px solid var(--border); }
.mirror-foot { font-size: 10.5px; color: var(--mist); display: flex; gap: 6px; align-items: center; margin: 4px 0 12px; }
.streaming { display: flex; gap: 6px; align-items: center; font-size: 10.5px; color: var(--mist); margin-top: 6px; }
.spin { width: 10px; height: 10px; border: 2px solid var(--fill); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.gauge-wrap { display: flex; align-items: center; gap: 14px; }
.legend { font-size: 11px; color: var(--slate); display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }

.reason-box { border: 1px solid var(--border); background: var(--canvas); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.reason-box b { color: var(--ink); }
.decisions { font-size: 11.5px; }
.decisions .grp { font-size: 10px; font-weight: 800; letter-spacing: .5px; color: var(--mist); margin: 10px 0 4px; }
.decisions .d { display: flex; gap: 7px; padding: 3px 0; color: var(--ink-soft); }
.decisions .d .ic { color: var(--green); }
.decisions .d.held .ic { color: var(--amber); }

.msgs { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; border-radius: 13px; padding: 8px 11px; font-size: 12.5px; line-height: 1.45; position: relative; }
.msg.customer { align-self: flex-start; background: var(--fill); border-bottom-left-radius: 4px; }
.msg.ai { align-self: flex-end; background: var(--blue-wash); border-bottom-right-radius: 4px; }
.msg.banker { align-self: flex-end; background: var(--violet-wash); border-bottom-right-radius: 4px; border-left: 3px solid var(--violet); }
.msg .author { font-size: 10px; font-weight: 700; color: var(--violet); margin-bottom: 2px; }
.msg.agent { align-self: flex-end; background: var(--amber-wash); border-bottom-right-radius: 4px; }
.msg .approval { margin-top: 7px; border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 8px 10px; }
.msg .approval .t { font-size: 11.5px; font-weight: 700; }
.msg .approval .d { font-size: 11px; color: var(--slate); margin-top: 2px; }
.msg .viz-chip { margin-top: 6px; font-size: 10.5px; color: var(--blue-ink); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; display: inline-flex; align-items: center; gap: 5px; }
.separator { align-self: center; font-size: 10.5px; color: var(--mist); background: var(--canvas); border-radius: 999px; padding: 3px 10px; }
.typing-dots i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--mist); margin-right: 3px; animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; } .typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.suggests { margin: 10px 0 2px; }
.suggests .k { font-size: 10.5px; color: var(--mist); margin-bottom: 5px; }
.suggests .chip { font-size: 11px; color: var(--blue-ink); background: var(--blue-wash); border: none; }

.control-pill {
  display: flex; align-items: center; gap: 8px; background: var(--violet-wash); border-radius: 10px;
  padding: 7px 11px; margin-bottom: 8px; font-size: 11.5px;
}
.control-pill b { font-size: 12px; }
.control-pill .handback { margin-left: auto; color: var(--violet); font-weight: 700; font-size: 11.5px; }

.foot-actions { display: flex; gap: 8px; margin-bottom: 9px; }
.btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; border-radius: 10px; padding: 9px 10px;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-pressed); }
.btn.primary:disabled { opacity: .5; cursor: default; }
.btn.plain { background: var(--canvas); border: 1px solid var(--border); }
.compose { display: flex; align-items: center; gap: 8px; }
.compose input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-size: 12.5px; outline: none; }
.compose input:focus { border-color: var(--brand); }
.compose .send { color: var(--brand); font-weight: 700; font-size: 12.5px; }
.compose .send:disabled { color: var(--mist); cursor: default; }

/* ---------- Assistants ---------- */
.agents-list { display: flex; flex-direction: column; gap: 2px; }
.agent-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; }
.agent-row:hover { background: var(--canvas); }
.agent-row .ic { width: 30px; height: 30px; border-radius: 9px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.agent-row .nm { font-size: 12.5px; font-weight: 600; }
.agent-row .tt { font-size: 11px; color: var(--mist); }
.assist-note { font-size: 11px; color: var(--mist); background: var(--canvas); border-radius: 9px; padding: 7px 10px; margin-bottom: 10px; }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; background: var(--blue-wash); color: var(--blue-ink); border-radius: 999px; padding: 3px 9px; margin-bottom: 8px; }
.msg .agent-name { font-size: 10px; font-weight: 700; color: var(--amber); margin-bottom: 2px; }
.fwd-row { display: flex; gap: 6px; margin-top: 6px; }
.fwd-row button { font-size: 10.5px; font-weight: 600; color: var(--blue-ink); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.mention-pop { position: absolute; bottom: calc(100% + 8px); left: 10px; right: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: 260px; overflow-y: auto; z-index: 30; }

/* ---------- Cockpit ---------- */
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.goal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; }
.goal .t { font-size: 12px; font-weight: 700; color: var(--slate); }
.goal .v { font-size: 17px; font-weight: 800; margin: 5px 0 7px; }
.goal .v .of { color: var(--mist); font-weight: 500; font-size: 13px; }
.goal .bar { height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.goal .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.goal .open { font-size: 11px; font-weight: 500; color: var(--blue-ink); margin-top: 7px; }
.cockpit-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; align-items: start; }
.queue-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--fill); }
.queue-row:last-child { border-bottom: none; }
.queue-row.grayed { opacity: .5; }
.puck { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-wash); color: var(--blue-ink); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.queue-row .mid { flex: 1; min-width: 0; }
.queue-row .l1 { display: flex; align-items: center; gap: 8px; }
.queue-row .nm { font-weight: 700; font-size: 13px; }
.queue-row .amt { color: var(--blue-ink); font-weight: 700; font-size: 12.5px; }
.queue-row .reason { font-size: 11.5px; color: var(--slate); margin-top: 3px; }
.queue-row .l3 { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--mist); }
.queue-row .tag { background: var(--canvas); border: 1px solid var(--border); border-radius: 999px; padding: 1.5px 8px; font-size: 10.5px; }
.queue-row .cb { color: var(--amber); font-weight: 600; }
.dno .sup { padding: 8px 0; border-bottom: 1px solid var(--fill); font-size: 12px; }
.dno .sup:last-child { border-bottom: none; }
.dno .who { font-weight: 600; }
.dno .why { color: var(--slate); font-size: 11.5px; margin-top: 2px; }
.auto-card .step { display: flex; gap: 8px; font-size: 12px; padding: 4px 0; color: var(--ink-soft); }
.auto-card .step .ic { color: var(--green); }
.auto-card .meta { font-size: 11px; color: var(--mist); margin-top: 6px; }

/* ---------- Modals / sheets ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 18, 35, .45); z-index: 80; display: flex; align-items: center; justify-content: center; }
.sheet { width: 520px; max-height: 82vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 22px 24px; box-shadow: 0 30px 80px rgba(2,12,40,.4); }
.sheet .kick { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--red); }
.sheet h3 { margin: 5px 0 12px; font-size: 17px; }
.sheet .blk { margin-bottom: 14px; }
.sheet .blk .bt { font-size: 11px; font-weight: 700; letter-spacing: .4px; color: var(--mist); text-transform: uppercase; margin-bottom: 6px; }
.sheet .note-line { background: var(--canvas); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; }
.sheet .play li { font-size: 12.5px; margin-bottom: 6px; color: var(--ink-soft); }
.sheet .snap { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 12px; }
.sheet .snap .k { color: var(--mist); }
.sheet-actions { display: flex; gap: 9px; margin-top: 16px; }
.gr-panel label { display: block; font-size: 11px; color: var(--slate); margin: 12px 0 5px; }
.seg-ctrl { display: flex; background: var(--canvas); border-radius: 9px; padding: 3px; gap: 2px; }
.seg-ctrl button { flex: 1; font-size: 12px; padding: 5px 4px; border-radius: 7px; color: var(--slate); }
.seg-ctrl button.on { background: #fff; font-weight: 600; color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12.5px; }
.switch { width: 36px; height: 21px; border-radius: 11px; background: var(--fill); position: relative; transition: background .15s; }
.switch.on { background: var(--brand); }
.switch i { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on i { left: 17px; }

/* ---------- Call overlay ---------- */
#callOverlay { position: fixed; inset: 0; z-index: 90; background: #0D1220; display: flex; flex-direction: column; }
.call-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.call-stage video.remote { width: 100%; height: 100%; object-fit: cover; }
.call-stage .placeholder { color: #fff; text-align: center; }
.call-stage .placeholder .avatar { width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.15); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.call-stage video.local { position: absolute; right: 18px; bottom: 18px; width: 180px; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); background: #000; }
.call-top { position: absolute; top: 16px; left: 20px; color: #fff; }
.call-top .st { font-size: 13px; font-weight: 700; }
.call-top .sub { font-size: 11.5px; opacity: .7; }
.call-controls { display: flex; justify-content: center; gap: 14px; padding: 18px; }
.call-controls button { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 19px; }
.call-controls button.off { background: rgba(255,255,255,.4); color: #10131B; }
.call-controls button.hang { background: var(--red); }

.incoming {
  position: fixed; top: 60px; right: 20px; z-index: 85; width: 300px;
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--green);
  border-radius: 13px; padding: 13px 15px; box-shadow: var(--shadow);
}
.incoming .t { font-weight: 700; font-size: 13px; }
.incoming .sub { font-size: 11.5px; color: var(--mist); margin: 2px 0 10px; }
.incoming .join { background: var(--green-wash); color: var(--green); font-weight: 700; border-radius: 9px; padding: 7px 14px; font-size: 12.5px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 95;
  background: var(--ink); color: #fff; font-size: 12.5px; border-radius: 999px; padding: 8px 18px;
  box-shadow: var(--shadow);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
