:root { --grad: linear-gradient(120deg, #ff5a1f, #e8115b); --deep: #b80d4a; --ink: #1f2933; --muted: #5b6573; --line: #e3ded4; --paper: #f6f4ef; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
.top { background: var(--grad); color: #fff; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 24px; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
.top .brand { color: #fff; text-decoration: none; font: 600 19px Georgia, "Times New Roman", serif; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 5px 11px; border-radius: 999px; }
.top nav a:hover { background: rgba(255,255,255,.2); }
.ribbon { margin: 0; padding: 7px 24px; background: #fff6e6; border-bottom: 1px solid #f0d199; color: #6b4700; font-size: 13px; }
main { max-width: 1240px; margin: 0 auto; padding: 8px 24px 48px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--deep); line-height: 1.25; }
h1 { font-size: 27px; margin: 20px 0 12px; } h2 { font-size: 20px; margin-top: 30px; } h3 { font-size: 16px; margin: 14px 0 6px; }
a { color: #1d4f91; }
.muted, .empty { color: var(--muted); } .empty { font-style: italic; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 14px 0 14px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; color: var(--muted); text-decoration: none; }
a.metric[href]:hover { border-color: #e8115b; }
.metric b { font: 600 28px Georgia, serif; color: var(--ink); }
a.metric[href] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.metric.active { border: 2px solid #e8115b; padding: 11px 15px; box-shadow: 0 4px 14px rgba(232,17,91,.16); background: #fff7f9; }
.metric.active b { color: var(--deep); } .metric.active span { color: var(--deep); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 0 0 6px; font-size: 14px; }
.kbar form { margin: 0; } .kbar small { color: var(--muted); } .kbar code { background: #eceae4; padding: 0 4px; border-radius: 4px; }
.flash { background: #e9f7ef; border: 1px solid #b6e2c6; color: #17603a; border-radius: 10px; padding: 8px 14px; margin: 0 0 8px; font-size: 14px; }
.flash.warn { background: #fff6e6; border-color: #f0d199; color: #6b4700; }
.results h2 { margin-top: 18px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.sel-count { color: var(--muted); font-size: 13.5px; }
button.danger { background: #b42318; } button.danger:not(:disabled):hover { background: #8f1c13; }
th.chk, td.chk { width: 34px; padding-right: 0; } .chk input { width: 16px; height: 16px; cursor: pointer; accent-color: #e8115b; }
tbody tr:hover { background: #fdfaf6; } tbody tr.selected { background: #fff1f4; }
.detail-h { margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; }
.panel ol { margin: 0; padding-left: 20px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--paper); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
td small { color: var(--muted); }
.badge { display: inline-block; font: 600 11.5px "Segoe UI", system-ui, sans-serif; border-radius: 999px; padding: 1px 9px; background: #eceae4; color: #374151; white-space: nowrap; vertical-align: middle; text-transform: lowercase; }
.b-consultation_requested, .b-callback_requested, .b-qualified { background: #dcf3e6; color: #17603a; }
.b-partial, .b-qualifying, .b-open, .b-active { background: #fff1d6; color: #8a5300; }
.b-failed, .b-not_ready { background: #fde2e1; color: #9b1c1c; }
.b-contacted { background: #e3ecfb; color: #1d4f91; } .b-closed, .b-ended { background: #eceae4; color: #4b5563; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; } dt { color: var(--muted); font-size: 13px; } dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
button { font: 600 13.5px "Segoe UI", system-ui, sans-serif; color: #fff; background: var(--grad); border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 6px; }
.notes { padding-left: 18px; } .notes li { margin: 4px 0; }
.transcript { display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.msg { border-radius: 10px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: #fff1ea; border-color: #f7c7b0; max-width: 85%; }
.msg p { margin: 2px 0 0; } .msg small { color: var(--muted); }
pre.summary { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; white-space: pre-wrap; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; }
.doc { max-width: 900px; } .doc p, .doc li { font-size: 15.5px; } .doc blockquote { margin: 12px 0; padding: 8px 14px; background: #fff6e6; border-left: 4px solid #f0a35b; border-radius: 6px; }
.doc pre { background: #16212e; color: #f6f4ef; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.45; }
.doc code { background: #eceae4; padding: 1px 5px; border-radius: 4px; font-size: 13.5px; } .doc pre code { background: none; padding: 0; color: inherit; }
.doc table { display: table; }
.top nav a.on { background: rgba(255,255,255,.25); }
button[disabled] { background: #c9c4bb; color: #fff; cursor: not-allowed; text-shadow: none; }
.datebar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 14px 0 6px; font-size: 14px; }
.datebar label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.datebar input[type=date] { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; color: var(--ink); }
.datebar .presets { display: flex; flex-wrap: wrap; gap: 4px; }
.datebar .presets a { color: var(--deep); text-decoration: none; font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.datebar .presets a.on, .datebar .presets a:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.datebar .range { margin-left: auto; color: var(--muted); }
.insights h2 { margin: 12px 0 8px; }
.insights .panel h3 { margin: 6px 0 6px; }
.results h2 small { font: 400 14px "Segoe UI", system-ui, sans-serif; }
.results { overflow-x: auto; } .results table { display: table; }
/* Phone calls (AFHC-style) */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; font: 14px "Segoe UI", system-ui, sans-serif; }
.filters input[type=search] { flex: 1 1 260px; min-width: 200px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.filters select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.filters label { display: inline-flex; align-items: center; gap: 5px; }
.filters .count { margin-left: auto; color: var(--muted); }
table.calls td { vertical-align: top; }
table.calls td.when { white-space: nowrap; }
table.calls td.from { white-space: nowrap; }
table.calls td.dur { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.calls td.sum { min-width: 320px; }
table.calls td.sum p { margin: 0 0 6px; }
.chip { display: block; width: fit-content; margin-top: 5px; font: 600 11.5px "Segoe UI", system-ui, sans-serif; border-radius: 999px; padding: 2px 9px; background: #eceae4; color: #374151; text-decoration: none; }
.chip.ok { background: #dcfce7; color: #166534; }
table.calls details { margin: 4px 0 6px; }
table.calls details summary { cursor: pointer; color: var(--deep); font-weight: 600; }
table.calls details pre { white-space: pre-wrap; max-height: 320px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 13px/1.5 "Segoe UI", system-ui, sans-serif; }
table.calls audio { display: block; width: 100%; max-width: 360px; height: 36px; margin-top: 4px; }
