/* Zippy Pro Recruiting — phone-first page for outbound pro calls (2026-09-10) */
:root {
    --bg: #f4f6f4;
    --card: #ffffff;
    --text: #1d2a22;
    --muted: #6b7a70;
    --line: #dfe6e1;
    --primary: #1f8a4c;
    --primary-dark: #176b3b;
    --primary-soft: #e6f4ec;
    --accent: #f0a500;
    --danger: #c0392b;
    --danger-soft: #fdecea;
    --info-soft: #e8f0fb;
    --shadow: 0 2px 10px rgba(0,0,0,.08);
    --radius: 14px;
    --tap: 48px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #101613; --card: #182019; --text: #e9efea; --muted: #9aa89f; --line: #2a352e;
        --primary: #35b46a; --primary-dark: #2a9556; --primary-soft: #1c3326; --danger-soft: #3a1f1c; --info-soft: #1b2634;
        --shadow: 0 2px 10px rgba(0,0,0,.4);
    }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 600; }
.screen { min-height: 100dvh; }

/* Login */
#loginScreen { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; }
.brand { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
label { display: block; font-weight: 600; font-size: 14px; color: var(--muted); margin: 12px 0 0; }
label input, label select, label textarea { display: block; width: 100%; margin-top: 6px; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font-size: 17px; }
label textarea { min-height: 80px; }

/* Buttons */
.btn { min-height: var(--tap); padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-secondary { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; margin-top: 18px; }
.btn-call { width: 100%; font-size: 21px; min-height: 64px; margin: 14px 0; background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(31,138,76,.35); }
.btn-call:disabled { box-shadow: none; }
.icon-btn { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border: none; background: none; font-size: 20px; text-decoration: none; color: var(--text); border-radius: 12px; }

/* Layout */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 800; font-size: 19px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.env-tag { background: #ff7a00; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
main#views { max-width: 720px; margin: 0 auto; padding: 12px 14px calc(84px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar .tab { flex: 1; min-height: 56px; border: none; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 20px; color: var(--muted); }
.tabbar .tab span { font-size: 12px; font-weight: 700; }
.tabbar .tab.active { color: var(--primary); }
.section-title { font-size: 20px; font-weight: 800; margin: 6px 0 10px; }
.back-btn { border: none; background: none; color: var(--primary); font-weight: 700; padding: 6px 0 10px; font-size: 17px; cursor: pointer; }
.spacer { flex: 1; }

/* Chips */
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; }
.chip-agent { background: var(--primary-soft); border-color: transparent; color: var(--primary-dark); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* Queue */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--card); border-radius: 12px; padding: 10px 6px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.toolbar input { width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--card); margin-bottom: 6px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }
.row { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-right { text-align: right; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; background: var(--line); color: var(--text); }
.badge.new { background: var(--info-soft); color: #2c5aa0; }
.badge.interested, .badge.applied, .badge.approved { background: var(--primary-soft); color: var(--primary-dark); }
.badge.callback, .badge.no_answer { background: #fff4d6; color: #8a5a00; }
.badge.not_interested, .badge.do_not_call, .badge.bad_number { background: var(--danger-soft); color: var(--danger); }
.fab-row { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; gap: 10px; padding: 0 14px; pointer-events: none; }
.fab-row .btn { pointer-events: auto; box-shadow: var(--shadow); }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card h2 { margin: 0 0 4px; font-size: 22px; }
.card h3 { margin: 14px 0 6px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.text-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mini { font-size: 14px; color: var(--muted); }
.call-item { padding: 10px 0; border-top: 1px solid var(--line); }
.call-item:first-child { border-top: none; }
.call-item summary { cursor: pointer; font-weight: 600; }
.transcript { white-space: pre-wrap; font-size: 14px; background: var(--bg); border-radius: 10px; padding: 10px; max-height: 320px; overflow: auto; margin-top: 8px; }
audio { width: 100%; margin-top: 8px; }

/* Live call */
.call-status { position: sticky; top: 58px; z-index: 4; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 12px; }
.call-status-main { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.call-status-sub { color: var(--muted); font-size: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.ringing { background: var(--accent); animation: pulse 1s infinite; }
.dot.live { background: var(--primary); animation: pulse 1.4s infinite; }
.dot.ended { background: var(--muted); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.coach-step { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.coach-label { font-size: 12px; font-weight: 800; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.coach-say { font-size: 20px; line-height: 1.4; font-weight: 500; }
.coach-say em { color: var(--primary-dark); font-style: normal; font-weight: 700; }
.coach-note { margin-top: 8px; font-size: 14px; color: var(--muted); }
.coach-prompt { margin: 14px 0 6px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.coach-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.coach-chips .chip { min-height: 44px; }
.coach-chips .chip.picked { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.coach-nav { display: flex; gap: 8px; margin-top: 14px; }
.coach-nav .btn { flex: 1; }
.coach-jump { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.coach-jump .chip { font-size: 13px; min-height: 34px; padding: 4px 12px; }
.coach-jump .chip.here { background: var(--primary); color: #fff; border-color: var(--primary); }
.coach-reply { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.coach-reply .coach-label { margin-bottom: 4px; }
.coach-reply p { margin: 0; font-size: 18px; }
.coach-field { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.coach-field input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; width: 130px; background: var(--card); }

.notes-card .summary { font-size: 18px; margin: 6px 0 10px; }
.notes-card ul { margin: 0; padding-left: 20px; }
.notes-card li { margin: 4px 0; }
.tip { background: #fff8e6; color: #6a4a00; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 15px; }
@media (prefers-color-scheme: dark) { .tip { background: #33290f; color: #f1d58a; } }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Script doc */
#scriptDoc .card { padding: 14px 16px; }
#scriptDoc h2 { font-size: 18px; }
#scriptDoc p { margin: 8px 0; }
#scriptDoc .obj { border-top: 1px solid var(--line); padding: 10px 0; }
#scriptDoc .obj b { display: block; }

/* Sheets */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
/* Sheets are centered dialogs (Ryan 2026-09-10: not anchored to the bottom). */
.sheet { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 32px); max-width: 520px; z-index: 21; background: var(--card); border-radius: 18px; padding: 20px 20px 18px; max-height: 88dvh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.sheet-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
.sheet-actions .btn { min-width: 100px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 30; max-width: 90vw; font-size: 15px; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); }
label.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); }
label.check input { width: 22px; height: 22px; margin: 0; min-height: 0; }
.field-label { font-weight: 600; font-size: 14px; color: var(--muted); margin: 12px 0 6px; }
/* Callback picker: two-line chips (label + date/time) */
#callbackDays .chip, #callbackTimes .chip { display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 6px 12px; min-width: 64px; }
#callbackDays .chip small, #callbackTimes .chip small { font-size: 11px; font-weight: 500; opacity: .75; }
.overdue { color: var(--danger, #c0392b); font-weight: 700; }
/* Shared callback schedule */
.tabbar .tab { position: relative; }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; font-style: normal; line-height: 18px; text-align: center; }
.cb-day { font-weight: 800; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 12px 0 2px; }
.cb-day.overdue { color: var(--danger); }
.cb-item { align-items: flex-start; }
.cb-time { min-width: 64px; font-weight: 800; font-size: 15px; padding-top: 2px; }
.cb-time small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.cb-item .row-sub, .cb-note { white-space: normal; }
.cb-note { font-size: 14px; margin-top: 4px; }
.cb-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.claim-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary-dark); background: var(--primary-soft); border-radius: 999px; padding: 2px 8px; margin-top: 4px; }
.claim-tag.other { color: #2c5aa0; background: var(--info-soft); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.trade-picker { padding-bottom: 0; }
.row.held { opacity: .6; }
.hold-tag { display: inline-block; font-size: 12px; font-weight: 700; color: #8a5a00; background: #fff4d6; border-radius: 999px; padding: 2px 8px; margin-top: 4px; }
@media (prefers-color-scheme: dark) { .hold-tag { background: #3a2f10; color: #f1d58a; } }
.time-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.time-table th, .time-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.time-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.time-table td.num, .time-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.time-table tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
.time-agent { font-size: 18px; font-weight: 800; margin: 14px 0 6px; }
.wins { text-align: center; font-weight: 700; color: var(--primary-dark); margin: -2px 0 10px; font-size: 15px; }
.wins .muted { font-weight: 500; }
.possible { background: #fff8e6; color: #6a4a00; border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
@media (prefers-color-scheme: dark) { .possible { background: #33290f; color: #f1d58a; } }
.possible .text-actions { margin-top: 10px; }
.toast.win { background: var(--primary); font-weight: 700; }
.tips { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.tips .coach-label { margin-bottom: 6px; }
.tips ul { margin: 0; padding-left: 20px; }
.tips li { margin: 4px 0; font-size: 16px; }
.playbook h4 { margin: 12px 0 4px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.playbook ul { margin: 0; padding-left: 20px; }
.playbook li { margin: 4px 0; }
.playbook .headline { font-size: 18px; font-weight: 700; margin: 4px 0 8px; }

/* A text or email option that has been sent (ZD-165) */
.send-btn { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; }
.send-btn small { font-size: 11px; font-weight: 500; opacity: .8; }
.send-btn.sent { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }

/* "Notes are being taken" — top of the live call view (ZD-166) */
.notes-banner { background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; line-height: 1.25; padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; text-align: center; }


/* Ask Zippy (ZD-327) */
.ask-thread { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.ask-msg { padding: 12px 14px; border-radius: var(--radius); max-width: 92%; overflow-wrap: anywhere; }
.ask-msg.q { align-self: flex-end; background: var(--primary); color: #fff; white-space: pre-wrap; }
.ask-msg.a { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); }
.ask-msg.a p { margin: 0 0 8px; } .ask-msg.a p:last-child { margin-bottom: 0; }
.ask-msg.a ul { margin: 4px 0 8px; padding-left: 20px; }
.ask-msg.a .ask-copy { margin-top: 8px; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--muted); }
.ask-msg.thinking { color: var(--muted); font-style: italic; }
.ask-form { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0; }
.ask-form textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--card); resize: vertical; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ask-msg.a .ask-h { font-weight: 800; margin-top: 4px; }
.ask-msg.a blockquote { margin: 4px 0 8px; padding: 8px 12px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 6px; }
