/* RSR Agent Portal (2026-10-05) - styles for agent.html / agent-portal.js.
 * Everything is prefixed `pt-` (the older `ap-` prefix is already used by the
 * legacy "agent progress" card in style.css). Tokens come from style.css
 * (--brand, --success, --border, --card, --bg, --ink, --muted ...). */

.pt-screen { max-width: 1400px; padding: 14px 16px 40px; }
#agent-screen.pt-screen { max-width: 1400px; }

.pt-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Accessible focus states for everything interactive in the portal */
.pt-screen :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible,
.pt-drawer :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible,
.pt-toasts :is(button):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.pt-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px solid var(--brand);
}
.pt-header-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-brand { font-size: 19px; font-weight: 800; margin: 0; line-height: 1.2; }
.pt-brand-sub { font-weight: 500; color: var(--muted); font-size: 14px; }
.pt-whoami { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-header-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; flex: 1 1 auto; }
.pt-header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.pt-presence { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.pt-presence-btn {
  padding: 7px 14px; font-size: 13px; font-weight: 600; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; min-height: 34px;
}
.pt-presence-btn + .pt-presence-btn { border-left: 1px solid var(--border); }
.pt-presence-btn:hover:not(:disabled):not(.active) { background: #f3f4f6; color: var(--ink); }
.pt-presence-btn.active[data-presence="available"] { background: var(--success); color: #fff; }
.pt-presence-btn.active[data-presence="break"] { background: #f0a800; color: #1a1a1a; }
.pt-presence-btn:disabled { cursor: default; opacity: 0.7; }
.pt-screen .pt-presence-btn:focus-visible { outline-offset: -3px; }

.pt-chip { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pt-chip-ok { background: var(--success-tint); color: var(--success); }
.pt-chip-warn { background: #fff2cc; color: #8a6d1a; }
.pt-chip-neutral { background: #eef2f7; color: #4b5563; }

.pt-receiving { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pt-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex-shrink: 0; }
.pt-receiving-on { color: var(--success); }
.pt-receiving-on .pt-dot { background: var(--success); box-shadow: 0 0 0 0 rgba(30, 126, 52, 0.5); animation: pt-pulse 2s infinite; }
.pt-receiving-off { color: var(--alert); }
.pt-receiving-off .pt-dot { background: var(--alert); }
.pt-receiving-unknown { color: var(--muted); }
@keyframes pt-pulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 126, 52, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(30, 126, 52, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 126, 52, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .pt-receiving-on .pt-dot { animation: none; }
  .pt-drawer, .pt-toast { animation: none !important; }
}

/* ---------- KPI strip ---------- */
.pt-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pt-kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; border-top: 3px solid #cfd4dc;
}
.pt-kpi-hot { border-top-color: var(--brand); }
.pt-kpi-good { border-top-color: var(--success); }
.pt-kpi-dead { border-top-color: #9ca3af; }
.pt-kpi-value { font-size: 24px; font-weight: 800; line-height: 1.1; }
.pt-kpi-hot .pt-kpi-value { color: var(--brand); }
.pt-kpi-good .pt-kpi-value { color: var(--success); }
.pt-kpi-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 3px; }

/* ---------- Toolbar ---------- */
.pt-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 6px; }
.pt-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-filter {
  padding: 7px 13px; border-radius: 18px; border: 1px solid var(--border); background: var(--card);
  font-size: 13px; color: #444; cursor: pointer; min-height: 34px;
}
.pt-filter:hover { border-color: var(--brand); }
.pt-filter.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pt-filter-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: #eef0f3; color: #444; font-size: 11px; font-weight: 700; text-align: center; }
.pt-filter.active .pt-filter-count { background: rgba(255, 255, 255, 0.25); color: #fff; }
.pt-filter-hot:not(.active) .pt-filter-count { background: var(--brand-tint); color: var(--brand-dark); }
.pt-toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pt-range { display: inline-flex; gap: 0; }
.pt-range-btn { border-radius: 0; min-height: 34px; }
.pt-range-btn:first-child { border-radius: 6px 0 0 6px; }
.pt-range-btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.pt-range-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; position: relative; }
.pt-range-btn.active:hover:not(:disabled) { color: #fff; background: var(--brand-dark); }
.pt-search input {
  padding: 7px 10px; font-size: 14px; border: 1px solid var(--border); border-radius: 6px;
  min-width: 240px; min-height: 34px; background: var(--card); color: var(--ink);
}
.pt-search input:focus { outline: none; border-color: var(--brand); }
.pt-search input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.pt-meta { font-size: 12px; color: var(--muted); min-height: 18px; margin: 4px 2px 8px; }
.pt-meta-err { color: var(--alert); font-weight: 600; }

/* ---------- Lead list (table) ---------- */
.pt-list-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.pt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-table th {
  position: sticky; top: 0; background: #fafafa; color: var(--muted); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.pt-table td { padding: 8px 12px; border-bottom: 1px solid #eee; vertical-align: top; white-space: normal; }
.pt-row { cursor: pointer; }
.pt-row:hover { background: #fafbfc; }
.pt-row.is-selected { background: var(--brand-tint); }
.pt-row.is-overdue { background: #fff5f5; }
.pt-row.is-overdue td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
.pt-row.is-overdue:hover, .pt-row.is-overdue.is-selected { background: #ffe9ea; }
.pt-row.is-closed td, .pt-row.is-dead td { color: #6b7280; }

.pt-c-lead { white-space: nowrap !important; }
.pt-lead-btn {
  display: block; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--ink); text-decoration: none; text-align: left;
}
.pt-lead-btn:hover { color: var(--brand); text-decoration: underline; }
.pt-ml { display: inline-block; margin-top: 2px; font-size: 12px; color: var(--brand); text-decoration: none; font-weight: 500; }
.pt-ml:hover { text-decoration: underline; }
.pt-strong { font-weight: 600; }
.pt-sub { font-size: 12px; color: var(--muted); }
.pt-c-garage { max-width: 220px; }
.pt-clip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.pt-due { font-weight: 600; color: #374151; white-space: nowrap; }
.pt-due-over { color: var(--alert); }
.pt-warn { color: #d97706; font-size: 14px; cursor: help; margin-left: 2px; }
.pt-tag-dead { background: #eceff3; color: #4b5563; }

.pt-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Lead list (stacked cards under ~700px) ---------- */
@media (max-width: 700px) {
  .pt-screen { padding: 10px 10px 40px; }
  .pt-list-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .pt-table, .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: 100%; }
  .pt-table thead { display: none; }
  .pt-row {
    background: var(--card); border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 10px; padding: 8px 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }
  .pt-row.is-overdue { background: #fff5f5; border-color: #f3b4b8; border-left: 4px solid var(--brand); }
  .pt-row.is-overdue td:first-child { box-shadow: none; }
  .pt-table td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 5px 0; border-bottom: 0; text-align: right;
  }
  .pt-table td::before {
    content: attr(data-label); flex: 0 0 auto; font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.3px; color: var(--muted); text-align: left;
  }
  .pt-table td > * { text-align: right; }
  .pt-c-lead { align-items: center; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid #eee !important; }
  .pt-c-lead::before { display: none; }
  .pt-c-lead .pt-lead-btn { font-size: 16px; }
  .pt-c-lead .pt-ml { margin-top: 0; font-size: 13px; }
  .pt-c-cust::before { align-self: center; }
  .pt-c-garage { max-width: none; }
  .pt-c-garage .pt-clip { max-width: 60vw; }
  .pt-table td:empty { display: none; }

  .pt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pt-kpi { padding: 8px 10px; }
  .pt-kpi-value { font-size: 20px; }
  .pt-header-actions { order: 2; }
  .pt-header-status { order: 3; flex-basis: 100%; }
  .pt-search { flex: 1 1 100%; }
  .pt-search input { width: 100%; min-width: 0; }
  .pt-toolbar-right { width: 100%; }
}

/* ---------- Drawer ---------- */
.pt-backdrop { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.35); z-index: 90; }
.pt-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; z-index: 100;
  background: var(--bg); box-shadow: -8px 0 28px rgba(0, 0, 0, 0.18);
  display: flex; flex-direction: column; animation: pt-slide-in 0.18s ease-out; outline: none;
}
@keyframes pt-slide-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.pt-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--card); border-bottom: 2px solid var(--brand); flex-shrink: 0;
}
.pt-drawer-title { margin: 0; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-drawer-close {
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font-size: 24px; line-height: 1; cursor: pointer; color: #444; flex-shrink: 0;
}
.pt-drawer-close:hover { border-color: var(--brand); color: var(--brand); }
.pt-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.pt-drawer-body > * { flex-shrink: 0; }
@media (max-width: 700px) {
  .pt-drawer { width: 100%; animation-name: pt-fade-in; }
  .pt-backdrop { display: none !important; }
  .pt-drawer-body { padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0px)); }
}
@keyframes pt-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Lead header block */
.pt-lead-head { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.pt-lead-name { font-size: 17px; font-weight: 800; }
.pt-lead-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 8px; }
.pt-dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 5px 10px; margin: 0; font-size: 13px; }
.pt-dl dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.pt-dl dd { margin: 0; word-break: break-word; }
.pt-tel { color: var(--brand); font-weight: 700; text-decoration: none; font-size: 14px; }
.pt-tel:hover { text-decoration: underline; }
.pt-lead-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* Buttons */
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; min-height: 38px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; line-height: 1.2; text-align: center;
}
.pt-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pt-btn:disabled { opacity: 0.5; cursor: default; }
.pt-btn-sm { padding: 6px 12px; min-height: 32px; font-size: 12px; }
.pt-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.pt-btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.pt-btn-secondary { background: var(--card); border-color: #b9bec7; color: var(--ink); }
.pt-btn-danger { background: var(--card); border-color: var(--alert); color: var(--alert); }
.pt-btn-danger:hover:not(:disabled) { background: var(--alert); border-color: var(--alert); color: #fff; }
.pt-btn-ghost { background: var(--card); color: #374151; }
.pt-btn.is-active { box-shadow: 0 0 0 2px var(--brand-tint), 0 0 0 3px var(--brand); }

/* Banners + notices */
.pt-banner { border-radius: 8px; padding: 9px 12px; font-size: 13px; border: 1px solid transparent; }
.pt-banner-info { background: #e3f2fd; border-color: #bcdcf7; color: #0d47a1; }
.pt-banner-warn { background: #fff6e0; border-color: #f0d878; color: #6b5a1a; }
.pt-banner-dead { background: #f1f2f4; border-color: #d9dce1; color: #374151; }
.pt-banner-good { background: var(--success-tint); border-color: #bfe3c9; color: var(--success); }
.pt-notice { display: none; border-radius: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.pt-notice-show { display: block; }
.pt-notice-ok { background: var(--success-tint); color: var(--success); }
.pt-notice-warn { background: #fff6e0; color: #6b5a1a; }
.pt-notice-error { background: var(--alert-tint); color: var(--alert); }

/* Stepper */
.pt-stepper { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 14px; }
.pt-step { position: relative; display: flex; gap: 12px; padding: 10px 0; }
.pt-step + .pt-step { border-top: 1px dashed #e5e7eb; }
.pt-step-dot {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: #e5e7eb; color: #6b7280; margin-top: 1px;
}
.pt-step-main { flex: 1 1 auto; min-width: 0; }
.pt-step-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pt-step-label { font-weight: 700; font-size: 14px; }
.pt-step-meta { font-size: 12px; color: var(--muted); }
.pt-src-crm { background: #ede9fe; color: #5b21b6; border-radius: 8px; padding: 1px 7px; font-weight: 600; font-size: 11px; }
.pt-step-detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pt-step-done .pt-step-dot { background: var(--success); color: #fff; }
.pt-step-current .pt-step-dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-tint); }
.pt-step-current .pt-step-label { color: var(--brand-dark); }
.pt-step-dead .pt-step-dot { background: var(--alert); color: #fff; box-shadow: 0 0 0 4px var(--alert-tint); }
.pt-step-dead .pt-step-label { color: var(--alert); }
.pt-step-dead .pt-step-detail { color: var(--alert); font-weight: 600; }
.pt-step-upcoming { opacity: 0.55; }
.pt-step-skipped { opacity: 0.5; }
.pt-step-skipped .pt-step-label { text-decoration: line-through; }

/* Actions */
.pt-actions { margin-top: 10px; }
.pt-actions-solo { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 0; }
.pt-action-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-form { margin-top: 12px; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 10px; }
.pt-field { display: flex; flex-direction: column; gap: 5px; }
.pt-field > label { font-size: 12px; font-weight: 600; color: #374151; }
.pt-label-sm { font-size: 11px; font-weight: 500; color: var(--muted); }
.pt-req { color: var(--alert); }
.pt-field input, .pt-field select, .pt-field textarea {
  padding: 8px 10px; font-size: 14px; font-family: inherit; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-height: 38px;
}
.pt-field textarea { resize: vertical; }
.pt-field input:focus, .pt-field select:focus, .pt-field textarea:focus { outline: none; border-color: var(--brand); }
.pt-field input:focus-visible, .pt-field select:focus-visible, .pt-field textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pt-form-error { color: var(--alert); font-size: 13px; font-weight: 600; min-height: 0; }
.pt-form-error:empty { display: none; }
.pt-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Vendor picker */
.pt-vendor-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin-top: 4px; }
.pt-vendor-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; font: inherit;
}
.pt-vendor-item:hover { border-color: var(--brand); }
.pt-vendor-item.is-selected { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.pt-vendor-name { font-size: 13px; font-weight: 600; }
.pt-vendor-name .tag { margin-left: 4px; }

/* History */
.pt-history { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.pt-history summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.pt-ev-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.pt-ev { display: flex; gap: 12px; font-size: 13px; }
.pt-ev-time { flex: 0 0 82px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pt-ev-label { font-weight: 600; }

/* Toasts */
.pt-toasts {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; width: 340px; max-width: calc(100vw - 32px);
}
.pt-toast {
  display: flex; align-items: stretch; background: #1f2937; color: #fff; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); overflow: hidden; animation: pt-fade-in 0.2s ease-out;
  border-left: 4px solid #60a5fa;
}
.pt-toast-new { border-left-color: var(--brand); }
.pt-toast-error { border-left-color: var(--alert); }
.pt-toast-body {
  flex: 1 1 auto; padding: 11px 12px; font: inherit; font-size: 13px; text-align: left;
  background: none; border: 0; color: inherit; cursor: default;
}
button.pt-toast-body { cursor: pointer; font-weight: 600; }
button.pt-toast-body:hover { background: rgba(255, 255, 255, 0.08); }
.pt-toast-x { flex: 0 0 34px; background: none; border: 0; color: #cbd5e1; font-size: 18px; cursor: pointer; }
.pt-toast-x:hover { color: #fff; }
.pt-toasts .pt-toast :is(button):focus-visible { outline-color: #fff; outline-offset: -2px; }
@media (max-width: 700px) {
  .pt-toasts { right: 10px; left: 10px; width: auto; max-width: none; }
}

/* ── 2026-10-10: break timers, prominent callback CTA ─────────────────── */
.pt-break-info { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg, #f4f5f7); color: var(--muted); border: 1px solid var(--border); }
.pt-break-info-on { background: #fff4d6; color: #8a5a00; border-color: #f0c869; }

.pt-btn.pt-btn-callback { background: #fff8e6; border: 1.5px solid #e0a100; color: #7a4f00; font-weight: 700; }
.pt-btn.pt-btn-callback:hover:not(:disabled) { background: #ffefc2; }
.pt-btn.pt-btn-callback-hot { background: #f5a800; border-color: #f5a800; color: #2b1d00; box-shadow: 0 2px 6px rgba(245, 168, 0, 0.35); }
.pt-btn.pt-btn-callback-hot:hover:not(:disabled) { background: #e09a00; border-color: #e09a00; }
.pt-btn.pt-btn-callback.is-active { outline: 2px solid #b37a00; outline-offset: 1px; }
.pt-callback-hint { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fff8e6; border: 1px solid #f0c869; color: #6b4500; font-size: 13px; font-weight: 600; }

/* ── 2026-10-12: vendor allocation v2 (nearest / list + aligned / denied) ──── */
.pt-vo { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pt-vo-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
.pt-vo .pt-notice { margin: 0; }
.pt-vo .pt-banner { margin: 0; }
.pt-tag-tried { background: #eceff3; color: #6b7280; font-weight: 500; }
.pt-link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand); cursor: pointer; text-align: left; align-self: flex-start; min-height: 32px; }
.pt-link-btn:hover { text-decoration: underline; }
.pt-screen .pt-link-btn:focus-visible, .pt-drawer .pt-link-btn:focus-visible { outline-offset: 1px; }

/* denial streak */
.pt-vo-streak { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #8a5a00; background: #fff6e0; border: 1px solid #f0d878; border-radius: 8px; padding: 6px 10px; }
.pt-vo-dots { display: inline-flex; gap: 4px; }
.pt-vo-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #e0a100; box-sizing: border-box; }
.pt-vo-dot.is-on { background: #e0a100; }

/* nearest candidate */
.pt-vo-cand { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.pt-vo-cand-name { font-size: 16px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; word-break: break-word; }
.pt-vo-cand-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.pt-vo-call { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 6px; background: var(--success); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.pt-vo-call:hover { filter: brightness(0.92); }

/* list mode */
.pt-vo-search { gap: 5px; }
.pt-vo-list { max-height: 260px; }
.pt-vendor-item.is-tried { opacity: 0.75; }
.pt-vendor-item.is-tried .pt-vendor-name { color: #4b5563; }
.pt-vo-picked { font-size: 13px; color: var(--success); background: var(--success-tint); border-radius: 6px; padding: 6px 10px; word-break: break-word; }
.pt-vo-custom { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px dashed #b9bec7; border-radius: 8px; background: var(--bg); }

/* aligned / denied segmented choice */
.pt-vo-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-vo-choice-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 10px 8px;
  border-radius: 8px; border: 2px solid var(--border); background: var(--card); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; line-height: 1.2; text-align: center;
}
.pt-vo-choice-btn:hover { border-color: #9ca3af; }
.pt-vo-choice-aligned.is-on { background: var(--success); border-color: var(--success); color: #fff; }
.pt-vo-choice-denied.is-on { background: var(--alert); border-color: var(--alert); color: #fff; }
.pt-vo .pt-vo-choice-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pt-vo-detail { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.pt-vo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pt-vo-chip { padding: 6px 12px; min-height: 34px; border-radius: 18px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; }
.pt-vo-chip:hover { border-color: var(--brand); }
.pt-vo-chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pt-vo .pt-vo-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pt-vo-hint { min-height: 0; }
.pt-vo-hint:empty { display: none; }
.pt-vo-confirm { width: 100%; min-height: 46px; font-size: 15px; font-weight: 700; }

/* the rest of step 2 (Mark dead) sits quietly below the panel */
.pt-action-btns-after-panel { margin-top: 10px; }

/* vendor history */
.pt-vo-history { margin-top: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.pt-vo-history summary { cursor: pointer; font-weight: 700; font-size: 12px; color: var(--muted); }
.pt-vh-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-vh-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px; font-size: 13px; }
.pt-vh-name { font-weight: 600; word-break: break-word; }
.pt-vh-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* change vendor: clear secondary action on later steps */
.pt-btn.pt-btn-change-vendor { background: #eef2ff; border: 1.5px solid #6366f1; color: #3730a3; font-weight: 700; }
.pt-btn.pt-btn-change-vendor:hover:not(:disabled) { background: #e0e7ff; border-color: #4f46e5; color: #312e81; }
.pt-btn.pt-btn-change-vendor.is-active { outline: 2px solid #4f46e5; outline-offset: 1px; box-shadow: none; }
.pt-btn.pt-btn-change-vendor-go { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pt-btn.pt-btn-change-vendor-go:hover:not(:disabled) { background: #4338ca; border-color: #4338ca; color: #fff; }
.pt-form-change-vendor { border-color: #c7d2fe; background: #f5f7ff; }
.pt-form-hint { font-size: 12px; color: #4b5563; }

@media (max-width: 420px) {
  .pt-vo { padding: 10px; }
  .pt-vo-choice-btn { font-size: 14px; }
  .pt-vh-item { grid-template-columns: auto minmax(0, 1fr); }
  .pt-vh-time { grid-column: 2; }
}

/* 2026-10-15: an action that is not allowed yet (No answer before the retry timer is due) */
.pt-btn.is-locked { opacity: 0.55; cursor: not-allowed; border-style: dashed; }

/* 2026-11-12: Service + Prepaid columns in the lead list */
.pt-c-service { max-width: 200px; }
.pt-service { max-width: 200px; }
@media (max-width: 700px) {
  .pt-c-service { max-width: none; }
  .pt-c-service .pt-service { max-width: 60vw; }
}

/* 2026-11-17: break disposition menu (Lunch / Tea / Washroom / JC) under the presence toggle */
.pt-presence-wrap { position: relative; display: inline-block; }
.pt-break-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 190px;
  display: flex; flex-direction: column; padding: 6px; gap: 2px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.pt-break-menu.hidden { display: none; }
.pt-break-opt {
  text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.pt-break-opt:hover, .pt-break-opt:focus-visible { background: #fff4d6; outline: none; }
.pt-break-opt.is-current { background: #f0a800; color: #1a1a1a; }
