/* Telemarketing (2026-10-31): the person panel shared by the dashboard's
   Calling tab and the agents' screen (calls.html), the Calling tab's own
   pieces, and the calling screen's layout. Loaded after admin.css on the
   dashboard; on calls.html it is the only stylesheet, so the page basics
   live under body.calls-page. */

/* ---------- outcome badges + buttons ---------- */
.co-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; background: #eef0f6; color: #3a3f5c; border: 1px solid transparent; }
.co-badge.sm { padding: 2px 7px; font-size: 11px; }
.co-badge.is-none { background: #f3f3fa; color: #6b7090; border-color: rgba(24, 22, 60, 0.1); }
.co-badge.is-neutral { background: #eef0f6; color: #3a3f5c; }
.co-badge.is-followup { background: #fff4d6; color: #8a5a00; }
.co-badge.is-good { background: #e5f6eb; color: #15803d; }
.co-badge.is-closed { background: #fdecef; color: #c81e3a; }
.co-badge.is-callback { background: #f1ecff; color: #4c1d95; }
.co-stage { display: inline-block; margin: 0 4px 0 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8fa8; }
.co-stage:first-child { margin-left: 0; }
.co-btn { min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid rgba(24, 22, 60, 0.14); background: #fff; font: inherit; font-size: 13.5px; font-weight: 700; color: #141526; cursor: pointer; text-align: left; transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease; }
.co-btn:hover { border-color: rgba(124, 92, 255, 0.45); }
.co-btn:active { transform: scale(0.97); }
.co-btn.is-followup { border-left: 5px solid #f0b429; }
.co-btn.is-good { border-left: 5px solid #15a05a; }
.co-btn.is-closed { border-left: 5px solid #e0415a; }
.co-btn.is-current { background: #f3f3fa; }
.co-btn.is-chosen { background: #141526; color: #fff; border-color: #141526; }
.co-btn.is-chosen.is-good { background: #15803d; border-color: #15803d; }
.co-btn.is-chosen.is-closed { background: #c81e3a; border-color: #c81e3a; }
.co-btn.is-chosen.is-followup { background: #8a5a00; border-color: #8a5a00; }

/* ---------- the person panel (.cp) ---------- */
.cp { display: grid; gap: 14px; }
.cp-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.cp-avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-family: "Sora", "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; font-size: 17px; color: #fff; background: linear-gradient(115deg, #c2410c 0%, #be185d 52%, #6d28d9 100%); }
.cp-who { flex: 1 1 220px; min-width: 0; }
.cp-who h3 { margin: 0; font-family: "Sora", "Plus Jakarta Sans", system-ui, sans-serif; font-size: 20px; line-height: 1.15; letter-spacing: -0.01em; }
.cp-who p { margin: 3px 0 0; font-size: 14px; color: #45495f; }
.cp-who .cp-sub { font-size: 12.5px; color: #636884; }
.cp-badges { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-assign { font-size: 13px; color: #45495f; }
.cp-note { padding: 10px 12px; border-radius: 12px; background: #fff8e8; border: 1px solid rgba(138, 90, 0, 0.16); font-size: 13px; line-height: 1.5; color: #4a3a12; max-height: 120px; overflow: auto; }
.cp-note span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a5a00; margin-bottom: 2px; }
.cp-link { background: none; border: 0; padding: 0; margin-left: 8px; color: #4c1d95; font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(76, 29, 149, 0.35); text-underline-offset: 3px; cursor: pointer; }
.cp-numbers { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cp-num { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k go" "v go"; align-items: center; gap: 0 12px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid rgba(24, 22, 60, 0.12); background: #fff; color: inherit; text-decoration: none; font: inherit; text-align: left; cursor: pointer; min-height: 60px; transition: border-color 0.12s ease, transform 0.12s ease; }
.cp-num:hover { border-color: rgba(124, 92, 255, 0.5); }
.cp-num:active { transform: scale(0.98); }
.cp-num-k { grid-area: k; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8fa8; }
.cp-num-v { grid-area: v; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 600; color: #141526; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-wa .cp-num-v, .cp-mail .cp-num-v { font-family: inherit; font-size: 13px; font-weight: 600; color: #45495f; white-space: normal; }
.cp-num-go { grid-area: go; padding: 8px 14px; border-radius: 10px; background: #141526; color: #fff; font-size: 13px; font-weight: 800; }
.cp-wa .cp-num-go { background: #128c7e; }
.cp-mail .cp-num-go { background: #4c1d95; }
.cp-empty { font-size: 13px; color: #636884; padding: 6px 0; }
.cp-timer { padding: 8px 12px; border-radius: 10px; background: #fff4d6; color: #8a5a00; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.cp-stage { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8fa8; }
.cp .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #eef0f6; }
.cp .seg-btn { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 700; color: #45495f; cursor: pointer; letter-spacing: 0; text-transform: none; }
.cp .seg-btn[aria-selected="true"] { background: #fff; color: #141526; box-shadow: 0 1px 2px rgba(20, 21, 38, 0.12); }
.cp .seg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cp-outcomes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.cp-form { display: grid; gap: 10px; }
.cp-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; color: #45495f; }
.cp-form textarea, .cp-form input[type="datetime-local"], .cp-editform input, .cp-editform textarea { font: inherit; font-size: 14px; padding: 9px 11px; border-radius: 10px; border: 1.5px solid rgba(24, 22, 60, 0.16); background: #fff; color: #141526; }
.cp-cb { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px !important; }
.cp-cb input { flex: 1 1 180px; }
.cp-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cp-save { min-height: 46px; padding: 0 20px; border: 0; border-radius: 12px; background: linear-gradient(115deg, #c2410c 0%, #be185d 52%, #6d28d9 100%); color: #fff; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; }
.cp-save:disabled { background: #e3e4ee; color: #8a8fa8; cursor: not-allowed; }
.cp-err { margin: 0; color: #c81e3a; font-size: 13px; font-weight: 600; }
.cp-editform { padding: 12px; border-radius: 14px; background: #f3f3fa; }
.cp-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cp-grid label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: #45495f; }
.cp-grid .cp-wide { grid-column: 1 / -1; }
.cp-history h4, .cp-script h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8fa8; }
.cp-history h4 span { font-weight: 700; color: #636884; margin-left: 4px; }
.cp-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cp-log li { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: baseline; font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(24, 22, 60, 0.07); }
.cp-log-when { color: #636884; font-size: 12px; white-space: nowrap; }
.cp-log-what em { font-style: normal; color: #636884; }
.cp-log-who { color: #8a8fa8; font-size: 12px; }
.cp-dur { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; color: #636884; }
.cp-free summary { font-size: 12.5px; color: #4c1d95; font-weight: 700; cursor: pointer; margin-top: 8px; }
.cp-free textarea { width: 100%; margin-top: 6px; font: inherit; font-size: 12.5px; padding: 8px; border-radius: 8px; border: 1px solid rgba(24, 22, 60, 0.12); }
.cp-script { padding: 14px; border-radius: 16px; background: #fbf7ef; border: 1px solid rgba(138, 90, 0, 0.14); }
.cp-script details { border-top: 1px solid rgba(138, 90, 0, 0.12); }
.cp-script details:first-of-type { border-top: 0; }
.cp-script summary { padding: 9px 0; font-weight: 800; font-size: 14px; cursor: pointer; color: #141526; }
.cp-script p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: #2b2e43; }
@media (max-width: 560px) { .cp-log li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Calling tab (dashboard) ---------- */
.cl-hero { display: grid; gap: 16px; }
.cl-hero-text h2 { margin: 0 0 6px; }
.cl-hero-text p { margin: 0; font-size: 13.5px; color: var(--ink-2, #45495f); line-height: 1.55; max-width: 900px; }
.cl-funnel { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.cl-tile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(24, 22, 60, 0.08); background: #fff; text-align: left; font: inherit; cursor: pointer; transition: transform 0.12s ease, border-color 0.12s ease; }
.cl-tile:hover { border-color: rgba(124, 92, 255, 0.4); transform: translateY(-1px); }
.cl-tile.is-on { border-color: #6d28d9; box-shadow: inset 0 0 0 1px #6d28d9; }
.cl-tile b { font-family: var(--font-display, "Sora", sans-serif); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cl-tile span { font-size: 12px; color: var(--ink-3, #636884); }
.cl-tile small { font-size: 11px; color: var(--ink-3, #636884); font-weight: 700; }
.cl-toolbar select { max-width: 190px; }
.cl-table td, .cl-agents td { vertical-align: top; }
.cl-table .ci-sub { font-size: 12px; color: var(--ink-3, #636884); white-space: normal; }
.cl-table th:nth-child(2), .cl-table td:nth-child(2) { max-width: 240px; }
.cl-table .crm-name-btn { white-space: normal; text-align: left; }
.cl-table td:nth-child(5), .cl-table td:nth-child(6) { white-space: nowrap; }
.cl-two { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .cl-two { grid-template-columns: 1fr; } }
.cl-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #fff; box-shadow: -24px 0 60px -30px rgba(20, 21, 38, 0.45); z-index: 60; display: grid; grid-template-rows: auto 1fr; }
.cl-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(24, 22, 60, 0.08); }
#cl-drawer-body { overflow: auto; padding: 18px; }
body.cl-drawer-open { overflow: hidden; }
.cl-pick { max-height: 44vh; overflow: auto; border: 1px solid rgba(24, 22, 60, 0.1); border-radius: 12px; padding: 6px 10px; margin: 10px 0 6px; }
.cl-pick-all { display: flex; gap: 8px; align-items: center; padding: 8px 0; font-weight: 700; border-bottom: 1px solid rgba(24, 22, 60, 0.08); }
.cl-pick-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(24, 22, 60, 0.05); font-size: 13.5px; }
.cl-pick-row small { color: var(--ink-3, #636884); font-size: 12px; }
.cl-sec { padding: 10px; border-radius: 12px; background: #f3f3fa; margin-bottom: 8px; display: grid; gap: 6px; }
.cl-sec-head { display: flex; gap: 6px; align-items: center; }
.cl-sec-head input { flex: 1; }
.cl-h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3, #636884); }

/* ---------- calls.html (the agents' screen) ---------- */
body.calls-page { margin: 0; min-height: 100dvh; background: #f3f3fa; color: #141526; font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.calls-page * { box-sizing: border-box; }
.calls-page button, .calls-page input, .calls-page textarea, .calls-page select { font: inherit; color: inherit; }
.calls-page :focus-visible { outline: 3px solid #7c5cff; outline-offset: 2px; }
.calls-page .gate { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 28px 20px; text-align: center; }
.calls-page .gate h1 { margin: 0; font-family: "Sora", sans-serif; font-size: 26px; }
.calls-page .gate p { margin: 0; max-width: 360px; color: #45495f; }
.calls-page .gate form { width: min(100%, 340px); display: grid; gap: 10px; text-align: left; }
.calls-page .gate label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: #45495f; }
.calls-page .gate input[type="email"], .calls-page .gate input[type="password"] { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(24, 22, 60, 0.18); background: #fff; }
.calls-page .gate .chk { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.calls-page .gate .err { margin: 0; color: #c81e3a; font-size: 13px; font-weight: 600; }
.calls-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: linear-gradient(115deg, #c2410c 0%, #be185d 52%, #6d28d9 100%); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.calls-page .btn.ghost { background: #e9e9f3; color: #141526; }
.cs-top { position: sticky; top: 0; z-index: 20; background: rgba(243, 243, 250, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(24, 22, 60, 0.08); }
.cs-top-in { display: flex; gap: 18px; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) 18px 10px; flex-wrap: wrap; }
.cs-brand { display: flex; gap: 10px; align-items: center; }
.cs-brand div { display: grid; line-height: 1.2; }
.cs-brand strong { font-size: 14px; }
.cs-brand span { font-size: 11.5px; color: #636884; }
.cs-event { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.cs-event strong { font-family: "Sora", sans-serif; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-event select { max-width: 320px; min-height: 36px; border-radius: 10px; border: 1px solid rgba(24, 22, 60, 0.16); background: #fff; padding: 0 8px; font-weight: 700; }
.cs-event small { font-size: 12px; color: #636884; }
.cs-stats { display: flex; gap: 14px; }
.cs-stats div { display: grid; line-height: 1.1; text-align: center; }
.cs-stats b { font-family: "Sora", sans-serif; font-size: 20px; font-variant-numeric: tabular-nums; }
.cs-stats span { font-size: 11px; color: #636884; }
.cs-menu { display: flex; gap: 6px; margin-left: auto; }
.cs-ghost { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(24, 22, 60, 0.14); background: #fff; font-size: 13px; font-weight: 700; color: #141526; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.cs-main { display: grid; grid-template-columns: 340px 1fr; gap: 18px; padding: 18px; max-width: 1400px; margin: 0 auto; align-items: start; }
.cs-side { display: grid; gap: 10px; position: sticky; top: 92px; max-height: calc(100dvh - 110px); }
.cs-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #e9e9f3; }
.cs-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: none; font-weight: 800; font-size: 14px; color: #636884; cursor: pointer; }
.cs-tabs button[aria-selected="true"] { background: #fff; color: #141526; box-shadow: 0 1px 2px rgba(20, 21, 38, 0.12); }
.cs-tabs button span { margin-left: 4px; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: #e9e9f3; color: #45495f; }
.cs-side input[type="search"] { min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(24, 22, 60, 0.14); background: #fff; }
.cs-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-filters button { border: 1px solid rgba(24, 22, 60, 0.12); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; color: #45495f; cursor: pointer; }
.cs-filters button[aria-pressed="true"] { background: #141526; color: #fff; border-color: #141526; }
.cs-filters button b { font-weight: 800; margin-left: 2px; }
.cs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow: auto; min-height: 0; }
.cs-row { width: 100%; display: flex; gap: 10px; align-items: center; justify-content: space-between; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid rgba(24, 22, 60, 0.08); background: #fff; cursor: pointer; }
.cs-row.is-current { border-color: #6d28d9; box-shadow: inset 0 0 0 1px #6d28d9; }
.cs-row.is-callback { border-left: 5px solid #7c5cff; }
.cs-row.is-new { border-left: 5px solid #38bdf8; }
.cs-row.is-done { opacity: 0.6; }
.cs-row-main { display: grid; min-width: 0; }
.cs-row-main strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row-main small { font-size: 12px; color: #636884; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row-side { display: grid; justify-items: end; gap: 3px; flex-shrink: 0; }
.cs-row-side small { font-size: 11px; color: #8a8fa8; }
.cs-due { font-style: normal; font-size: 12px; font-weight: 800; color: #4c1d95; }
.cs-new { font-style: normal; font-size: 12px; font-weight: 800; color: #0369a1; }
.cs-bounce { font-style: normal; font-size: 11px; font-weight: 800; color: #c81e3a; }
.cs-empty { padding: 16px; text-align: center; color: #636884; font-size: 14px; }
.cs-person { background: #fff; border-radius: 20px; border: 1px solid rgba(24, 22, 60, 0.08); padding: 18px; min-height: 60vh; }
.cs-person-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8fa8; }
.cs-pick { display: grid; place-content: center; justify-items: center; gap: 12px; min-height: 40vh; text-align: center; color: #45495f; }
.cs-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #141526; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14px; z-index: 80; box-shadow: 0 18px 40px -18px rgba(20, 21, 38, 0.6); display: flex; gap: 12px; align-items: center; }
.cs-toast button { border: 0; border-radius: 9px; padding: 6px 12px; background: #fff; color: #141526; font-weight: 800; cursor: pointer; }
@media (max-width: 860px) {
  .cs-main { grid-template-columns: 1fr; padding: 12px; }
  .cs-side { position: static; max-height: none; }
  .cs-main.is-person .cs-side { display: none; }
  .cs-main:not(.is-person) .cs-person { display: none; }
  .cs-stats { display: none; }
  .cs-top-in { gap: 10px; }
  .cs-person { padding: 14px; border-radius: 16px; }
}
@media (min-width: 861px) { .cs-person-bar #cs-back { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .co-btn, .cp-num, .cl-tile { transition: none; } }

/* ---------- call-with picker, outcome editor, telemarketer accounts (2026-10-31, round 16b) ---------- */
.cp-callwith { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: #636884; }
.cp-callwith label { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: #45495f; }
.cp-callwith select { font: inherit; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(24, 22, 60, 0.16); background: #fff; }
.cl-outs { display: grid; gap: 6px; margin-bottom: 8px; }
.cl-out { display: grid; grid-template-columns: auto minmax(120px, 1.4fr) 1.3fr 1fr 1fr auto; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 10px; background: #f3f3fa; }
.cl-out.is-hidden { opacity: 0.55; }
.cl-out input[type="text"], .cl-out select { font: inherit; font-size: 12.5px; min-height: 32px; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(24, 22, 60, 0.16); background: #fff; min-width: 0; }
.cl-out-btns { display: inline-flex; gap: 4px; }
.cl-out-btns .icon-btn { min-height: 30px; padding: 2px 8px; }
@media (max-width: 760px) { .cl-out { grid-template-columns: auto 1fr auto; } }
#cl-tele .bl-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
#cl-tele .bl-sec-head h2 { margin: 0; }
.cl-tele-actions { white-space: nowrap; }
.cl-tele-actions .icon-btn { margin-right: 4px; }
tr.is-revoked td { opacity: 0.55; }
