/* ==========================================================================
   HaulGuardPro — Steel & Signal: Command Edition
   Shared design system. Presentation only: no behaviour, no selectors used by JS.
   Loaded by every layout after its own styles; Tailwind (Play CDN) utilities
   still apply, these rules add the system on top with scoped selectors.
   ========================================================================== */
:root {
  --hg-navy: #082341;
  --hg-navy-2: #0c2d52;
  --hg-ink: #0f172a;
  --hg-action: #1d4ed8;
  --hg-action-press: #1e40af;
  --hg-signal: #3b82f6;
  --hg-tint: #dbeafe;
  --hg-tint-50: #eff6ff;
  --hg-ground: #f3f5f8;
  --hg-surface: #ffffff;
  --hg-surface-2: #f8fafc;
  --hg-surface-3: #eef2f6;
  --hg-line: #e2e8f0;
  --hg-line-strong: #cbd5e1;
  --hg-steel: #94a3b8;
  --hg-text-2: #475569;
  --hg-text-3: #64748b;
  --hg-on-navy: #e7edf5;
  --hg-on-navy-2: #a9b8cb;
  --hg-danger: #b91c1c; --hg-danger-bg: #fef2f2; --hg-danger-line: #fecaca;
  --hg-warn: #b45309;   --hg-warn-bg: #fffbeb;   --hg-warn-line: #fde68a;
  --hg-ok: #047857;     --hg-ok-bg: #ecfdf5;     --hg-ok-line: #a7f3d0;
  --hg-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hg-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --hg-r-control: 6px;
  --hg-r-panel: 8px;
  --hg-r-sheet: 12px;
  --hg-shadow-float: 0 8px 24px rgba(8, 35, 65, .12), 0 2px 6px rgba(8, 35, 65, .08);
  --hg-ease: cubic-bezier(.2, 0, 0, 1);
  --hg-safe-top: env(safe-area-inset-top, 0px);
  --hg-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Shared primitives (new markup uses these) ---------- */
.hg-display { font-family: var(--hg-display); font-weight: 600; letter-spacing: .005em; }
.hg-num { font-variant-numeric: tabular-nums; }
.hg-skip {
  position: absolute; left: 16px; top: -100px; z-index: 10000; padding: 12px 16px;
  background: #fff; color: var(--hg-ink); border-radius: var(--hg-r-control); font-weight: 600;
  box-shadow: var(--hg-shadow-float); text-decoration: none;
}
.hg-skip:focus { top: calc(16px + var(--hg-safe-top)); }

.hg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--hg-r-control); font: 600 14px/1 var(--hg-font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms var(--hg-ease), border-color 120ms var(--hg-ease), color 120ms var(--hg-ease), transform 120ms var(--hg-ease);
}
.hg-btn:active { transform: translateY(1px); }
.hg-btn-primary { background: var(--hg-action); color: #fff; }
.hg-btn-primary:hover { background: var(--hg-action-press); color: #fff; }
.hg-btn-secondary { background: #fff; color: var(--hg-ink); border-color: var(--hg-line-strong); }
.hg-btn-secondary:hover { background: var(--hg-surface-2); border-color: var(--hg-steel); }
.hg-btn-light { background: #fff; color: var(--hg-navy); }
.hg-btn-light:hover { background: var(--hg-tint); }
.hg-btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hg-btn-ghost-light:hover { background: rgba(255,255,255,.08); border-color: #fff; color: #fff; }
.hg-btn-lg { min-height: 48px; padding: 0 24px; font-size: 16px; }
.hg-btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }

.hg-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; font-size: 12px; font-weight: 600; white-space: nowrap; }
.hg-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hg-badge-danger { color: var(--hg-danger); background: var(--hg-danger-bg); border-color: var(--hg-danger-line); }
.hg-badge-warn { color: var(--hg-warn); background: var(--hg-warn-bg); border-color: var(--hg-warn-line); }
.hg-badge-ok { color: var(--hg-ok); background: var(--hg-ok-bg); border-color: var(--hg-ok-line); }
.hg-badge-info { color: var(--hg-action-press); background: var(--hg-tint-50); border-color: #bfdbfe; }
.hg-badge-neutral { color: var(--hg-text-2); background: #f1f5f9; border-color: var(--hg-line); }

.hg-panel { background: var(--hg-surface); border: 1px solid var(--hg-line); border-radius: var(--hg-r-panel); }
.hg-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hg-line); }
.hg-panel-title { font-size: 16px; font-weight: 700; color: var(--hg-ink); display: flex; align-items: center; gap: 8px; margin: 0; }
.hg-panel-sub { font-size: 13px; color: var(--hg-text-2); margin-top: 2px; }
.hg-link-more { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--hg-action-press); text-decoration: none; }
.hg-link-more:hover { text-decoration: underline; }

@keyframes hg-fade-in { from { opacity: 0; } }
@keyframes hg-rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   OWNER / TEAM APP  (body.hgp-app)  — restyles the existing Tailwind markup
   ========================================================================== */
body.hgp-app { background: var(--hg-ground); color: var(--hg-ink); font-family: var(--hg-font); -webkit-font-smoothing: antialiased; }
html.hgp-app-root { background: var(--hg-ground); }
body.hgp-app :focus-visible { outline: 2px solid var(--hg-action); outline-offset: 2px; }
body.hgp-app .hgp-brand-bg :focus-visible { outline-color: var(--hg-signal); }

/* Sidebar */
body.hgp-app aside.hgp-brand-bg { background: var(--hg-navy); border-right: 0; padding-top: var(--hg-safe-top); padding-bottom: var(--hg-safe-bottom); }
body.hgp-app .sidebar-link { min-height: 44px; padding: 0 12px; border-radius: var(--hg-r-control); color: var(--hg-on-navy); font-weight: 500; }
body.hgp-app .sidebar-link svg, body.hgp-app .sidebar-link i { color: var(--hg-on-navy-2); transition: color 120ms var(--hg-ease); }
body.hgp-app .sidebar-link:hover { background: rgba(255,255,255,.07); color: #fff; }
body.hgp-app .sidebar-link:hover svg, body.hgp-app .sidebar-link:hover i { color: #fff; }
body.hgp-app .sidebar-link.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--hg-signal); }
body.hgp-app .sidebar-link.active svg, body.hgp-app .sidebar-link.active i { color: #fff; }
body.hgp-app .hgp-upgrade-link { color: #fff !important; background: rgba(59,130,246,.16) !important; }
body.hgp-app .hgp-upgrade-link svg { color: var(--hg-signal) !important; }
body.hgp-app .hgp-nav-group { margin: 16px 12px 4px; font-size: 12px; font-weight: 600; color: var(--hg-on-navy-2); text-transform: none; letter-spacing: 0; }

/* Top bar: white on desktop, navy app bar on phones (matches the installed PWA) */
body.hgp-app header.hgp-topbar { background: var(--hg-navy); border-bottom: 0; padding-top: calc(12px + var(--hg-safe-top)); }
body.hgp-app .hgp-topbar-title { font-family: var(--hg-display); font-weight: 500; font-size: 20px; letter-spacing: .01em; color: #fff; }
@media (min-width: 1024px) {
  body.hgp-app header.hgp-topbar { background: #fff; border-bottom: 1px solid var(--hg-line); padding-top: 12px; min-height: 60px; }
  body.hgp-app .hgp-topbar-title { color: var(--hg-ink); font-size: 22px; font-weight: 600; }
  body.hgp-app header.hgp-topbar .hgp-topbar-btn { color: var(--hg-text-2) !important; }
  body.hgp-app header.hgp-topbar .hgp-topbar-btn:hover { background: var(--hg-surface-3) !important; color: var(--hg-ink) !important; }
  body.hgp-app header.hgp-topbar .hgp-team-name { color: var(--hg-ink) !important; }
  body.hgp-app header.hgp-topbar .hgp-team-name span { color: var(--hg-text-3) !important; }
}

/* Main canvas */
body.hgp-app main { color: var(--hg-ink); }
body.hgp-app main h1 { font-family: var(--hg-display); font-weight: 600; letter-spacing: .005em; color: var(--hg-ink); }
body.hgp-app main h2, body.hgp-app main h3 { color: var(--hg-ink); letter-spacing: -.003em; }

/* Cards / panels: one radius, one border colour, no resting shadow */
body.hgp-app main .bg-white.rounded-xl,
body.hgp-app main .bg-white.rounded-2xl,
body.hgp-app main .bg-white.rounded-lg.border { border-radius: var(--hg-r-panel); border-color: var(--hg-line); box-shadow: none; }
body.hgp-app main .bg-white.rounded-xl.border:hover { border-color: var(--hg-line); }
body.hgp-app main .shadow-sm, body.hgp-app main .shadow { box-shadow: none; }

/* Buttons that use the brand fill */
body.hgp-app main a.bg-brand-700, body.hgp-app main button.bg-brand-700,
body.hgp-app main a.bg-brand-600, body.hgp-app main button.bg-brand-600 { background-color: var(--hg-action); border-radius: var(--hg-r-control); }
body.hgp-app main a.bg-brand-700:hover, body.hgp-app main button.bg-brand-700:hover,
body.hgp-app main a.bg-brand-600:hover, body.hgp-app main button.bg-brand-600:hover { background-color: var(--hg-action-press); }
body.hgp-app main button, body.hgp-app main a { transition: background-color 120ms var(--hg-ease), border-color 120ms var(--hg-ease), color 120ms var(--hg-ease); }
body.hgp-app main button.rounded-xl, body.hgp-app main a.rounded-xl { border-radius: var(--hg-r-control); }

/* Form controls */
body.hgp-app main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not([type="color"]),
body.hgp-app main select,
body.hgp-app main textarea {
  min-height: 40px; border: 1px solid var(--hg-line-strong); border-radius: var(--hg-r-control);
  background-color: #fff; color: var(--hg-ink); font-size: 15px;
  transition: border-color 120ms var(--hg-ease), box-shadow 120ms var(--hg-ease);
}
body.hgp-app main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
body.hgp-app main select:hover, body.hgp-app main textarea:hover { border-color: var(--hg-steel); }
body.hgp-app main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body.hgp-app main select:focus, body.hgp-app main textarea:focus {
  outline: none; border-color: var(--hg-action); box-shadow: 0 0 0 3px rgba(29, 78, 216, .18);
}
body.hgp-app main input[readonly], body.hgp-app main input:disabled, body.hgp-app main select:disabled { background-color: var(--hg-surface-2); color: var(--hg-text-2); }
body.hgp-app main input[type="checkbox"], body.hgp-app main input[type="radio"] { accent-color: var(--hg-action); width: 16px; height: 16px; }
body.hgp-app main input[type="file"] { font-size: 14px; color: var(--hg-text-2); }
body.hgp-app main input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border: 1px solid var(--hg-line-strong); border-radius: var(--hg-r-control);
  background: #fff; color: var(--hg-ink); font: 600 13px var(--hg-font); cursor: pointer;
}
body.hgp-app main input[type="file"]::file-selector-button:hover { background: var(--hg-surface-2); }
body.hgp-app main label { color: var(--hg-ink); }
body.hgp-app main input::placeholder, body.hgp-app main textarea::placeholder { color: #94a3b8; }

/* Tables: rules and alignment, no zebra, quiet header */
body.hgp-app main table { border-collapse: collapse; }
body.hgp-app main table thead th {
  background: var(--hg-surface-2); color: var(--hg-text-3); font-size: 12px; font-weight: 600;
  text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--hg-line);
}
body.hgp-app main table tbody tr { border-color: var(--hg-line); }
body.hgp-app main table tbody td { border-color: var(--hg-line); }
body.hgp-app main table tbody tr:hover td { background-color: var(--hg-surface-2); }
body.hgp-app main .divide-y > * + * { border-color: var(--hg-line); }
body.hgp-app main table .uppercase { text-transform: none; letter-spacing: 0; }

/* Text hierarchy: lift the lightest greys to readable contrast (slate-400 fails AA on white) */
body.hgp-app main .text-slate-400 { color: var(--hg-text-3); }
body.hgp-app main .text-slate-500 { color: var(--hg-text-2); }
body.hgp-app main .text-\[10px\] { font-size: 12px; }
body.hgp-app main .text-\[11px\] { font-size: 12px; }
body.hgp-app main .tracking-widest, body.hgp-app main .tracking-wider { letter-spacing: .02em; }

/* Pills & badges keep their colour, gain the system shape */
body.hgp-app main span.rounded-full.text-xs,
body.hgp-app main span.rounded-full.text-\[11px\] { font-weight: 600; }

/* Flash messages */
body.hgp-app .hgp-flash { border-radius: var(--hg-r-panel); animation: hg-rise 240ms var(--hg-ease); }

/* Pagination (Laravel tailwind view) */
body.hgp-app main nav[role="navigation"] span[aria-current="page"] > span { background: var(--hg-ink) !important; color: #fff !important; border-color: var(--hg-ink) !important; }
body.hgp-app main nav[role="navigation"] a, body.hgp-app main nav[role="navigation"] span > span { border-color: var(--hg-line) !important; }

/* SweetAlert2 dialogs in the system's shape */
body.hgp-app .swal2-popup, body.hgp-driver .swal2-popup { border-radius: var(--hg-r-sheet) !important; font-family: var(--hg-font) !important; padding: 24px !important; }
body.hgp-app .swal2-title, body.hgp-driver .swal2-title { font-size: 20px !important; color: var(--hg-ink) !important; }
body.hgp-app .swal2-styled.swal2-confirm, body.hgp-driver .swal2-styled.swal2-confirm { background: var(--hg-action) !important; border-radius: var(--hg-r-control) !important; font-weight: 600 !important; }
body.hgp-app .swal2-styled.swal2-cancel, body.hgp-driver .swal2-styled.swal2-cancel { background: #fff !important; color: var(--hg-ink) !important; border: 1px solid var(--hg-line-strong) !important; border-radius: var(--hg-r-control) !important; font-weight: 600 !important; }

/* Global loader: calmer, branded */
body.hgp-app #hgp-loader { background: rgba(8, 35, 65, .55); }

/* Mobile bottom tab bar (owner + team app) */
.hgp-tabbar {
  position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: var(--hg-safe-bottom); background: #fff; border-top: 1px solid var(--hg-line);
}
.hgp-tabbar a, .hgp-tabbar button {
  display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 60px; padding: 0 2px;
  border: 0; background: none; color: var(--hg-text-2); font: 600 12px/1.1 var(--hg-font); text-decoration: none; text-align: center;
}
.hgp-tabbar svg, .hgp-tabbar i { width: 22px; height: 22px; font-size: 19px; }
.hgp-tabbar [aria-current="page"] { color: var(--hg-action); }
@media (min-width: 1024px) { .hgp-tabbar { display: none; } }
@media (max-width: 1023.98px) {
  body.hgp-app.hgp-has-tabbar main { padding-bottom: calc(84px + var(--hg-safe-bottom)) !important; }
  body.hgp-app.hgp-has-tabbar > #hgp-shell > footer { padding-bottom: calc(76px + var(--hg-safe-bottom)); }
}

/* ---------- Owner dashboard (new markup) ---------- */
.hg-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.hg-page-head > div:first-child { flex: 1 1 300px; min-width: 0; }
.hg-finding { font-size: 16px; line-height: 1.5; color: var(--hg-text-2); margin: 0; }
.hg-finding b { font-weight: 700; }
.hg-finding .t-danger { color: var(--hg-danger); }
.hg-finding .t-warn { color: var(--hg-warn); }
.hg-finding .t-ok { color: var(--hg-ok); }
.hg-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.hg-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
@media (min-width: 768px) { .hg-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1280px) { .hg-stats.hg-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hg-stat {
  display: grid; gap: 2px; align-content: start; padding: 14px 16px; background: #fff; border: 1px solid var(--hg-line);
  border-radius: var(--hg-r-panel); color: var(--hg-ink); text-decoration: none; min-width: 0;
  transition: border-color 120ms var(--hg-ease), background-color 120ms var(--hg-ease);
}
.hg-stat:hover { border-color: var(--hg-line-strong); background: var(--hg-surface-2); }
.hg-stat-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hg-text-2); }
.hg-stat-value { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hg-stat-note { font-size: 12px; color: var(--hg-text-3); }
.hg-stat.is-danger .hg-stat-label, .hg-stat.is-danger .hg-stat-value { color: var(--hg-danger); }
.hg-stat.is-warn .hg-stat-label, .hg-stat.is-warn .hg-stat-value { color: var(--hg-warn); }
@media (min-width: 768px) { .hg-stat { padding: 16px 20px; } .hg-stat-value { font-size: 32px; } }

.hg-urgent { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 20px; border: 1px solid var(--hg-danger-line); background: var(--hg-danger-bg); border-radius: var(--hg-r-panel); }
.hg-pulse { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--hg-danger); animation: hg-pulse 2s var(--hg-ease) infinite; }
@keyframes hg-pulse { 0% { box-shadow: 0 0 0 0 rgba(185,28,28,.45); } 70% { box-shadow: 0 0 0 8px rgba(185,28,28,0); } 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0); } }

.hg-att-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--hg-line); }
.hg-att-row:first-child { border-top: 0; }
.hg-kind { width: 40px; height: 40px; border-radius: var(--hg-r-panel); background: var(--hg-surface-3); color: var(--hg-text-2); display: grid; place-items: center; overflow: hidden; }
.hg-kind img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.hg-att-name { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--hg-ink); }
.hg-att-meta { font-size: 13px; color: var(--hg-text-2); }
.hg-att-due { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--hg-text-2); }
.hg-att-act { grid-column: 2; margin-top: 8px; }
@media (min-width: 640px) {
  .hg-att-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .hg-att-act { grid-column: 3; margin-top: 0; }
}
.hg-empty { display: grid; justify-items: center; gap: 6px; padding: 32px 20px; text-align: center; color: var(--hg-text-2); font-size: 14px; }
.hg-empty strong { color: var(--hg-ink); font-size: 15px; }
.hg-empty .hg-empty-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--hg-ok-bg); color: var(--hg-ok); }

