/* Ticket Caller 811 -- shared by index.html (desktop) and mobile.html.
   Uses each page's own theme tokens (--glass-*, --w*, --text...), so it follows
   light/dark and the Streets/Satellite glass variants on both. */
/* ---- Ticket Caller 811 Idaho (ticket-caller.js) ---- */
.tc-start-btn{ border-color:var(--accent); }
.tc-review{
  position:absolute; top:64px; right:14px; bottom:22px; width:400px; z-index:26;
  display:flex; flex-direction:column; color:var(--text);
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-border); border-radius:14px; box-shadow:var(--glass-shadow);
}
.tc-review-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:12px 12px 10px 14px; border-bottom:1px solid var(--glass-border); }
.tc-review-title{ display:flex; flex-direction:column; gap:2px; min-width:0; font-size:13px; }
.tc-review-title b{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tc-review-nav{ display:flex; gap:6px; flex:none; }
.tc-review-nav button{ background:var(--w60); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:5px 9px; font:inherit; font-size:12px; cursor:pointer; }
.tc-review-nav button:hover:not(:disabled){ border-color:var(--accent); }
.tc-review-nav button:disabled{ opacity:0.4; cursor:default; }
.tc-review-x{ font-size:16px !important; line-height:1; }
.tc-review-body{ flex:1; overflow-y:auto; padding:12px 14px; display:flex; flex-direction:column; gap:10px; }
.tc-review-body .tc-draft{ border:none; background:none; padding:0; }
.tc-review-body .tc-desc{ font-size:11.5px; width:100%; }
.tc-review-foot{ padding:8px 14px; border-top:1px solid var(--glass-border); font-size:11.5px; }
.tc-review-list{ display:flex; flex-wrap:wrap; gap:5px; }
.tc-review-list button{ color:#fff; font-weight:700; font-size:12px; border-radius:7px; padding:2px 8px; border:2px solid transparent; cursor:pointer; opacity:0.75; }
.tc-review-list button.cur{ border-color:var(--text); opacity:1; }
.map-wrap:has(.tc-review[style*="flex"]) .map-top-actions{ right:428px; }
/* Map type switch (Hybrid / Satellite / Streets) steps aside while the review panel is open, so it stays clickable (Eduardo 2026-10-19). */
body:has(.tc-review[style*="flex"]) .basemap-toggle{ right:428px; display:flex; }
@media (max-width: 760px){
  .tc-review{ top:auto; left:8px; right:8px; bottom:8px; width:auto; max-height:55vh; }
  .map-wrap:has(.tc-review[style*="flex"]) .map-top-actions{ right:14px; }
  body:has(.tc-review[style*="flex"]) .basemap-toggle{ right:14px; bottom:calc(55vh + 16px); opacity:1; pointer-events:auto; }
}
.tc-map-label{ display:inline-block; color:#fff; font-weight:700; font-size:12px; border-radius:9px; padding:0 6px; border:1px solid rgba(255,255,255,0.8); white-space:nowrap; }
.tc-map-label.pending{ color:#3b0a2a; }   /* dark text on the light pink (in review) or light green (approved) line colour */
.tc-map-label.cur{ font-size:14px; padding:1px 8px; border:2px solid #fff; box-shadow:0 0 0 2px rgba(0,0,0,0.45); }
/* Ticket Caller uses the app's glass look (same tokens as the map overlays). */
#tcOverlay{ background:rgba(4,10,20,0.38); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.tc-modal,
.tc-edit-modal{
  background:var(--glass-bg-strong, var(--glass-bg)); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
}
.tc-modal{ max-width:1040px; }
.tc-modal .email-log-header{ border-bottom-color:var(--glass-border); }
.tc-head{ display:flex; align-items:center; gap:8px; }
.tc-back{ background:none; border:1px solid var(--border); color:var(--text); border-radius:7px; padding:2px 8px; cursor:pointer; font-size:14px; }
.tc-muted{ color:var(--text-muted); font-size:12.5px; }
.tc-error{ color:#ff8f93; font-size:12.5px; }
.tc-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:6px 0 12px; }
.tc-list{ display:flex; flex-direction:column; gap:8px; }
.tc-group-h{ font-weight:700; font-size:13.5px; margin:10px 2px 0; display:flex; align-items:baseline; gap:8px; }
.tc-group-h:first-child{ margin-top:0; }
.tc-row{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1.2fr) auto; gap:12px; align-items:center; text-align:left;
  background:var(--w40); border:1px solid var(--glass-border); border-radius:10px; padding:12px 14px; color:var(--text); font:inherit; cursor:pointer; }
.tc-row:hover{ border-color:var(--accent); }
.tc-row-main{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.tc-chip{ font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:999px; border:1px solid var(--border); white-space:nowrap; }
.tc-chip-review,.tc-chip-draft{ color:#f0a066; border-color:rgba(224,105,31,0.5); }
.tc-chip-approved{ color:#5dd39a; border-color:rgba(48,164,108,0.5); }
.tc-chip-called{ color:#8fb2ff; border-color:color-mix(in srgb, var(--accent) 50%, transparent); }
.tc-chip-rejected{ color:var(--text-muted); }
.tc-form{ display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; }
.tc-field{ display:flex; flex-direction:column; gap:5px; font-size:12.5px; color:var(--text-muted); border:none; padding:0; margin:0; }
.tc-field input,.tc-field .dp-btn,.tc-field select,.tc-field textarea{ background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:8px 10px; font:inherit; font-size:13px; }
.tc-field input:focus,.tc-field .dp-btn:focus-visible,.tc-field select:focus,.tc-field textarea:focus{ outline:2px solid var(--accent); outline-offset:0; }
.tc-wide{ grid-column:1 / -1; }
.tc-radio{ flex-direction:row; flex-wrap:wrap; gap:8px 20px; }
.tc-radio legend{ margin-bottom:6px; }
.tc-radio label{ display:flex; align-items:center; gap:6px; color:var(--text); }
.tc-form-actions{ display:flex; justify-content:flex-end; align-items:center; gap:10px; }
.tc-form-actions .tc-error{ margin-right:auto; }
/* New project: PDF drop zone, draft-now check, folded schedule */
.tc-drop{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:110px; padding:18px;
  border:2px dashed var(--border); border-radius:12px; cursor:pointer; text-align:center; color:var(--text); transition:border-color .15s, background .15s; }
.tc-drop b{ font-size:14px; word-break:break-all; }
.tc-drop:hover, .tc-drop-over{ border-color:var(--accent); background:color-mix(in srgb, var(--accent) 8%, transparent); }
.tc-drop-has{ border-style:solid; border-color:var(--turquoise, #22b8cf); }
.tc-drop:focus-within{ outline:2px solid var(--accent); outline-offset:2px; }
.tc-check{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text); cursor:pointer; }
.tc-check input{ width:16px; height:16px; }
.tc-more{ border:1px solid var(--border); border-radius:10px; padding:8px 12px; }
.tc-more summary{ cursor:pointer; font-size:13px; color:var(--text); padding:2px 0; }
.tc-more-body{ margin-top:10px; }
.tc-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:6px; }
.tc-card{ background:var(--w40); border:1px solid var(--glass-border); border-radius:10px; padding:12px 14px; font-size:13px; }
.tc-card h4{ margin:0 0 8px; font-size:13px; }
.tc-kv{ display:flex; justify-content:space-between; gap:12px; padding:3px 0; }
.tc-kv span{ color:var(--text-muted); }
.tc-kv b{ text-align:right; font-weight:600; }
.tc-notes{ margin-top:8px; padding:8px; border-radius:8px; background:var(--w60); white-space:pre-wrap; }
.tc-card-actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.tc-file-btn{ display:inline-flex; align-items:center; }
.tc-report{ margin:6px 0 0; padding-left:18px; }
.tc-report li{ margin:3px 0; }
.tc-report-warn{ color:#f0a066; } .tc-report-bad{ color:#ff8f93; } .tc-report-ok{ color:#5dd39a; }
.tc-agent-bar:empty{ display:none; }
.tc-agent-bar{ margin-top:12px; padding-top:10px; border-top:1px solid var(--w100, rgba(255,255,255,.12)); display:flex; flex-direction:column; gap:8px; }
.tc-agent-bar h4{ margin:0; }
.tc-agent-row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.tc-agent-row input, .tc-agent-row select{ flex:1 1 200px; min-width:0; padding:7px 9px; border-radius:8px; border:1px solid var(--w100, rgba(255,255,255,.18)); background:var(--w60, rgba(255,255,255,.05)); color:inherit; font:inherit; font-size:12.5px; }
.tc-agent-row select.tc-source-select{ flex:0 0 auto; }
.tc-agent-last .confirm-btn{ padding:3px 8px; font-size:11.5px; }
/* Cloud caller Yes card: one block per ticket the cloud machine filled */
.tc-call-card:empty{ display:none; }
.tc-call-card{ display:flex; flex-direction:column; gap:8px; }
.tc-call-card h4{ margin:4px 0 0; }
.tc-confirm{ background:var(--w40); border:1px solid var(--glass-border); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.tc-confirm-waiting{ border-color:rgba(224,105,31,0.6); box-shadow:0 0 0 1px rgba(224,105,31,0.25) inset; }
.tc-confirm-sent{ border-color:rgba(48,164,108,0.5); }
.tc-confirm-failed, .tc-confirm-expired{ border-color:rgba(229,72,77,0.5); }
.tc-confirm-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tc-confirm-when{ margin-left:auto; font-size:11.5px; }
.tc-confirm-number{ font-variant-numeric:tabular-nums; }
.tc-confirm-summary{ margin:0; white-space:pre-wrap; font-size:13px; }
.tc-confirm-locate{ margin:8px 0; padding:8px 10px; border-left:3px solid var(--accent, #4caf50); background:rgba(127,127,127,0.08); border-radius:6px; }
.tc-confirm-locate p{ margin:2px 0 0; font-size:13px; line-height:1.45; }
.tc-chip-waiting, .tc-chip-filling{ color:#f0a066; border-color:rgba(224,105,31,0.5); }
.tc-chip-yes, .tc-chip-sending{ color:#8fb2ff; border-color:color-mix(in srgb, var(--accent) 50%, transparent); }
.tc-chip-sent{ color:#5dd39a; border-color:rgba(48,164,108,0.5); }
.tc-chip-stop, .tc-chip-failed, .tc-chip-expired{ color:#ff8f93; border-color:rgba(229,72,77,0.5); }
.tc-chip-skipped{ color:var(--text-muted); }
.tc-confirm-filled summary{ cursor:pointer; font-size:12.5px; color:var(--text-muted); }
.tc-confirm-filled .tc-kv{ font-size:12.5px; border-bottom:1px solid var(--w60); }
.tc-confirm-filled .tc-kv b{ max-width:62%; word-break:break-word; }
.tc-live{ margin:0; display:flex; flex-direction:column; gap:4px; }
.tc-live img{ width:100%; max-width:640px; border-radius:8px; border:1px solid var(--glass-border); display:block; background:var(--w40); }
.tc-live figcaption{ font-size:11.5px; }
.tc-shots{ display:flex; gap:8px; flex-wrap:wrap; }
.tc-shot{ padding:0; border:0; background:none; cursor:zoom-in; width:160px; max-width:46%; }
.tc-shots img{ width:100%; border-radius:6px; border:1px solid var(--glass-border); display:block; }
.tc-lightbox{ position:fixed; inset:0; z-index:10000; background:rgba(0,0,0,.82); display:flex; flex-direction:column; }
.tc-lightbox-bar{ display:flex; align-items:center; gap:8px; padding:10px 14px; color:#fff; background:rgba(0,0,0,.5); }
.tc-lightbox-bar b{ flex:1; }
.tc-lightbox-bar .confirm-btn{ padding:6px 12px; font-size:14px; }
.tc-lightbox-body{ flex:1; min-height:0; overflow:auto; display:flex; align-items:flex-start; justify-content:center; padding:10px; }
.tc-lightbox-body img{ max-width:100%; height:auto; border-radius:6px; }
.tc-confirm .tc-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.tc-confirm .tc-actions .confirm-btn-ok{ font-size:13px; padding:8px 14px; }
.tc-confirm .tc-actions .confirm-btn{ font-size:13px; padding:8px 14px; }
.tc-fix-box{ display:flex; flex-direction:column; gap:8px; }
.tc-fix-box textarea{ resize:vertical; min-height:52px; }
.tc-confirm-fix{ margin:0; font-size:13px; color:#f5c26b; }
.tc-chip-fix{ color:#f5c26b; border-color:rgba(245,194,107,0.5); }
:root[data-theme="light"] .tc-confirm-fix, :root[data-theme="light"] .tc-chip-fix{ color:#8a5a00; }
:root[data-theme="light"] .tc-chip-waiting, :root[data-theme="light"] .tc-chip-filling{ color:#A5520F; }
:root[data-theme="light"] .tc-chip-sent{ color:#1E7D50; }
:root[data-theme="light"] .tc-chip-yes, :root[data-theme="light"] .tc-chip-sending{ color:#2A56C6; }
:root[data-theme="light"] .tc-chip-stop, :root[data-theme="light"] .tc-chip-failed, :root[data-theme="light"] .tc-chip-expired{ color:#B3261E; }
.tc-drafts{ display:flex; flex-direction:column; gap:10px; }
.tc-draft{ background:var(--w40); border:1px solid var(--glass-border); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.tc-draft[data-status="rejected"]{ opacity:0.6; }
.tc-draft-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tc-seq{ color:#fff; font-weight:700; border-radius:7px; padding:1px 8px; }
.tc-dft{ margin-left:auto; font-size:12.5px; font-variant-numeric:tabular-nums; }
.tc-desc{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; line-height:1.45; margin:0; padding:8px 10px; border-radius:7px; border:1px dashed var(--border); background:var(--w60); width:max-content; max-width:100%; overflow-x:auto; white-space:pre; color:var(--text); }
.tc-desc-meta{ font-size:11.5px; }
.tc-flag{ font-size:12.5px; color:#f0a066; }
.tc-staff-note{ font-size:12.5px; color:var(--text-muted); }
/* Cloud drafter Fix box + lessons (2026-10-27) */
.tc-fix-line{ font-size:12.5px; padding:6px 8px; border-radius:8px; background:var(--w60, rgba(255,255,255,.05)); overflow-wrap:anywhere; }
.tc-fix-line.is-open{ color:#f5c26b; } .tc-fix-line.is-done{ color:#5dd39a; } .tc-fix-line.is-bad{ color:#ff8f93; }
.tc-lessons{ display:flex; flex-direction:column; gap:6px; margin:10px 0 4px; }
.tc-lessons h4{ margin:0; }
.tc-lesson{ display:flex; flex-direction:column; gap:6px; padding:8px; border-radius:10px; border:1px solid var(--w100, rgba(255,255,255,.18)); }
.tc-lesson-text{ width:100%; box-sizing:border-box; padding:7px 9px; border-radius:8px; border:1px solid var(--w100, rgba(255,255,255,.18)); background:var(--w60, rgba(255,255,255,.05)); color:inherit; font:inherit; font-size:13px; resize:vertical; }
.tc-lesson-foot{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:space-between; font-size:12px; }
.tc-lesson-btns{ display:flex; gap:6px; }
.tc-actions{ display:flex; gap:6px; flex-wrap:wrap; }
.tc-actions .confirm-btn{ padding:6px 11px; font-size:12px; }
.tc-approve,
.tc-review .tc-approve,
.tc-scope .tc-approve{ background:rgba(48,164,108,0.22); border-color:rgba(48,164,108,0.75); color:#6fe0a8; }
.tc-approve:hover:not(:disabled){ background:rgba(48,164,108,0.36); }
:root[data-theme="light"] .tc-approve{ background:rgba(48,164,108,0.16); color:#1E7D50; }
.confirm-btn:disabled{ opacity:0.45; cursor:not-allowed; }
.tc-edit-modal{ max-width:560px; display:flex; flex-direction:column; gap:10px; }
/* The app's shared modal shells are dark-only; give the Ticket Caller ones a light ground in light theme. */
:root[data-theme="light"] .tc-desc,
:root[data-theme="light"] .tc-notes{ background:#F3F8FC; }
:root[data-theme="light"] .tc-flag,
:root[data-theme="light"] .tc-chip-review,
:root[data-theme="light"] .tc-chip-draft,
:root[data-theme="light"] .tc-report-warn{ color:#A5520F; }
:root[data-theme="light"] .tc-chip-approved,
:root[data-theme="light"] .tc-report-ok{ color:#1E7D50; }
:root[data-theme="light"] .tc-chip-called{ color:#2A56C6; }
:root[data-theme="light"] .tc-error,
:root[data-theme="light"] .tc-report-bad{ color:#B93238; }
@media (max-width: 760px){
  .tc-form,.tc-grid{ grid-template-columns:1fr; }
  .tc-row{ grid-template-columns:1fr; }
  .tc-row > .tc-chip{ justify-self:start; }   /* "All called · Oct 13" hugs its text on phones */
  .tc-dft{ margin-left:0; }
}

/* Generic dialog/button classes the Ticket Caller markup uses. index.html
   defines them already; mobile.html does not, so they're scoped to .tc-scope
   (added to every Ticket Caller overlay) and repeat index.html's values. */
.tc-scope.email-log-overlay,
.tc-scope.confirm-overlay{
  position:fixed; inset:0; background:rgba(4,10,20,0.72);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.tc-scope.email-log-overlay{ z-index:600; }
.tc-scope.confirm-overlay{ z-index:700; }
.tc-scope .confirm-modal{
  width:100%; max-width:380px; border:1px solid var(--glass-border);
  border-radius:14px; box-shadow:var(--glass-shadow); padding:20px;
  background:var(--glass-bg-strong, var(--glass-bg)); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
}
.tc-scope .confirm-message{ font-size:14px; line-height:1.5; color:var(--text); margin-bottom:18px; }
.tc-scope .confirm-actions{ display:flex; justify-content:flex-end; gap:10px; }
.tc-scope .confirm-btn,
.tc-review .confirm-btn{
  border-radius:8px; padding:9px 16px; font-size:13px; font-family:inherit; font-weight:600;
  cursor:pointer; border:1px solid var(--border); background:var(--w60); color:var(--text);
}
.tc-scope .confirm-btn-ok,
.tc-review .confirm-btn-ok{ border-color:var(--accent); background:color-mix(in srgb, var(--accent) 18%, transparent); }
.tc-scope .email-log-modal{
  width:100%; max-width:1280px; max-height:88vh; display:flex; flex-direction:column;
  border-radius:14px; overflow:hidden;
}
.tc-scope .email-log-header{
  display:flex; align-items:center; justify-content:space-between; padding:16px 18px;
  border-bottom:1px solid var(--glass-border); font-weight:700; font-size:15px; flex:none;
}
.tc-scope .email-log-close{
  background:none; border:none; color:var(--text-muted); font-size:22px; line-height:1;
  cursor:pointer; padding:2px 6px; border-radius:6px;
}
.tc-scope .email-log-body{ overflow-y:auto; padding:12px 18px 18px; }
.tc-scope .empty-note{ color:var(--text-muted); font-size:13px; padding:12px 0; }
@media (max-width: 760px){
  /* mobile.html uses viewport-fit=cover: keep the window below the status
     bar (the close button sat under the clock/battery and couldn't be tapped). */
  .tc-scope.email-log-overlay,
  .tc-scope.confirm-overlay{
    padding:calc(env(safe-area-inset-top, 0px) + 10px) 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
  }
  .tc-scope .email-log-modal{ max-height:100%; height:auto; }
  .tc-scope .email-log-close{ min-width:44px; min-height:44px; font-size:26px; }
}

/* mobile.html: floating entry button + review sheet above the tab bar */
.tc-fab{
  position:absolute; left:14px; top:calc(var(--safe-top, 0px) + 70px); z-index:36;
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow); color:var(--text);
  border-radius:999px; padding:9px 14px; font:inherit; font-size:13px; font-weight:600; cursor:pointer;
}
.tc-on-mobile .tc-review{ left:8px; right:8px; width:auto; top:auto; bottom:calc(var(--safe-bottom, 0px) + 70px); max-height:52vh; z-index:40; }
.tc-on-mobile .app.tc-reviewing .bottom-sheet,
.tc-on-mobile .app.tc-reviewing .tc-fab{ display:none; }
.tc-on-mobile .tc-review-foot{ display:none; }

/* Long unbroken text (URLs, file names) must wrap instead of widening cards on phones. */
.tc-grid > *, .tc-row > *, .tc-draft, .tc-card{ min-width:0; }
.tc-notes, .tc-card, .tc-flag, .tc-staff-note, .tc-report li, .tc-row-main{ overflow-wrap:anywhere; }

/* Keep 811's 50-character lines on one row even on narrow phones. */
.tc-review-body .tc-desc{ font-size:clamp(9.5px, 2.65vw, 11.5px); }

/* Drawing a draft's line by hand (desktop) */
.tc-draw-bar{
  position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:27;
  display:flex; flex-direction:column; gap:8px; padding:10px 14px; max-width:calc(100% - 28px);
  background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-border); border-radius:14px; box-shadow:var(--glass-shadow); color:var(--text); font-size:12.5px;
}
.tc-draw-top{ display:flex; justify-content:space-between; gap:16px; }
.tc-draw-ft{ font-variant-numeric:tabular-nums; font-weight:700; }
.tc-draw-bar .tc-desc{ font-size:11px; }
.tc-draw-actions{ display:flex; justify-content:flex-end; gap:8px; }
.tc-toolbar-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.tc-form-compact{ grid-template-columns:1fr 1fr; gap:10px; }

/* ---- required fields ---- */
.tc-req{ color:#ff8f93; font-weight:700; }
:root[data-theme="light"] .tc-req{ color:#B93238; }
.tc-missing input, .tc-missing select, .tc-missing textarea{ border-color:rgba(229,72,77,0.8) !important; }

/* ---- one look for every Ticket Caller pop-up: glass, soft blurred backdrop ---- */
.tc-scope.confirm-overlay{ background:rgba(4,10,20,0.38); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.tc-scope .confirm-modal{ border-radius:16px; }
.tc-scope .confirm-message{ font-size:14px; }

/* ---- positive actions are green (Save, Submit, Approve, Review on map, Save line, OK) ---- */
.tc-scope .confirm-btn-ok,
.tc-review .confirm-btn-ok{
  background:rgba(48,164,108,0.24); border-color:rgba(48,164,108,0.8); color:#6fe0a8;
}
.tc-scope .confirm-btn-ok:hover:not(:disabled),
.tc-review .confirm-btn-ok:hover:not(:disabled){ background:rgba(48,164,108,0.38); }
:root[data-theme="light"] .tc-scope .confirm-btn-ok,
:root[data-theme="light"] .tc-review .confirm-btn-ok{ background:rgba(48,164,108,0.16); color:#1E7D50; }

/* ---- drawing toolbar polish ---- */
.tc-draw-bar{ gap:10px; padding:12px 14px; border-radius:16px; min-width:380px; }
.tc-draw-top b{ font-size:13px; }
.tc-draw-ft{ padding:1px 10px; border-radius:999px; background:var(--w60); border:1px solid var(--glass-border); }
.tc-draw-actions .confirm-btn{ padding:7px 13px; font-size:12.5px; }
@media (max-width: 760px){ .tc-draw-bar{ min-width:0; } }
.tc-form-compact > .tc-field{ min-width:0; }
.tc-field select, .tc-field input, .tc-field textarea{ width:100%; box-sizing:border-box; min-width:0; }
.tc-desc:empty{ display:none; }
.tc-scope .confirm-modal.tc-edit-modal{ max-width:560px; }

/* destructive actions */
.tc-scope .tc-danger, .tc-danger{ background:rgba(229,72,77,0.16); border-color:rgba(229,72,77,0.7); color:#ff9da0; }
.tc-scope .tc-danger:hover, .tc-danger:hover{ background:rgba(229,72,77,0.28); }
:root[data-theme="light"] .tc-danger{ color:#B93238; background:rgba(229,72,77,0.10); }

/* ---- job list summary, progress and state tags (NC / VA and Idaho) ---- */
.tc-stats{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:0 0 12px; }
.tc-stat{ display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:10px; background:var(--w40); border:1px solid var(--glass-border); }
.tc-stat b{ font-size:20px; line-height:1.1; font-variant-numeric:tabular-nums; }
.tc-stat span{ font-size:11.5px; color:var(--text-muted); }
.tc-stat-draft b{ color:#f0a066; } .tc-stat-approved b{ color:#5dd39a; } .tc-stat-called b{ color:#8fb2ff; } .tc-stat-rejected b{ color:var(--text-muted); }
.tc-row-tags{ display:flex; gap:5px; flex-wrap:wrap; margin-bottom:3px; }
.tc-tag{ font-size:11px; font-weight:700; letter-spacing:.04em; padding:1px 6px; border-radius:5px; background:var(--accent-fill, #2F6BE0); color:#fff; }
.tc-tag-plain{ background:var(--w80); color:var(--text); font-weight:600; letter-spacing:0; }
.tc-tag-warn{ background:rgba(224,160,31,0.18); color:#e8b64a; font-weight:600; letter-spacing:0; }
/* Design source (Plan PDF / IQGeo / Ociusx): neutral like tc-tag-plain, colour stays = status */
.tc-tag-source{ display:inline-block; max-width:min(100%, 320px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; text-decoration:none; }
a.tc-tag-source:hover{ text-decoration:underline; }
a.tc-tag-source:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.tc-row-progress{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.tc-bar{ display:flex; height:6px; border-radius:99px; overflow:hidden; background:var(--w80); }
.tc-bar i{ display:block; height:100%; }
.tc-bar-called{ background:#3D7EFF; } .tc-bar-approved{ background:#30A46C; } .tc-bar-draft{ background:#E0691F; } .tc-bar-rejected{ background:#7C8A99; }
.tc-row-hold{ opacity:.78; border-style:dashed; }
/* Calling now (10/23): a pulsing dot on the chip, the approved part of the bar slides while tickets are being called. */
.tc-chip-calling{ display:inline-flex; align-items:center; gap:6px; color:#8fb2ff; border-color:color-mix(in srgb, #3D7EFF 60%, transparent);
  background:color-mix(in srgb, #3D7EFF 12%, transparent); }
.tc-chip-calling::before{ content:""; width:7px; height:7px; border-radius:50%; background:#3D7EFF; animation:tcLivePulse 1.6s ease-out infinite; }
.tc-bar-live .tc-bar-approved{ background:repeating-linear-gradient(-45deg, #30A46C 0 6px, #46c287 6px 12px); background-size:17px 100%;
  animation:tcLiveSlide 1s linear infinite; }
@keyframes tcLivePulse{ 0%{ box-shadow:0 0 0 0 rgba(61,126,255,.6); } 100%{ box-shadow:0 0 0 7px rgba(61,126,255,0); } }
@keyframes tcLiveSlide{ to{ background-position:17px 0; } }
@media (prefers-reduced-motion: reduce){ .tc-chip-calling::before,.tc-bar-live .tc-bar-approved{ animation:none; } }
:root[data-theme="light"] .tc-chip-calling{ color:#2A56C6; }
.tc-hold-banner{ display:flex; flex-direction:column; gap:3px; margin:0 0 12px; padding:10px 14px; border-radius:10px; font-size:13px;
  background:rgba(224,160,31,0.12); border:1px solid rgba(224,160,31,0.45); }
.tc-hold-banner b{ color:#e8b64a; }
.tc-desc.tc-desc-free{ white-space:pre-wrap; width:auto; font-family:inherit; font-size:12.5px; line-height:1.5; }
:root[data-theme="light"] .tc-tag-warn,
:root[data-theme="light"] .tc-hold-banner b{ color:#8a5d00; }
:root[data-theme="light"] .tc-stat-draft b{ color:#b4520f; }
:root[data-theme="light"] .tc-stat-approved b{ color:#1f7a4d; }
:root[data-theme="light"] .tc-stat-called b{ color:#2A56C6; }
@media (max-width:640px){ .tc-stats{ grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* road crossings on the review map + in the draft card */
.tc-cross-label{ display:inline-block; background:#7C3AED; color:#fff; font-weight:700; font-size:11px; border-radius:8px; padding:0 6px; border:1px solid rgba(255,255,255,0.85); white-space:nowrap; }
.tc-crossings{ margin:6px 0; padding:6px 8px; border-left:3px solid #7C3AED; background:rgba(124,58,237,0.10); border-radius:6px; font-size:12px; }
.tc-crossings div{ margin-top:2px; }

/* GPS coordinates of the line (Reference Coordinates for Exactix) */
.tc-gps{ margin:6px 0; padding:6px 8px; border-left:3px solid #3D7EFF; background:color-mix(in srgb, var(--accent) 10%, transparent); border-radius:6px; font-size:12px; }
.tc-gps-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tc-gps pre{ margin:4px 0 0; max-height:110px; overflow:auto; font-size:11px; white-space:pre; }

/* project PDF download: light orange accent */
.tc-scope .tc-pdf-btn, .tc-review .tc-pdf-btn{ background:rgba(245,158,11,0.16); border-color:rgba(245,158,11,0.65); color:#fbbf5a; }
.tc-scope .tc-pdf-btn:hover:not(:disabled), .tc-review .tc-pdf-btn:hover:not(:disabled){ background:rgba(245,158,11,0.28); }
:root[data-theme="light"] .tc-scope .tc-pdf-btn, :root[data-theme="light"] .tc-review .tc-pdf-btn{ background:rgba(245,158,11,0.12); color:#B45309; }

/* Renew tickets card (renew-card.js): desktop Ticket Management side card + phone Tickets tools pop-up */
.rn-card{ display:flex; flex-direction:column; gap:8px; font-size:13px; }
.rn-list{ max-height:240px; overflow-y:auto; overflow-x:hidden; display:flex; flex-direction:column; gap:2px; border:1px solid var(--glass-border); border-radius:8px; padding:4px; }
/* two lines per ticket so it fits the narrow side card with no sideways scroll: number · date · line button, then the street */
/* one block per 811: VA blue, PA amber (state tag + left edge) */
.rn-group{ display:flex; flex-direction:column; gap:2px; border-left:3px solid var(--rn-c); border-radius:6px; padding-left:2px; }
.rn-group + .rn-group{ margin-top:6px; }
.rn-group-va{ --rn-c:#4A90E2; } .rn-group-pa{ --rn-c:#E0A030; }
.rn-group-head{ position:sticky; top:-4px; z-index:1; display:flex; align-items:center; gap:6px; padding:4px 6px; font-size:12px; font-weight:600; background:var(--surface-2, #111a2b); border-radius:4px; }
.rn-state{ padding:1px 6px; border-radius:4px; font-size:11px; font-weight:700; letter-spacing:.3px; color:#fff; background:var(--rn-c); }
.rn-group-n{ margin-left:auto; color:var(--text-muted); font-weight:500; }
.rn-row{ display:grid; grid-template-columns:16px minmax(0,1fr) auto 22px; grid-template-rows:auto auto; column-gap:8px; row-gap:0; align-items:center; padding:4px 6px; border-radius:6px; cursor:pointer; min-width:0; }
.rn-row:hover{ background:var(--w40); }
.rn-row input{ width:16px; height:16px; margin:0; flex:none; accent-color:var(--accent); grid-row:1; }
.rn-num{ font-variant-numeric:tabular-nums; font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rn-street{ grid-column:2 / -1; grid-row:2; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-muted); font-size:12px; }
.rn-exp{ font-size:12px; white-space:nowrap; color:var(--text-muted); }
.rn-pin{ width:22px; height:22px; padding:0; display:grid; place-items:center; border:0; border-radius:5px; background:none; color:var(--text-muted); cursor:pointer; }
.rn-pin:hover, .rn-pin:focus-visible{ color:var(--text); background:var(--w60); }
.rn-peek{ position:fixed; z-index:10001; width:260px; border-radius:10px; overflow:hidden; border:1px solid var(--glass-border); background:var(--surface-2, #111a2b); box-shadow:0 10px 30px rgba(0,0,0,.45); opacity:0; pointer-events:none; transition:opacity .12s; }
.rn-peek.is-on{ opacity:1; pointer-events:auto; }
.rn-peek-map{ width:260px; height:170px; }
.rn-peek-cap{ padding:5px 8px; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rn-row.is-past .rn-exp{ color:#ff8f93; }
.rn-remarks{ border:0; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; min-width:0; }
.rn-remarks legend{ font-weight:600; padding:0; margin-bottom:2px; }
.rn-opt{ display:flex; align-items:flex-start; gap:6px; cursor:pointer; line-height:1.35; }
.rn-opt input{ width:16px; height:16px; margin:1px 0 0; flex:none; accent-color:var(--accent); }
.rn-own, .rn-note-in{ width:100%; box-sizing:border-box; padding:6px 8px; border-radius:6px; border:1px solid var(--glass-border); background:var(--w40); color:inherit; font:inherit; }
.rn-go{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.rn-go .confirm-btn{ font-size:13px; padding:8px 12px; }
.rn-msg{ font-size:12px; color:var(--text-muted); flex-basis:100%; }
.rn-note{ margin:0; font-size:12px; color:var(--text-muted); }
.rn-note.is-bad{ color:#ff8f93; }
.rn-jobs{ display:flex; flex-direction:column; gap:10px; }
.rn-job{ display:flex; flex-direction:column; gap:6px; }
.rn-job-head{ display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; }
.rn-job-head .confirm-btn{ margin-left:auto; padding:4px 10px; font-size:12px; }
