[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1d2330; background: #f4f6f9; }
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1.5rem; background: #1f3a5f; color: #fff; }
header .brand { font-size: 1.05rem; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a { color: #fff; text-decoration: none; opacity: .85; }
nav a:hover { opacity: 1; text-decoration: underline; }
nav .who { opacity: .7; }
nav form { margin: 0; }
main { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }
h1 { font-size: 1.35rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.card { background: #fff; border: 1px solid #dde2ea; border-radius: 8px; padding: 1.25rem; }
.login { max-width: 360px; margin: 4rem auto; display: grid; gap: .9rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
input { font: inherit; padding: .55rem .65rem; border: 1px solid #c3cad6; border-radius: 6px; }
button { font: inherit; cursor: pointer; padding: .5rem 1rem; border: 0; border-radius: 6px; background: #2563eb; color: #fff; }
button:hover:not(:disabled) { background: #1d4ed8; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.danger { background: #dc2626; }
button.danger:hover:not(:disabled) { background: #b91c1c; }
button.secondary { background: #e5e9f0; color: #1d2330; }
button.secondary:hover:not(:disabled) { background: #d5dbe5; }
button.link { background: none; color: #fff; padding: 0; opacity: .85; }
.error { color: #b91c1c; margin: 0; }
.muted { color: #6b7280; }
.dial-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 800px) { .dial-layout { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid #e6e9ef; white-space: nowrap; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
tr.active td { background: #eef4ff; }
.panel { position: sticky; top: 1rem; display: grid; gap: .75rem; }
.status { font-weight: 600; }
.status[data-state="ready"] { color: #15803d; }
.status[data-state="busy"] { color: #b45309; }
.status[data-state="error"] { color: #b91c1c; }
.controls { display: flex; gap: .5rem; }
.timer { font-variant-numeric: tabular-nums; font-size: 1.6rem; }
audio { height: 32px; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; background: #e5e9f0; }
.badge.completed { background: #dcfce7; color: #166534; }
.badge.failed, .badge.busy, .badge.no-answer, .badge.canceled { background: #fee2e2; color: #991b1b; }
.disposition { display: grid; gap: .75rem; }
.disposition h2 { margin: 0; color: #b45309; }
select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid #c3cad6; border-radius: 6px; background: #fff; width: 100%; }
textarea { resize: vertical; }
.badge.status-appointment-booked { background: #dcfce7; color: #166534; }
.badge.status-do-not-contact { background: #1f2937; color: #fff; }
.badge.status-not-interested, .badge.status-not-qualified, .badge.status-wrong-number, .badge.status-invalid-number, .badge.status-duplicate,
.badge.status-already-completed-hired-contractor { background: #fee2e2; color: #991b1b; }
.badge.status-callback-requested { background: #fef3c7; color: #92400e; }
.badge.status-attempted-no-answer { background: #e0e7ff; color: #3730a3; }
.badge.status-new { background: #e5e9f0; color: #1d2330; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.report-head h1 { margin: 0; }
a.button { display: inline-block; padding: .5rem 1rem; border-radius: 6px; background: #2563eb; color: #fff; text-decoration: none; }
a.button:hover { background: #1d4ed8; }
.counts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.count { display: grid; min-width: 7.5rem; padding: .5rem .75rem; border: 1px solid #dde2ea; border-radius: 8px; background: #fff; color: inherit; text-decoration: none; }
.count strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.count span { font-size: .78rem; color: #6b7280; }
.count.selected { border-color: #2563eb; box-shadow: 0 0 0 1px #2563eb inset; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin-bottom: .75rem; }
.filters label { min-width: 9rem; }
.filter-actions { display: flex; align-items: center; gap: .75rem; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.report td.notes { white-space: normal; min-width: 16rem; max-width: 28rem; }

/* Lead page */
.lead-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.lead-grid h2 { margin-top: 0; font-size: 1.05rem; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0; }
dl.details dt { color: #6b7280; }
dl.details dd { margin: 0; overflow-wrap: anywhere; }