/* The Road Ahead (monthly expiration lanes from the existing 6-month timeline) */
.hg-road { padding: 20px; }
.hg-road-grid { display: grid; grid-template-columns: 120px repeat(var(--cols), minmax(0, 1fr)); align-items: stretch; }
.hg-road-lane { display: flex; align-items: center; gap: 8px; min-height: 52px; font-size: 13px; font-weight: 600; color: var(--hg-text-2); }
.hg-road-cell { position: relative; display: grid; place-items: center; min-height: 52px; background: var(--hg-surface-2); border-top: 2px dashed var(--hg-line-strong); }
.hg-road-cell.first-row { border-top: 0; }
.hg-road-cell.col-first { border-left: 1px solid var(--hg-line); }
.hg-road-cell.col-last { border-right: 1px solid var(--hg-line); }
.hg-road-cell.is-now { background: #fbf6ec; }
.hg-road-cell.is-overdue { background: repeating-linear-gradient(135deg, rgba(185,28,28,.06) 0 6px, rgba(185,28,28,.12) 6px 12px); }
.hg-road-month { padding: 8px 4px 0; font-size: 12px; font-weight: 600; color: var(--hg-text-3); text-align: center; }
.hg-road-month.is-overdue { color: var(--hg-danger); }
.hg-marker {
  position: relative; display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 4px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; border: 2px solid var(--hg-navy); background: #fff; color: var(--hg-navy);
}
.hg-marker::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 7px; margin-left: -1px; background: var(--hg-navy); }
.hg-marker.is-danger { background: var(--hg-danger); border-color: var(--hg-danger); color: #fff; }
.hg-marker.is-danger::after { background: var(--hg-danger); }
.hg-marker.is-warn { background: var(--hg-warn); border-color: var(--hg-warn); color: #fff; }
.hg-marker.is-warn::after { background: var(--hg-warn); }
.hg-road-zero { color: var(--hg-line-strong); font-size: 13px; }
.hg-road-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--hg-text-2); }
.hg-road-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 767.98px) {
  .hg-road { padding: 16px 12px; overflow-x: auto; }
  .hg-road-grid { grid-template-columns: 92px repeat(var(--cols), minmax(46px, 1fr)); min-width: 420px; }
  .hg-road-lane { font-size: 12px; }
}

