/* NetKL AI Caller: warm-paper operations console */
:root {
  --paper: #F6F5F1;
  --paper-2: #EFEDE6;
  --surface: #FFFFFF;
  --ink: #17171A;
  --ink-2: #3C3B37;
  --muted: #7F7C73;
  --faint: #A8A497;
  --line: #E7E4DC;
  --line-2: #D9D5CA;
  --accent: #2F5BFF;
  --accent-deep: #1E43D8;
  --accent-soft: #EAEFFF;
  --green: #136B3A; --green-bg: #E5F4EA; --green-dot: #1F9D55;
  --amber: #875A07; --amber-bg: #FBF0D8; --amber-dot: #E39B17;
  --red: #A1281D;   --red-bg: #FCE8E5;   --red-dot: #DE4A3B;
  --blue: #2341C7;  --blue-bg: #EAEFFF;  --blue-dot: #2F5BFF;
  --grey: #5E5B53;  --grey-bg: #EFEDE7;  --grey-dot: #A8A497;
  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 23, 26, .04), 0 0 0 1px rgba(23, 23, 26, .02);
  --shadow-lg: 0 18px 40px -18px rgba(23, 23, 26, .25), 0 2px 6px rgba(23, 23, 26, .05);
  --font: "Geist", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Geist", ui-sans-serif, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14.5px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
::selection { background: #D7E0FF; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; letter-spacing: -.015em; margin: 0; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
h4 { font-size: .92rem; margin: 1rem 0 .4rem; }
p { margin: 0 0 .6rem; }
code { font-family: var(--mono); font-size: .82em; background: var(--paper-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink-2); }
.muted { color: var(--muted); }
small { font-size: .82rem; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.i { flex-shrink: 0; vertical-align: -3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px 14px; background: var(--paper-2); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand b { display: block; font-family: var(--display); font-size: 1.08rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .76rem; letter-spacing: .02em; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(255,255,255,.08), 0 4px 10px -4px rgba(23,23,26,.5); }
.livepill { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 500; }
.livepill:hover { color: var(--ink); }
.livepill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.livepill.on { color: var(--green); }
.livepill.on i { background: var(--green-dot); box-shadow: 0 0 0 0 rgba(31,157,85,.5); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(31,157,85,.45); } 80%, 100% { box-shadow: 0 0 0 7px rgba(31,157,85,0); } }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.navgroup { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 600; padding: 14px 10px 6px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; transition: background .12s, color .12s; }
.side nav a .i { color: var(--muted); transition: color .12s; }
.side nav a:hover { background: rgba(23,23,26,.045); color: var(--ink); }
.side nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.side nav a.on .i { color: var(--accent); }
.side nav a span { flex: 1; }
.count { font-style: normal; background: var(--red-dot); color: #fff; border-radius: 99px; min-width: 20px; height: 20px; padding: 0 6px; font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.me > span:not(.av) { flex: 1; min-width: 0; line-height: 1.2; }
.me b { display: block; font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: .74rem; }
.iconbtn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); border: 0; background: none; cursor: pointer; }
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }

.main { min-width: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 30px 40px 72px; animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 4px 0 24px; }
.ph-main { min-width: 0; }
.ph h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph h1 .badge { font-family: var(--font); letter-spacing: 0; }
.ph .sub { color: var(--muted); margin: 6px 0 0; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.ph .sub .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 500; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }

