:root {
  color-scheme: light;
  --ink: #212322;
  --muted: #616a64;
  --paper: #ffffff;
  --canvas: #f6f8f6;
  --green: #2f6751;
  --green-hover: #23533f;
  --green-soft: #edf4ef;
  --line: #dce3dd;
  --danger: #a23832;
  --danger-soft: #fff1ef;
  --warning: #75521b;
  --warning-soft: #fff8e8;
  --focus: #1d6754;
  --scrollbar-thumb: #a1afa5;
  --scrollbar-track: #eef2ef;
  --scrollbar-hover: #778c7f;
  --scrollbar-active: #546c5e;
  --radius: 10px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-data: "SFMono-Regular", Consolas, monospace;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}
* { box-sizing: border-box; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--scrollbar-track); }
*::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border: 2px solid var(--scrollbar-track); border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
*::-webkit-scrollbar-thumb:active { background: var(--scrollbar-active); }
body { margin: 0; font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 25px; line-height: 1.25; letter-spacing: -.6px; font-weight: 650; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.35px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), a[href] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-hover); }
input, textarea { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
textarea, .resize-none { width: 100%; padding: 12px; min-height: 96px; max-height: 240px; resize: none; }
input[aria-invalid="true"] { border-color: var(--danger); }
.muted, .field-hint { color: var(--muted); }
.field-hint { font-size: 12px; margin-top: 6px; }
.brand { font-size: 12px; line-height: 1; letter-spacing: 2px; font-weight: 750; }
.brand span { font-size: 10px; letter-spacing: 1.6px; font-weight: 450; padding-left: 4px; }
.button { display: inline-flex; min-height: 40px; min-width: 76px; align-items: center; justify-content: center; border: 1px solid transparent; padding: 9px 14px; border-radius: 8px; font-size: 13px; line-height: 20px; font-weight: 600; text-decoration: none; transition: background-color 140ms, border-color 140ms; white-space: nowrap; }
.button:active:not(:disabled) { transform: translateY(1px); }
.primary { color: var(--paper); background: var(--green); }
.primary:hover:not(:disabled) { background: var(--green-hover); }
.outline { color: var(--ink); background: var(--paper); border-color: var(--line); }
.outline:hover:not(:disabled), .ghost:hover:not(:disabled) { background: var(--green-soft); border-color: var(--line); }
.ghost { background: transparent; color: var(--muted); }
.danger { color: var(--paper); background: var(--danger); }
.danger:hover:not(:disabled) { filter: brightness(.9); }
.full { width: 100%; }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 420px); padding: 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.login-card .brand { margin-bottom: 34px; }
.login-card h1 { margin-bottom: 10px; }
.login-card form { margin-top: 28px; }
.login-card label { display: block; font-weight: 600; margin-bottom: 8px; }
.secret-field { display: flex; border: 1px solid var(--line); border-radius: 8px; }
.secret-field input { min-width: 0; width: 100%; padding: 12px; border: 0; }
.secret-field .button { margin: 3px; }
.field-error { min-height: 22px; margin: 5px 0 8px; color: var(--danger); font-size: 12px; }
.app-shell { max-width: 1500px; padding: 28px 32px 18px; margin: 0 auto; }
.app-header, .queue-toolbar, .queue-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.title-group { display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap; }
.operator { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.operator span { font-size: 13px; font-weight: 600; }
.queue-intro { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); margin: 15px 0 22px; font-size: 12px; }
.segments { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0 3px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.segment { appearance: none; position: relative; display: flex; align-items: center; gap: 8px; padding: 13px 0; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted); white-space: nowrap; font-size: 13px; font-weight: 500; }
.segment:hover { color: var(--green); }
.segment[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.segment-count { min-width: 24px; padding: 1px 5px; border-radius: 5px; background: #eaf0ec; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.segment[aria-current="page"] .segment-count { background: var(--green-soft); color: var(--green); }
.queue-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.queue-toolbar { padding: 20px 22px 10px; }
.queue-toolbar p { margin-top: 4px; font-size: 12px; }
.queue-status { min-height: 25px; padding: 0 22px 7px; color: var(--muted); font-size: 12px; }
.table-scroll { overflow-x: auto; scrollbar-gutter: stable; }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
th { color: var(--muted); font-size: 11px; font-weight: 600; background: #f9fbf9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 22px; }
th:nth-child(1) { width: 23%; } th:nth-child(2) { width: 19%; } th:nth-child(3) { width: 30%; } th:nth-child(4) { width: 14%; } th:nth-child(5) { width: 14%; }
td { padding: 18px 22px; vertical-align: middle; border-bottom: 1px solid #edf1ed; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfa; }
.client-name { font-weight: 600; line-height: 1.35; display: block; }
.cell-secondary { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.cell-phone { font-size: 12px; font-variant-numeric: tabular-nums; text-decoration: none; }
.cell-phone:hover { text-decoration: underline; }
.attempt-label { font-size: 12px; white-space: nowrap; }
.attempt-dots { display: flex; gap: 4px; margin-top: 7px; }
.attempt-dot { height: 5px; width: 12px; border-radius: 2px; background: #e1e9e3; }
.attempt-dot.used { background: var(--green); }
.row-action { border-color: var(--line); width: 100%; min-width: 88px; color: var(--green); }
.queue-footer { min-height: 72px; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 16px; }
.pagination .button { min-width: 66px; }
.queue-footnote { color: var(--muted); font-size: 11px; margin: 13px 3px; }
.banner { margin: 10px 22px; padding: 12px 14px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.danger-banner { background: var(--danger-soft); color: var(--danger); }
.empty-state { text-align: center; padding: 44px 20px 48px; max-width: 540px; margin: auto; }
.empty-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 13px; background: var(--green-soft); color: var(--green); font-size: 20px; }
.empty-state p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.contact-dialog { border: 0; padding: 0; background: var(--paper); color: var(--ink); width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: 12px 12px 12px auto; border-radius: 14px; box-shadow: 0 18px 70px #17261d33; overflow-y: auto; scrollbar-gutter: stable; }
.contact-dialog::backdrop { background: #17261d55; }
.dialog-header { position: sticky; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 20px; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 1; }
.dialog-header h2 { overflow-wrap: anywhere; }
.eyebrow { color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.phone-link { display: inline-block; margin-top: 8px; font-variant-numeric: tabular-nums; }
.close-button { min-width: 36px; width: 36px; padding: 0; font-size: 25px; font-weight: 400; }
.dialog-body { padding: 20px 26px 28px; }
.dialog-body .banner { margin: 12px 0; }
#contact-summary { font-size: 12px; margin-bottom: 20px; }
#contact-loading { margin-bottom: 14px; color: var(--muted); }
#reload-contact { margin: 0 0 18px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 11px; }
.outcomes { display: grid; gap: 8px; }
.outcome { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font-size: 13px; cursor: pointer; }
.outcome:hover { background: var(--canvas); }
.outcome:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.outcome:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.outcome input { margin: 0; width: 16px; height: 16px; accent-color: var(--green); flex: 0 0 auto; }
.stop-outcome { margin-top: 6px; color: var(--danger); }
.stop-outcome:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.note-label { display: flex; justify-content: space-between; margin: 16px 0 8px; font-size: 13px; font-weight: 600; gap: 10px; }
.note-label span { font-weight: 400; }
.next-contact-hint { font-size: 12px; padding: 14px 0; color: var(--muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#save-contact { min-width: 195px; }
.history-section { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 22px; }
.history-list { margin: 18px 0 0; padding: 0; list-style: none; }
.history-list li { padding: 0 0 18px 15px; border-left: 2px solid var(--line); }
.history-list li:last-child { padding-bottom: 0; }
.history-title { display: block; font-size: 13px; font-weight: 600; }
.history-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.history-note { font-size: 13px; margin-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
#no-history { margin-top: 16px; font-size: 13px; }
.confirmation { padding: 26px; }
.confirmation p { margin: 12px 0 24px; color: var(--muted); font-size: 13px; }
.notification { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: min(460px, calc(100vw - 32px)); border: 1px solid var(--line); border-left: 4px solid var(--green); background: var(--paper); padding: 16px 20px; border-radius: 10px; box-shadow: 0 8px 25px #17261d22; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }
@media(max-width: 1100px) { .app-shell { padding: 22px 20px; } .title-group { gap: 18px; } td, th { padding-left: 16px; padding-right: 16px; } .segments { gap: 0 17px; } .brand span { display: none; } }
@media(max-width: 760px) { .app-shell { padding: 18px 12px; } .app-header { align-items: flex-start; gap: 10px; } .title-group { display: block; } .title-group .brand { margin-bottom: 10px; } h1 { font-size: 22px; } .operator { gap: 0; flex-direction: column; align-items: flex-end; } .operator .button { min-height: 32px; padding: 4px 8px; min-width: 0; } .queue-intro { margin: 14px 0; } .segments { gap: 0 16px; margin-bottom: 14px; } .segment { font-size: 12px; padding: 10px 0; } .queue-toolbar { padding: 18px 14px 8px; gap: 12px; } .queue-status { padding-left: 14px; } .queue-toolbar h2 { font-size: 18px; } table { min-width: 700px; } .queue-footer { padding: 12px 14px; gap: 10px; flex-wrap: wrap; } .pagination { gap: 12px; } .banner { margin-left: 14px; margin-right: 14px; } .contact-dialog { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; } .dialog-header { padding: 20px; } .dialog-body { padding: 18px 20px 28px; } .login-card { padding: 28px; } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media(forced-colors: active) { * { scrollbar-color: auto; } .button, .segment, .outcome { border: 1px solid ButtonText; } .segment[aria-current="page"] { border-bottom: 3px solid Highlight; } .attempt-dot { border: 1px solid CanvasText; } }
