/* RR v3 2026-04-13a 21:27 */
/* ═══════════════════════════════════════════════════════════════
   ROADRUNNER CDT — External Stylesheet
   Research-based design system. High contrast, glanceable.
   Fonts: Manrope (headers/nav/buttons) + Work Sans (body/data)
   All contrast ratios WCAG AA verified.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Work+Sans:wght@400;500;600&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Structure */
  --header-bg:    #1e3a5f;   /* Deep navy — trust, authority */
  --sidebar-bg:   #f4f6f8;   /* Cool light gray — recedes, content pops */
  --content-bg:   #ffffff;   /* Pure white content area */
  --page-bg:      #f0f2f5;   /* Slightly off-white page canvas */
  --card-bg:      #ffffff;

  /* Primary action — strong blue, passes contrast on white */
  --blue:         #2563eb;   /* 4.71:1 on white — WCAG AA */
  --blue-hover:   #1d4ed8;
  --blue-dim:     #eff6ff;
  --blue-text:    #1e40af;

  /* Text hierarchy — all verified against backgrounds */
  --text-1:       #111827;   /* 16.1:1 on white — AAA */
  --text-2:       #374151;   /* 10.7:1 on white — AAA */
  --text-3:       #6b7280;   /* 5.74:1 on white — AA */
  --text-inv:     #ffffff;   /* On dark header */
  --text-inv-dim: rgba(255,255,255,0.7);

  /* Semantic — stoplight system */
  --urgent:       #dc2626;   /* Red — white text 5.25:1 */
  --urgent-dim:   #fef2f2;
  --urgent-text:  #991b1b;   /* On light bg — 7.2:1 */
  --followup:     #d97706;   /* Amber — dark text only */
  --followup-dim: #fffbeb;
  --followup-text:#92400e;   /* On light bg — 6.5:1 */
  --success:      #059669;   /* Green — white text 4.54:1 */
  --success-dim:  #ecfdf5;
  --success-text: #065f46;

  /* Borders */
  --border:       #e5e7eb;
  --border-2:     #d1d5db;

  /* Fonts */
  --fh: 'Manrope', sans-serif;
  --fb: 'Work Sans', sans-serif;

  /* Radii */
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--page-bg); color: var(--text-1); font-family: var(--fb); font-size: 14px; overflow: hidden; -webkit-font-smoothing: antialiased; }

/* ── SHELL LAYOUT ── */
#shell { display: none; height: 100vh; }
#sidebar { width: 216px; min-width: 216px; background: var(--header-bg); display: flex; flex-direction: column; z-index: 20; padding: 6px; gap: 0; overflow-y: auto; }
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── SIDEBAR LOGO / HEADER ── */
.logo { padding: 0 16px; height: 56px; display: flex; align-items: center; background: var(--header-bg); gap: 10px; }
.logo img { height: 36px; width: auto; }
.logo-name { font-family: var(--fh); font-size: 16px; font-weight: 800; color: var(--text-inv); letter-spacing: 0.04em; }