.hg-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--hg-surface-3); }
.hg-bar span { height: 100%; }
.hg-dist { display: grid; gap: 14px; }
.hg-dist-row { display: grid; gap: 6px; }
.hg-dist-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.hg-dist-top b { font-size: 14px; }
.hg-dist-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--hg-text-2); }
.hg-dist-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* ==========================================================================
   DRIVER PORTAL (body.hgp-driver)
   ========================================================================== */
body.hgp-driver { background: var(--hg-ground); color: var(--hg-ink); font-size: 16px; -webkit-font-smoothing: antialiased; }
body.hgp-driver :focus-visible { outline: 2px solid var(--hg-action); outline-offset: 2px; }
body.hgp-driver main h1 { font-family: var(--hg-display); font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: .005em; }
body.hgp-driver main .bg-white.rounded-xl, body.hgp-driver main .bg-white.rounded-2xl { border-radius: var(--hg-r-sheet); border-color: var(--hg-line); box-shadow: none; }
body.hgp-driver main .text-slate-400 { color: var(--hg-text-3); }
body.hgp-driver main .text-slate-500 { color: var(--hg-text-2); }
body.hgp-driver main .text-xs { font-size: 13px; }
body.hgp-driver main .text-\[10px\], body.hgp-driver main .text-\[11px\] { font-size: 12px; }
body.hgp-driver main button.bg-brand-700, body.hgp-driver main a.bg-brand-700,
body.hgp-driver main button.bg-emerald-600, body.hgp-driver main button.bg-brand-600 { min-height: 52px; font-size: 17px; border-radius: var(--hg-r-panel); }
body.hgp-driver main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
body.hgp-driver main select, body.hgp-driver main textarea {
  min-height: 48px; font-size: 16px; border: 1px solid var(--hg-line-strong); border-radius: var(--hg-r-control); background: #fff;
}
body.hgp-driver main input:focus, body.hgp-driver main select:focus, body.hgp-driver main textarea:focus { outline: none; border-color: var(--hg-action); box-shadow: 0 0 0 3px rgba(29,78,216,.18); }
body.hgp-driver main input[type="file"] { min-height: 48px; font-size: 15px; }
body.hgp-driver main input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 10px 14px; border: 0; border-radius: var(--hg-r-control); background: var(--hg-navy); color: #fff; font: 600 14px var(--hg-font);
}
.hgp-d-head { background: var(--hg-navy); color: #fff; padding-top: var(--hg-safe-top); }
.hgp-d-tabs { padding-bottom: var(--hg-safe-bottom); }
.hgp-d-tabs a { min-height: 60px; display: grid; justify-items: center; align-content: center; gap: 4px; font-size: 12px; font-weight: 600; }
.hgp-d-tabs a i { font-size: 19px; }
body.hgp-driver main { padding-bottom: calc(96px + var(--hg-safe-bottom)) !important; }

/* ==========================================================================
   TEAM PORTAL LAYOUT (body.hgp-team)
   ========================================================================== */
body.hgp-team { background: var(--hg-ground); }
body.hgp-team header.hgp-team-head { background: var(--hg-navy); border: 0; color: #fff; padding-top: calc(12px + var(--hg-safe-top)); }
body.hgp-team main h1 { font-family: var(--hg-display); font-weight: 600; }
body.hgp-team main .bg-white.rounded-xl, body.hgp-team main .bg-white.rounded-2xl { border-radius: var(--hg-r-panel); border-color: var(--hg-line); box-shadow: none; }
body.hgp-team main table thead th { background: var(--hg-surface-2); color: var(--hg-text-3); font-size: 12px; text-transform: none; letter-spacing: 0; }
body.hgp-team main .text-slate-400 { color: var(--hg-text-3); }
@media (min-width: 1024px) { body.hgp-app .sidebar-link { min-height: 36px; } body.hgp-app .hgp-nav-group { margin-top: 12px; } }
@media (max-width: 639.98px) {
  .hg-actions { overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .hg-actions::-webkit-scrollbar { display: none; }
  .hg-actions .hg-btn { flex: none; min-height: 44px; }
}

/* ==========================================================================
   MARKETING — explainer video section (home)
   ========================================================================== */
.hg-video-sec { background: #f3f5f8; }
.hg-video-grid { display: grid; gap: 28px; grid-template-areas: "copy" "frame" "points"; }
.hg-video-copy { grid-area: copy; }
.hg-video-frame { grid-area: frame; }
.hg-video-points { grid-area: points; margin: 0; display: grid; gap: 18px; }
.hg-video-lead { margin-top: 8px; font-size: 18px; line-height: 1.55; max-width: 56ch; }
.hg-video-points div { display: grid; gap: 2px; }
.hg-video-points dt { font-weight: 700; font-size: 16px; color: var(--hg-ink); }
.hg-video-points dd { margin: 0; font-size: 16px; color: var(--hg-text-2); }
@media (min-width: 640px) and (max-width: 1023.98px) { .hg-video-points { grid-template-columns: 1fr 1fr; gap: 20px 32px; } }
@media (min-width: 1024px) {
  .hg-video-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "copy frame" "points frame"; gap: 24px 56px; align-items: start; }
  .hg-video-frame { align-self: center; }
}
.hg-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--hg-r-sheet); overflow: hidden; background: var(--hg-navy); isolation: isolate; }
.hg-video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); transform-origin: 72% 0%; transition: transform 600ms var(--hg-ease); }
.hg-video-frame:hover .hg-video-poster { transform: scale(1.54); }
.hg-video-scrim { position: absolute; inset: 0; background: rgba(8, 35, 65, .5); }
.hg-video-play { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px; border: 0; background: transparent; color: #fff; font: 600 17px var(--hg-font); cursor: pointer; }
.hg-video-sec .hg-video-play span { color: #fff !important; font-weight: 600 !important; }
.hg-video-ring { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform 180ms var(--hg-ease), background-color 180ms var(--hg-ease); }
.hg-video-sec .hg-video-play .hg-video-ring { color: var(--hg-navy) !important; }
.hg-video-ring svg { width: 34px; height: 34px; margin-left: 5px; }
.hg-video-play:hover .hg-video-ring { transform: scale(1.06); background: var(--hg-tint); }
.hg-video-play:focus-visible { outline: none; }
.hg-video-play:focus-visible .hg-video-ring { outline: 3px solid var(--hg-signal); outline-offset: 4px; }
.hg-video-meta { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 18px; pointer-events: none; }
.hg-video-sec .hg-video-meta span { color: #dbe5f1 !important; font-size: 14px; }
.hg-video-sec .hg-video-meta .hg-video-soon { color: #fff !important; font-weight: 700 !important; background: rgba(8,35,65,.7); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 2px 10px; }
.hg-video-pending { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; background: var(--hg-navy); animation: hg-fade-in 240ms var(--hg-ease); }
.hg-video-pending[hidden] { display: none; }
.hg-video-sec .hg-video-pending-title { font-family: var(--hg-display) !important; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600 !important; color: #fff !important; }
.hg-video-sec .hg-video-pending-text { max-width: 44ch; color: #c9d5e4 !important; font-size: 16px; }
.hg-video-pending-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.hg-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; z-index: 4; }
@media (max-width: 520px) {
  .hg-video-ring { width: 64px; height: 64px; } .hg-video-ring svg { width: 26px; height: 26px; }
  .hg-video-meta > span:first-child { display: none; }
  .hg-video-sec .hg-video-pending-text { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .hg-video-poster, .hg-video-frame:hover .hg-video-poster { transform: scale(1.5); } }

/* Home hero: the headline's second clause becomes a quieter sub-line (same text, same h1) */
.hero .hero-title span { display: block; margin-top: 14px; font-family: var(--hg-display) !important; font-weight: 500 !important; font-size: .56em; line-height: 1.2; color: #93c5fd !important; letter-spacing: .005em; }
.hero .hero-eyebrow { background: transparent; border-color: rgba(255,255,255,.35); border-radius: 999px; }
.hero .hero-eyebrow, .hero .hero-eyebrow i { color: #dbe5f1 !important; }
@media (max-width: 900px) {
  .hero > picture + div { background: linear-gradient(180deg, rgba(8,35,65,.94) 0%, rgba(8,35,65,.86) 55%, rgba(8,35,65,.6) 100%) !important; }
}
.hero > picture + div { background-color: transparent; }

/* Pages that render their own <h1>: the top-bar title becomes a quiet context label, so the title isn't shown twice */
body.hgp-app:has(main h1) .hgp-topbar-title { font-family: var(--hg-font); font-size: 15px; font-weight: 600; letter-spacing: 0; }
@media (min-width: 1024px) { body.hgp-app:has(main h1) .hgp-topbar-title { color: var(--hg-text-2); } }
body.hgp-app main h1.text-2xl, body.hgp-app main h1.text-xl { font-size: 26px; line-height: 1.2; }
@media (max-width: 639.98px) { body.hgp-app .hgp-team-name { display: none; } }