.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.section-h h2 { display: flex; align-items: center; gap: 10px; }
.section-h p { margin: 0; color: var(--muted); font-size: .88rem; }
.step { width: 24px; height: 24px; border-radius: 8px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: .78rem; display: inline-grid; place-items: center; }
.num { font-family: var(--mono); font-size: .78rem; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; font-weight: 500; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h3, .card-h h3 { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card > h3 .i, .card-h h3 .i { color: var(--muted); }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-h h3 { margin-bottom: 4px; }
.card-h + p { margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.grid-main > div > .card:last-child { margin-bottom: 0; }
.mt { margin-top: 16px; }

/* ---------- buttons & form controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 10px;
  font: 500 .9rem/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: 0 1px 0 rgba(23,23,26,.04); transition: background .12s, border-color .12s, transform .06s, box-shadow .12s;
}
.btn:hover { border-color: #C6C1B4; background: #FCFBF8; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,91,255,.22); border-color: var(--accent); }
.btn .i { color: currentColor; opacity: .85; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 4px 12px -6px rgba(23,23,26,.6); }
.btn.primary:hover { background: #2A2A2E; color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px -6px rgba(47,91,255,.8); }
.btn.accent:hover { background: var(--accent-deep); color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: #F2C2BB; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { height: 30px; padding: 0 10px; font-size: .83rem; border-radius: 8px; gap: 6px; }
.btn.wide { width: 100%; height: 42px; }
.btn.wa { color: #0E7A43; }
.btn.wa:hover { background: #E7F6EE; border-color: #B9E3CB; }
button.link { background: none; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; padding: 0; }

input, select, textarea {
  font: inherit; font-size: .9rem; height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--ink); max-width: 100%; transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: #C6C1B4; }
input::placeholder, textarea::placeholder { color: var(--faint); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--surface) 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='%237F7C73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
textarea { width: 100%; height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; padding: 0; border-radius: 5px; border: 1.5px solid var(--line-2); display: inline-grid; place-items: center; cursor: pointer; vertical-align: middle; }
input[type=checkbox]:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; border-color: var(--ink); }
input[type=file] { height: auto; padding: 0; border: 0; }
input[type=number] { width: 100%; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; font-weight: 500; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 400; color: var(--ink); font-size: .9rem; cursor: pointer; }
label.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1; min-width: 120px; }
.row .grow, .grow { flex: 2; min-width: 160px; }
.row .shrink { flex: 0 0 auto; }
form.inline { display: inline; }
.push { margin-left: auto; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { position: relative; display: flex; align-items: center; }
.search .i { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
.search input { padding-left: 34px; width: 270px; }
.filters label.inline { color: var(--muted); font-weight: 500; }
.clear { color: var(--muted); font-size: .85rem; display: inline-flex; align-items: center; gap: 4px; }

.daypicks { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick { position: relative; }
.daypick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.daypick span { display: grid; place-items: center; width: 46px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); font-size: .82rem; font-weight: 500; color: var(--muted); background: var(--surface); transition: all .12s; }
.daypick input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.daypick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47,91,255,.22); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
.card.tablewrap { padding: 0; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; background: #FBFAF7; padding-top: 10px; padding-bottom: 10px; white-space: nowrap; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #FBFAF6; }
tr:last-child td { border-bottom: 0; }
td.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
td.empty .i { display: block; margin: 0 auto 8px; color: var(--faint); }
td.summary { max-width: 360px; color: var(--ink-2); }
td.summary div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .87rem; }
td.go { width: 44px; text-align: right; padding-left: 0; }
td.check, th.check { width: 44px; padding-right: 0; }
.go a { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--faint); }
tr:hover .go a { color: var(--ink); background: var(--paper-2); }
tr.overdue td { background: #FFF8F6; }
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red-dot); }
table.compact th { text-transform: none; letter-spacing: 0; font-size: .86rem; background: none; color: var(--muted); font-weight: 500; width: 42%; }
table.compact td, table.compact th { padding: 9px 0; }
table.compact td { font-weight: 500; }

.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who > span:not(.av) { min-width: 0; line-height: 1.3; }
.who b, .who a.name { display: block; font-weight: 600; color: var(--ink); }
.who a.name:hover { color: var(--accent); }
.who small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when b { display: block; font-weight: 500; }
.when small { color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.result { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.result .i { color: var(--muted); }
.lang { font-family: var(--mono); font-size: .72rem; font-weight: 500; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }

/* ---------- avatars ---------- */
.av { --h: 220; width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; flex-shrink: 0;
  background: hsl(var(--h) 55% 92%); color: hsl(var(--h) 45% 30%); font: 600 .8rem/1 var(--font); letter-spacing: .02em; }
.av.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .74rem; }
.av.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 1.05rem; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 99px; font-size: .76rem; font-weight: 500; white-space: nowrap; line-height: 1.35; background: var(--grey-bg); color: var(--grey); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grey-dot); }
.b-green { background: var(--green-bg); color: var(--green); } .b-green::before { background: var(--green-dot); }
.b-amber { background: var(--amber-bg); color: var(--amber); } .b-amber::before { background: var(--amber-dot); }
.b-red { background: var(--red-bg); color: var(--red); } .b-red::before { background: var(--red-dot); }
.b-blue { background: var(--blue-bg); color: var(--blue); } .b-blue::before { background: var(--blue-dot); }
.b-grey { background: var(--grey-bg); color: var(--grey); }
.b-black { background: var(--ink); color: #fff; } .b-black::before { background: #fff; }
.badge.nodot::before { display: none; }

/* ---------- flash ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; background: var(--green-bg); color: var(--green); border: 1px solid #C5E6D1; font-size: .9rem; animation: rise .3s ease-out both; }
.flash .i { flex-shrink: 0; }
.flash.err { background: var(--red-bg); color: #7E1D14; border-color: #F4C9C2; }
.flash.warn { background: var(--amber-bg); color: #6B4504; border-color: #F1DBA9; }
.flash form.push { margin-left: auto; }

/* ---------- overview ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; margin-bottom: 16px; }
.campaign {
  position: relative; overflow: hidden; border-radius: 18px; padding: 24px 26px; color: #F3F1EA;
  background: radial-gradient(120% 140% at 100% 0%, #2B2F45 0%, #17171A 55%) , #17171A;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; min-height: 236px;
}
.campaign::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.campaign > * { position: relative; z-index: 1; }
.campaign .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.campaign .state { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #A9A699; font-weight: 600; }
.campaign .state i { width: 8px; height: 8px; border-radius: 50%; background: #6E6B62; }
.campaign.is-on .state { color: #7BE0A6; }
.campaign.is-on .state i { background: #3DDC84; animation: ping 1.8s infinite; }
.campaign h2 { font-size: 1.9rem; font-weight: 750; letter-spacing: -.035em; color: #fff; margin-top: 8px; }
.campaign .meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 30px; }
.campaign .meta div { display: flex; flex-direction: column; }
.campaign .meta b { font-family: var(--display); font-size: 1.45rem; font-weight: 650; color: #fff; letter-spacing: -.02em; line-height: 1.15; }
.campaign .meta small { color: #9E9B8F; font-size: .76rem; }
.campaign .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.campaign .btn { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #F3F1EA; box-shadow: none; }
.campaign .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.campaign .btn.go { background: #fff; color: var(--ink); border-color: #fff; }
.campaign .btn.go:hover { background: #ECEBE5; color: var(--ink); }
.campaign .hours { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.07); color: #C8C5B9; border: 1px solid rgba(255,255,255,.1); }
.campaign .hours.open { color: #7BE0A6; }
.wave { display: flex; align-items: center; justify-content: space-between; gap: 3px; height: 54px; }
.wave span { width: 4px; border-radius: 4px; background: linear-gradient(#8FA3FF, #2F5BFF); height: calc(var(--hh, 20px) * .3); opacity: .45; flex-shrink: 0; }
.campaign.is-on .wave span { opacity: 1; animation: bar 1.15s ease-in-out infinite; }
@keyframes bar { 0%, 100% { height: 6px; } 50% { height: var(--hh, 38px); } }

.attention { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.attention h3 { margin-bottom: 2px; }
.att { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); transition: border-color .12s, background .12s; }
.att:hover { border-color: var(--line-2); background: #FCFBF8; color: var(--ink); }
.att .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.att .ic.hot { background: var(--red-bg); color: var(--red); }
.att .ic.go { background: var(--green-bg); color: var(--green); }
.att > span:not(.ic) { flex: 1; line-height: 1.3; }
.att b { display: block; font-weight: 600; }
.att small { color: var(--muted); }
.att strong { font-family: var(--display); font-size: 1.4rem; font-weight: 650; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; box-shadow: var(--shadow); position: relative; }
.kpi .i { position: absolute; top: 15px; right: 14px; color: var(--faint); }
.kpi label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi span { display: block; font-family: var(--display); font-size: 2.1rem; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; margin-top: 10px; color: var(--ink); }
.kpi small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; font-family: var(--mono); }
.kpi.green span { color: var(--green); } .kpi.amber span { color: var(--amber); } .kpi.red span { color: var(--red); }
.kpi.green { box-shadow: inset 0 3px 0 var(--green-dot), var(--shadow); }
.kpi.amber { box-shadow: inset 0 3px 0 var(--amber-dot), var(--shadow); }
.kpi.red { box-shadow: inset 0 3px 0 var(--red-dot), var(--shadow); }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.pipe { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--paper-2); gap: 2px; margin: 4px 0 18px; }
.pipe i { display: block; height: 100%; min-width: 4px; transition: filter .15s; }
.pipe i:hover { filter: brightness(1.1); }
.legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 14px; }
.legend a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; color: var(--ink-2); font-size: .86rem; }
.legend a:hover { background: var(--paper-2); color: var(--ink); }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.legend span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend b { font-family: var(--mono); font-weight: 500; font-size: .84rem; }
.legend a.zero { color: var(--faint); }
.legend a.zero b { color: var(--faint); }

.setup { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--r); background: #FFFBF0; border: 1px solid #F1DBA9; margin-bottom: 16px; }
.setup > b { display: flex; align-items: center; gap: 8px; color: #6B4504; font-weight: 600; }
.setup ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; flex: 1; }
.setup li { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; padding: 5px 11px 5px 7px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.setup li i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed #D9A93A; }
.setup li.done { color: var(--muted); }
.setup li.done i { border: 0; background: var(--green-dot); color: #fff; }
.setup li.done i .i { width: 11px; height: 11px; }

/* ---------- prospects bulk bar ---------- */
.bulkbar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 14px; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: background .15s, box-shadow .15s; }
.bulkbar .sel { color: var(--muted); font-size: .88rem; }
.bulkbar .sel b { font-family: var(--mono); color: var(--ink); }
.bulkbar .btns { display: flex; gap: 6px; flex-wrap: wrap; }
form.has-sel .bulkbar { background: var(--ink); border-color: var(--ink); box-shadow: var(--shadow-lg); }
form.has-sel .bulkbar .sel, form.has-sel .bulkbar .sel b { color: #fff; }
form.has-sel .bulkbar .btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; box-shadow: none; }
form.has-sel .bulkbar .btn:hover { background: rgba(255,255,255,.16); }
form.has-sel .bulkbar .btn.danger { color: #FFB4A8; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-size: .86rem; color: var(--muted); }
.pager a { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.pager a:hover { background: #FCFBF8; }
.pagerow { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- call detail ---------- */
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; box-shadow: var(--shadow); }
.facts > div { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.facts > div:first-child { border-left: 0; }
.facts label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.facts b { display: block; margin-top: 5px; font-family: var(--display); font-size: 1.15rem; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts .badge { margin-top: 6px; }
.player { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.player .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
audio { width: 100%; height: 38px; }
.nodata { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: .9rem; }
.summary-text { font-size: 1.02rem; line-height: 1.6; color: var(--ink); margin: 0; }
.captured { display: flex; flex-direction: column; }
.cap { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.cap:last-child { border-bottom: 0; }
.cap span { color: var(--muted); }
.cap b { font-weight: 500; text-align: right; }
.cap.hl b { font-weight: 600; }
.yes { color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
.no { color: var(--muted); }

.transcript { display: flex; flex-direction: column; gap: 14px; max-height: 720px; overflow-y: auto; padding: 4px 4px 4px 0; }
.utt { display: flex; gap: 10px; align-items: flex-end; max-width: 82%; }
.utt .bub { padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.5; }
.utt .bub b { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 2px; }
.utt.agent { align-self: flex-start; }
.utt.agent .bub { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.utt.agent .bub b { color: var(--accent); }
.utt.user { align-self: flex-end; flex-direction: row-reverse; }
.utt.user .bub { background: var(--ink); color: #F3F1EA; border-bottom-right-radius: 5px; }
.utt.user .bub b { color: #A9A699; }
.botav { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }

/* ---------- staff to-do ---------- */
.sends { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.send { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.send .to { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--paper); font-size: .88rem; color: var(--ink-2); }
.send .to b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.send .to .i { color: var(--muted); }
.send textarea { font-size: .86rem; background: #FCFBF8; color: var(--ink-2); }
.send .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.send .acts form { margin-left: auto; }
.todo { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; background: #FDFCFA; }
.todo-h { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.todo-h .i { color: var(--muted); }
.emptybox { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); background: rgba(255,255,255,.5); }
.emptybox .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--green-bg); color: var(--green); display: grid; place-items: center; }

/* ---------- upload ---------- */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 34px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; color: var(--muted); font-weight: 400; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); }
.drop b { color: var(--ink); font-size: .98rem; }
.drop .fname { font-family: var(--mono); font-size: .82rem; color: var(--accent); }
.cols { display: flex; flex-direction: column; }
.cols div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .87rem; }
.cols div:last-child { border-bottom: 0; }
.cols code { white-space: nowrap; }
.cols span { color: var(--muted); text-align: right; }
.req { color: var(--red-dot); font-weight: 600; }
ul.plain { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .88rem; }
ul.plain li { margin: 3px 0; }

/* ---------- settings ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--paper-2); border-radius: 12px; border: 1px solid var(--line); margin-bottom: 18px; position: sticky; top: 10px; z-index: 4; }
.tabs a { padding: 7px 12px; border-radius: 9px; color: var(--ink-2); font-size: .86rem; font-weight: 500; }
.tabs a:hover { background: var(--surface); color: var(--ink); }
.agentrow { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.agentrow:last-of-type { border-bottom: 0; }
.agentrow > b { font-weight: 600; }
.agentrow code { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv small { color: var(--muted); font-size: .74rem; }
.syncbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.syncbar .muted { font-size: .84rem; flex: 1; min-width: 220px; }

/* ---------- auth ---------- */
body.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.authart { position: relative; overflow: hidden; padding: 44px 48px; color: #F3F1EA; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(90% 80% at 85% 10%, #2B3358 0%, transparent 60%), radial-gradient(70% 60% at 0% 100%, #2A2A22 0%, transparent 60%), #141416; }
.authart::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 16px 16px; mask-image: radial-gradient(70% 70% at 60% 40%, #000, transparent); }
.authart > * { position: relative; z-index: 1; }
.authart .brand { color: #fff; }
.authart .brand small { color: #A9A699; }
.authart .logo { background: #fff; color: var(--ink); }
.authart h2 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.02; color: #fff; max-width: 13ch; }
.authart h2 em { font-style: normal; color: #8FA3FF; }
.authart p { color: #A9A699; max-width: 42ch; margin-top: 14px; }
.authart .wave { height: 70px; gap: 4px; margin-top: 30px; }
.authart .wave span { width: 5px; opacity: 1; animation: bar 1.3s ease-in-out infinite; }
.authside { display: grid; place-items: center; padding: 40px 24px; background: var(--paper); }
.authcard { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.authcard h1 { font-size: 1.8rem; font-weight: 750; letter-spacing: -.035em; }
.authcard .sub { color: var(--muted); margin: -8px 0 6px; }
.authcard input { height: 42px; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1060px) {
  .hero, .grid-main, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div:nth-child(4) { border-left: 0; }
  .facts > div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .setup { padding: 14px; gap: 10px; }
  .setup ol { flex-basis: 100%; }
  .ph-actions { width: 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3), .facts > div:nth-child(5) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .utt { max-width: 94%; }
  .agentrow { grid-template-columns: 1fr; gap: 6px; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 6px 0 2px; }
  .livepill { margin: 0; order: 2; margin-left: auto; }
  .side nav { flex-direction: row; overflow-x: auto; width: 100%; order: 3; gap: 4px; padding-bottom: 2px; }
  .side nav a { white-space: nowrap; }
  .navgroup, .me { display: none; }
  .wrap { padding: 20px 16px 60px; }
  .ph h1 { font-size: 1.6rem; }
  .kpis, .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign .meta { grid-template-columns: repeat(2, auto); }
  .search input { width: 100%; }
  .sends { grid-template-columns: 1fr; }
  body.auth { grid-template-columns: 1fr; }
  .authart { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
tr[data-href] { cursor: pointer; }
.toolbar.filters { justify-content: flex-start; }
.who .push { margin-left: auto; }
.send .who { align-items: center; }
