:root { color-scheme: light; font-family: system-ui, sans-serif; }
body { margin: 0; background: #f6f7f9; color: #1c2230; }
.bar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem;
       background: #fff; border-bottom: 1px solid #dde1e8; }
.brand { font-weight: 600; }
.persona, .who { color: #5a6477; }
.spacer { flex: 1; }
.inline { display: inline; margin: 0; }
main { max-width: 64rem; margin: 1.5rem auto; padding: 0 1rem; }
button { padding: .45rem .9rem; border: 1px solid #b9c0cc; border-radius: 6px;
         background: #fff; cursor: pointer; }
.login main { max-width: 22rem; margin-top: 12vh; background: #fff; padding: 1.5rem;
              border: 1px solid #dde1e8; border-radius: 8px; }
.login label { display: block; margin: .8rem 0; }
.login input { display: block; width: 100%; box-sizing: border-box; padding: .5rem; margin-top: .25rem; }
.error { color: #a31616; }

/* Call list and detail: readable from 400 px up, no inline styles. */
h1 { font-size: 1.3rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin-bottom: 1rem; }
.filters label { display: flex; flex-direction: column; font-size: .85rem; color: #5a6477; }
.filters input, .filters select { padding: .4rem; font-size: 1rem; }
.totals { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.totals div { flex: 1 1 7rem; background: #fff; border: 1px solid #dde1e8; border-radius: 8px; padding: .6rem .8rem; }
.totals dt { font-size: .8rem; color: #5a6477; }
.totals dd { margin: .15rem 0 0; font-size: 1.15rem; font-weight: 600; }
.scroll, .table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
.calls { display: block; overflow-x: auto; white-space: nowrap; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid #e6e9ef; }
th { font-size: .8rem; color: #5a6477; }
.kv th { background: #f0f2f6; }
.pager { display: flex; gap: 1rem; justify-content: center; margin: 1rem 0; }
.notice { background: #fff8e1; border: 1px solid #f0d98a; padding: .8rem; border-radius: 8px; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .4rem 0; }
.player audio { width: 100%; max-width: 24rem; }
.transcript { display: flex; flex-direction: column; gap: .4rem; }
.line { margin: 0; padding: .55rem .75rem; border-radius: 8px; overflow-wrap: anywhere; }
.line strong { display: block; font-size: .75rem; color: #5a6477; }
.line.agent { background: #e8f0fe; }
.line.caller { background: #eef6ee; }
.tools { padding-left: 1.2rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f0f2f6; padding: .5rem; border-radius: 6px; }
