:root {
  color-scheme: dark;
  font-family: Inter, sans-serif;
  --bg: #101214;
  --panel: #181c20;
  --panel-soft: #20262b;
  --line: #343c43;
  --text: #f4f7f8;
  --muted: #9ba6ae;
  --lime: #2f8df7;
  --status-good: #b7ff2a;
  --orange: #ff7a18;
  --red: #ff5a5f;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(420px, 100%); border: 1px solid var(--line); background: var(--panel); padding: 32px; }
.login-transition { position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; background: var(--bg); }
.login-transition-content { width: min(620px, calc(100% - 36px)); display: grid; gap: 18px; padding: 26px; border: 1px solid var(--line); background: var(--panel); }
.startup-header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.startup-header .brand-mark, .startup-header .brand-mark-image { width: 48px; height: 48px; font-size: 24px; }
.startup-header h2 { margin: 0; font-size: 20px; }
.startup-header span { display: block; margin-top: 4px; color: var(--lime); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.startup-header strong { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--orange); color: var(--orange); font-size: 16px; }
.startup-checks { display: grid; gap: 6px; }
.startup-check { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid transparent; color: var(--text); font-size: 12px; }
.startup-check i { position: relative; width: 9px; height: 9px; border-top: 2px solid var(--orange); border-right: 2px solid var(--orange); transform: rotate(45deg); animation: startup-arrow .8s ease-in-out infinite alternate; }
.startup-check small { color: var(--muted); font-size: 10px; }
.startup-check.ready { border-color: rgba(47, 141, 247, .28); background: rgba(47, 141, 247, .06); }
.startup-check.ready i { border: 0; width: 9px; height: 5px; border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: rotate(-45deg); animation: none; }
.startup-check.ready small { color: var(--lime); }
.startup-check.problem { border-color: rgba(255, 90, 95, .35); background: rgba(255, 90, 95, .04); }
.startup-check.problem i { width: 10px; height: 10px; border: 0; animation: none; transform: none; }
.startup-check.problem i::before, .startup-check.problem i::after { content: ""; position: absolute; width: 11px; height: 2px; background: var(--red); transform: rotate(45deg); }
.startup-check.problem i::after { transform: rotate(-45deg); }
.startup-check.problem small { color: var(--red); }
.startup-progress { height: 3px; overflow: hidden; background: var(--line); }
.startup-progress i { display: block; width: 0; height: 100%; background: var(--lime); transition: width .25s linear; }
#startup-message { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
.startup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@keyframes startup-arrow { from { transform: translateX(-2px) rotate(45deg); opacity: .45; } to { transform: translateX(2px) rotate(45deg); opacity: 1; } }
.welcome-recap { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.welcome-recap-panel { width: min(720px, 100%); display: grid; justify-items: center; text-align: center; }
.welcome-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; color: var(--lime); font-weight: 800; }
.welcome-brand span, .welcome-brand img { width: 38px; height: 38px; display: grid; place-items: center; border: 0; font-size: 19px; object-fit: contain; }
.welcome-brand .welcome-logo { width: min(300px, 84vw); height: auto; }
.welcome-brand small { font-size: 11px; }
.welcome-recap h2 { margin: 6px 0 10px; font-size: 30px; }
.welcome-quote { max-width: 600px; min-height: 48px; margin: 0; color: #cbd5e1; font-size: 14px; line-height: 1.6; }
.welcome-stats { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 26px 0; }
.welcome-stats div { display: grid; gap: 5px; padding: 16px 10px; border: 1px solid var(--line); background: var(--panel-soft); }
.welcome-stats strong { color: var(--lime); font-size: 25px; }
.welcome-stats span { color: var(--muted); font-size: 11px; }
.welcome-recap .primary-button { width: min(360px, 100%); }
.welcome-signoff { margin-top: 18px; color: var(--muted); }
.brand-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.brand-lockup.compact { margin-bottom: 36px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--lime); color: var(--lime); font-weight: 800; font-size: 22px; }
.brand-logo { width: min(360px, 100%); max-width: 100%; height: auto; object-fit: contain; }
.topbar-logo { width: min(190px, 24vw); }
.topbar-brand { border: 1px solid transparent; background: transparent; padding: 5px; line-height: 0; }
.topbar-brand:hover, .topbar-brand:focus-visible { border-color: var(--lime); background: rgba(47, 141, 247, .08); outline: none; }
.topbar-title { min-width: 150px; }
.brand-mark-image { width: 44px; height: 44px; object-fit: contain; border: 0; background: transparent; }
.brand-lockup h1 { margin: 0; font-size: 21px; }
.brand-lockup p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.brand-product { display: block; margin-top: 4px; color: var(--lime); font-size: 11px; font-weight: 700; line-height: 1.35; }

.login-form, .form-grid { display: grid; gap: 14px; }
.login-support-link { justify-self: end; margin-top: -7px; border: 0; background: transparent; color: var(--orange); padding: 0; font-size: 11px; font-weight: 700; }
.login-support-link:hover { color: var(--lime); }
.login-agreement { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; text-align: center; }
.login-agreement button { border: 0; background: transparent; color: var(--lime); padding: 0; font-size: inherit; font-weight: 700; }
.login-agreement button:hover { color: var(--orange); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.checkbox-label { display: flex; align-items: center; align-self: end; gap: 9px; min-height: 40px; color: var(--text); }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--lime); }
.preload-mode-control { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 12px; border: 1px solid var(--orange); background: rgba(255, 122, 24, .06); color: var(--text); }
.preload-mode-control input { width: 19px; height: 19px; accent-color: var(--orange); }
.preload-mode-control span { display: grid; gap: 2px; }
.preload-mode-control strong { color: var(--orange); font-size: 13px; }
.preload-mode-control small { color: var(--muted); font-size: 11px; }
.job-form-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.job-form-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 10px 7px; font-size: 11px; font-weight: 700; }
.job-form-tab:hover { color: var(--text); }
.job-form-tab.active { border-bottom-color: var(--lime); color: var(--lime); background: rgba(47, 141, 247, .08); }
.job-tab-panel { display: none; min-height: 320px; }
.job-tab-panel.active { display: block; }
.job-hidden-fields { display: none; }
#job-form.preload-mode .job-form-tab[data-job-tab="times"] { display: none; }
#job-form.preload-mode .job-tab-panel label:not([data-preload-essential]) { display: none; }
#job-form.preload-mode .job-tab-panel[data-job-tab-panel="job"] .checkbox-label { display: none; }
#job-form textarea[name="notes"] { min-height: 230px; max-height: 46vh; overflow-y: auto; }
#job-form .dialog-actions { position: sticky; bottom: -24px; z-index: 2; margin: 20px -24px -24px; padding: 15px 24px 24px; border-top: 1px solid var(--line); background: var(--panel); }
.address-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.address-field-heading button { border: 0; background: transparent; color: var(--lime); padding: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.address-field-heading button:hover, .address-field-heading button:focus-visible { color: var(--orange); outline: none; }
.address-field-heading button:disabled { color: var(--muted); cursor: wait; }
.address-input-shell { position: relative; display: block; }
.location-suggestion-menu { position: absolute; z-index: 20; top: calc(100% + 5px); left: 0; right: 0; display: grid; overflow: hidden; border: 1px solid var(--line); background: #111518; box-shadow: 0 14px 28px rgba(0, 0, 0, .38); }
.location-suggestion-menu button { width: 100%; border: 0; border-bottom: 1px solid rgba(52, 60, 67, .72); background: transparent; color: var(--text); padding: 10px 12px; text-align: left; font-size: 12px; line-height: 1.35; }
.location-suggestion-menu button:last-child { border-bottom: 0; }
.location-suggestion-menu button:hover,
.location-suggestion-menu button:focus-visible { background: rgba(47, 141, 247, .1); color: var(--lime); outline: none; }
.address-verification-status { color: var(--muted); font-size: 10px; font-weight: 600; }
.address-verification-status.verified { color: var(--status-good); }
.address-verification-status.verified::before { content: "✓"; margin-right: 5px; }
.address-verification-status.error { color: var(--red); }
label:has(.address-verification-status.verified) input { border-color: var(--status-good); }
.address-verification-result { display: grid; gap: 7px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel-soft); padding: 14px; }
.address-verification-result span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.address-verification-result strong { color: var(--text); font-size: 14px; line-height: 1.45; }
.address-verification-result a { justify-self: start; color: var(--lime); font-size: 11px; font-weight: 700; text-decoration: none; }
.address-verification-result a:hover, .address-verification-result a:focus-visible { color: var(--orange); outline: none; }
.plate-lookup-control { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 0 4px; }
.plate-lookup-control span { color: var(--muted); font-size: 11px; }
.plate-lookup-control span.success { color: var(--lime); }
.plate-lookup-control span.error { color: var(--red); }
.plate-api-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.plate-api-settings .backup-status { grid-column: 1 / -1; margin: 0; }
.google-maps-api-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.google-maps-api-settings button { justify-self: start; }
.google-maps-api-settings .backup-status { grid-column: 1 / -1; margin: 0; }
[data-pricing-field].hidden { display: none; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #111518; color: var(--text); padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); }
textarea { resize: vertical; }
.form-error { min-height: 16px; margin: 0; color: var(--red); font-size: 12px; }

.primary-button, .secondary-button { border: 1px solid var(--lime); padding: 11px 16px; font-weight: 700; }
.primary-button { background: var(--lime); color: #101214; }
.secondary-button { background: transparent; color: var(--text); border-color: var(--line); }
.text-button { border: 0; background: transparent; color: var(--lime); padding: 0; text-align: left; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 28px; }
.danger-button { border: 1px solid var(--red); background: transparent; color: var(--red); padding: 11px 16px; font-weight: 700; }
.danger-button:hover { background: rgba(255, 90, 95, .1); }
.danger-text { color: var(--red); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: 88px minmax(0, calc(100vh - 88px)); transition: grid-template-columns .2s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 86px minmax(0, 1fr); }
.app-header { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(230px, auto); align-items: center; gap: 18px; padding: 10px 24px 10px 18px; border-bottom: 1px solid var(--line); background: rgba(12, 15, 17, .98); box-shadow: 0 12px 34px rgba(0, 0, 0, .25); }
.app-brand-area { display: flex; align-items: center; min-width: 0; }
.app-header-center { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 30px; }
.app-header-actions { display: flex; align-items: center; justify-content: end; gap: 10px; min-width: 0; }
.header-search-field { width: 170px; height: 36px; display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: stretch; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #111518; color: var(--muted); padding: 0; transition: border-color .15s ease; }
.line-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-search-field .line-icon { width: 100%; height: 100%; border-left: 1px solid var(--line); color: var(--text); padding: 9px; transition: color .15s ease, border-color .15s ease; }
.header-search-field input { width: 100%; height: 100%; border: 0; background: transparent; padding: 7px 14px; opacity: 1; }
.header-search-field:hover,
.header-search-field:focus-within { border-color: var(--lime); }
.header-search-field:hover .line-icon,
.header-search-field:focus-within .line-icon { border-left-color: var(--lime); color: var(--lime); }
.header-message-button { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); padding: 0; }
.header-message-button:hover, .header-message-button:focus-visible { color: var(--lime); outline: none; }
.header-nav-button { min-width: 62px; display: grid; justify-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted); padding: 2px 4px; font-size: 10px; font-weight: 700; letter-spacing: 0; line-height: 1.1; }
.header-nav-button .line-icon { width: 21px; height: 21px; }
.header-nav-button:hover, .header-nav-button:focus-visible { color: var(--lime); outline: none; }
.header-nav-button.active { color: var(--lime); }
.header-profile-button { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 152px; border: 0; background: transparent; color: var(--text); padding: 4px 0; text-align: left; }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(47, 141, 247, .45); border-radius: 50%; background: rgba(47, 141, 247, .1); color: var(--lime); }
.profile-avatar .line-icon { width: 20px; height: 20px; }
.profile-copy { min-width: 0; display: grid; gap: 2px; }
.header-profile-button strong { font-size: 13px; line-height: 1.1; }
.header-profile-button #profile-role { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.header-profile-button:hover, .header-profile-button:focus-visible { border-color: var(--orange); color: var(--orange); outline: none; }
.sidebar { grid-column: 1; grid-row: 2; position: sticky; top: 88px; height: calc(100vh - 88px); display: flex; flex-direction: column; padding: 20px 14px 24px; border-right: 1px solid var(--line); background: rgba(12, 15, 17, .98); overflow: hidden; }
.app-shell > section { grid-row: 2; grid-column: 2; min-width: 0; }
.sidebar-section-label { margin: 0 4px 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; color: var(--muted); padding: 8px 4px; text-align: left; }
.nav-button:hover, .nav-button:focus-visible { color: var(--lime); outline: none; }
.nav-button.active { color: var(--lime); }
.nav-button span { color: inherit; }
.nav-icon { display: none; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-button > span:not(.nav-icon):not(.nav-label) { min-width: 18px; text-align: right; font-size: 11px; }
.nav-button.review-nav,
.nav-button.review-nav.active { color: var(--red); }
.nav-button.review-nav:hover, .nav-button.review-nav:focus-visible { color: var(--red); }
.nav-button.review-nav span { background: transparent; }
.nav-button.accounts-nav,
.nav-button.driver-hub-nav { margin-top: 8px; }
.nav-button.accounts-nav.active,
.nav-button.driver-hub-nav.active { color: var(--lime); }
.user-block { margin-top: auto; display: grid; gap: 5px; padding-top: 18px; border-top: 1px solid var(--line); }
.collapse-link { width: fit-content; margin-bottom: 12px; border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 11px; font-weight: 800; text-align: left; text-transform: uppercase; }
.collapse-link:hover, .collapse-link:focus-visible { color: var(--lime); outline: none; }
.user-actions { display: flex; align-items: center; gap: 16px; }
.notification-badge { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; display: grid; place-items: center; border: 2px solid #13171a; border-radius: 50%; background: var(--red); color: white; font-size: 9px; }
.sidebar-collapsed .sidebar { padding-inline: 10px; }
.sidebar-collapsed .nav-list { gap: 7px; }
.sidebar-collapsed .nav-button { justify-content: center; padding: 8px 2px; text-align: center; }
.sidebar-collapsed .nav-button > span:not(.nav-label) { display: none; }
.sidebar-collapsed .nav-label { white-space: normal; font-size: 10px; line-height: 1.1; }
.sidebar-collapsed .accounts-nav,
.sidebar-collapsed .driver-hub-nav { margin-top: 4px; }
.sidebar-collapsed .user-block { justify-items: center; padding-top: 12px; }
.sidebar-collapsed .collapse-link { width: 100%; font-size: 0; text-align: center; }
.sidebar-collapsed .collapse-link::before { content: ">>"; font-size: 14px; }
.sidebar-collapsed .user-actions { display: none; }

.break-overlay { position: fixed; inset: 0; z-index: 2900; display: grid; place-items: center; padding: 24px; background: rgba(7, 9, 10, .94); backdrop-filter: blur(5px); }
.break-content { width: min(560px, 100%); display: grid; justify-items: center; text-align: center; }
.break-icon { width: 112px; height: 112px; display: grid; place-items: center; margin-bottom: 24px; border: 2px solid var(--orange); color: var(--orange); background: rgba(255, 122, 24, .06); }
.break-icon svg { width: 62px; height: 62px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.break-content h2 { margin: 8px 0 10px; font-size: 30px; }
.break-content p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.break-content .primary-button { min-width: 220px; }
.read-only-banner { position: fixed; inset: 14px 18px auto 248px; z-index: 2850; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px; border: 1px solid var(--orange); background: rgba(18, 21, 23, .97); box-shadow: 0 12px 30px rgba(0, 0, 0, .38); }
.read-only-banner div { display: grid; gap: 3px; }
.read-only-banner strong { color: var(--orange); }
.read-only-banner span { color: var(--muted); font-size: 11px; }
.read-only-banner .primary-button { flex: 0 0 auto; border-color: var(--orange); background: transparent; color: var(--orange); }
.read-only-banner .primary-button:hover { background: rgba(255, 122, 24, .1); }
.driver-message-toasts { position: fixed; z-index: 2800; top: 20px; right: 20px; width: min(360px, calc(100% - 40px)); display: grid; gap: 9px; pointer-events: none; }
.driver-message-toast { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--orange); background: rgba(24, 28, 32, .98); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); pointer-events: auto; }
.driver-message-toast strong { color: var(--orange); }
.driver-message-toast span { color: var(--text); font-size: 12px; line-height: 1.45; }
.driver-message-toast-actions { display: flex; justify-content: end; gap: 8px; }
.driver-message-toast-actions button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 6px 9px; font-size: 10px; font-weight: 700; }
.driver-message-toast-actions .toast-open { border-color: var(--orange); color: var(--orange); }
.security-settings-link { border-color: rgba(255, 122, 24, .5); }
.security-settings-link span { color: var(--orange); }
body.read-only-active .primary-button:not(#unlock-read-only-button):not(#confirm-unlock-read-only):not(#continue-to-dispatch),
body.read-only-active .danger-button,
body.read-only-active .presence-message-button,
body.read-only-active .presence-release-button,
body.read-only-active .presence-logout-button,
body.read-only-active #edit-account-button,
body.read-only-active #edit-selected-job,
body.read-only-active #save-assignment,
body.read-only-active #choose-backup-folder,
body.read-only-active #logout-backup-button { opacity: .45; }

.workspace { min-width: 0; height: calc(100vh - 88px); overflow: hidden; display: grid; grid-template-rows: auto minmax(280px, 1fr) auto; }
#jobs-workspace { grid-template-rows: minmax(280px, 1fr) auto; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 26px 30px 20px; border-bottom: 1px solid var(--line); }
.topbar h2, .dialog-heading h2 { margin: 3px 0 0; font-size: 27px; }
.eyebrow { margin: 0; color: var(--lime); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: end; gap: 10px; }
.search-field { min-width: 290px; }
.sort-field { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; min-width: 0; color: var(--muted); }
.sort-trigger { border: 0; background: transparent; color: inherit; padding: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.sort-field:hover .sort-trigger,
.sort-field:focus-within .sort-trigger,
.sort-field.open .sort-trigger { color: var(--lime); outline: none; }
.sort-field select { position: absolute; top: calc(100% + 7px); right: 0; z-index: 20; width: 142px; opacity: 0; pointer-events: none; border-color: var(--line); background: #111518; color: var(--text); box-shadow: 0 12px 28px rgba(0, 0, 0, .36); }
.sort-field:hover select,
.sort-field:focus-within select,
.sort-field.open select { opacity: 1; pointer-events: auto; }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stat-strip div { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-right: 1px solid var(--line); background: var(--panel); }
.stat-strip div:last-child { border-right: 0; }
.stat-strip span { color: var(--muted); font-size: 12px; }
.stat-strip strong { font-size: 23px; color: var(--text); }
.app-footer-status { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 22px; border-top: 1px solid var(--line); background: rgba(12, 15, 17, .98); color: var(--muted); font-size: 10px; }
.app-footer-status .system-status-lights { flex: 0 0 auto; }

.accounts-workspace { min-width: 0; height: calc(100vh - 88px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); }
.accounts-topbar { border-bottom-color: rgba(47, 141, 247, .45); }
.accounts-layout { min-height: 0; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(430px, .9fr); overflow: hidden; }
.account-list-panel { min-width: 0; min-height: 0; overflow: auto; padding: 20px 22px; }
.account-list { display: grid; gap: 8px; }
.account-row { width: 100%; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 14px; text-align: left; }
.account-row:hover, .account-row.selected { border-color: var(--lime); background: var(--panel-soft); }
.account-id { color: var(--orange); font-size: 16px; font-weight: 800; }
.account-main { min-width: 0; display: grid; gap: 4px; }
.account-main strong, .account-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-main small { color: var(--muted); }
.account-billing { display: grid; justify-items: end; gap: 4px; }
.account-billing strong { color: var(--lime); font-size: 11px; text-transform: uppercase; }
.account-billing small { color: var(--muted); font-size: 10px; }
.account-detail { min-height: 0; overflow: auto; border-left: 1px solid var(--line); background: #14181b; padding: 26px; }
.account-detail-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.account-detail-header h3 { margin: 0; font-size: 23px; }
.account-detail-header p { margin: 5px 0 0; color: var(--orange); font-weight: 700; }
.account-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.account-detail-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.job-account-match { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid var(--orange); background: rgba(255, 122, 24, .07); }
.job-account-match strong { color: var(--orange); }
.job-account-match span { color: var(--muted); font-size: 11px; }
.account-form-status { min-height: 20px; padding: 7px 0; }
.account-form-status.saving { color: var(--orange); }
.account-form-status.success { color: var(--lime); }
.account-rates-editor { display: grid; gap: 10px; border: 1px solid var(--line); background: #14181b; padding: 14px; }
.account-rates-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.account-rates-heading h3 { margin: 3px 0 0; font-size: 16px; }
.account-rates-heading .secondary-button { padding: 8px 10px; font-size: 11px; white-space: nowrap; }
.account-rates-list { display: grid; gap: 8px; }
.account-rate-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(110px, .55fr) minmax(150px, 1fr) auto; gap: 8px; align-items: end; }
.account-rate-row label { margin: 0; }
.account-rate-row .text-button { align-self: end; padding: 9px 4px; color: var(--red); }

.billing-workspace { min-width: 0; height: calc(100vh - 88px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); }
.billing-topbar { border-bottom-color: rgba(183, 255, 42, .42); }
.billing-summary { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.billing-layout { min-height: 0; display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 18px; overflow: hidden; padding: 20px 22px; }
.billing-info-panel { align-self: start; display: grid; gap: 8px; border: 1px solid var(--line); background: var(--panel); padding: 18px; }
.billing-info-panel h3 { margin: 0; color: var(--text); font-size: 18px; }
.billing-info-panel p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.billing-ready-list { min-height: 0; display: grid; align-content: start; gap: 12px; overflow: auto; }
.billing-ready-card { border: 1px solid var(--line); background: var(--panel); }
.billing-ready-card header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.billing-ready-card header div { min-width: 0; display: grid; gap: 4px; }
.billing-ready-card header span { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.billing-ready-card h3, .billing-ready-card p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.billing-ready-card h3 { color: var(--text); font-size: 17px; }
.billing-ready-card p { color: var(--muted); font-size: 12px; }
.billing-ready-card header strong { color: var(--lime); font-size: 18px; }
.billing-ready-meta { display: grid; grid-template-columns: 120px 120px minmax(0, 1fr); gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.billing-ready-meta span:last-child { color: var(--lime); font-weight: 800; text-transform: uppercase; }
.billing-ready-meta.invoice-meta span:last-child { overflow: hidden; color: var(--muted); font-weight: 700; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.billing-ready-meta .invoice-status-ready { color: var(--lime); }
.billing-ready-meta .invoice-status-sent { color: var(--orange); }
.billing-ready-meta .invoice-status-cc { color: var(--red); }
.billing-ready-notes { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; color: var(--muted); font-size: 11px; }
.billing-ready-notes > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.billing-ready-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.billing-ready-actions .primary-button, .billing-ready-actions .secondary-button { padding: 8px 10px; font-size: 11px; }
.billing-empty { min-height: 220px; }
.billing-calculation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.billing-calculation div { display: grid; gap: 4px; border: 1px solid var(--line); background: #14181b; padding: 10px; }
.billing-calculation span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.billing-calculation strong { color: var(--lime); font-size: 15px; }
.invoice-preview-dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.invoice-preview-content { margin-top: 14px; }
.invoice-preview-paper { display: grid; gap: 18px; background: #f7f4ed; color: #1b1c1e; padding: 28px; }
.invoice-preview-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; border-bottom: 2px solid #1b1c1e; padding-bottom: 18px; }
.invoice-preview-header span, .invoice-preview-addresses span, .invoice-preview-notes span, .invoice-preview-email span { display: block; color: #5f655f; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.invoice-preview-header h3 { margin: 4px 0 0; color: #1b1c1e; font-size: 30px; letter-spacing: 0; }
.invoice-preview-header strong { border: 1px solid #1b1c1e; padding: 8px 10px; color: #1b1c1e; font-size: 11px; text-transform: uppercase; }
.invoice-preview-addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.invoice-preview-addresses div { display: grid; gap: 4px; }
.invoice-preview-addresses strong { color: #1b1c1e; font-size: 16px; }
.invoice-preview-addresses p { margin: 0; color: #4b4f4b; font-size: 12px; line-height: 1.4; }
.invoice-preview-lines { display: grid; border: 1px solid #c9c4b8; border-bottom: 0; }
.invoice-preview-lines div { display: grid; grid-template-columns: 1fr 150px; gap: 14px; border-bottom: 1px solid #c9c4b8; padding: 12px 14px; }
.invoice-preview-lines span { color: #4b4f4b; font-size: 12px; }
.invoice-preview-lines strong { justify-self: end; color: #1b1c1e; font-size: 13px; }
.invoice-preview-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #1b1c1e; color: #f7f4ed; padding: 15px 16px; }
.invoice-preview-total span { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.invoice-preview-total strong { font-size: 24px; }
.invoice-preview-notes { display: grid; gap: 7px; }
.invoice-preview-notes p { margin: 0; color: #3c403c; font-size: 12px; line-height: 1.5; }
.invoice-preview-email { display: grid; gap: 8px; }
.invoice-preview-email pre { overflow: auto; margin: 0; max-height: 220px; border: 1px solid #c9c4b8; background: #fffdf8; color: #1b1c1e; padding: 12px; font-family: Inter, sans-serif; font-size: 12px; line-height: 1.45; white-space: pre-wrap; }

.driver-hub-workspace { min-width: 0; height: calc(100vh - 88px); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--bg); }
.driver-hub-topbar { border-bottom-color: rgba(255, 122, 24, .45); }
.orange-eyebrow { color: var(--orange); }
.driver-hub-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.driver-hub-stats div { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-right: 1px solid var(--line); background: var(--panel); }
.driver-hub-stats div:last-child { border-right: 0; }
.driver-hub-stats span { color: var(--muted); font-size: 12px; }
.driver-hub-stats strong { color: var(--lime); font-size: 23px; }
.driver-hub-stats .orange-stat strong { color: var(--orange); }
.driver-hub-content { min-height: 0; display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 14px; padding: 18px 22px 20px; }
.driver-hub-roster { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.presence-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.presence-heading h3 { margin: 3px 0 0; font-size: 18px; }
.presence-heading > span { color: var(--lime); font-size: 12px; font-weight: 700; }
.shared-truck-warning { display: grid; gap: 3px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--orange); background: rgba(255, 122, 24, .08); }
.shared-truck-warning strong { color: var(--orange); font-size: 12px; }
.shared-truck-warning span { color: var(--text); font-size: 11px; }
.online-driver-list { min-height: 0; display: grid; align-content: start; gap: 7px; overflow: auto; }
.driver-presence-row { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 11px; text-align: left; }
.driver-presence-row:hover, .driver-presence-row.selected { border-color: var(--lime); background: var(--panel-soft); }
.presence-dot { width: 9px; height: 9px; background: var(--lime); border-radius: 50%; }
.presence-person { display: grid; gap: 3px; min-width: 0; }
.presence-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence-person span, .presence-time { color: var(--muted); font-size: 11px; }
.presence-side { display: grid; justify-items: end; gap: 5px; }
.presence-expand { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line); color: var(--lime); font-weight: 700; }
.driver-presence-row.selected .presence-expand { border-color: var(--lime); }
.presence-expanded { margin-top: 5px; color: var(--lime) !important; }
.presence-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.presence-message-button { border: 1px solid var(--orange); background: transparent; color: var(--orange); padding: 7px 10px; font-size: 11px; font-weight: 700; }
.presence-message-button:hover { background: rgba(255, 122, 24, .1); }
.presence-release-button { border: 1px solid var(--lime); background: transparent; color: var(--lime); padding: 7px 10px; font-size: 11px; font-weight: 700; }
.presence-logout-button { border: 1px solid var(--red); background: transparent; color: var(--red); padding: 7px 10px; font-size: 11px; font-weight: 700; }
.message-receipt { margin-top: 7px; padding-left: 8px; border-left: 2px solid var(--muted); font-size: 10px !important; font-weight: 700; }
.message-receipt.sent { color: var(--muted) !important; }
.message-receipt.delivered { border-left-color: var(--orange); color: var(--orange) !important; }
.message-receipt.acknowledged { border-left-color: var(--lime); color: var(--lime) !important; }
.message-receipt.reply { border-left-color: var(--lime); color: var(--text) !important; background: var(--panel-soft); padding: 7px 8px; }
.driver-map { min-height: 0; height: 100%; border: 1px solid var(--line); background: var(--panel); }
.leaflet-container { font-family: Inter, sans-serif; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-soft); color: var(--text); }
.leaflet-tooltip.driver-map-label { display: grid; gap: 2px; border: 1px solid var(--lime); background: #181c20; color: var(--text); box-shadow: 0 3px 12px rgba(0, 0, 0, .45); font-size: 11px; }
.leaflet-tooltip.driver-map-label::before { border-top-color: var(--lime); }
.driver-map-label span { display: block; color: var(--lime); font-size: 10px; }
.presence-empty { display: grid; place-items: center; min-height: 120px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.live-map-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #0d1114; }
.live-driver-map { width: 100%; height: 100%; min-height: 420px; }
.live-map-toolbar { position: absolute; z-index: 5; top: 12px; left: 50%; display: flex; align-items: center; gap: 16px; max-width: calc(100% - 130px); transform: translateX(-50%); border: 1px solid rgba(52, 60, 67, .78); background: rgba(12, 15, 17, .92); padding: 8px 12px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.live-map-toolbar span { display: inline-flex; align-items: center; gap: 6px; }
.live-map-toolbar button { border: 0; background: transparent; color: var(--lime); padding: 0; font-size: 10px; font-weight: 800; }
.live-map-toolbar button:hover, .live-map-toolbar button:focus-visible { color: var(--orange); outline: none; }
.live-map-traffic { color: var(--lime); }
.live-map-traffic i { width: 7px; height: 7px; border-radius: 50%; background: var(--status-good); box-shadow: 0 0 8px rgba(183, 255, 42, .72); }
.live-map-setup { position: absolute; z-index: 6; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: #0d1114; text-align: center; }
.live-map-setup strong { font-size: 16px; }
.live-map-setup span { color: var(--muted); font-size: 12px; }
.live-map-setup button { margin-top: 8px; }
.live-map-inspector { position: absolute; z-index: 6; left: 16px; bottom: 16px; width: min(310px, calc(100% - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px; border: 1px solid var(--lime); background: rgba(18, 22, 25, .96); padding: 14px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
.live-map-driver-heading { grid-column: 1 / -1; display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.live-map-driver-heading > div { min-width: 0; display: grid; gap: 3px; }
.live-map-driver-heading strong { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.live-map-driver-heading span { color: var(--muted); font-size: 10px; }
.live-map-driver-heading button { border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 22px; line-height: 1; }
.live-map-driver-heading button:hover, .live-map-driver-heading button:focus-visible { color: var(--lime); outline: none; }
.live-map-inspector label { min-width: 0; }
.live-map-inspector select { min-width: 0; padding: 9px 10px; }
.live-map-inspector .primary-button { align-self: end; padding: 10px 12px; }
.live-map-route-status { grid-column: 1 / -1; min-height: 18px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.live-map-route-status.success { color: var(--status-good); }
.live-map-route-status.error { color: var(--red); }
.live-map-point-inspector { border-color: var(--orange); }
.live-map-point-address { grid-column: 1 / -1; margin: 0; color: var(--text); font-size: 12px; line-height: 1.45; }
.live-map-point-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.live-map-point-actions button { border: 0; background: transparent; color: var(--lime); padding: 4px 0; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.live-map-point-actions button:hover, .live-map-point-actions button:focus-visible { color: var(--orange); outline: none; }
.live-map-point-actions #remove-live-map-point { margin-left: auto; color: var(--red); }
.oest-map-marker { position: absolute; display: flex; align-items: center; gap: 7px; transform: translate(-50%, -100%); border: 1px solid var(--lime); border-radius: 4px; background: rgba(18, 22, 25, .96); color: var(--text); padding: 6px 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, .45); text-align: left; white-space: nowrap; }
.oest-map-marker:hover, .oest-map-marker:focus-visible { border-color: var(--orange); outline: none; }
.oest-map-marker::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; border-right: 1px solid var(--lime); border-bottom: 1px solid var(--lime); background: #121619; transform: translateX(-50%) rotate(45deg); }
.oest-map-marker:hover::after, .oest-map-marker:focus-visible::after { border-color: var(--orange); }
.oest-map-marker i { position: relative; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.oest-map-marker span { position: relative; z-index: 1; display: grid; gap: 1px; max-width: 220px; }
.oest-map-marker strong { font-size: 11px; }
.oest-map-marker small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; }
.oest-map-marker.branch { border-color: var(--orange); }
.oest-map-marker.branch::after { border-color: var(--orange); }
.oest-map-marker.branch i { border-radius: 1px; background: var(--orange); }
.oest-map-marker.branch.main { border-color: var(--status-good); }
.oest-map-marker.branch.main::after { border-color: var(--status-good); }
.oest-map-marker.branch.main i { background: var(--status-good); }
.oest-map-marker.stale { border-color: var(--line); opacity: .72; }
.oest-map-marker.stale::after { border-color: var(--line); }
.oest-map-marker.pickup { border-color: var(--status-good); }
.oest-map-marker.pickup::after { border-color: var(--status-good); }
.oest-map-marker.pickup i { background: var(--status-good); }
.oest-map-marker.dropoff { border-color: var(--orange); }
.oest-map-marker.dropoff::after { border-color: var(--orange); }
.oest-map-marker.dropoff i { border-radius: 1px; background: var(--orange); }
.oest-map-marker.custom-point { border-color: var(--lime); }
.oest-map-marker.custom-point::after { border-color: var(--lime); }
.oest-map-marker.custom-point i { background: var(--lime); }
.oest-map-marker.custom-point.point-branch { border-color: var(--orange); }
.oest-map-marker.custom-point.point-branch::after { border-color: var(--orange); }
.oest-map-marker.custom-point.point-branch i { border-radius: 1px; background: var(--orange); }
.oest-map-marker.custom-point.point-fuel { border-color: #ffc247; }
.oest-map-marker.custom-point.point-fuel::after { border-color: #ffc247; }
.oest-map-marker.custom-point.point-fuel i { background: #ffc247; }
.oest-map-marker.custom-point.point-other { border-color: #9ba6ae; }
.oest-map-marker.custom-point.point-other::after { border-color: #9ba6ae; }
.oest-map-marker.custom-point.point-other i { background: #9ba6ae; }
.job-map-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #0d1114; }
.job-map-heading { z-index: 4; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(12, 15, 17, .98); padding: 11px 16px; }
.job-map-heading > div { min-width: 0; display: grid; gap: 2px; text-align: center; }
.job-map-heading strong, .job-map-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-map-heading strong { font-size: 13px; }
.job-map-heading span { color: var(--muted); font-size: 10px; }
.job-map-heading button { border: 0; background: transparent; color: var(--lime); padding: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.job-map-heading button:hover, .job-map-heading button:focus-visible { color: var(--orange); outline: none; }
.job-route-map { width: 100%; height: 100%; min-height: 420px; }
.job-map-route-panel { position: absolute; z-index: 5; left: 16px; bottom: 16px; width: min(520px, calc(100% - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; border: 1px solid var(--line); background: rgba(18, 22, 25, .96); padding: 13px 14px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
.job-map-route-panel > div { min-width: 0; display: flex; align-items: center; gap: 8px; }
.job-map-route-panel strong { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.job-map-route-panel span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.job-map-route-panel .primary-button { padding: 9px 12px; }
.job-map-actions { display: flex !important; gap: 8px !important; }
.job-map-actions button { white-space: nowrap; }
#job-map-status { grid-column: 1 / -1; min-height: 16px; margin: 0; color: var(--muted); font-size: 10px; }
#job-map-status.success { color: var(--status-good); }
#job-map-status.error { color: var(--red); }
.map-point-verify-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.map-point-verify-row span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.map-point-verify-row span.success { color: var(--status-good); }
.map-point-verify-row span.error { color: var(--red); }
.share-map-summary { display: grid; gap: 5px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel-soft); padding: 13px; }
.share-map-summary strong { color: var(--text); font-size: 14px; }
.share-map-summary span { color: var(--muted); font-size: 11px; line-height: 1.45; }
#share-map-dialog label + label { margin-top: 14px; }
.message-map-link { align-self: start; margin-top: 8px; color: var(--lime); font-size: 11px; font-weight: 800; text-decoration: none; }
.message-map-link:hover, .message-map-link:focus-visible { color: var(--orange); outline: none; }

.content-grid { min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; }
.job-list-panel { min-width: 0; min-height: 0; overflow: auto; padding: 20px 22px; }
.jobs-driver-panel { min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); border-left: 1px solid var(--line); background: rgba(12, 15, 17, .72); padding: 18px 16px; }
.side-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.side-panel-heading strong { color: var(--text); font-size: 12px; text-transform: uppercase; }
.side-panel-link { border: 0; background: transparent; color: var(--lime); padding: 0; font-size: 11px; font-weight: 700; }
.side-panel-link:hover, .side-panel-link:focus-visible { color: var(--orange); outline: none; }
.jobs-driver-status-list { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 10px; }
.jobs-driver-status-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(52, 60, 67, .55); }
.jobs-driver-status-row:last-child { border-bottom: 0; }
.jobs-driver-status-row strong { display: block; overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.jobs-driver-status-link { max-width: 100%; display: block; overflow: hidden; border: 0; background: transparent; color: var(--text); padding: 0; font-size: 12px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.jobs-driver-status-link:hover, .jobs-driver-status-link:focus-visible { color: var(--lime); outline: none; }
.jobs-driver-status-row span { color: var(--muted); font-size: 10px; }
.jobs-driver-status-state { color: var(--lime); font-size: 10px; font-weight: 700; text-align: right; }
.jobs-driver-status-state.idle { color: var(--status-good); }
.jobs-driver-status-state.stale { color: var(--muted); }
.list-heading { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.job-list-panel > .list-heading { align-items: center; gap: 18px; margin: -20px -22px 12px; padding: 10px 22px; border-bottom: 1px solid var(--line); background: rgba(16, 19, 22, .98); }
.list-title { display: grid; min-width: 0; }
.list-title h2 { margin: 0; color: var(--text); font-size: 16px; line-height: 1.15; font-weight: 800; }
.sync-status { color: var(--orange); }
.sync-status.live { color: var(--lime); }
.system-status-lights { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.system-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.health-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 2px rgba(139, 148, 158, .12); }
.health-dot.good { background: var(--status-good); box-shadow: 0 0 8px rgba(181, 255, 44, .65); }
.health-dot.warning { background: var(--orange); box-shadow: 0 0 8px rgba(255, 122, 24, .55); }
.health-dot.problem { background: var(--red); box-shadow: 0 0 8px rgba(255, 74, 74, .55); }
.health-dot.pending { background: var(--muted); }
.job-list { display: grid; gap: 8px; }
.job-row { width: 100%; display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(240px, 1.5fr) 120px 130px auto; gap: 18px; align-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 14px; text-align: left; cursor: pointer; }
.job-row:hover, .job-row.selected { border-color: var(--lime); background: var(--panel-soft); }
.job-main { display: grid; gap: 4px; min-width: 0; }
.job-main strong, .job-location span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-main small, .job-location small, .job-time small { color: var(--muted); }
.job-location, .job-time { display: grid; gap: 3px; min-width: 0; }
.job-view-button { justify-self: end; border: 0; background: transparent; color: var(--orange); padding: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.job-view-button:hover, .job-view-button:focus-visible { color: var(--lime); outline: none; }
.job-row-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.job-map-button { border: 0; background: transparent; color: var(--lime); padding: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.job-map-button:hover, .job-map-button:focus-visible { color: var(--orange); outline: none; }
.badge { justify-self: start; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.badge.pending { color: var(--orange); }
.badge.completed { color: var(--lime); }
.badge.cancelled { color: var(--red); }
.preload-marker { display: block; margin-top: 3px; color: var(--orange); font-style: normal; }
.review-marker { display: block; margin-top: 3px; color: var(--red); font-style: normal; }
.billed-marker { display: block; margin-top: 3px; color: var(--status-good); font-style: normal; }
.empty-list { padding: 70px 20px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }

.job-detail-workspace { min-width: 0; height: calc(100vh - 88px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); }
.job-detail-topbar { border-bottom-color: rgba(255, 122, 24, .45); }
.job-detail-back { border-color: var(--orange); color: var(--orange); }
.job-detail-back:hover { background: rgba(255, 122, 24, .1); }
.detail-panel { min-height: 0; overflow: auto; background: #14181b; padding: 24px; }
.detail-page { width: min(1100px, 100%); margin: 0 auto; padding: 28px 32px 40px; }
.empty-state { min-height: 240px; display: grid; place-content: center; gap: 8px; color: var(--muted); text-align: center; }
.detail-header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.detail-header h3 { margin: 0; font-size: 21px; }
.detail-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; row-gap: 14px; }
.detail-item { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.detail-item span { color: var(--muted); font-size: 11px; }
.detail-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.detail-actions label { grid-column: span 2; }
.review-complete-button { border: 1px solid var(--red); background: var(--red); color: white; padding: 11px 16px; font-weight: 700; }

dialog { width: min(860px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: auto; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 0; }
dialog::backdrop { background: rgba(0, 0, 0, .72); }
dialog form { padding: 24px; }
.compact-dialog { width: min(540px, calc(100% - 30px)); padding: 24px; }
.compact-dialog label { margin-top: 12px; }
#map-point-dialog, #share-map-dialog { padding: 0; }
#settings-dialog { max-height: calc(100vh - 30px); overflow-y: auto; }
.settings-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.settings-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 10px 8px; font-size: 11px; font-weight: 800; }
.settings-tab:hover, .settings-tab:focus-visible { color: var(--text); outline: none; }
.settings-tab.active { border-bottom-color: var(--lime); color: var(--lime); background: rgba(47, 141, 247, .07); }
.settings-tab-panel { display: none; }
.settings-tab-panel.active { display: block; }
.test-job-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.test-job-controls label { margin: 0; }
.test-job-controls button { min-height: 42px; white-space: nowrap; }
.active-test-jobs { display: grid; gap: 7px; margin-top: 10px; }
.active-test-jobs > p { margin: 0; color: var(--muted); font-size: 12px; }
.test-job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-left: 2px solid var(--lime); background: #14181b; }
.test-job-row strong, .test-job-row span { display: block; }
.test-job-row strong { color: var(--text); font-size: 12px; }
.test-job-row span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.test-job-row time { color: var(--lime); font-size: 11px; font-weight: 800; }
.settings-section-heading { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 10px; }
.settings-section-heading h3 { margin: 3px 0 0; font-size: 18px; }
.driver-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.driver-admin-form .wide { grid-column: 1 / -1; }
.driver-admin-list, .driver-audit-list { display: grid; gap: 8px; margin-top: 12px; }
.driver-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--panel); padding: 11px 12px; }
.driver-admin-row.inactive { opacity: .58; }
.driver-admin-main strong, .driver-admin-main span, .driver-admin-meta span { display: block; }
.driver-admin-main strong { color: var(--text); font-size: 13px; }
.driver-admin-main span, .driver-admin-meta span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.driver-admin-meta { text-align: right; }
.driver-admin-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 7px; }
.driver-admin-actions button { padding: 7px 10px; font-size: 11px; }
.driver-audit-row { border-left: 2px solid var(--lime); background: #14181b; padding: 9px 10px; }
.driver-audit-row strong, .driver-audit-row span { display: block; }
.driver-audit-row strong { color: var(--text); font-size: 12px; }
.driver-audit-row span { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
@media (max-width: 620px) { .test-job-controls { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .settings-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .driver-admin-form, .driver-admin-row { grid-template-columns: 1fr; }
  .driver-admin-meta { text-align: left; }
}
.settings-section { margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }
.settings-section.first { margin-top: 0; padding-top: 0; border-top: 0; }
.software-settings-links { display: grid; gap: 8px; }
.emergency-dialog { width: min(620px, calc(100% - 30px)); padding: 24px; border: 3px solid #ff2638; background: #3b080d; box-shadow: 0 0 0 8px rgba(255, 38, 56, .18), 0 0 80px rgba(255, 38, 56, .45); }
.emergency-dialog::backdrop { background: rgba(25, 0, 3, .88); }
.emergency-header { display: grid; gap: 5px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .24); }
.emergency-header span { color: white; font-size: 30px; font-weight: 800; }
.emergency-header strong { color: #ffb4ba; font-size: 12px; text-transform: uppercase; }
.emergency-details { display: grid; gap: 10px; margin-top: 20px; padding: 18px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .22); }
.emergency-details p { margin: 0; color: white; font-size: 15px; }
.emergency-details strong { color: #ffb4ba; }
.emergency-details a { color: white; font-weight: 800; }
.emergency-acknowledge-button { width: 100%; border: 2px solid white; background: #ff2638; color: white; padding: 14px 18px; font-weight: 800; text-transform: uppercase; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.backup-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.backup-panel strong { display: block; margin-bottom: 5px; }
.backup-panel p, .logout-message { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.backup-panel .backup-status { grid-column: 1 / -1; }
.backup-status { min-height: 18px; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.backup-status.success { color: var(--lime); }
.backup-status.error { color: var(--red); }
.settings-link { display: grid; gap: 3px; border: 1px solid var(--line); background: var(--panel-soft); color: var(--text); padding: 11px 12px; text-align: left; }
.settings-link:hover { border-color: var(--lime); }
.settings-link span { font-weight: 700; }
.settings-link small { color: var(--muted); }
.software-info-dialog { width: min(660px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 24px; }
.software-info-content { display: grid; gap: 18px; color: #d5dce2; font-size: 13px; line-height: 1.65; }
.software-info-content p { margin: 0; }
.software-info-content section { display: grid; gap: 8px; }
.software-info-content h3 { margin: 0; color: var(--text); font-size: 14px; }
.software-info-content footer { padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.software-brand { display: grid; gap: 1px; padding: 16px; border: 1px solid var(--lime); background: var(--panel-soft); }
.software-brand img { width: 320px; max-width: 100%; margin-bottom: 8px; }
.software-brand strong { font-size: 22px; }
.software-brand span { color: var(--lime); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.software-details { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.software-details div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.software-details dt { color: var(--muted); }
.software-details dd { margin: 0; color: var(--text); font-weight: 600; }
.software-details a { color: var(--lime); }
.software-note { color: var(--muted); }
.message-recipient { display: grid; gap: 3px; margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); background: var(--panel-soft); }
.message-recipient span, .message-recipient small { color: var(--muted); font-size: 11px; }
.message-recipient strong { color: var(--lime); font-size: 17px; }
.messages-center-dialog { width: min(1080px, calc(100% - 30px)); height: min(760px, calc(100vh - 30px)); overflow: hidden; padding: 24px; }
.messages-center-dialog .dialog-heading { margin-bottom: 16px; }
.message-center-layout { height: calc(100% - 62px); min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--line); }
.conversation-sidebar { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid var(--line); background: #14181b; }
.message-search { padding: 12px; border-bottom: 1px solid var(--line); }
.message-search input { margin-top: 2px; }
.conversation-list { min-height: 0; overflow-y: auto; }
.conversation-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: start; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); padding: 13px 12px; text-align: left; }
.conversation-row:hover, .conversation-row.active { background: var(--panel-soft); }
.conversation-row.active { box-shadow: inset 3px 0 var(--lime); }
.conversation-presence { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.conversation-presence.online { background: var(--status-good); box-shadow: 0 0 7px rgba(181, 255, 44, .6); }
.conversation-person { min-width: 0; display: grid; gap: 4px; }
.conversation-person strong, .conversation-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-person span { color: var(--muted); font-size: 10px; }
.conversation-side { display: grid; justify-items: end; gap: 6px; color: var(--muted); font-size: 9px; }
.conversation-unread { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: white; font-size: 9px; font-weight: 800; }
.conversation-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--panel); }
.conversation-header { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.conversation-header div { display: grid; gap: 4px; }
.conversation-header span { color: var(--muted); font-size: 10px; }
.conversation-header .online { color: var(--lime); }
.conversation-thread { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 18px; }
.message-bubble { max-width: min(72%, 560px); display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel-soft); line-height: 1.45; font-size: 12px; }
.message-bubble.incoming { align-self: flex-start; border-left-color: var(--orange); }
.message-bubble.outgoing { align-self: flex-end; border-right-color: var(--lime); background: rgba(47, 141, 247, .07); }
.message-bubble small { color: var(--muted); font-size: 9px; }
.message-bubble.outgoing small { text-align: right; }
.message-center-empty { margin: auto; color: var(--muted); font-size: 12px; text-align: center; }
.message-center-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 12px; border-top: 1px solid var(--line); background: #14181b; }
.message-center-composer textarea { min-height: 48px; max-height: 130px; resize: vertical; }
.message-center-composer button { align-self: stretch; min-width: 90px; }
.message-center-composer span { grid-column: 1 / -1; min-height: 12px; color: var(--muted); font-size: 10px; }
.message-center-composer span.success { color: var(--lime); }
.message-center-composer span.error { color: var(--red); }
button:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 1050px) {
  .workspace { height: auto; overflow: visible; display: block; }
  .accounts-workspace { height: auto; overflow: visible; display: block; }
  .billing-workspace { height: auto; overflow: visible; display: block; }
  .accounts-layout { grid-template-columns: 1fr; overflow: visible; }
  .billing-layout { grid-template-columns: 1fr; overflow: visible; }
  .account-list-panel, .account-detail { overflow: visible; }
  .account-detail { border-left: 0; border-top: 1px solid var(--line); }
  .job-detail-workspace { height: auto; overflow: visible; display: block; }
  .live-map-panel { height: 520px; min-height: 520px; overflow: hidden; }
  .job-map-panel { height: 520px; min-height: 520px; }
  .live-map-toolbar { left: 10px; right: 10px; max-width: none; transform: none; overflow-x: auto; }
  .google-maps-api-settings { grid-template-columns: 1fr; }
  .google-maps-api-settings .backup-status { grid-column: 1; }
  .driver-hub-workspace { height: auto; overflow: visible; display: block; }
  .driver-hub-content { grid-template-columns: 1fr; }
  .online-driver-list { max-height: 260px; }
  .billing-ready-list { overflow: visible; }
  .driver-map { height: 320px; }
  .content-grid { grid-template-columns: 1fr; overflow: visible; }
  .jobs-driver-panel { border-left: 0; border-top: 1px solid var(--line); max-height: 360px; }
  .job-list-panel, .detail-panel { overflow: visible; }
  .job-row { grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) 100px auto; }
  .job-time { display: none; }
}

@media (max-width: 760px) {
  .welcome-stats { grid-template-columns: repeat(2, 1fr); }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .app-header { grid-template-columns: 1fr; justify-items: start; gap: 10px; padding: 14px; }
  .app-header-center { width: 100%; justify-content: start; }
  .app-header-actions { width: 100%; justify-content: start; flex-wrap: wrap; }
  .header-search-field,
  .header-search-field:hover,
  .header-search-field:focus-within { width: min(100%, 170px); }
  .billing-ready-card header,
  .billing-ready-notes { display: grid; }
  .billing-ready-meta,
  .billing-calculation,
  .account-rate-row { grid-template-columns: 1fr; }
  .invoice-preview-paper { padding: 18px; }
  .invoice-preview-header,
  .invoice-preview-addresses,
  .invoice-preview-lines div { grid-template-columns: 1fr; display: grid; }
  .invoice-preview-lines strong { justify-self: start; }
  .header-search-field input { width: 100%; opacity: 1; }
  .sidebar { grid-row: 2; position: static; height: auto; padding: 24px 14px; }
  .app-shell > section { grid-row: 3; grid-column: 1; }
  .nav-list { grid-template-columns: repeat(2, 1fr); }
  .sidebar-collapsed .sidebar { padding: 24px 14px; }
  .sidebar-collapsed .nav-button { display: flex; justify-content: space-between; padding: 11px 12px; font-size: inherit; text-align: left; }
  .sidebar-collapsed .nav-button::before { content: none; }
  .sidebar-collapsed .collapse-link { width: fit-content; font-size: 11px; text-align: left; }
  .sidebar-collapsed .collapse-link::before { content: none; }
  .sidebar-collapsed .user-actions { display: initial; }
  .sidebar-collapsed .user-actions { display: flex; }
  .user-block { margin-top: 20px; }
  .topbar, .topbar-actions { align-items: stretch; flex-direction: column; }
  .topbar-logo { width: min(220px, 74vw); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .driver-hub-stats { grid-template-columns: repeat(2, 1fr); }
  .content-grid { min-height: auto; }
  .list-heading { align-items: flex-start; gap: 10px; flex-direction: column; }
  .app-footer-status { align-items: flex-start; flex-direction: column; }
  .system-status-lights { justify-content: flex-start; }
  .job-row { grid-template-columns: 1fr; }
  .job-row-actions { justify-self: start; }
  .job-map-heading { grid-template-columns: 1fr auto; }
  .job-map-heading > div { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .job-map-heading #back-from-job-map { grid-column: 1; grid-row: 2; justify-self: start; }
  .job-map-heading #view-job-from-map { grid-column: 2; grid-row: 2; justify-self: end; }
  .job-map-route-panel { grid-template-columns: 1fr; }
  .job-map-route-panel .primary-button { justify-self: start; }
  .job-map-actions { flex-wrap: wrap; }
  .map-point-verify-row { align-items: stretch; flex-direction: column; }
  .detail-page { padding: 22px 18px 32px; }
  .detail-grid, .detail-actions, .account-detail-grid { grid-template-columns: 1fr; }
  .detail-actions label { grid-column: auto; }
  .account-row { grid-template-columns: 64px minmax(0, 1fr); }
  .account-billing { grid-column: 2; justify-items: start; }
  .form-grid { grid-template-columns: 1fr; }
  .messages-center-dialog { height: calc(100vh - 20px); width: calc(100% - 20px); padding: 14px; }
  .message-center-layout { grid-template-columns: 1fr; grid-template-rows: minmax(150px, 34%) minmax(0, 1fr); }
  .conversation-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .job-form-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-tab-panel { min-height: 0; }
  .read-only-banner { inset: 10px 10px auto; align-items: stretch; flex-direction: column; }
}