/* ── SIDEBAR NAV ── */
nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-group { 
  font-family: var(--fh); font-size: 10px; font-weight: 800; 
  color: var(--text-2); letter-spacing: 0.14em; text-transform: uppercase; 
  padding: 10px 12px 8px; 
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.nav-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 14px; margin: 0; cursor: pointer; font-family: var(--fh); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--text-1); border-radius: 4px; border-left: 3px solid transparent; transition: all 0.12s; }
.nav-item:hover { background: var(--blue-dim); color: var(--blue-text); }
.nav-item.active { background: rgba(37,99,235,0.10); color: var(--blue); border-left-color: var(--blue); font-weight: 700; border-radius: 4px; }
.nav-dot { display: none; }
.nav-item::before { content: '▶'; font-size: 7px; color: var(--text-3); flex-shrink: 0; margin-right: 4px; opacity: 0.6; }
.nav-item.active::before { color: var(--blue); opacity: 1; }
.nav-item.active .nav-dot { opacity: 1; }
.nav-badge { margin-left: auto; background: var(--urgent); color: #fff; border-radius: 10px; font-family: var(--fh); font-size: 9px; font-weight: 700; padding: 2px 7px; }
.nav-badge.blue { background: var(--blue); }

/* ── SIDEBAR FOOTER ── */
.sf { padding: 6px; margin-top: auto; }
.sf-rep { font-family: var(--fb); font-size: 12px; color: var(--text-1); font-weight: 600; line-height: 1.5; }
.sf-sub { font-family: var(--fb); font-size: 11px; color: var(--text-2); margin-top: 1px; }
.sf-signout { margin-top: 6px; background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.35); border-radius: 6px; font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-1); cursor: pointer; padding: 7px 12px; transition: all 0.12s; width: 100%; }
.sf-signout:hover { background: var(--urgent); border-color: var(--urgent); color: #fff; }

/* ── TOPBAR ── */
#topbar { height: 56px; background: var(--header-bg); border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; padding: 0 20px; gap: 12px; flex-shrink: 0; z-index: 25; position: relative; }
.tb-title { font-family: var(--fh); font-size: 16px; font-weight: 700; color: var(--text-inv); letter-spacing: 0.02em; }
.tb-sub { font-size: 12px; color: var(--text-inv-dim); margin-left: 6px; font-family: var(--fb); }
.tb-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--r); padding: 7px 14px; font-family: var(--fb); font-size: 13px; color: var(--text-inv); width: 220px; outline: none; transition: all 0.12s; }
.search:focus { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.search::placeholder { color: rgba(255,255,255,0.5); }
.search-drop-item { padding: 9px 14px; cursor: pointer; font-family: var(--fh); font-size: 13px; color: var(--text-1); border-bottom: 1px solid var(--border); }
.search-drop-item:last-child { border-bottom: none; }
.search-drop-item:hover { background: var(--page-bg); color: var(--blue); }

/* ── CONTENT ── */
#content { flex: 1; overflow: hidden; background: var(--page-bg); position: relative; }
.page { visibility: hidden; position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; padding: 20px; pointer-events: none; z-index: 1; }
.page.active { visibility: visible; pointer-events: auto; }
#page-map { padding: 0; overflow: hidden; }

/* ── BUTTONS ── */
.btn { padding: 8px 18px; border-radius: var(--r); border: none; cursor: pointer; font-family: var(--fh); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.12s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-red { background: var(--urgent); color: #fff; }
.btn-red:hover { background: #b91c1c; }
.btn-navy { background: var(--header-bg); color: #fff; }
.btn-navy:hover { background: #162d4a; }
.btn-ghost { background: transparent; color: var(--text-2); border: 1.5px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-green { background: var(--success-dim); color: var(--success-text); border: 1px solid var(--success); }
.btn-green:hover { background: var(--success); color: #fff; }
.btn-amber { background: var(--followup-dim); color: var(--followup-text); border: 1px solid var(--followup); }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; padding: 13px; }

/* ── CARDS ── */
.card { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); padding: 18px; margin-bottom: 14px; }
.card-title { font-family: var(--fh); font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

/* ── KPI ROW ── */
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); padding: 14px 18px; border-top: 3px solid var(--blue); min-width: 160px; max-width: 240px; flex: 1 1 160px; }
.kpi-label { font-family: var(--fh); font-size: 10px; font-weight: 600; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.kpi-val { font-family: var(--fh); font-size: 28px; font-weight: 800; color: var(--text-1); line-height: 1; }
.kpi-sub { font-family: var(--fb); font-size: 12px; color: var(--text-3); margin-top: 6px; }
.kpi-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 10px; }
.kpi-fill { height: 100%; border-radius: 2px; background: var(--blue); }
.kpi-fill.g { background: var(--success); }

/* ── GRIDS ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 900px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.fr2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fr3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── CALL SHEET ITEMS ── */
.cs-item { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); border-left: 5px solid var(--border-2); padding: 12px 14px; cursor: pointer; transition: border-color 0.12s; }
.cs-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.cs-item.urgent  { border-left-color: var(--urgent); }
.cs-item.reorder { border-left-color: var(--blue); }
.cs-item.followup{ border-left-color: var(--followup); }
.cs-item.today   { border-left-color: var(--text-3); }
.cs-company { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 3px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cs-why { font-family: var(--fb); font-size: 13px; font-weight: 500; margin-bottom: 4px; line-height: 1.4; }
.cs-item.urgent   .cs-why { color: var(--urgent-text); }
.cs-item.reorder  .cs-why { color: var(--blue-text); }
.cs-item.followup .cs-why { color: var(--followup-text); }
.cs-item.today    .cs-why { color: var(--text-3); }
.cs-contact { font-family: var(--fb); font-size: 12px; color: var(--text-3); }
.cs-actions { display: flex; gap: 8px; margin-top: 10px; }
.cs-call { flex: 1; padding: 7px 0; border-radius: var(--r); border: none; font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; color: #fff; text-align: center; }
.cs-item.urgent   .cs-call { background: var(--urgent); }
.cs-item.reorder  .cs-call { background: var(--blue); }
.cs-item.followup .cs-call { background: var(--header-bg); }
.cs-item.today    .cs-call { background: var(--text-3); }
.cs-done { padding: 7px 16px; border-radius: var(--r); background: var(--page-bg); border: 1px solid var(--border-2); font-family: var(--fh); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); cursor: pointer; }

/* ── FILTER CHIPS — STOPLIGHT ── */
.chip-row, .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { font-family: var(--fh); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 16px; border-radius: 20px; border: none; cursor: pointer; transition: all 0.12s; }
.chip-all      { background: var(--header-bg); color: #fff; }
.chip-urgent   { background: var(--urgent);    color: #fff; }
.chip-followup { background: var(--followup);  color: var(--text-1); }
.chip-reorder  { background: var(--success);   color: #fff; }
.chip-today    { background: var(--page-bg);   color: var(--text-2); border: 1px solid var(--border-2); }
.chip.inactive { opacity: 0.5; filter: grayscale(0.4); }
.chip { background: var(--page-bg); color: var(--text-2); border: 1px solid var(--border-2); }
.chip.on { background: var(--header-bg); color: #fff; border-color: var(--header-bg); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.chip:hover:not(.on) { background: var(--border); color: var(--text-1); }

/* ── BADGES ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-family: var(--fh); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.b-red    { background: var(--urgent-dim);   color: var(--urgent-text); }
.b-blue   { background: var(--blue-dim);     color: var(--blue-text); }
.b-amber  { background: var(--followup-dim); color: var(--followup-text); }
.b-green  { background: var(--success-dim);  color: var(--success-text); }
.b-slate  { background: var(--page-bg);      color: var(--text-3); border: 1px solid var(--border); }
.b-navy   { background: var(--header-bg);    color: #fff; }

/* ── TABLES ── */
.tbl-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; overflow-y: hidden; margin-bottom: 14px; -webkit-overflow-scrolling: touch; width: 100%; display: block; }
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl th { font-family: var(--fh); font-size: 10px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.1em; padding: 11px 16px; text-align: left; background: var(--header-bg); white-space: nowrap;  white-space: nowrap; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-family: var(--fb); font-size: 13px; color: var(--text-2);  white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--blue-dim); }
.tbl-row-link { cursor: pointer; }

/* ── FORM INPUTS ── */
.fi { width: 100%; background: var(--page-bg); border: 1px solid var(--border-2); border-radius: 6px; padding: 9px 12px; font-family: var(--fb); font-size: 13px; color: var(--text-1); outline: none; transition: all 0.12s; box-sizing: border-box; height: 38px; }
.fi:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-dim); }
.fi:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.fi::placeholder { color: var(--text-3); }
.fi-label { font-family: var(--fh); font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 5px; }
select.fi { cursor: pointer; }
textarea.fi { resize: vertical; min-height: 80px; }

/* ── MODAL ── */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 500; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-bg.open { display: flex; z-index: 500; }
.modal { background: var(--card-bg); border-radius: 12px; width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,0.25); border: 1px solid var(--border); }
.modal-lg { max-width: 720px; }
.mh { padding: 0; background: var(--header-bg); border-radius: 12px 12px 0 0; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.mt { font-family: var(--fh); font-size: 14px; font-weight: 800; color: #fff; letter-spacing: 0.06em; text-transform: uppercase; padding: 14px 20px; }
.mx { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 20px; padding: 14px 18px; line-height: 1; transition: color 0.12s; }
.mx:hover { color: #fff; }
.mb { flex: 1; overflow-y: auto; padding: 22px 22px 16px; }
.mf { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--page-bg); border-radius: 0 0 12px 12px; flex-shrink: 0; }

/* ── WIZARD ── */
.wiz-steps { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.wiz-step { flex: 1; padding: 10px 8px; text-align: center; font-family: var(--fh); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); cursor: default; position: relative; }
.wiz-step.done { color: var(--success); }
.wiz-step.active { color: var(--blue); }
.wiz-step.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--blue); }
.wiz-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--page-bg); border: 2px solid var(--border-2); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; color: var(--text-3); }
.wiz-step.active .wiz-step-num { background: var(--blue); border-color: var(--blue); color: #fff; }
.wiz-step.done .wiz-step-num { background: var(--success); border-color: var(--success); color: #fff; }

/* ── DROP ZONE ── */
.dropzone { border: 2px dashed var(--border-2); border-radius: var(--r-lg); padding: 32px 20px; text-align: center; cursor: pointer; transition: all 0.2s; background: var(--page-bg); }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-dim); }
.dropzone-icon { font-size: 32px; margin-bottom: 10px; }
.dropzone-label { font-family: var(--fh); font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.dropzone-sub { font-family: var(--fb); font-size: 12px; color: var(--text-3); }
.dropzone input[type=file] { display: none; }

/* ── INVENTORY / LOCATION CARDS ── */
.loc-card { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); padding: 16px; margin-bottom: 10px; cursor: pointer; transition: all 0.15s; border-left: 5px solid var(--border); }
.loc-card:hover { border-color: var(--blue); }
.loc-card.alert { border-left-color: var(--urgent); }
.loc-card.warn  { border-left-color: var(--followup); }
.loc-card.ok    { border-left-color: var(--success); }
.loc-card.ghost { border-left-color: var(--text-3); }
.pbar { height: 5px; background: var(--page-bg); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.pfill { height: 100%; border-radius: 3px; background: var(--success); transition: width 0.3s; }
.pfill.warn  { background: var(--followup); }
.pfill.alert { background: var(--urgent); }

/* ── DRIVING MODE ── */
#drive-mode { display: none; position: fixed; inset: 0; background: var(--page-bg); z-index: 200; flex-direction: column; }
#drive-mode.open { display: flex; }
.dm-header { background: var(--header-bg); padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.dm-label { font-family: var(--fh); font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.7); letter-spacing: 0.14em; text-transform: uppercase; }
.dm-sub { font-family: var(--fb); font-size: 13px; color: rgba(255,255,255,0.9); margin-top: 2px; }
.dm-exit { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--r); padding: 7px 16px; font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.9); cursor: pointer; transition: all 0.12s; }
.dm-exit:hover { border-color: var(--urgent); color: #fca5a5; }
.dm-body { flex: 1; overflow-y: auto; padding: 16px; }
.dm-footer { background: var(--header-bg); padding: 10px 14px 16px; display: flex; gap: 8px; flex-shrink: 0; }
.dm-tab { flex: 1; padding: 12px 8px; border-radius: var(--r); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.08); font-family: var(--fh); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); cursor: pointer; text-align: center; transition: all 0.15s; }
.dm-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.dm-tab:hover { border-color: rgba(255,255,255,0.4); color: #fff; }

/* Route stops */
.route-stop { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); padding: 16px 18px; margin-bottom: 10px; display: flex; gap: 14px; align-items: center; transition: border-color 0.15s; }
.route-stop:hover { border-color: var(--blue); }
.route-stop.done { opacity: 0.4; }
.stop-num { font-family: var(--fh); font-size: 22px; font-weight: 800; color: var(--urgent); width: 32px; text-align: center; flex-shrink: 0; }
.stop-handle { color: var(--border-2); cursor: grab; font-size: 16px; flex-shrink: 0; padding: 4px; }
.stop-handle:hover { color: var(--text-3); }
.stop-body { flex: 1; }
.stop-name { font-family: var(--fh); font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.stop-addr { font-family: var(--fb); font-size: 12px; color: var(--text-3); }
.stop-why { font-family: var(--fb); font-size: 11px; color: var(--urgent-text); margin-top: 4px; }
.stop-btns { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.stop-nav { background: var(--header-bg); color: #fff; border: none; border-radius: var(--r); padding: 9px 16px; font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.stop-nav:hover { background: var(--blue); }
.stop-arrived { background: var(--success-dim); color: var(--success-text); border: 1px solid var(--success); border-radius: var(--r); padding: 8px 12px; font-family: var(--fh); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }

/* Call queue */
.call-screen { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; }
.call-card { width: 100%; max-width: 400px; text-align: center; }
.call-company { font-family: var(--fh); font-size: 26px; font-weight: 800; margin-bottom: 14px; color: var(--text-1); }
.call-why-lbl { font-family: var(--fh); font-size: 9px; font-weight: 700; color: var(--text-3); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.call-why { font-family: var(--fb); font-size: 15px; color: var(--text-2); line-height: 1.5; margin-bottom: 28px; padding: 14px 16px; background: var(--page-bg); border-radius: var(--r); border-left: 4px solid var(--urgent); text-align: left; }
.call-dial { width: 100%; padding: 20px; background: var(--urgent); border: none; border-radius: var(--r-lg); font-family: var(--fh); font-size: 18px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; cursor: pointer; margin-bottom: 12px; }
.call-dial:hover { background: #b91c1c; }
.call-skips { display: flex; gap: 8px; }
.call-skip { flex: 1; padding: 12px; background: var(--card-bg); border: 1px solid var(--border-2); border-radius: var(--r); font-family: var(--fh); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); cursor: pointer; }
.call-skip:hover { border-color: var(--blue); color: var(--blue); }
.call-hint { font-family: var(--fb); font-size: 11px; color: var(--text-3); margin-top: 16px; }

/* Arrived briefing */
.arrived-head { background: var(--header-bg); padding: 16px 20px; flex-shrink: 0; }
.arrived-lbl { font-family: var(--fh); font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.6); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 4px; }
.arrived-co { font-family: var(--fh); font-size: 22px; font-weight: 800; color: #fff; }
.brief-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.brief-sec { margin-bottom: 18px; }
.brief-lbl { font-family: var(--fh); font-size: 9px; font-weight: 700; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.brief-val { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text-1); }
.brief-sub { font-family: var(--fb); font-size: 13px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.arrived-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; background: var(--page-bg); flex-shrink: 0; }
.start-btn { flex: 1; padding: 14px; background: var(--blue); border: none; border-radius: var(--r); font-family: var(--fh); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; cursor: pointer; }
.start-btn:hover { background: var(--blue-hover); }
.skip-btn { padding: 14px 20px; background: var(--card-bg); border: 1px solid var(--border-2); border-radius: var(--r); font-family: var(--fh); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); cursor: pointer; }

/* Resolve */
.resolve-screen { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; }
.resolve-card { width: 100%; max-width: 380px; }
.resolve-title { font-family: var(--fh); font-size: 21px; font-weight: 800; text-align: center; margin-bottom: 4px; color: var(--text-1); }
.resolve-sub { font-family: var(--fb); font-size: 13px; color: var(--text-3); text-align: center; margin-bottom: 24px; line-height: 1.5; }
.resolve-btn { width: 100%; padding: 16px; border-radius: var(--r-lg); border: none; font-family: var(--fh); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; margin-bottom: 9px; text-align: left; display: flex; align-items: center; gap: 14px; transition: all 0.15s; }
.rb-reached  { background: var(--success-dim);  color: var(--success-text); border: 1px solid var(--success); }
.rb-reached:hover  { background: var(--success);  color: #fff; }
.rb-noanswer { background: var(--page-bg);       color: var(--text-2); border: 1px solid var(--border-2); }
.rb-noanswer:hover { border-color: var(--blue); color: var(--blue); }
.rb-later    { background: var(--followup-dim);  color: var(--followup-text); border: 1px solid var(--followup); }
.rb-later:hover    { background: var(--followup); color: #fff; }
.rb-icon { font-size: 20px; }

/* Voice */
.voice-sec { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }
.voice-btn { background: var(--page-bg); border: 2px solid var(--border-2); border-radius: 50%; width: 60px; height: 60px; font-size: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; transition: all 0.15s; }
.voice-btn:hover { border-color: var(--blue); }
.voice-btn.rec { border-color: var(--urgent); background: var(--urgent-dim); animation: pulse 1s infinite; }
.voice-lbl { font-family: var(--fh); font-size: 9px; font-weight: 700; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; }
.voice-txt { background: var(--page-bg); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; font-family: var(--fb); font-size: 13px; color: var(--text-2); margin-top: 8px; text-align: left; min-height: 36px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Quick note */
.qn-screen { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; }
.qn-card { width: 100%; max-width: 380px; }
.qn-title { font-family: var(--fh); font-size: 20px; font-weight: 800; color: var(--text-1); margin-bottom: 4px; text-align: center; }
.qn-sub { font-family: var(--fb); font-size: 13px; color: var(--text-3); text-align: center; margin-bottom: 24px; }
.qn-voice { width: 100%; padding: 20px; background: var(--page-bg); border: 2px solid var(--border-2); border-radius: var(--r-lg); font-family: var(--fh); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-2); cursor: pointer; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.15s; }
.qn-voice:hover { border-color: var(--blue); color: var(--blue); }
.qn-voice.rec { border-color: var(--urgent); background: var(--urgent-dim); color: var(--urgent); animation: pulse 1s infinite; }
.qn-or { text-align: center; font-family: var(--fh); font-size: 10px; font-weight: 600; color: var(--text-3); margin: 6px 0; letter-spacing: 0.1em; text-transform: uppercase; }
.qn-text { width: 100%; background: var(--page-bg); border: 2px solid var(--border-2); border-radius: var(--r-lg); padding: 16px; font-family: var(--fb); font-size: 15px; color: var(--text-1); outline: none; resize: none; min-height: 80px; transition: border-color 0.12s; }
.qn-text:focus { border-color: var(--blue); background: #fff; }
.qn-save { width: 100%; padding: 14px; background: var(--blue); border: none; border-radius: var(--r-lg); font-family: var(--fh); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; cursor: pointer; margin-top: 10px; }
.qn-save:hover { background: var(--blue-hover); }
.qn-gps { font-family: var(--fb); font-size: 11px; color: var(--text-3); text-align: center; margin-top: 8px; }

/* Inbox */
.inbox-item { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); border-left: 5px solid var(--followup); padding: 14px 16px; margin-bottom: 10px; }
.inbox-note { font-family: var(--fb); font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 5px; }
.inbox-meta { font-family: var(--fh); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px; text-transform: uppercase; }
.inbox-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inbox-action { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border-2); background: var(--page-bg); font-family: var(--fh); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; color: var(--text-3); transition: all 0.12s; }
.inbox-action:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

/* Triggers */
.trig-item { background: var(--card-bg); border-radius: var(--r-lg); border: 1px solid var(--border); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.trig-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.trig-on  { background: var(--success); }
.trig-off { background: var(--border-2); }
.trig-body { flex: 1; }
.trig-name   { font-family: var(--fh); font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.trig-action { font-family: var(--fb); font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.trig-thresh { font-family: var(--fh); font-size: 10px; font-weight: 600; color: var(--followup-text); background: var(--followup-dim); padding: 2px 8px; border-radius: 4px; display: inline-block; }
.trig-right  { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }

/* Import */
.import-template { background: var(--page-bg); border: 1px solid var(--border-2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; font-family: var(--fb); font-size: 12px; color: var(--text-2); line-height: 1.8; }
.import-cols { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.import-col { padding: 3px 10px; background: var(--header-bg); color: #fff; border-radius: 4px; font-family: var(--fh); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.import-col.optional { background: var(--page-bg); color: var(--text-3); border: 1px solid var(--border-2); }
.mapper-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.mapper-field { flex: 1; font-family: var(--fh); font-weight: 600; color: var(--text-1); }
.mapper-arrow { color: var(--text-3); font-size: 16px; }
.mapper-select { flex: 1; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 10px; }
.preview-table th { background: var(--header-bg); color: #fff; padding: 7px 10px; text-align: left; font-family: var(--fh); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.preview-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); font-family: var(--fb); color: var(--text-2); }
.preview-table tr:last-child td { border-bottom: none; }

/* Mobile bottom bar */
#mobile-bar { display: none; background: var(--header-bg); border-top: 1px solid rgba(255,255,255,0.1); padding: 8px 0 10px; flex-shrink: 0; }
.mob-tabs { display: flex; justify-content: space-around; align-items: center; }
.mob-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; min-width: 52px; padding: 2px 0; }
.mob-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.mob-label { font-family: var(--fh); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.mob-tab.active .mob-label { color: #fff; }
.mob-icon-lines { display: flex; flex-direction: column; gap: 3px; width: 20px; }
.mob-icon-lines div { height: 2.5px; background: rgba(255,255,255,0.5); border-radius: 2px; width: 20px; }
.mob-tab.active .mob-icon-lines div { background: #fff; }
.mob-icon-circle { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; position: relative; }
.mob-icon-circle::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.mob-tab.active .mob-icon-circle { border-color: #fff; }
.mob-tab.active .mob-icon-circle::after { background: #fff; }
.mob-icon-box { width: 18px; height: 18px; border-radius: 3px; border: 2.5px solid rgba(255,255,255,0.5); }
.mob-tab.active .mob-icon-box { border-color: #fff; }
.mob-icon-ops { width: 18px; height: 18px; border-radius: 3px; border: 2.5px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; }
.mob-icon-ops::after { content: ''; width: 8px; height: 8px; border-radius: 1px; border: 2px solid rgba(255,255,255,0.5); }
.mob-tab.active .mob-icon-ops { border-color: #fff; }
.mob-tab.active .mob-icon-ops::after { border-color: #fff; }
.mob-icon-dots { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.mob-icon-dots div { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.mob-tab.active .mob-icon-dots div { background: #fff; }
#drive-float { position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%); background: var(--urgent); color: #fff; border: none; border-radius: var(--r-lg); padding: 12px 32px; font-family: var(--fh); font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; z-index: 30; display: none; }

/* Login screen */
#login-screen { display: none; position: fixed; inset: 0; background: var(--page-bg); align-items: center; justify-content: center; z-index: 500; }
.login-box { background: var(--card-bg); border-radius: var(--r-xl); border: 1px solid var(--border); padding: 36px 32px; width: 100%; max-width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-name { font-family: var(--fh); font-size: 28px; font-weight: 800; color: var(--text-1); letter-spacing: 0.04em; }
.logo-tag { font-family: var(--fb); font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; margin-top: 2px; }
.login-logo-tag { font-family: var(--fb); font-size: 12px; color: var(--text-3); margin-top: 4px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.auth-tab { flex: 1; padding: 10px; text-align: center; font-family: var(--fh); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); cursor: pointer; position: relative; transition: color 0.12s; }
.auth-tab.active { color: var(--blue); }
.auth-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--blue); }

/* Misc */
.back { color: var(--text-3); cursor: pointer; font-family: var(--fh); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 4px; margin-bottom: 16px; }
.back:hover { color: var(--blue); }
.empty { text-align: center; padding: 40px; color: var(--text-3); font-family: var(--fb); font-size: 14px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.mono  { font-family: var(--fh); }
.muted { color: var(--text-3); }
.dim   { color: var(--text-3); }
.bold  { font-weight: 600; }
.red   { color: var(--urgent); }
.green { color: var(--success-text); }
.gold  { color: var(--followup-text); }
.tag   { display: inline-block; padding: 2px 8px; border-radius: 4px; font-family: var(--fh); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text-1); color: #fff; padding: 12px 18px; border-radius: var(--r); font-family: var(--fb); font-size: 13px; font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,0.2); animation: slideIn 0.2s ease; }
.toast.green  { background: var(--success); }
.toast.amber  { background: var(--followup); color: var(--text-1); }
.toast.red    { background: var(--urgent); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: var(--page-bg); } ::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--header-bg); }

/* Responsive */
@media (max-width: 768px) {
  #sidebar { display: none; }
  #mobile-bar { display: block; }
  #drive-float { display: block; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Sidebar section cards */
.nav-card { background: var(--sidebar-bg); border-radius: 8px; overflow: hidden; margin: 0 0 6px 0; padding-bottom: 2px; }
.nav-card .nav-group { background: transparent; }

/* Call sheet grid */
#cs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; max-width: 900px; }
/* Inventory grid */
#inv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; max-width: 900px; }

/* ── Content width system ─────────────────────────────────── */
.content-wide   { max-width: 1200px; }
.content-normal { max-width: 900px; }
.content-form   { max-width: 680px; }
.content-page   { width: 100%; }

/* Card grids */
.card-grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }

/* KPI row */
.kpi-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; max-width: 900px; }
.kpi-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 18px; min-width: 160px; flex: 0 0 auto; }
.kpi-card .kpi-label { font-family: var(--fh); font-size: 9px; font-weight: 700; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.kpi-card .kpi-val   { font-family: var(--fh); font-size: 26px; font-weight: 800; color: var(--text-1); line-height: 1; }
.kpi-card .kpi-sub   { font-family: var(--fb); font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Two-panel row */
.panel-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.panel-half { flex: 1 1 360px; min-width: 280px; max-width: 480px; }

#trig-list { max-width: 900px; }
#trig-list .trig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 8px; margin-bottom: 16px; }

.tb-filter-input { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--r); padding: 5px 10px; font-family: var(--fb); font-size: 12px; color: var(--text-inv); width: 130px; outline: none; transition: all 0.12s; }
.tb-filter-input:focus { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
.tb-filter-select { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--r); padding: 5px 10px; font-family: var(--fb); font-size: 12px; color: var(--text-inv); outline: none; cursor: pointer; }
.tb-filter-select option { background: var(--header-bg); color: #fff; }

.tbl td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .col-date     { width: 95px; }
.tbl .col-account  { width: 160px; }
.tbl .col-location { width: 130px; }
.tbl .col-product  { width: 62px; }
.tbl .col-qty      { width: 75px; text-align: right; }
.tbl .col-amount   { width: 80px; text-align: right; }
.tbl .col-po       { width: 65px; }
.tbl .col-actions  { width: 85px; text-align: right; }

/* Nav tooltips */
.nav-item[data-tip] { position: relative; }
.nav-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--header-bg);
  color: #fff;
  font-family: var(--fb);
  font-size: 11px;
  font-weight: 400;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Topbar action buttons */
.btn-topbar { 
  background: var(--sidebar-bg); 
  color: var(--header-bg); 
  border: 1px solid var(--border-2); 
  border-radius: 8px;
  font-family: var(--fh);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  transition: all 0.12s;
}
.btn-topbar:hover { 
  box-shadow: 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.10);
  transform: translateY(-1px);
  background: #fff;
}
.btn-topbar:active {
  box-shadow: 0 1px 2px rgba(0,0,0,0.10);
  transform: translateY(0);
}
.btn-topbar-drive {
  background: var(--sidebar-bg);
  color: var(--urgent);
  border-color: var(--urgent);
}
.btn-topbar-drive:hover {
  background: var(--urgent);
  color: #fff;
}

/* ── UNIFIED FORM FIELDS ─────────────────────────────────── */
.fg { margin-bottom: 16px; }
.fl { font-family: var(--fh); font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.fs { width: 100%; background: var(--page-bg); border: 1px solid var(--border-2); border-radius: 6px; padding: 9px 12px; padding-right: 30px; font-family: var(--fb); font-size: 13px; color: var(--text-1); outline: none; transition: all 0.12s; box-sizing: border-box; height: 38px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.fs:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.fta { width: 100%; background: var(--page-bg); border: 1px solid var(--border-2); border-radius: 6px; padding: 9px 12px; font-family: var(--fb); font-size: 13px; color: var(--text-1); outline: none; transition: all 0.12s; box-sizing: border-box; min-height: 80px; resize: vertical; line-height: 1.5; }
.fta:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-dim); }
