/* ===== MyMileMargin – Shared Stylesheet ===== */

/* Bottom nav theme variables — match teal preset (bottom-nav-theme.js) so first paint matches JS before data loads. */
:root {
  /* Light app theme default (same as PRESETS.teal.light) */
  --bn-bar-bg: linear-gradient(180deg, rgba(255,255,255,0.34) 0%, rgba(0,148,148,0.5) 14%, rgba(0,122,122,0.68) 52%, rgba(0,96,96,0.82) 100%);
  --bn-bar-border: rgba(255,255,255,0.28);
  --bn-bar-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 -6px 20px rgba(0,100,100,0.32);
  --bn-btn-color: rgba(255,255,255,0.74);
  --bn-btn-bg: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.08) 40%, rgba(0,0,0,0.15) 100%);
  --bn-btn-border: rgba(0,0,0,0.2);
  --bn-btn-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 3px 0 rgba(0,60,60,0.5), 0 4px 6px rgba(0,0,0,0.15);
  --bn-btn-active-color: #ffffff;
  --bn-btn-active-bg: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
  --bn-btn-active-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 1px 0 rgba(0,60,60,0.4);
}
body.dark-mode {
  /* Same as PRESETS.teal.dark — avoids flash before bottom-nav-theme.js runs */
  --bn-bar-bg: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(26,42,74,0.48) 25%, rgba(26,42,74,0.62) 100%);
  --bn-bar-border: rgba(255,255,255,0.18);
  --bn-bar-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 -12px 36px rgba(0,0,0,0.35);
  --bn-btn-color: rgba(255,255,255,0.5);
  --bn-btn-bg: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.02) 40%, rgba(0,0,0,0.2) 100%);
  --bn-btn-border: rgba(0,0,0,0.4);
  --bn-btn-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 3px 0 rgba(0,0,0,0.35), 0 4px 6px rgba(0,0,0,0.2);
  --bn-btn-active-color: #e94560;
  --bn-btn-active-bg: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.4) 100%);
  --bn-btn-active-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(0,0,0,0.3);
}

/* ===== HOMEPAGE ===== */
.home-theme-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #1a4a8a;
  background: #16213e;
  color: #a0a0c0;
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.home-theme-toggle:hover {
  background: #0f3460;
  border-color: #0ecf9e;
}
body:not(.dark-mode) .home-theme-toggle {
  background: #e4f3f3;
  border-color: #b0d8d8;
  color: #557777;
}
body:not(.dark-mode) .home-theme-toggle:hover {
  background: #d0e8e8;
  border-color: #007a7a;
}
.homepage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow-y: auto;
}
.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(233,69,96,0.15) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 80% 90%, rgba(14,207,158,0.08) 0%, transparent 45%),
              linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  pointer-events: none;
}
body:not(.dark-mode) .home-bg {
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,122,122,0.12) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 80% 90%, rgba(0,100,100,0.06) 0%, transparent 45%),
              linear-gradient(180deg, #e8f6f6 0%, #d4edee 50%, #c0e4e6 100%);
}

/* Hero Section */
.home-hero {
  text-align: center;
  padding: 48px 24px 40px;
  position: relative;
  z-index: 1;
}
.home-logo {
  width: 120px;
  height: auto;
  margin-bottom: 12px;
}
.home-logo-placeholder {
  font-size: 80px;
  line-height: 1;
  opacity: 0.6;
  margin-bottom: 12px;
}
.home-title {
  font-size: 32px;
  font-weight: 700;
  color: #e94560;
  margin-bottom: 8px;
}
.home-subheadline {
  font-size: 18px;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 12px;
}
body:not(.dark-mode) .home-subheadline { color: #1a2e2e; }
.home-desc {
  font-size: 15px;
  color: #a0a0c0;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
body:not(.dark-mode) .home-desc { color: #557777; }
.home-dev-notice {
  font-size: 14px;
  color: #8a8ab0;
  line-height: 1.55;
  margin: 0 auto 18px;
  max-width: 440px;
  padding: 0 16px;
}
.home-dev-notice a {
  color: #0ecf9e;
  word-break: break-all;
}
.home-dev-notice a:hover {
  text-decoration: underline;
}
body:not(.dark-mode) .home-dev-notice {
  color: #5a6a6a;
}
body:not(.dark-mode) .home-dev-notice a {
  color: #0d8a6e;
}
.home-cta {
  display: inline-block;
  background: #e94560;
  color: #fff;
  padding: 14px 36px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(233,69,96,0.35);
}
.home-cta:hover {
  background: #d63852;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233,69,96,0.4);
}

/* Feature Grid */
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 48px;
  position: relative;
  z-index: 1;
}
.home-feature-card {
  background: rgba(30,60,120,0.4);
  border: 1px solid rgba(122,122,158,0.3);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
body:not(.dark-mode) .home-feature-card {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,122,122,0.2);
}
.home-feature-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
}
.home-feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 10px;
}
body:not(.dark-mode) .home-feature-card h3 { color: #1a2e2e; }
.home-feature-card p {
  font-size: 13px;
  color: #a0a0c0;
  line-height: 1.5;
}
body:not(.dark-mode) .home-feature-card p { color: #557777; }
@media (max-width: 768px) {
  .home-feature-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }
}

/* Diesel Atlas Section */
.home-atlas {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.home-atlas h2 {
  font-size: 22px;
  font-weight: 700;
  color: #e94560;
  margin-bottom: 12px;
}
body:not(.dark-mode) .home-atlas h2 { color: #007a7a; }
.home-atlas p {
  font-size: 15px;
  color: #a0a0c0;
  line-height: 1.6;
}
body:not(.dark-mode) .home-atlas p { color: #557777; }

/* Product Roadmap */
.home-roadmap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}
.home-roadmap h2 {
  font-size: 22px;
  font-weight: 700;
  color: #e94560;
  margin-bottom: 24px;
  text-align: center;
}
body:not(.dark-mode) .home-roadmap h2 { color: #007a7a; }
.home-roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.home-roadmap-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px 16px;
  align-items: start;
  padding: 16px;
  background: rgba(30,60,120,0.3);
  border: 1px solid rgba(122,122,158,0.25);
  border-radius: 10px;
  border-left: 4px solid #0ecf9e;
}
body:not(.dark-mode) .home-roadmap-item {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,122,122,0.2);
  border-left-color: #007a7a;
}
.home-roadmap-badge {
  font-size: 11px;
  font-weight: 700;
  color: #0ecf9e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
body:not(.dark-mode) .home-roadmap-badge { color: #007a7a; }
.home-roadmap-title {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e0;
}
body:not(.dark-mode) .home-roadmap-title { color: #1a2e2e; }
.home-roadmap-desc {
  grid-column: 2;
  font-size: 13px;
  color: #a0a0c0;
  line-height: 1.5;
}
body:not(.dark-mode) .home-roadmap-desc { color: #557777; }

/* Enhanced Footer */
.home-footer-enhanced {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  border-top: 1px solid rgba(15,52,96,0.8);
  position: relative;
  z-index: 1;
}
body:not(.dark-mode) .home-footer-enhanced { border-top-color: rgba(0,122,122,0.3); }
.home-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-footer-about {
  font-size: 13px;
  color: #a0a0c0;
  line-height: 1.5;
  margin: 0;
}
body:not(.dark-mode) .home-footer-about { color: #557777; }
.home-footer-col a {
  font-size: 13px;
  color: #7a7a9e;
  text-decoration: none;
}
.home-footer-col a:hover {
  color: #0ecf9e;
}
body:not(.dark-mode) .home-footer-col a { color: #557777; }
body:not(.dark-mode) .home-footer-col a:hover { color: #007a7a; }
.home-footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 11px;
  color: #4a4a6e;
  margin: 16px 0 0;
}
body:not(.dark-mode) .home-footer-copy { color: #99aaaa; }
@media (max-width: 640px) {
  .home-footer-enhanced {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Legacy footer (used elsewhere) */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin-bottom: 12px;
}
.footer-links a {
  color: #7a7a9e;
  font-size: 13px;
  text-decoration: none;
}
.footer-links a:hover {
  color: #0ecf9e;
}
.footer-copy {
  font-size: 11px;
  color: #4a4a6e;
}

/* ===== APP FOOTER (on app pages, above bottom nav) ===== */
.app-footer {
  text-align: center;
  padding: 20px 16px 24px;
  margin-top: auto;
  border-top: 1px solid #0f3460;
}
.app-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  margin-bottom: 8px;
}
.app-footer .footer-links a {
  color: #7a7a9e;
  font-size: 12px;
  text-decoration: none;
}
.app-footer .footer-links a:hover { color: #0ecf9e; }
.app-footer .footer-copy { font-size: 10px; color: #4a4a6e; }
body:not(.dark-mode) .app-footer { border-top-color: #b0d8d8; }
body:not(.dark-mode) .app-footer .footer-links a { color: #557777; }
body:not(.dark-mode) .app-footer .footer-links a:hover { color: #007a7a; }
body:not(.dark-mode) .app-footer .footer-copy { color: #99aaaa; }

/* ===== TAX DISCLAIMER ===== */
.tax-disclaimer {
  font-size: 10px;
  color: #7a7a9e;
  text-align: center;
  padding: 16px 16px 24px;
  margin: 0;
  border-top: 1px solid #0f3460;
}
body:not(.dark-mode) .tax-disclaimer {
  color: #668888;
  border-top-color: #b0d8d8;
}

/* ===== LEGAL LINKS MODAL (popup from More tab) ===== */
.legal-links-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.legal-links-modal.active { display: flex; }
.legal-links-popup {
  background: #16213e;
  border: 1px solid #1a4a8a;
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  width: 100%;
  position: relative;
}
.legal-links-popup h3 {
  font-size: 16px;
  color: #e94560;
  margin-bottom: 16px;
  padding-right: 28px;
}
.legal-links-popup .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #7a7a9e;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.legal-links-popup .close-btn:hover { color: #e94560; }
.legal-links-popup a {
  display: block;
  padding: 10px 0;
  color: #a0a0c0;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #0f3460;
}
.legal-links-popup a:last-of-type { border-bottom: none; }
.legal-links-popup a:hover { color: #0ecf9e; }
body:not(.dark-mode) .legal-links-popup { background: #ffffff; border-color: #b0d8d8; }
body:not(.dark-mode) .legal-links-popup h3 { color: #007a7a; }
body:not(.dark-mode) .legal-links-popup a { color: #445566; border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .legal-links-popup a:hover { color: #007a7a; }

/* ===== LEGAL PAGES (Privacy, Contact, Terms) ===== */
.legal-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.legal-back {
  display: inline-block;
  color: #7a7a9e;
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 20px;
}
.legal-back:hover { color: #0ecf9e; }
.legal-page h1 {
  font-size: 22px;
  color: #e94560;
  margin-bottom: 6px;
}
.legal-updated {
  font-size: 12px;
  color: #7a7a9e;
  margin-bottom: 20px;
}
.legal-body {
  font-size: 14px;
  color: #a0a0c0;
  line-height: 1.7;
}
.legal-body h2 {
  font-size: 16px;
  color: #e0e0e0;
  margin: 20px 0 8px;
}
.legal-body p { margin-bottom: 12px; }
.legal-body ul { margin: 12px 0 12px 20px; }
.legal-body a { color: #0ecf9e; text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }
.legal-footer-link { margin-top: 28px; padding-top: 16px; border-top: 1px solid #0f3460; }
body:not(.dark-mode) .legal-footer-link { border-top-color: #b0d8d8; }

/* App download page */
.app-download-disclaimer {
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid rgba(233, 69, 96, 0.4);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: #e0e0e0;
}
body:not(.dark-mode) .app-download-disclaimer {
  background: rgba(0, 122, 122, 0.12);
  border-color: rgba(0, 122, 122, 0.35);
  color: #334455;
}
.app-download-cta-wrap { margin: 24px 0; }
.app-download-cta {
  display: inline-block;
  background: #0ecf9e;
  color: #1a1a2e !important; /* dark text on green so it’s visible in dark theme */
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.app-download-cta:hover {
  background: #5ff0b8;
  text-decoration: none;
}
.app-download-cta:active { transform: scale(0.98); }
body:not(.dark-mode) .app-download-cta {
  background: #007a7a;
  color: #fff;
}
body:not(.dark-mode) .app-download-cta:hover {
  background: #008c8c;
}
.app-download-help {
  font-size: 13px;
  color: #a0a0c0;
  line-height: 1.5;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(15, 52, 96, 0.4);
  border-radius: 8px;
}
body:not(.dark-mode) .app-download-help {
  color: #556677;
  background: rgba(0, 122, 122, 0.1);
}

/* More page (Legal & Info) */
.more-page {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 100px;
  max-width: 560px;
  margin: 0 auto;
}
.more-title {
  font-size: 20px;
  color: #e0e0e0;
  margin-bottom: 20px;
}
body:not(.dark-mode) .more-title { color: #1a2e2e; }
.more-disclaimer {
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.35);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: #c0c0d0;
}
body:not(.dark-mode) .more-disclaimer {
  background: rgba(0, 122, 122, 0.1);
  border-color: rgba(0, 122, 122, 0.3);
  color: #445566;
}
.more-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.more-links a {
  color: #0ecf9e;
  text-decoration: none;
  font-size: 15px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 52, 96, 0.5);
}
.more-links a:hover { text-decoration: underline; }
body:not(.dark-mode) .more-links a { color: #007a7a; }
body:not(.dark-mode) .more-links a { border-bottom-color: rgba(0, 122, 122, 0.2); }
.more-feedback {
  font-size: 14px;
  color: #a0a0c0;
  line-height: 1.6;
}
.more-feedback a { color: #0ecf9e; text-decoration: none; }
.more-feedback a:hover { text-decoration: underline; }
body:not(.dark-mode) .more-feedback { color: #556677; }
body:not(.dark-mode) .more-feedback a { color: #007a7a; }

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, #16213e 15%, #16213e 100%);
  padding: 10px 16px 10px 72px;
  border-bottom: 1px solid #0f3460;
  border-top: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1),
              0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  min-height: 56px;
}
.app-header h1 {
  font-size: 18px; color: #e94560; font-weight: 700;
  position: absolute; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
}
.app-title-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  height: 56px;
  text-decoration: none;
  overflow: hidden;
}
.app-title-img {
  height: 72px;
  width: auto;
  max-width: 256px;
  object-fit: contain;
}
.app-title-fallback {
  font-size: 18px; color: #e94560; font-weight: 700;
}
body:not(.dark-mode) .app-title-fallback { color: #ffffff; }
.app-logo-wrap {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  height: 56px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}
.app-logo {
  height: 128px;
  width: auto;
  object-fit: contain;
}
.app-logo-placeholder { font-size: 48px; line-height: 1; opacity: 0.6; }
@media (max-width: 640px) {
  .app-logo-wrap { display: none !important; }
  .app-header { padding-left: 16px; }
}
.app-header-spacer { flex: 1; min-width: 8px; }
.auth-header-slot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
}
.auth-header-slot .auth-user-info {
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 50%;
}
.auth-header-slot .auth-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #0ecf9e;
  display: block;
}
.auth-header-slot .auth-btn {
  padding: 6px 14px;
  font-size: 12px;
}

/* Header account menu (avatar → dropdown: Message Center, Profile, Settings, …) */
.auth-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
}
.auth-menu-trigger:focus-visible {
  outline: 2px solid #0ecf9e;
  outline-offset: 2px;
}
.auth-menu-trigger .auth-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #0ecf9e;
  display: block;
}
.auth-menu-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #0ecf9e;
  font-size: 14px;
  font-weight: 700;
  color: #e0e0e0;
  background: #16213e;
}
.auth-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px 0;
  background: #16213e;
  border: 1px solid #1a4a8a;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  z-index: 12050;
}
.auth-menu-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: #e0e0e0;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}
.auth-menu-item:hover {
  background: rgba(14, 207, 158, 0.12);
  color: #0ecf9e;
}
.auth-menu-item-btn {
  border-left: none;
  border-right: none;
}
body:not(.dark-mode) .auth-menu-trigger .auth-user-avatar,
body:not(.dark-mode) .auth-menu-initial {
  border-color: #007a7a;
}
body:not(.dark-mode) .auth-menu-dropdown {
  background: #ffffff;
  border-color: #b0d8d8;
  box-shadow: 0 8px 28px rgba(0, 80, 80, 0.18);
}
body:not(.dark-mode) .auth-menu-item {
  color: #1a2e2e;
}
body:not(.dark-mode) .auth-menu-item:hover {
  background: rgba(0, 122, 122, 0.1);
  color: #007a7a;
}
body:not(.dark-mode) .auth-menu-initial {
  background: #e4f3f3;
  color: #007a7a;
}

/* ===== DISPATCH SIDEBAR (hamburger menu) ===== */
/* Floats over main column (no extra row / no layout shift); opens slide-out panel */
.dsp-menu-bar {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 35;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  display: block;
  background: transparent;
  border: none;
  pointer-events: none;
}
.dsp-menu-bar .dsp-hamburger {
  pointer-events: auto;
}

.dsp-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 7px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.dsp-hamburger:hover {
  background: rgba(14, 207, 158, 0.12);
}
.dsp-hamburger:focus-visible {
  outline: 2px solid #0ecf9e;
  outline-offset: 2px;
}
.dsp-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #e8ecf4;
  border-radius: 1px;
  transition: background 0.2s, opacity 0.2s;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
/* Light header (teal gradient): dark bars + subtle hover — matches app chrome */
body:not(.dark-mode) .dsp-hamburger span {
  background: #0a4d4d;
  box-shadow: none;
}
body:not(.dark-mode) .dsp-hamburger:hover {
  background: rgba(0, 90, 90, 0.12);
}
body:not(.dark-mode) .dsp-hamburger:focus-visible {
  outline-color: #007a7a;
}

.dsp-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.dsp-sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.dsp-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 270px;
  max-width: 80vw;
  background: #0a1628;
  border-right: 1px solid #1a4a8a;
  z-index: 200001;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}
.dsp-sidebar.open {
  transform: translateX(0);
}

.dsp-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #1a4a8a;
}
.dsp-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #0ecf9e;
}
.dsp-sidebar-close {
  background: none;
  border: none;
  color: #7a7a9e;
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.dsp-sidebar-close:hover { color: #e0e0e0; }

.dsp-sidebar-links {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.dsp-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-size: 14px;
  color: #c0c0d8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dsp-sidebar-item:hover {
  background: rgba(14, 207, 158, 0.08);
  color: #0ecf9e;
}
.dsp-sidebar-item-active {
  background: rgba(14, 207, 158, 0.12);
  color: #0ecf9e;
  font-weight: 600;
  border-left: 3px solid #0ecf9e;
}
.dsp-sidebar-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* Dispatch sidebar — light mode */
body:not(.dark-mode) .dsp-sidebar {
  background: #ffffff;
  border-right-color: #b0d8d8;
  box-shadow: 4px 0 24px rgba(0, 80, 80, 0.15);
}
body:not(.dark-mode) .dsp-sidebar-header { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .dsp-sidebar-title { color: #007a7a; }
body:not(.dark-mode) .dsp-sidebar-close { color: #99aaaa; }
body:not(.dark-mode) .dsp-sidebar-close:hover { color: #1a2e2e; }
body:not(.dark-mode) .dsp-sidebar-item { color: #445566; }
body:not(.dark-mode) .dsp-sidebar-item:hover { background: rgba(0, 122, 122, 0.06); color: #007a7a; }
body:not(.dark-mode) .dsp-sidebar-item-active { background: rgba(0, 122, 122, 0.1); color: #007a7a; border-left-color: #007a7a; }
body:not(.dark-mode) .dsp-sidebar-overlay { background: rgba(0, 40, 40, 0.4); }

/* ===== SUBSCRIPTION MODAL (portal to <html>; above body flex children, bottom nav, overlays) ===== */
#subscriptionModal {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  isolation: isolate;
  background: rgba(0, 0, 0, 0.85);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(28px, env(safe-area-inset-bottom, 0px)) 16px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: auto;
}
#subscriptionModal.sub-modal-open {
  display: flex;
}
#subscriptionModal .sub-modal-dialog {
  background: #0f3460;
  border: 1px solid #1a4a8a;
  border-radius: 12px;
  max-width: 520px;
  width: 92%;
  padding: 22px 20px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-height: min(88vh, 88dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
}
#subscriptionModal .sub-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #7a7a9e;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  font-family: inherit;
}
#subscriptionModal .sub-modal-close:hover {
  color: #e0e0e0;
}
#subscriptionModal .sub-modal-period-box {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  text-align: center;
}
#subscriptionModal .sub-period-label {
  font-size: 13px;
  color: #c0c0c0;
  margin-bottom: 6px;
}
#subscriptionModal .sub-period-value {
  font-size: 16px;
  font-weight: 600;
  color: #e0e0e0;
}
#subscriptionModal .sub-bill-toggle {
  display: flex;
  background: #1a1a2e;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
#subscriptionModal .sub-bill-toggle button {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 10px 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: #7a7a9e;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
#subscriptionModal .sub-bill-toggle button.sub-bill-active {
  background: #0ecf9e;
  color: #1a1a2e;
}
#subscriptionModal .sub-tier-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
#subscriptionModal .sub-tier-card {
  flex: 1;
  min-width: 92px;
  max-width: 148px;
  border: 2px solid #1a4a8a;
  border-radius: 10px;
  padding: 12px 8px;
  background: #1a1a2e;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
#subscriptionModal .sub-tier-card.sub-tier-selected {
  border-color: #0ecf9e;
  box-shadow: 0 0 0 1px rgba(14, 207, 158, 0.35);
}
#subscriptionModal .sub-tier-card.sub-tier-disabled {
  opacity: 0.52;
  cursor: default;
  pointer-events: none;
}
#subscriptionModal .sub-tier-name {
  font-weight: 700;
  color: #e0e0e0;
  font-size: 13px;
  margin-bottom: 4px;
}
#subscriptionModal .sub-tier-price {
  font-size: 20px;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1.2;
  margin: 6px 0;
}
#subscriptionModal .sub-tier-price small {
  font-size: 11px;
  font-weight: 600;
  color: #7a7a9e;
}
#subscriptionModal .sub-tier-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0ecf9e;
  margin-bottom: 4px;
}
#subscriptionModal .sub-tier-caption {
  font-size: 10px;
  color: #7a7a9e;
  line-height: 1.35;
  margin-top: 6px;
  text-align: left;
}
#subscriptionModal .sub-basic-features {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 10px;
  color: #a8a8b8;
  text-align: left;
  line-height: 1.45;
}
#subscriptionModal .sub-basic-features li {
  padding: 2px 0 2px 12px;
  position: relative;
}
#subscriptionModal .sub-basic-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #0ecf9e;
  font-size: 9px;
}
#subscriptionModal .sub-text-muted {
  color: #7a7a9e;
  font-size: 12px;
  margin: 0;
  line-height: 1.45;
}
#subscriptionModal .sub-status-strong {
  color: #c8c8d8;
}
#subscriptionModal .sub-plans-heading {
  color: #f5a623;
  margin: 0 0 6px;
  font-size: 17px;
}
#subscriptionModal .sub-manage-btn {
  width: 100%;
  padding: 12px;
  background: #1a4a8a;
  color: #e0e0e0;
  border: 1px solid #1a4a8a;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
#subscriptionModal .sub-manage-btn:hover {
  filter: brightness(1.08);
}
body:not(.dark-mode) #subscriptionModal {
  background: rgba(0, 55, 55, 0.42) !important;
}
body:not(.dark-mode) #subscriptionModal .sub-modal-dialog {
  background: #ffffff;
  border-color: #b0d8d8;
  box-shadow: 0 8px 32px rgba(0, 80, 80, 0.2);
}
body:not(.dark-mode) #subscriptionModal .sub-modal-close {
  color: #668888;
}
body:not(.dark-mode) #subscriptionModal .sub-modal-close:hover {
  color: #007a7a;
}
body:not(.dark-mode) #subscriptionModal .sub-bill-toggle {
  background: #e4f3f3;
}
body:not(.dark-mode) #subscriptionModal .sub-bill-toggle button {
  color: #557777;
}
body:not(.dark-mode) #subscriptionModal .sub-bill-toggle button.sub-bill-active {
  color: #003333;
}
body:not(.dark-mode) #subscriptionModal .sub-tier-card {
  background: #f4fbfb;
  border-color: #b0d8d8;
}
body:not(.dark-mode) #subscriptionModal .sub-tier-card.sub-tier-selected {
  border-color: #0ecf9e;
  box-shadow: 0 0 0 1px rgba(14, 207, 158, 0.45);
}
body:not(.dark-mode) #subscriptionModal .sub-tier-name,
body:not(.dark-mode) #subscriptionModal .sub-tier-price {
  color: #1a2e2e;
}
body:not(.dark-mode) #subscriptionModal .sub-tier-price small {
  color: #668888;
}
body:not(.dark-mode) #subscriptionModal .sub-tier-caption,
body:not(.dark-mode) #subscriptionModal .sub-basic-features {
  color: #557777;
}
body:not(.dark-mode) #subscriptionModal .sub-basic-features li::before {
  color: #007a7a;
}
body:not(.dark-mode) #subscriptionModal .sub-modal-period-box {
  background: #e4f3f3;
  border: 1px solid #b0d8d8;
}
body:not(.dark-mode) #subscriptionModal .sub-period-label {
  color: #557777;
}
body:not(.dark-mode) #subscriptionModal .sub-period-value {
  color: #007a7a;
}
body:not(.dark-mode) #subscriptionModal .sub-text-muted {
  color: #668888 !important;
}
body:not(.dark-mode) #subscriptionModal .sub-status-strong {
  color: #007a7a !important;
}
body:not(.dark-mode) #subscriptionModal .sub-plans-heading {
  color: #b86b00 !important;
}
body:not(.dark-mode) #subscriptionModal .sub-manage-btn {
  background: #007a7a;
  border-color: #006060;
  color: #ffffff;
}

/* ===== TUTORIAL OVERLAY (welcome step; mounted on <html>) ===== */
.mmm-tutorial-overlay {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483646 !important;
  isolation: isolate;
  background: rgba(0, 0, 0, 0.82);
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(28px, env(safe-area-inset-bottom, 0px)) 16px;
  box-sizing: border-box;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.mmm-tutorial-overlay.mmm-tutorial-open {
  display: flex;
  flex-direction: column;
}
.mmm-tutorial-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto;
  background: #0f3460;
  border: 1px solid #1a4a8a;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}
.mmm-tutorial-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #7a7a9e;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  font-family: inherit;
}
.mmm-tutorial-close:hover {
  color: #e0e0e0;
}
.mmm-tutorial-title {
  margin: 0 36px 14px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0ecf9e;
}
.mmm-tutorial-body {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: #c8c8d8;
}
.mmm-tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.mmm-tutorial-actions .btn {
  min-width: 120px;
}
body:not(.dark-mode) .mmm-tutorial-card {
  background: #ffffff;
  border-color: #b0d8d8;
  box-shadow: 0 12px 40px rgba(0, 80, 80, 0.22);
}
body:not(.dark-mode) .mmm-tutorial-close {
  color: #668888;
}
body:not(.dark-mode) .mmm-tutorial-close:hover {
  color: #007a7a;
}
body:not(.dark-mode) .mmm-tutorial-title {
  color: #007a7a;
}
body:not(.dark-mode) .mmm-tutorial-body {
  color: #334455;
}

/* Atlas tutorial finale — centered modal (chain 21–22), above map UI */
.mmm-atlas-tutorial-root {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(28px, env(safe-area-inset-bottom, 0px)) 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.82);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.mmm-atlas-tutorial-root .mmm-atlas-tutorial-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
  flex-shrink: 0;
}

.mmm-tutorial-skip-to {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mmm-tutorial-skip-to-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8aa8;
}
.mmm-tutorial-skip-to-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mmm-tutorial-skip-to-list li {
  margin: 0;
}
.mmm-tutorial-skip-to-btn {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #d8d8e8;
  cursor: pointer;
  font-family: inherit;
}
.mmm-tutorial-skip-to-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(14, 207, 158, 0.45);
  color: #ffffff;
}
body:not(.dark-mode) .mmm-tutorial-skip-to {
  border-top-color: rgba(0, 0, 0, 0.08);
}
body:not(.dark-mode) .mmm-tutorial-skip-to-label {
  color: #668888;
}
body:not(.dark-mode) .mmm-tutorial-skip-to-btn {
  background: #f4faf9;
  border-color: #b0d8d8;
  color: #224;
}
body:not(.dark-mode) .mmm-tutorial-skip-to-btn:hover {
  background: #e8f5f3;
  border-color: #007a7a;
  color: #003030;
}

/* ===== NEWS SPOTLIGHT (Loads → Continue → News; box-shadow hole) ===== */
.mmm-news-spotlight-root {
  position: fixed;
  inset: 0;
  z-index: 99900;
  pointer-events: none;
}
.mmm-spot-ring {
  position: fixed;
  z-index: 99901;
  pointer-events: none;
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 9999px rgba(155, 160, 170, 0.7);
  box-sizing: border-box;
}
body.dark-mode .mmm-spot-ring {
  box-shadow: 0 0 0 9999px rgba(55, 60, 72, 0.82);
  border-color: rgba(255, 255, 255, 0.88);
}
.mmm-spot-tooltip {
  position: fixed;
  z-index: 99902;
  pointer-events: auto;
  max-width: min(360px, calc(100vw - 24px));
  padding: 38px 16px 14px 16px;
  background: #0f3460;
  border: 1px solid #1a4a8a;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}
.mmm-spot-tooltip-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7a7a9e;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mmm-spot-tooltip-x:hover {
  color: #e0e0e0;
  background: rgba(255, 255, 255, 0.08);
}
.mmm-spot-tooltip-body {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #c8c8d8;
}
.mmm-spot-tooltip-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mmm-spot-tooltip-actions .btn {
  min-width: 100px;
}
.mmm-spot-tooltip-actions .btn-primary {
  margin-left: auto;
}
body:not(.dark-mode) .mmm-spot-tooltip {
  background: #ffffff;
  border-color: #b0d8d8;
  box-shadow: 0 12px 36px rgba(0, 80, 80, 0.18);
}
body:not(.dark-mode) .mmm-spot-tooltip-body {
  color: #334455;
}
body:not(.dark-mode) .mmm-spot-tooltip-x {
  color: #668888;
}
body:not(.dark-mode) .mmm-spot-tooltip-x:hover {
  color: #007a7a;
  background: rgba(0, 122, 122, 0.08);
}

/* ===== MAIN TABS (bottom nav) ===== */
.main-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: 100%; position: relative; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bn-bar-bg);
  /* Glassmorphism: blur + extra saturation so it feels current, not flat */
  backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  display: flex;
  align-items: center;
  min-height: 56px;
  border-top: 1px solid var(--bn-bar-border);
  border-radius: 0;
  box-shadow: var(--bn-bar-shadow);
  padding: 6px 4px max(8px, env(safe-area-inset-bottom, 0px));
  gap: 4px;
  z-index: 10000;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav button {
  flex: 0 0 auto; min-width: 64px; min-height: 42px; padding: 8px 6px;
  color: var(--bn-btn-color); font-size: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bn-btn-bg);
  border: 1px solid var(--bn-btn-border); border-radius: 10px;
  box-shadow: var(--bn-btn-shadow);
  backdrop-filter: blur(14px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(190%) brightness(1.04);
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s; white-space: nowrap;
}
.bottom-nav button:active {
  transform: translateY(2px);
  box-shadow: var(--bn-btn-active-shadow);
  background: var(--bn-btn-active-bg);
}
.bottom-nav button.active {
  color: var(--bn-btn-active-color);
  transform: translateY(2px);
  box-shadow: var(--bn-btn-active-shadow);
  background: var(--bn-btn-active-bg);
  border-color: rgba(0,0,0,0.5);
}
body.dark-mode .bottom-nav button.active { font-weight: 600; }
/*
 * Keep icon row height consistent: emoji uses font metrics; custom SVG uses <img>. inline-flex + default
 * line-height can make the Loads slot shorter so the label sits higher than other tabs. Fixed-height
 * flex box matches the emoji line box (~20–22px) for all buttons.
 */
.bottom-nav button .nav-icon {
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
}
.bottom-nav button .nav-icon .nav-icon-img {
  width: 20px;
  height: 20px;
  max-height: 22px;
  object-fit: contain;
  object-position: center center;
  display: block;
  pointer-events: none;
}

.tab-page { display: none; }
.tab-page.active { display: flex; flex-direction: column; height: 100%; min-width: 0; max-width: 100%; overflow-x: hidden; }

/* ===== SUB TABS (within Revenue) ===== */
.sub-tabs {
  display: flex; background: #16213e;
  border-bottom: 1px solid #0f3460;
  flex-shrink: 0;
}
.sub-tabs button {
  flex: 1; padding: 8px; background: none; border: none;
  color: #7a7a9e; font-size: 13px; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.sub-tabs button.active {
  color: #e94560; border-bottom-color: #e94560;
}
.sub-tab-content { display: none; flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 32px; max-width: 100%; }
.sub-tab-content.active { display: block; }

/* ===== LOAD LIST ===== */
.load-list { padding: 4px 8px; }
.load-list-header {
  display: grid;
  padding: 6px 4px;
  font-size: 10px; font-weight: 700; color: #e94560;
  border-bottom: 1px solid #0f3460;
  background: #16213e;
  position: sticky; top: 0; z-index: 5;
}
.load-row {
  display: grid;
  padding: 4px 4px;
  font-size: 11px;
  border-bottom: 1px solid #0f3460;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
}
.load-row:hover { background: #1f2b4d; }
.load-row.child-row {
  background: #0d1b3e;
  border-left: 3px solid #0f3460;
  padding-left: 5px;
  display: none;
}
.load-row.child-row.expanded { display: grid; }
.load-row.child-row .child-indent { font-size:10px; color:#4a4a6e; }
.load-row.linked-group-summary {
  background: #1a2845;
  border-left: 3px solid #0ecf9e;
}
.load-row.linked-group-summary:hover {
  background: #223556;
}
.row-checkbox {
  accent-color: #e94560; width: 15px; height: 15px; cursor: pointer;
}
.expand-arrow {
  background: none; border: none; color: #7a7a9e; font-size: 14px;
  cursor: pointer; padding: 0; width: 26px; text-align: center;
  transition: transform 0.2s, color 0.2s;
}
.expand-arrow:hover { color: #e94560; }
.expand-arrow.open { transform: rotate(90deg); }

/* Link toolbar */
.link-toolbar {
  display: none; padding: 6px 10px;
  background: #0f3460; border-bottom: 1px solid #1a4a8a;
  align-items: center; gap: 8px; justify-content: space-between;
}
.link-toolbar.visible { display: flex; }
.link-toolbar .sel-count { font-size: 12px; color: #b0b0c8; }
.link-toolbar .toolbar-btns { display: flex; gap: 6px; }

/* Search & Sort bar */
.list-controls {
  display: flex; gap: 6px; padding: 6px 8px;
  background: #16213e; border-bottom: 1px solid #0f3460;
  align-items: center; flex-wrap: wrap;
  flex-shrink: 0;
}
.list-controls input[type="text"] {
  width: 100%; min-width: 0; box-sizing: border-box;
  background: #0f3460; border: 1px solid #1a4a8a;
  color: #e0e0e0; padding: 5px 8px; border-radius: 4px;
  font-size: 12px; outline: none;
}
.list-controls input::placeholder { color: #4a4a6e; }
.list-controls select {
  background: #0f3460; border: 1px solid #1a4a8a;
  color: #e0e0e0; padding: 5px 6px; border-radius: 4px;
  font-size: 11px; outline: none;
}
.list-control-group {
  display: flex; flex-direction: column; gap: 2px;
}
.list-control-label {
  font-size: 9px; color: #7a7a9e; text-transform: uppercase; letter-spacing: 0.5px;
}
.load-filter-panel {
  background: #0f3460; border-bottom: 1px solid #1a4a8a;
  padding: 10px 12px;
}
.load-filter-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px;
}
.load-filter-row:last-child { margin-bottom: 0; }
.load-filter-item {
  display: flex; flex-direction: column; gap: 2px;
}
.load-filter-item label {
  font-size: 9px; color: #7a7a9e; text-transform: uppercase; letter-spacing: 0.5px;
}
.load-filter-item input,
.load-filter-item select {
  background: #16213e; border: 1px solid #1a4a8a;
  color: #e0e0e0; padding: 4px 6px; border-radius: 4px;
  font-size: 11px; outline: none; min-width: 80px;
}
.sort-btn {
  background: none; border: 1px solid #1a4a8a; color: #7a7a9e;
  padding: 4px 6px; border-radius: 4px; cursor: pointer;
  font-size: 12px; transition: color 0.2s;
}
.sort-btn:hover { color: #e94560; }

/* Load list group headers (Group By) */
.load-list-group-header {
  background: #0f3460; color: #0ecf9e; font-size: 11px; font-weight: 700;
  padding: 6px 10px; border-radius: 4px; margin-bottom: 4px;
  border: 1px solid #1a4a8a;
}

/* Group section headers */
.group-header {
  background: linear-gradient(135deg, #1a3a6a 0%, #16213e 100%);
  border: 1px solid #0f3460; border-left: 3px solid #0ecf9e;
  padding: 8px 12px; margin-top: 6px;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 4px;
}
.group-header:first-child { margin-top: 0; }
.group-header .gh-title {
  font-size: 12px; font-weight: 600; color: #0ecf9e;
}
.group-header .gh-meta {
  font-size: 10px; color: #7a7a9e;
  display: flex; gap: 10px;
}
.group-header .gh-meta .gh-total {
  color: #e0e0ff; font-weight: 600;
}

/* Scrollable list for wide grid */
.list-scroll-wrapper {
  overflow-x: auto; overflow-y: auto; flex: 1; min-height: 0;
}
/* Load List sub-tab: split-panel layout */
#rev-list.sub-tab-content.active {
  display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0;
}
.rev-split-panel { display: flex; height: calc(100vh - 160px); overflow: hidden; }
.rev-list-panel {
  width: 25%; min-width: 180px; max-width: 60%;
  display: flex; flex-direction: column; border-right: 1px solid #0f3460; overflow: hidden;
}
.rev-list-scroll { flex: 1; overflow-y: auto; overflow-x: auto; padding-bottom: 60px; }
.rev-split-resizer {
  width: 5px; cursor: col-resize; background: #0f3460; flex-shrink: 0; transition: background 0.15s;
}
.rev-split-resizer:hover, .rev-split-resizer.active { background: #0ecf9e; }
.rev-detail-panel {
  flex: 1; overflow-y: auto; padding: 16px; position: relative;
}
.rev-detail-back-btn {
  display: none; position: absolute; top: 8px; left: 8px; z-index: 10;
  background: #0f3460; border: 1px solid #1a4a8a; color: #e0e0e0;
  padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.rev-detail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; opacity: 0.6;
}
.rev-detail-card {
  background: #16213e; border-radius: 10px; padding: 20px;
}
.rev-detail-card .detail-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px;
}
.rev-detail-card .detail-section-label {
  font-size: 12px; font-weight: 700; color: #0ecf9e; padding: 12px 0 6px;
  border-bottom: 1px solid #0f3460; margin-bottom: 4px;
}
.rev-detail-card .detail-row {
  display: flex; justify-content: space-between; padding: 7px 0;
  border-bottom: 1px solid rgba(15,52,96,0.5); font-size: 13px;
}
.rev-detail-card .detail-row:last-child { border-bottom: none; }
.rev-detail-card .dl { color: #7a7a9e; flex-shrink: 0; }
.rev-detail-card .dv { color: #e0e0e0; font-weight: 500; text-align: right; word-break: break-word; }
.rev-detail-card .detail-actions {
  display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #0f3460;
}
.rev-detail-card .detail-actions button { flex: 1; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; }
.rev-detail-card .edit-btn { background: #0ecf9e; color: #1a1a2e; }
.rev-detail-card .delete-btn { background: transparent; border: 1px solid #e94560 !important; color: #e94560; }
.rev-detail-card .save-btn { background: #0ecf9e; color: #1a1a2e; }
.rev-detail-card .cancel-btn { background: transparent; border: 1px solid #7a7a9e !important; color: #7a7a9e; }
.rev-list-panel .load-row.selected { background: #1f2b4d; border-left: 3px solid #0ecf9e; }
/* Inline edit form within detail panel */
.rev-edit-section { margin-bottom: 12px; }
.rev-edit-section .edit-section-title {
  font-size: 12px; font-weight: 700; color: #0ecf9e; padding: 8px 0 6px;
  border-bottom: 1px solid #0f3460; margin-bottom: 8px;
}
.rev-edit-row { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rev-edit-field { flex: 1; min-width: 80px; }
.rev-edit-field label { display: block; font-size: 10px; color: #7a7a9e; margin-bottom: 2px; }
.rev-edit-field input, .rev-edit-field select {
  width: 100%; box-sizing: border-box; padding: 5px 6px; font-size: 12px;
  background: #0f3460; border: 1px solid #1a4a8a; color: #e0e0e0; border-radius: 4px; outline: none;
}
.rev-edit-field input:focus, .rev-edit-field select:focus { border-color: #0ecf9e; }
/* Mobile: detail slides in from right as full-screen overlay */
@media (max-width: 768px) {
  .rev-list-panel { width: 100% !important; max-width: 100% !important; min-width: 0; }
  .rev-split-resizer { display: none; }
  .rev-detail-panel {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #1a1a2e; z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: block; padding-top: 44px; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overflow-x: hidden;
  }
  .rev-detail-panel.mobile-visible { transform: translateX(0); }
  .rev-detail-back-btn { display: block; }
}
#rev-list .list-scroll-wrapper {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: auto;
  padding-bottom: 130px;
}
.load-row .loc-cell {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.load-row .pay-amount { color: #0ecf9e; font-weight: 600; }
.load-row .type-badge {
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  display: inline-block; text-align: center;
}
.badge-load { background: #0f3460; color: #53a8ff; }
.badge-detention { background: #3d1e0f; color: #ffa14e; }
.badge-tarp { background: #2d1f0f; color: #d4a574; }
.badge-bonus { background: #1e3d0f; color: #7ef04e; }
.badge-reimburse { background: #3d0f3d; color: #e04ef0; }
.badge-custom { background: #1a2a3a; color: #8ba3c7; }

.load-list-totals {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 8px 12px;
  background: #16213e;
  border-top: 2px solid #0f3460;
  flex-shrink: 0;
  font-size: 12px;
}
/* Load list totals: fixed above nav, compact */
#rev-list .load-list-totals {
  padding: 4px 10px;
  font-size: 10px;
  border-top: 1px solid #0f3460;
  flex-shrink: 0;
}
#rev-list .load-list-totals .total-item .label { font-size: 9px; }
#rev-list .load-list-totals .total-item .value { font-size: 11px; font-weight: 600; }
.total-item { text-align: center; }
.total-item .label { color: #7a7a9e; font-size: 10px; }
.total-item .value { color: #0ecf9e; font-weight: 700; font-size: 14px; }

/* ===== ADD ENTRY FORM ===== */
.entry-form { padding: 10px 12px; max-width: 100%; }
.form-row {
  display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-end;
}
.form-group { display: flex; flex-direction: column; flex: 1; }

/* Loads add entry (+ edit stops): early/late window — two pairs on desktop, stacked pairs on phone */
.entry-form .form-row > .load-schedule-band {
  flex: 1 1 100%;
  min-width: 0;
}
.load-schedule-band {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
}
.load-schedule-pair {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  align-items: flex-end;
}
.load-schedule-pair > .form-group {
  flex: 1 1 0;
  min-width: 0;
}
.load-schedule-pair > .form-group.load-schedule-time {
  flex: 0 0 118px;
  max-width: 140px;
}
.load-schedule-pair > .form-group.load-schedule-time input[type="time"],
.load-schedule-pair > .form-group input[type="date"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.load-schedule-pair > .rev-edit-field {
  flex: 1 1 0;
  min-width: 0;
}
.load-schedule-pair > .rev-edit-field.load-schedule-time {
  flex: 0 0 100px;
  max-width: 120px;
}
.rev-edit-row.load-schedule-band {
  flex-wrap: nowrap;
  align-items: flex-end;
}
.rev-edit-row.load-schedule-band > .load-schedule-pair {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 640px) {
  .load-schedule-band {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .load-schedule-pair {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  .load-schedule-pair > .form-group.load-schedule-time,
  .load-schedule-pair > .rev-edit-field.load-schedule-time {
    flex: 0 0 110px;
    max-width: 40%;
  }
}

/* Company driver Add Entry — mobile-first layout */
.company-add-entry {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.company-add-entry *,
.company-add-entry *::before,
.company-add-entry *::after {
  box-sizing: border-box;
}
.company-add-entry .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  align-items: flex-end;
  min-width: 0;
  width: 100%;
}
.company-add-entry .form-group {
  min-width: 0;
}
.company-add-entry .form-group input,
.company-add-entry .form-group select,
.company-add-entry .form-group textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.company-add-entry .company-city-full {
  flex: 1 1 100%;
  min-width: 0;
}
.company-add-entry .company-state-zip-row {
  flex-wrap: nowrap;
}
.company-add-entry .company-state-field {
  flex: 0 0 72px;
  max-width: 88px;
}
.company-add-entry .company-zip-field {
  flex: 1 1 auto;
}
.company-add-entry .company-dt-stack {
  width: 100%;
  min-width: 0;
}
.company-add-entry .company-dt-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 8px;
  min-width: 0;
  width: 100%;
}
.company-add-entry .company-dt-date {
  flex: 1 1 0;
  min-width: 0;
}
.company-add-entry .company-dt-date input[type="date"] {
  width: 100%;
  min-width: 0;
}
.company-add-entry .company-dt-time {
  flex: 0 0 90px;
  min-width: 0;
  max-width: 100px;
}
.company-add-entry .company-dt-time input[type="time"] {
  width: 100%;
  min-width: 0;
}
.company-add-entry .company-delivered-row .company-delivered-input-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.company-add-entry .company-delivered-row input[type="date"] {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}
.company-add-entry .company-mile-row {
  margin-bottom: 10px;
}
.company-add-entry .company-mile-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #0ecf9e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(14, 207, 158, 0.12);
  vertical-align: middle;
  border: 1px solid rgba(14, 207, 158, 0.35);
}
.company-add-entry .amenity-row {
  flex-wrap: wrap;
}
.company-add-entry .section-divider {
  flex-wrap: wrap;
  min-width: 0;
}
/* Shrink native date/time pickers on narrow viewports */
@media (max-width: 480px) {
  .company-add-entry .company-dt-time {
    flex: 0 0 80px;
    max-width: 90px;
  }
  .company-add-entry .form-group input[type="date"],
  .company-add-entry .form-group input[type="time"] {
    font-size: 12px;
    padding: 5px 4px;
  }
}
.form-group label {
  font-size: 10px; color: #7a7a9e; margin-bottom: 2px;
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: #0f3460; border: 1px solid #1a4a8a;
  color: #e0e0e0; padding: 6px 8px; border-radius: 4px;
  font-size: 13px; outline: none;
  transition: border-color 0.2s;
  width: 100%;
  min-width: 0;
}
.form-group input:focus,
.form-group select:focus { border-color: #e94560; }
.form-group input::placeholder { color: #4a4a6e; }

/* Checkbox row */
.checkbox-row {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px; padding: 4px 0;
}
.checkbox-row input[type="checkbox"] {
  accent-color: #e94560; width: 16px; height: 16px;
}
.checkbox-row label { font-size: 12px; color: #b0b0c8; cursor: pointer; }

.amenity-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  margin-bottom: 8px; padding: 6px 0;
}
.amenity-yn {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap;
}
.amenity-label {
  font-size: 11px; color: #7a7a9e; margin-right: 2px; min-width: 0;
}
.amenity-yn-opt {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #b0b0c8; cursor: pointer; white-space: nowrap;
}
.amenity-yn-opt input[type="radio"] { accent-color: #0ecf9e; width: 14px; height: 14px; }

/* Mileage split section */
.mileage-split { display: block; }
.split-section {
  background: #0d1b3e; border: 1px solid #1a3a6a;
  border-radius: 6px; padding: 8px 10px; margin-bottom: 8px;
}
.split-section h4 {
  font-size: 11px; color: #7a7a9e; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Pay type dependent sections */
.pay-section { display: none; }
.pay-section.visible { display: block; }

/* Buttons */
.btn {
  padding: 8px 16px; border: none; border-radius: 5px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { background: #d63550; }
.btn-secondary { background: #0f3460; color: #e0e0e0; }
.btn-secondary:hover { background: #1a4a8a; }
.btn-danger { background: #7a1a1a; color: #ff8a8a; }
.btn-danger:hover { background: #9a2a2a; }
.form-actions {
  display: flex; gap: 8px; margin-top: 4px; justify-content: flex-end;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 40px 20px; color: #4a4a6e;
}
.empty-state .icon { font-size: 36px; margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* Overview placeholder */
.placeholder-content {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; color: #4a4a6e; text-align: center; padding: 40px;
}
.placeholder-content .icon { font-size: 48px; margin-bottom: 12px; }
.placeholder-content h2 { font-size: 16px; margin-bottom: 4px; color: #7a7a9e; }
.placeholder-content p { font-size: 12px; }

/* Overview Tabs (browser-style) */
.overview-wrap { display: flex; flex-direction: column; height: 100%; }
.ov-tab-bar {
  display: flex; background: #16213e; border-bottom: 2px solid #0f3460;
  overflow-x: auto; flex-shrink: 0;
}
.ov-tab-btn {
  flex: 1; min-width: 0; padding: 10px 6px; border: none; background: transparent;
  color: #7a7a9e; font-size: 12px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s;
  white-space: nowrap; text-align: center;
}
.ov-tab-btn:hover { color: #e0e0e0; background: rgba(233,69,96,0.06); }
.ov-tab-btn.active { color: #e94560; border-bottom-color: #e94560; background: rgba(233,69,96,0.08); }
.ov-tab-panel { display: none; flex: 1; overflow-y: auto; padding: 10px 12px 32px; }
.ov-tab-panel.active { display: block; }
.ov-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #0f3460; font-size: 13px; }
.ov-row:last-child { border-bottom: none; }
.ov-label { color: #7a7a9e; }
.ov-value { color: #e0e0e0; font-weight: 600; }
.ov-value.green { color: #0ecf9e; }
.ov-value.red { color: #e94560; }
.ov-divider { font-size: 11px; color: #4a4a6e; text-transform: uppercase; letter-spacing: 1px; margin: 10px 0 4px; }
.ov-date-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.ov-date-row input[type="date"] { flex: 1; min-width: 120px; background: #1a1a2e; border: 1px solid #0f3460; color: #e0e0e0; border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.ov-date-row button { background: #e94560; border: none; color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.ov-date-row button.secondary { background: #0f3460; }
.ov-big-num { font-size: 22px; font-weight: 700; color: #0ecf9e; text-align: center; margin: 8px 0; }
.ov-big-num.red { color: #e94560; }
.chart-wrap { position: relative; height: 200px; margin-top: 6px; }
.chart-wrap-sm { position: relative; height: 180px; margin-top: 6px; }
.chart-hdr { display:flex; align-items:center; justify-content:space-between; margin:14px 0 6px; }
.chart-hdr-title { font-size:11px; color:#7a7a9e; text-transform:uppercase; letter-spacing:.8px; }
.ct-btns { display:flex; gap:2px; background:#0f3460; border-radius:6px; padding:2px; }
.ct-btn { background:transparent; border:none; color:#7a7a9e; font-size:11px; padding:3px 10px; border-radius:4px; cursor:pointer; transition:all .15s; }
.ct-btn.active { background:#1a1a2e; color:#e0e0e0; font-weight:600; }

/* Settlements */
.settlement-card { background:#16213e; padding:14px; border-radius:6px; margin-bottom:10px; cursor:pointer; border-left:3px solid #0f3460; transition: border-color .2s, background .2s; }
.settlement-card:hover { border-left-color:#0ecf9e; background:#1a2a50; }
.settlement-card.correct { border-left-color:#0ecf9e; }
.settlement-card.incorrect { border-left-color:#e94560; }
.settlement-badge { display:inline-block; font-size:10px; padding:2px 8px; border-radius:10px; font-weight:600; }
.settlement-badge.correct { background:rgba(78,204,163,0.15); color:#0ecf9e; }
.settlement-badge.incorrect { background:rgba(233,69,96,0.15); color:#e94560; }
.settlement-badge.pending { background:rgba(122,122,158,0.15); color:#7a7a9e; }
/* Above .bottom-nav (z-index 10000) so long settlement popups can scroll and bottom buttons stay visible */
#settlementModal {
  display:none; position:fixed; top:0; left:0; width:100%; height:100%; max-height:100dvh;
  background:rgba(0,0,0,0.78); z-index:10100; overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  padding:16px 12px calc(72px + env(safe-area-inset-bottom, 0px));
  box-sizing:border-box;
}
#settlementModalInner {
  background:#1a1a2e; border-radius:10px; max-width:580px; margin:0 auto 12px; border:1px solid #0f3460;
  display:flex; flex-direction:column; max-height:calc(100dvh - 32px - 72px); overflow:hidden;
}
#settlementModalContent {
  display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden;
}
#settlementModal .settle-modal-scroll {
  flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch;
}
#settlementModal .settle-modal-sticky-bottom {
  flex-shrink:0; background:#1a1a2e; border-top:1px solid #0f3460;
  padding-bottom:max(4px, env(safe-area-inset-bottom, 0px));
  box-shadow:0 -6px 20px rgba(0,0,0,0.25);
}
#settlementReviewModal { z-index:10100 !important; padding-bottom:calc(72px + env(safe-area-inset-bottom, 0px)) !important; }
.settle-modal-header { flex-shrink:0; background:#0f3460; padding:14px 16px; display:flex; justify-content:space-between; align-items:center; }
.settle-section { padding:14px 16px; border-bottom:1px solid #0f3460; }
.settle-section:last-child { border-bottom:none; }
.settle-section-title { color:#7a7a9e; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:10px; }
.settle-load-row { background:#0f3460; padding:10px 12px; border-radius:4px; margin-bottom:6px; }
.settle-exp-row { background:#0f3460; padding:10px 12px; border-radius:4px; margin-bottom:6px; border-left:3px solid #e94560; }
.settle-accuracy-row { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:4px; align-items:stretch; }
.settle-accuracy-btn { padding:8px 16px; border-radius:6px; border:1px solid #0f3460; font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; flex:1 1 140px; min-width:min(100%,140px); }
.settle-accuracy-btn.yes { background:rgba(14,207,158,0.1); color:#0ecf9e; border-color:#0ecf9e; }
.settle-accuracy-btn.yes.active, .settle-accuracy-btn.yes:hover { background:#0ecf9e; color:#1a1a2e; }
.settle-accuracy-btn.no { background:rgba(233,69,96,0.1); color:#e94560; border-color:#e94560; }
.settle-accuracy-btn.no.active, .settle-accuracy-btn.no:hover { background:#e94560; color:#fff; }

/* Scrollable list wrapper */
.list-wrapper {
  flex: 1; overflow-y: auto;
}

/* ===== CURRENT LOAD SUB-TAB ===== */
.current-load-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 10px 12px;
  position: sticky; bottom: 0;
  background: #0e1428;
  border-top: 1px solid #0f3460;
  z-index: 10;
}
.cl-btn {
  padding: 10px 6px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.cl-btn:active { transform: translateY(1px); opacity: 0.85; }
.cl-btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.cl-btn-secondary { background: #16213e; color: #b0b0c8; border: 1px solid #1a4a8a; }
.cl-btn-danger    { background: #3d0f1a; color: #e94560; border: 1px solid #e94560; }
.cl-btn-primary   { background: #0f3460; color: #e0e0e0; border: 1px solid #1a4a8a; }
.cl-btn-finish    { background: #0f3d2e; color: #0ecf9e; border: 1px solid #0ecf9e; }
.cl-detail-section {
  font-size: 10px; font-weight: 700; color: #7a7a9e;
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 8px 0 4px; border-bottom: 1px solid #0f3460;
  margin-bottom: 2px;
}
.cl-detail-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 5px 0; border-bottom: 1px solid rgba(15,52,96,0.5);
  font-size: 12px; gap: 8px;
}
.cl-dl { color: #7a7a9e; flex-shrink: 0; }
.cl-dv { color: #e0e0e0; font-weight: 600; text-align: right; }

/* Current Load modals */
.cl-modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.72); z-index: 500;
  justify-content: center; align-items: center;
  animation: fadeIn 0.15s ease;
}
.cl-modal {
  background: #1a1a2e; border: 1px solid #0f3460;
  border-radius: 12px; width: 92%; max-width: 400px;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease;
}
.cl-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 12px; border-bottom: 1px solid #0f3460;
}
.cl-modal-title { font-size: 16px; font-weight: 700; color: #e0e0e0; }
.cl-modal-close { background: none; border: none; color: #7a7a9e; font-size: 20px; cursor: pointer; padding: 0; line-height: 1; }
.cl-modal-close:hover { color: #e94560; }
.cl-modal-body { padding: 14px 18px; overflow-y: auto; flex: 1; }
.cl-modal-footer {
  padding: 12px 18px; border-top: 1px solid #0f3460;
  display: flex; gap: 8px; justify-content: flex-end;
}
.cl-cancel-type-row { display: flex; flex-direction: column; gap: 10px; }
.cl-radio-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #e0e0e0; cursor: pointer; }
.cl-radio-label input { accent-color: #e94560; width: 16px; height: 16px; cursor: pointer; }
.cl-field-row { display: flex; gap: 10px; }
.cl-field { display: flex; flex-direction: column; flex: 1; gap: 4px; }
.cl-field label { font-size: 10px; color: #7a7a9e; font-weight: 600; text-transform: uppercase; }
.cl-field input { background: #0f3460; border: 1px solid #1a4a8a; color: #e0e0e0; padding: 7px 8px; border-radius: 5px; font-size: 13px; outline: none; }
.cl-field input:focus { border-color: #e94560; }
.cl-select-item {
  background: #16213e; border: 1px solid #0f3460;
  border-radius: 8px; padding: 10px 12px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cl-select-item:hover { background: #1f2b4d; border-color: #0ecf9e; }
.cl-select-active { border-color: #0ecf9e !important; background: #0f2d20 !important; }

/* Light mode overrides */
body:not(.dark-mode) .current-load-actions { background: #e4f3f3; border-top-color: #b0d8d8; }
body:not(.dark-mode) .cl-btn-secondary { background: #fff; color: #007a7a; border-color: #b0d8d8; }
body:not(.dark-mode) .cl-btn-primary { background: #e4f3f3; color: #007a7a; border-color: #b0d8d8; }
body:not(.dark-mode) .cl-btn-danger { background: #fde8ec; color: #cc2244; border-color: #e94560; }
body:not(.dark-mode) .cl-btn-finish { background: #e4f3ed; color: #007a5a; border-color: #007a5a; }
body:not(.dark-mode) .cl-btn:disabled { opacity: 0.4; }
body:not(.dark-mode) .cl-modal { background: #fff; border-color: #c0dede; }
body:not(.dark-mode) .cl-modal-header, body:not(.dark-mode) .cl-modal-footer { border-color: #c0dede; }
body:not(.dark-mode) .cl-modal-title { color: #1a2e2e; }
body:not(.dark-mode) .cl-modal-close { color: #668888; }
body:not(.dark-mode) .cl-radio-label { color: #1a2e2e; }
body:not(.dark-mode) .cl-field label { color: #668888; }
body:not(.dark-mode) .cl-field input { background: #f0f8f8; border-color: #b0d8d8; color: #1a2e2e; }
body:not(.dark-mode) .cl-select-item { background: #f0f8f8; border-color: #c0dede; }
body:not(.dark-mode) .cl-select-item:hover { background: #e4f3f3; border-color: #007a7a; }
body:not(.dark-mode) .cl-select-active { background: #d8f0e8 !important; border-color: #007a5a !important; }
body:not(.dark-mode) .cl-detail-section { color: #668888; border-color: #c0dede; }
body:not(.dark-mode) .cl-detail-row { border-color: rgba(176,216,216,0.5); }
body:not(.dark-mode) .cl-dl { color: #668888; }
body:not(.dark-mode) .cl-dv { color: #1a2e2e; }

/* Current Load card - light mode uses light card; dark mode uses dark card */
.cl-current-card {
  background: #16213e; border: 1px solid #0f3460;
  border-radius: 8px; padding: 14px 14px 10px; margin-bottom: 10px;
}
body:not(.dark-mode) .cl-current-card {
  background: #f0f8f8; border-color: #b0d8d8;
}
body:not(.dark-mode) #currentLoadView .cl-detail-section { color: #668888; border-color: #b0d8d8; }
body:not(.dark-mode) #currentLoadView .cl-dl { color: #668888; }
body:not(.dark-mode) #currentLoadView .cl-dv { color: #1a2e2e; }
body:not(.dark-mode) #currentLoadView .cl-current-card .type-badge { background: #d0e0e0 !important; color: #5a7a7a !important; }
.cl-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cl-load-id-label, .cl-card-total { font-size: 15px; font-weight: 700; color: #0ecf9e; }
.cl-card-total { font-size: 16px; }
body:not(.dark-mode) #currentLoadView .cl-load-id-label, body:not(.dark-mode) #currentLoadView .cl-card-total { color: #007a5a; }
#currentLoadView .cl-total-row { border-top: 2px solid rgba(15,52,96,0.5); margin-top: 6px; padding-top: 8px; }
#currentLoadView .cl-total-row .cl-dl, #currentLoadView .cl-total-row .cl-dv { font-size: 14px; font-weight: 700; color: #007a5a; }
body.dark-mode #currentLoadView .cl-total-row .cl-dl, body.dark-mode #currentLoadView .cl-total-row .cl-dv { color: #0ecf9e; }
/* Dark mode: force light text on dark card */
#currentLoadView .cl-detail-section { color: #7a7a9e; }
#currentLoadView .cl-dl { color: #7a7a9e; }
#currentLoadView .cl-dv { color: #e0e0e0; }
body.dark-mode #currentLoadView .cl-dv { color: #e0e0e0; }
#currentLoadView .empty-state p { color: #1a2e2e; }
body.dark-mode #currentLoadView .empty-state p { color: #e0e0e0; }
#currentLoadView .empty-state .icon { opacity: 1; }

/* Entry detail modal / expand */
.entry-detail-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 10050;
  justify-content: center; align-items: center;
  animation: fadeIn 0.15s ease;
}
.entry-detail-overlay.active { display: flex; }
.entry-detail-card {
  background: #1a1a2e; border: 1px solid #0f3460;
  border-radius: 12px; padding: 20px; width: 92%; max-width: 420px;
  max-height: 80vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(15,52,96,0.6);
  font-size: 12px; gap: 8px;
}
.detail-row .dl { color: #7a7a9e; flex-shrink: 0; }
.detail-row .dv { color: #e0e0e0; font-weight: 600; text-align: right; }
.detail-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.offset-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid #0f3460;
  background: #16213e; color: #0ecf9e; font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
.offset-btn:active { background: #0f3460; }
.detail-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: #e94560; margin-top: 12px; margin-bottom: 2px; padding-bottom: 2px;
}
.detail-section-label:first-of-type { margin-top: 0; }

/* Section divider */
.section-divider {
  font-size: 11px; color: #e94560; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.btn-add-stop:hover { background: #1a4a8a !important; color: #0ecf9e !important; }
.stop-block { margin-bottom: 16px; padding: 12px; background: rgba(15,52,96,0.3); border-radius: 6px; border: 1px solid rgba(26,74,138,0.5); }
.stop-block:not(:last-child) { margin-bottom: 12px; }
body:not(.dark-mode) .stop-block { background: rgba(176,216,216,0.2); border-color: rgba(0,122,122,0.3); }

/* Diesel Price Watch – single panel + region selector */
.diesel-panel-single {
  max-width: 100%;
}
.diesel-panel {
  background: #16213e;
  border: 1px solid #1a4a8a;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
}
.diesel-panel-header {
  font-size: 10px;
  color: #7a7a9e;
  margin-bottom: 4px;
}
.diesel-panel-header-static {
  font-weight: 600;
  color: #a0a0c0;
}
.diesel-region-select {
  width: 100%;
  padding: 2px 4px;
  font-size: 10px;
  background: transparent;
  border: 1px solid #1a4a8a;
  border-radius: 4px;
  color: #a0a0c0;
  cursor: pointer;
}
.diesel-region-select:focus { outline: none; border-color: #0ecf9e; }
.diesel-panel-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4px;
}
.diesel-panel-right { text-align: right; }
.diesel-price { font-size: 16px; font-weight: 700; color: #0ecf9e; }
.diesel-period { font-size: 9px; color: #7a7a9e; margin-top: 1px; }
.diesel-change { font-size: 10px; font-weight: 600; }
.diesel-chart-canvas {
  width: 100%;
  height: 48px;
  display: block;
}

.info-tip { position: relative; }
.info-tip-popup {
  top: calc(100% + 6px) !important;
  bottom: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: min(300px, 95vw);
}
.info-tip:hover .info-tip-popup,
.info-tip.show .info-tip-popup { display: block !important; }

/* ===== ACCOUNT TAB ===== */
.account-sub-tabs { display: flex; background: #16213e; border-bottom: 1px solid #0f3460; }
.account-sub-tabs button { flex: 1; padding: 8px; background: none; border: none; color: #7a7a9e; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
.account-sub-tabs button.active { color: #e94560; border-bottom-color: #e94560; }
.acct-sub { overflow-y: auto; padding-bottom: 110px; }

.profile-card { background: #16213e; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.profile-card .pf-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #0f3460; font-size: 12px; }
.profile-card .pf-row:last-child { border-bottom: none; }
.profile-card .pf-label { color: #7a7a9e; }
.profile-card .pf-value { color: #e0e0e0; font-weight: 600; }
.profile-logout-wrap {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(15,52,96,0.6);
}
body:not(.dark-mode) .profile-logout-wrap { border-top-color: rgba(0,122,122,0.25); }

/* ===== EXPENSES TAB ===== */
.cat-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.cat-chip {
  padding: 5px 10px; border-radius: 14px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid #0f3460; background: #0f3460; color: #7a7a9e;
  transition: all 0.2s; white-space: nowrap;
}
.cat-chip.selected { background: #e94560; color: #fff; border-color: #e94560; }
.cat-chip.add-chip { border-style: dashed; color: #0ecf9e; border-color: #0ecf9e; }
.cat-chip.add-chip:hover { background: #1a3a2e; }
.cat-chip .remove-cat {
  margin-left: 4px; color: #ff8a8a; font-weight: 700; cursor: pointer;
  font-size: 13px;
}

/* Category Dropdown Styles */
.cat-selector-wrap {
  position: relative; display: flex; gap: 8px; align-items: center; margin-bottom: 12px;
}
.cat-selector {
  flex: 1; position: relative;
}
.cat-selector input {
  width: 100%;
  padding: 8px 12px;
  background: #0f3460;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 13px;
  cursor: pointer;
}
.cat-selector input:focus {
  outline: none;
  border-color: #e94560;
  background: #16213e;
}
.cat-selector input::placeholder {
  color: #7a7a9e;
}
.cat-dropdown {
  position: fixed;
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: none;
}
.cat-dropdown.visible {
  display: block;
}
.cat-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  color: #e0e0e0;
  font-size: 13px;
  transition: background 0.15s;
  border-bottom: 1px solid #0f3460;
}
.cat-dropdown-item:last-child {
  border-bottom: none;
}
.cat-dropdown-item:hover {
  background: #0f3460;
}
.cat-dropdown-item.selected {
  background: #e94560;
  color: #fff;
}
.cat-dropdown-item.new-entry {
  color: #0ecf9e;
  font-weight: 600;
}
.cat-dropdown-item.new-entry:hover {
  background: #1a3a2e;
}
.cat-manage-btn {
  padding: 8px 12px;
  background: #0f3460;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #7a7a9e;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}
.cat-manage-btn:hover {
  background: #16213e;
  color: #0ecf9e;
  border-color: #0ecf9e;
}

.img-upload-area {
  border: 2px dashed #0f3460; border-radius: 8px;
  padding: 16px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: #4a4a6e; font-size: 12px;
}
.img-upload-area:hover { border-color: #e94560; background: #1a1a3e; }
.img-preview {
  position: relative; display: inline-block; margin-top: 8px;
}
.img-preview img {
  max-width: 100%; max-height: 180px; border-radius: 6px;
  border: 1px solid #0f3460;
}
.img-preview .remove-img {
  position: absolute; top: -6px; right: -6px;
  background: #e94560; color: #fff; border: none; border-radius: 50%;
  width: 22px; height: 22px; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Fuel-specific fields */
.fuel-fields {
  display: none; background: #0d1b3e;
  border: 1px solid #1a3a6a; border-radius: 6px;
  padding: 10px; margin-bottom: 8px;
}
.fuel-fields.visible { display: block; }
.fuel-fields h4 {
  font-size: 11px; color: #ffa14e; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Address autocomplete suggestions */
.address-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #16213e; border: 1px solid #1a3a6a; border-top: none;
  border-radius: 0 0 6px 6px; z-index: 9999; max-height: 200px;
  overflow-y: auto; display: none;
}
.address-suggestions.visible { display: block; }
.address-suggestions .sug-item {
  padding: 8px 10px; font-size: 12px; color: #c0c0e0;
  cursor: pointer; border-bottom: 1px solid #0f3460;
}
.address-suggestions .sug-item:hover {
  background: #0f3460; color: #fff;
}
.address-suggestions .sug-item small {
  display: block; font-size: 10px; color: #7a7a9e; margin-top: 2px;
}

.fuel-savings {
  background: #1a3a2e; border: 1px solid #2a5a3e; border-radius: 6px;
  padding: 8px 10px; margin-top: 6px; text-align: center;
}
.fuel-savings .sav-label { font-size: 10px; color: #7a7a9e; }
.fuel-savings .sav-amount { font-size: 16px; font-weight: 700; color: #0ecf9e; }

.exp-row {
  display: grid;
  grid-template-columns: 62px 1fr 70px 26px;
  padding: 8px;
  border-bottom: 1px solid #0f3460;
  align-items: center; cursor: pointer;
  transition: background 0.15s; font-size: 12px;
}
.exp-row:hover { background: #1f2b4d; }
.exp-row .exp-cat-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 10px;
  background: #0f3460; color: #53a8ff; display: inline-block;
}
.exp-row .exp-amount { color: #ff6b6b; font-weight: 700; }
.exp-row .exp-note {
  font-size: 10px; color: #7a7a9e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exp-row .exp-receipt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #0ecf9e; display: inline-block;
}
.addr-warn {
  color: #f0ad4e; cursor: help; font-size: 13px;
  margin-left: 4px; vertical-align: middle;
  position: relative; display: inline-block;
}
.addr-warn:hover::after {
  content: attr(title);
  position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
  background: #1a1a2e; color: #f0ad4e; border: 1px solid #f0ad4e;
  padding: 4px 8px; border-radius: 4px; font-size: 10px;
  white-space: nowrap; z-index: 100; pointer-events: none;
}
/* Expenses tab layout - same as Overview: one panel at a time, full area */
.expenses-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.expenses-wrap .sub-tab-content { display: none; flex: 1; min-height: 0; overflow-y: auto; }
.expenses-wrap .sub-tab-content.active { display: block; }
#exp-list.sub-tab-content.active { display: flex !important; flex-direction: column; overflow: hidden; padding-bottom: 0; }
#exp-recurring.sub-tab-content.active { display: block !important; }
.exp-split-panel { display: flex; height: calc(100vh - 160px); overflow: hidden; }
.exp-list-panel {
  width: 25%; min-width: 180px; max-width: 60%;
  display: flex; flex-direction: column; border-right: 1px solid #0f3460; overflow: hidden;
}
.exp-list-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.exp-split-resizer {
  width: 5px; cursor: col-resize; background: #0f3460; flex-shrink: 0; transition: background 0.15s;
}
.exp-split-resizer:hover, .exp-split-resizer.active { background: #0ecf9e; }
.exp-detail-panel {
  flex: 1; overflow-y: auto; padding: 16px; position: relative;
}
.exp-detail-back-btn {
  display: none; position: absolute; top: 8px; left: 8px; z-index: 10;
  background: #0f3460; border: 1px solid #1a4a8a; color: #e0e0e0;
  padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.exp-detail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; opacity: 0.6;
}
.exp-detail-card {
  background: #16213e; border-radius: 10px; padding: 20px;
}
.exp-detail-card .detail-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px;
}
.exp-detail-card .detail-amount { font-size: 28px; font-weight: 700; color: #0ecf9e; }
.exp-detail-card .detail-cat {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  background: #0f3460; color: #53a8ff; font-weight: 600;
}
.exp-detail-card .detail-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid #0f3460; font-size: 13px;
}
.exp-detail-card .detail-row:last-child { border-bottom: none; }
.exp-detail-card .detail-label { color: #7a7a9e; }
.exp-detail-card .detail-val { color: #e0e0e0; font-weight: 500; text-align: right; }
.exp-detail-card .detail-actions {
  display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #0f3460;
}
.exp-detail-card .detail-actions button { flex: 1; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; }
.exp-detail-card .detail-actions .edit-btn { background: #0ecf9e; color: #1a1a2e; }
.exp-detail-card .detail-actions .delete-btn { background: transparent; border: 1px solid #e94560; color: #e94560; }
.exp-list-panel .exp-row.selected { background: #1f2b4d; border-left: 3px solid #0ecf9e; }

/* Inline edit form within expense detail panel */
.exp-edit-section { margin-bottom: 12px; }
.exp-edit-section-title {
  font-size: 12px; font-weight: 700; color: #0ecf9e; padding: 8px 0 6px;
  border-bottom: 1px solid #0f3460; margin-bottom: 8px;
}
.exp-edit-row { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.exp-edit-field { flex: 1; min-width: 80px; }
.exp-edit-field label { display: block; font-size: 10px; color: #7a7a9e; margin-bottom: 3px; }
.exp-edit-field input, .exp-edit-field select {
  width: 100%; padding: 6px 8px; background: #0f3460; border: 1px solid #1a4a8a;
  border-radius: 5px; color: #e0e0e0; font-size: 12px; box-sizing: border-box;
}
.exp-detail-card .save-btn { background: #0ecf9e; color: #1a1a2e; }
.exp-detail-card .cancel-btn { background: transparent; border: 1px solid #7a7a9e !important; color: #7a7a9e; }

/* Mobile: detail slides in from right as full-screen overlay */
@media (max-width: 768px) {
  .exp-list-panel { width: 100% !important; max-width: 100% !important; min-width: 0; }
  .exp-split-resizer { display: none; }
  .exp-detail-panel {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #1a1a2e; z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: block; padding-top: 44px; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overflow-x: hidden;
  }
  .exp-detail-panel.mobile-visible { transform: translateX(0); }
  .exp-detail-back-btn { display: block; }
}

.exp-list-header {
  display: grid;
  grid-template-columns: 62px 1fr 70px 26px;
  padding: 6px 8px; font-size: 10px; font-weight: 700; color: #e94560;
  border-bottom: 1px solid #0f3460;
  background: #16213e; position: sticky; top: 0; z-index: 5;
}

/* Fuel Map Styles */
#fuelMapContainer {
  width: 100%; height: calc(100vh - 150px);
  border-radius: 8px; overflow: hidden;
  min-height: 200px;
}
.fuel-map-controls {
  display: flex; gap: 8px; padding: 8px 12px;
  align-items: center; flex-wrap: wrap;
}
.fuel-map-controls select, .fuel-map-controls input {
  background: #0f3460; border: 1px solid #1a4a8a;
  color: #e0e0e0; padding: 6px 8px; border-radius: 6px;
  font-size: 12px; outline: none;
}
.fuel-map-controls button {
  padding: 6px 14px; background: #e94560; color: #fff;
  border: none; border-radius: 6px; font-size: 12px;
  cursor: pointer;
}
.fuel-map-controls button.secondary {
  background: #0f3460; border: 1px solid #1a4a8a;
}
.fuel-popup { font-size: 13px; color: #1a1a2e; max-width: 280px; }
.fuel-popup .fp-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.fuel-popup .fp-addr { color: #555; font-size: 11px; margin-bottom: 6px; }
.fuel-popup .fp-row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 12px; border-bottom: 1px solid #eee; }
.fuel-popup .fp-row:last-child { border-bottom: none; }
.fuel-popup .fp-label { color: #666; }
.fuel-popup .fp-val { font-weight: 600; }
.fuel-popup .fp-good { color: #2e7d32; }
.fuel-popup .fp-divider { border-top: 1px solid #ccc; margin: 6px 0; }
.fuel-popup .fp-history-title { font-weight: 600; font-size: 12px; margin-bottom: 4px; color: #333; }
.fuel-popup .fp-hist-item { font-size: 11px; padding: 3px 0; border-bottom: 1px dotted #ddd; }
.map-layer-toggle {
  position: absolute; top: 10px; right: 10px; z-index: 1000;
  background: #16213e; border-radius: 8px; padding: 4px;
  display: flex; gap: 2px; border: 1px solid #0f3460;
}
.map-layer-toggle button {
  padding: 5px 10px; border: none; border-radius: 6px;
  background: transparent; color: #7a7a9e; font-size: 11px;
  cursor: pointer; transition: all 0.2s;
}
.map-layer-toggle button.active {
  background: #e94560; color: #fff;
}

.period-preview {
  background: #16213e; border-radius: 8px; padding: 10px 12px;
  font-size: 12px;
}
.period-preview .pp-row {
  display: flex; justify-content: space-between;
  padding: 3px 0;
}
.period-preview .pp-label { color: #7a7a9e; }
.period-preview .pp-value { color: #0ecf9e; font-weight: 600; }

/* Customize menu items */
.settings-menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: #16213e; border-radius: 6px;
  margin-bottom: 6px; cursor: pointer;
  border: 1px solid #0f3460; transition: background 0.15s;
}
.settings-menu-item:hover { background: #1f2b4d; }
.settings-menu-item .smi-left { display: flex; align-items: center; gap: 10px; }
.settings-menu-item .smi-icon { font-size: 20px; }
.settings-menu-item .smi-label { font-size: 13px; font-weight: 600; }
.settings-menu-item .smi-desc { font-size: 10px; color: #7a7a9e; }
.settings-menu-item .smi-arrow { color: #7a7a9e; font-size: 16px; }

.cust-back-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #0f3460;
  border-bottom: 1px solid #1a4a8a;
  cursor: pointer; font-size: 13px; color: #e94560;
  font-weight: 600; transition: background 0.15s;
}
.cust-back-bar:hover { background: #1a4a8a; }
.cust-back-bar .back-arrow { font-size: 16px; }

/* Customize checkboxes */
.customize-list {
  list-style: none; padding: 0;
}
.customize-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #16213e; border-radius: 6px;
  margin-bottom: 6px; cursor: pointer;
  border: 1px solid #0f3460;
  transition: background 0.15s;
}
.customize-list li:hover { background: #1f2b4d; }
.customize-list li input[type="checkbox"] {
  accent-color: #e94560; width: 18px; height: 18px; cursor: pointer;
}
.customize-list li .col-label { font-size: 13px; font-weight: 600; }
.customize-list li .col-desc { font-size: 10px; color: #7a7a9e; }

.bn-preset-card:hover { background: #1f2b4d !important; }
.bn-preset-card.bn-preset-selected { border-color: #0ecf9e !important; box-shadow: 0 0 0 1px #0ecf9e; }
body:not(.dark-mode) .bn-preset-card { background: #ffffff !important; border-color: #c0dede; }
body:not(.dark-mode) .bn-preset-card:hover { background: #e4f3f3 !important; }
body:not(.dark-mode) .bn-preset-card.bn-preset-selected { border-color: #007a7a !important; box-shadow: 0 0 0 1px #007a7a; }

/* Bottom Bar Theme – Layout (options left, color box top-right 25%) */
.bn-theme-layout {
  display: grid;
  grid-template-columns: 1fr minmax(0, 25%);
  grid-template-rows: auto;
  gap: 12px;
  align-items: start;
  max-width: 340px;
}
.bn-theme-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bn-theme-opt {
  padding: 12px 14px;
  border: 1px solid #0f3460;
  border-radius: 8px;
  background: #16213e;
  color: #7a7a9e;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}
.bn-theme-opt:hover {
  background: #1a2a4e;
  color: #e0e0e0;
  border-color: #1a4a8a;
}
.bn-theme-opt.bn-opt-active {
  background: #0f3460;
  color: #0ecf9e;
  border-color: #0ecf9e;
  box-shadow: 0 0 0 1px #0ecf9e;
}
body:not(.dark-mode) .bn-theme-opt {
  background: #e4f3f3;
  border-color: #b0d8d8;
  color: #668888;
}
body:not(.dark-mode) .bn-theme-opt:hover {
  background: #d0e8e8;
  color: #007a7a;
  border-color: #007a7a;
}
body:not(.dark-mode) .bn-theme-opt.bn-opt-active {
  background: #007a7a;
  color: #fff;
  border-color: #007a7a;
  box-shadow: 0 0 0 1px #007a7a;
}
.bn-theme-color-area {
  position: relative;
  aspect-ratio: 1;
  max-width: 100%;
  min-width: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #0ecf9e;
  flex-shrink: 0;
}
body:not(.dark-mode) .bn-theme-color-area { border-color: #007a7a; }
.bn-theme-color-area .bn-custom-picker-wrap {
  width: 100%;
  height: 100%;
  min-height: 80px;
  padding: 4px;
  box-sizing: border-box;
}
.bn-theme-color-area .bn-picker-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}
.bn-theme-color-area .bn-picker-hue {
  flex: 0 0 14px;
  width: 14px;
  height: 100%;
  min-height: 60px;
}
.bn-color-swatch {
  width: 100%;
  height: 100%;
  min-height: 80px;
  border-radius: 8px;
}

/* Bottom Bar Theme Preview */
.bn-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.bn-preview-mockup {
  position: relative;
  width: 340px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a2a4e;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
body:not(.dark-mode) .bn-preview-mockup { border-color: #b0d8d8; }
.bn-preview-mockup .bn-preview-header {
  height: 48px;
  background: #0f3460;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}
body:not(.dark-mode) .bn-preview-mockup .bn-preview-header { background: #007a7a; }
.bn-preview-mockup .bn-preview-content {
  height: 120px;
  background: #16213e;
  padding: 12px;
  font-size: 11px;
  color: #7a7a9e;
}
body:not(.dark-mode) .bn-preview-mockup .bn-preview-content { background: #e4f3f3; color: #668888; }
.bn-preview-mockup .bn-preview-nav {
  min-height: 52px;
  background: var(--bn-bar-bg);
  border-top: 1px solid var(--bn-bar-border);
  box-shadow: var(--bn-bar-shadow);
  backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  display: flex;
  align-items: center;
  padding: 6px 4px 8px;
  gap: 4px;
}
.bn-preview-mockup .bn-preview-nav .bn-preview-btn {
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  font-size: 10px;
  color: var(--bn-btn-color);
  background: var(--bn-btn-bg);
  border: 1px solid var(--bn-bar-border);
  border-radius: 8px;
  backdrop-filter: blur(14px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(190%) brightness(1.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  cursor: default;
}
.bn-preview-mockup .bn-preview-nav .bn-preview-btn:first-child {
  color: var(--bn-btn-active-color);
  background: var(--bn-btn-active-bg);
}
.bn-preview-connector {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 2px;
  height: 50px;
  background: linear-gradient(180deg, #0ecf9e 0%, transparent 100%);
  transform: translateX(-50%);
}
body:not(.dark-mode) .bn-preview-connector { background: linear-gradient(180deg, #007a7a 0%, transparent 100%); }
.bn-preview-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.bn-preview-picker-row label {
  font-size: 13px;
  font-weight: 600;
}
.bn-preview-picker-row input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 2px;
  border-radius: 8px;
  border: 2px solid #0ecf9e;
  cursor: pointer;
  background: #1a1a2e;
}
.bn-color-picker-big {
  width: 120px !important;
  height: 120px !important;
  padding: 4px !important;
  border-radius: 12px !important;
}

/* Custom color picker (click + drag) */
.bn-custom-picker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bn-picker-main {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  cursor: crosshair;
  border: 2px solid #0ecf9e;
  flex-shrink: 0;
  touch-action: none;
}
body:not(.dark-mode) .bn-picker-main { border-color: #007a7a; }
.bn-picker-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.bn-picker-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
  pointer-events: none;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 0%;
}
.bn-picker-hue {
  position: relative;
  width: 16px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  cursor: ns-resize;
  border: 2px solid #0ecf9e;
  flex-shrink: 0;
  touch-action: none;
  background: linear-gradient(to bottom, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
body:not(.dark-mode) .bn-picker-hue { border-color: #007a7a; }
.bn-picker-hue-thumb {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  margin-top: -2px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
  pointer-events: none;
  top: 0%;
}

body:not(.dark-mode) .bn-preview-picker-row input[type="color"] { border-color: #007a7a; background: #fff; }

/* Import/Export Modal */
.ie-overlay {
  display:none; position:fixed; top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,0.75); z-index:300;
  justify-content:center; align-items:center;
}
.ie-overlay.active { display:flex; }
.ie-card {
  background:#1a1a2e; border:1px solid #0f3460;
  border-radius:12px; padding:20px; width:90%; max-width:360px;
}
.ie-card h3 { margin:0 0 14px; color:#e0e0ff; font-size:16px; text-align:center; }
.ie-option {
  display:flex; align-items:center; gap:10px;
  padding:12px; margin:6px 0; border-radius:8px;
  background:#16213e; border:1px solid #0f3460;
  cursor:pointer; transition:all .2s;
}
.ie-option:hover:not(.ie-disabled) { border-color:#0ecf9e; background:#1a2a4e; }
.ie-option.ie-disabled { opacity:0.35; cursor:not-allowed; }
.ie-option .ie-icon { font-size:22px; }
.ie-option .ie-text { flex:1; }
.ie-option .ie-title { font-size:13px; color:#e0e0ff; font-weight:600; }
.ie-option .ie-desc { font-size:10px; color:#7a7a9e; margin-top:2px; }
.ie-option .ie-badge {
  font-size:9px; padding:2px 6px; border-radius:4px;
  background:#0f3460; color:#7a7a9e;
}
.ie-option:not(.ie-disabled) .ie-badge { background:#0ecf9e20; color:#0ecf9e; }
.ie-close {
  display:block; margin:14px auto 0; padding:8px 24px;
  background:#0f3460; border:1px solid #1a4a8a; color:#7a7a9e;
  border-radius:6px; cursor:pointer; font-size:12px;
}
.ie-close:hover { color:#e0e0ff; }
.ie-result {
  margin-top:12px; padding:10px; border-radius:6px;
  font-size:12px; text-align:center; display:none;
}
.ie-result.success { display:block; background:#0ecf9e20; color:#0ecf9e; border:1px solid #0ecf9e40; }
.ie-result.error { display:block; background:#e9456020; color:#e94560; border:1px solid #e9456040; }

/* Auth UI Styles */
.auth-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 8px 16px; background: #0f3460; border-bottom: 1px solid #1a4a8a;
  font-size: 12px;
}
.auth-bar.authed { background: #1a4a8a; }
.auth-user-info {
  display: flex; align-items: center; gap: 8px; color: #0ecf9e; font-weight: 600;
}
.auth-user-avatar {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #0ecf9e;
}
.auth-btn {
  background: #0ecf9e; color: #0f3460; border: none; padding: 6px 12px;
  border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600;
  transition: background 0.2s;
}
.auth-btn:hover { background: #6ee7ba; }
.auth-btn.logout {
  background: #e94560; color: white;
}
.auth-btn.logout:hover { background: #ff5a73; }
#g_id_onload { display: none; }

/* Login Modal */
.login-modal {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8); z-index: 99999;
  align-items: center; justify-content: center;
}
.login-modal.active { display: flex; }
.login-card {
  background: #16213e; border: 1px solid #0f3460; border-radius: 12px;
  padding: 32px; width: 90%; max-width: 400px; text-align: center;
  position: relative;
}
.login-card h2 { color: #e94560; margin-bottom: 16px; font-size: 20px; }
.login-card p { color: #7a7a9e; margin-bottom: 24px; font-size: 13px; }
.google-signin-button { margin: 16px 0; }
.login-card-close {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: none; color: #7a7a9e;
  font-size: 20px; cursor: pointer; line-height: 1;
}
.login-card-close:hover { color: #e0e0e0; }

/* Login Modal Screens */
.login-screen { display: none; }
.login-screen.active { display: block; }
.login-card { max-height: 90vh; overflow-y: auto; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: #555; font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: #1a4a8a;
}
.login-input {
  width: 100%; padding: 10px 14px; margin-bottom: 10px;
  background: #0a1628; border: 1px solid #1a4a8a; border-radius: 8px;
  color: #e0e0e0; font-size: 14px; box-sizing: border-box;
  outline: none; transition: border-color .2s;
}
.login-input:focus { border-color: #0ecf9e; }
.login-input::placeholder { color: #555; }
.login-select {
  width: 100%; padding: 10px 14px; margin-bottom: 10px;
  background: #0a1628; border: 1px solid #1a4a8a; border-radius: 8px;
  color: #e0e0e0; font-size: 14px; box-sizing: border-box;
  outline: none; appearance: none; cursor: pointer;
}
.login-select:focus { border-color: #0ecf9e; }
.login-btn {
  width: 100%; padding: 11px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 6px;
  transition: opacity .2s;
}
.login-btn:disabled { opacity: .5; cursor: not-allowed; }
.login-btn-primary { background: #0ecf9e; color: #0a1628; }
.login-btn-google {
  background: #ffffff; color: #3c4043; border: 1px solid #dadce0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 500; font-size: 14px;
}
.login-btn-google:hover { background: #f7f8f8; border-color: #c0c0c0; }
.login-btn-google svg { flex-shrink: 0; }
.login-btn-email { background: #0f3460; color: #e0e0e0; border: 1px solid #1a4a8a; }
.login-btn-email:hover { border-color: #0ecf9e; }
.login-link {
  display: inline-block; margin-top: 12px; color: #7a7a9e; font-size: 12px;
  cursor: pointer; text-decoration: none;
}
.login-link:hover { color: #0ecf9e; }
.login-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 14px; color: #7a7a9e; font-size: 12px;
  cursor: pointer; text-decoration: none;
}
.login-back:hover { color: #e0e0e0; }
.login-error {
  background: #e9456020; border: 1px solid #e94560; border-radius: 6px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 12px; color: #e94560;
  display: none; text-align: left;
}
.login-success {
  background: #0ecf9e20; border: 1px solid #0ecf9e; border-radius: 6px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 12px; color: #0ecf9e;
  display: none; text-align: left;
}

/* Dev Notice Banner */
.dev-notice {
  background: linear-gradient(135deg, #1a2a1a, #0f2a3a);
  border-bottom: 2px solid #0ecf9e;
  color: #0ecf9e; font-size: 12px; font-weight: 600;
  text-align: center; padding: 8px 16px; flex-shrink: 0;
}
.dev-notice a { color: #e94560; text-decoration: underline; cursor: pointer; }

/* News Tab */
.news-card {
  background: #16213e; border-radius: 8px; padding: 14px 16px;
  margin-bottom: 10px; border-left: 3px solid #0ecf9e;
}
.news-card .news-meta { font-size: 10px; color: #7a7a9e; margin-bottom: 4px; }
.news-card .news-title { font-size: 14px; font-weight: 700; color: #e0e0e0; margin-bottom: 8px; }
.news-card .news-body { font-size: 12px; color: #a0a0c0; line-height: 1.65; }

/* ===== Bridge Map page ===== */
#toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: #16213e;
  border-bottom: 1px solid #0f3460; flex-shrink: 0;
}
#toolbar h1 { font-size: 16px; color: #0ecf9e; white-space: nowrap; }
label.file-btn {
  background: #0ecf9e; color: #0f3460; font-weight: 700;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  font-size: 13px; white-space: nowrap;
}
label.file-btn:hover { background: #6ee7ba; }
#fileInput { display: none; }
#stats { font-size: 12px; color: #7a7a9e; margin-left: auto;
         display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%;
       display: inline-block; margin-right: 3px; vertical-align: middle; }
#map { flex: 1; }
.bp { font-size: 12px; line-height: 1.7; min-width: 230px; }
.bp-name { font-weight: 700; font-size: 13px; margin-bottom: 6px;
           border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.bp-row { display: flex; justify-content: space-between; gap: 10px; }
.bp-lbl { color: #666; flex-shrink: 0; }
.c-g { color: #2a9d6a; font-weight: 600; }
.c-f { color: #c98000; font-weight: 600; }
.c-p { color: #c0392b; font-weight: 600; }
#layerToggle {
  position: absolute; top: 10px; right: 10px; z-index: 1000;
  display: flex; gap: 4px; background: #16213e;
  border: 1px solid #0f3460; border-radius: 8px; padding: 4px;
}
#layerToggle button {
  padding: 5px 12px; border: none; border-radius: 6px;
  background: transparent; color: #7a7a9e;
  font-size: 11px; cursor: pointer; transition: all 0.2s;
}
#layerToggle button.active { background: #e94560; color: #fff; }

/* Responsive tweaks */
@media (max-width: 400px) {
  .load-list-header, .load-row {
    font-size: 9px;
    padding: 3px 2px;
  }
}

/* ===========================================================================
   LIGHT MODE
   =========================================================================== */
body:not(.dark-mode) { background: #f0f8f8; color: #1a2e2e; }
body:not(.dark-mode) .app-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, #007a7a 20%, #009999 100%);
  border-bottom-color: #006060;
  border-top-color: rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25),
              0 4px 12px rgba(0,80,80,0.3);
}
body:not(.dark-mode) .app-header h1 { color: #ffffff; }
body:not(.dark-mode) .auth-user-info { color: inherit; }
body:not(.dark-mode) .auth-header-slot .auth-user-avatar { border-color: #007a7a; }
body:not(.dark-mode) .auth-header-slot .auth-btn { background: #0ecf9e; color: #003333; }
/* Bottom nav light/dark colors come from --bn-* vars (set by bottom-nav-theme.js) */
body:not(.dark-mode) .sub-tabs { background: #e4f3f3; border-bottom-color: #b0d8d8; }
body:not(.dark-mode) .sub-tabs button { color: #557777; }
body:not(.dark-mode) .sub-tabs button.active { color: #007a7a; border-bottom-color: #007a7a; }
body:not(.dark-mode) .account-sub-tabs { background: #e4f3f3; border-bottom-color: #b0d8d8; }
body:not(.dark-mode) .account-sub-tabs button { color: #557777; }
body:not(.dark-mode) .account-sub-tabs button.active { color: #007a7a; border-bottom-color: #007a7a; }
body:not(.dark-mode) .ov-tab-bar { background: #e4f3f3; border-bottom-color: #b0d8d8; }
body:not(.dark-mode) .ov-tab-btn { color: #557777; }
body:not(.dark-mode) .ov-tab-btn.active { color: #007a7a; border-bottom-color: #007a7a; background: rgba(0,122,122,0.08); }
body:not(.dark-mode) .ov-tab-btn:hover { color: #005f5f; }
body:not(.dark-mode) .settlement-card,
body:not(.dark-mode) .profile-card,
body:not(.dark-mode) .news-card,
body:not(.dark-mode) .period-preview,
body:not(.dark-mode) .settings-menu-item,
body:not(.dark-mode) .customize-list li,
body:not(.dark-mode) .entry-detail-card,
body:not(.dark-mode) .ie-card,
body:not(.dark-mode) .ie-option { background: #ffffff; border-color: #c0dede; color: #1a2e2e; }
body:not(.dark-mode) .load-list-totals,
body:not(.dark-mode) .list-controls,
body:not(.dark-mode) .load-filter-panel,
body:not(.dark-mode) .exp-list-header,
body:not(.dark-mode) .load-list-header,
body:not(.dark-mode) .load-list-group-header { background: #e4f3f3; border-color: #b0d8d8; }
body:not(.dark-mode) .load-filter-item input,
body:not(.dark-mode) .load-filter-item select { background: #ffffff; border-color: #b0d8d8; color: #1a2e2e; }
body:not(.dark-mode) .load-list-group-header { color: #007a7a; }
body:not(.dark-mode) .load-list-header { color: #007a7a; }
body:not(.dark-mode) .exp-list-header { color: #007a7a; }
body:not(.dark-mode) .total-item .value { color: #007a7a; }
body:not(.dark-mode) .settlement-card:hover,
body:not(.dark-mode) .settings-menu-item:hover,
body:not(.dark-mode) .customize-list li:hover { background: #e4f3f3; }
body:not(.dark-mode) .ie-option:hover:not(.ie-disabled) { background: #e4f3f3; border-color: #007a7a; }
body:not(.dark-mode) .ov-label,
body:not(.dark-mode) .total-item .label,
body:not(.dark-mode) .form-group label,
body:not(.dark-mode) .settings-menu-item .smi-desc,
body:not(.dark-mode) .settings-menu-item .smi-arrow,
body:not(.dark-mode) .profile-card .pf-label,
body:not(.dark-mode) .period-preview .pp-label,
body:not(.dark-mode) .detail-row .dl,
body:not(.dark-mode) .ov-divider,
body:not(.dark-mode) .ie-option .ie-desc,
body:not(.dark-mode) .customize-list li .col-desc,
body:not(.dark-mode) .gh-meta,
body:not(.dark-mode) .exp-row .exp-note,
body:not(.dark-mode) .news-card .news-meta { color: #668888; }
body:not(.dark-mode) .ov-value { color: #1a2e2e; }
body:not(.dark-mode) .ov-value.green,
body:not(.dark-mode) .ov-big-num,
body:not(.dark-mode) .period-preview .pp-value,
body:not(.dark-mode) .load-row .pay-amount,
body:not(.dark-mode) .gh-title { color: #007a7a; }
body:not(.dark-mode) .section-divider { color: #007a7a; border-bottom-color: #b0d8d8; }

/* ===== MESSAGE CENTER (Account → Message Center) ===== */
.msg-card {
  margin-bottom: 12px;
  padding: 14px;
  background: #0f3460;
  border: 1px solid #1a4a8a;
  border-radius: 10px;
}
.msg-date { font-size: 11px; color: #7a7a9e; margin-bottom: 6px; }
.msg-title { font-size: 14px; font-weight: 700; color: #0ecf9e; margin-bottom: 8px; }
.msg-body { font-size: 13px; color: #e0e0e0; line-height: 1.55; margin: 0 0 10px; }
.msg-from { font-size: 12px; color: #7a7a9e; margin: 0 0 12px; line-height: 1.45; }
.msg-muted { color: #7a7a9e; font-size: 13px; margin: 0; }
.msg-error { color: #e94560; font-size: 13px; }
.msg-generic-title { font-size: 14px; font-weight: 600; color: #e0e0e0; margin-bottom: 6px; }
.msg-generic-body { font-size: 13px; color: #c0c0d8; margin: 0; }
.msg-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.msg-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.msg-btn-approve { background: linear-gradient(135deg, #0ecf9e, #0ba37a); color: #1a1a2e; }
.msg-btn-approve:hover { opacity: 0.9; }
.msg-btn-decline { background: transparent; border: 1px solid #e94560; color: #e94560; }
.msg-btn-decline:hover { background: rgba(233, 69, 96, 0.1); }
.msg-status { font-size: 12px; font-weight: 600; color: #7a7a9e; }
.msg-status-approved { color: #0ecf9e; }
.msg-status-declined { color: #e94560; }
.msg-status-pending { color: #f5a623; }

.msg-center-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
  flex-wrap: wrap;
}
.msg-center-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #1a4a8a;
  background: #0f3460;
  color: #a8a8c8;
  cursor: pointer;
  font-family: inherit;
}
.msg-center-tab:hover {
  color: #e0e0e0;
  border-color: #2a5a9a;
}
.msg-center-tab.active {
  background: rgba(14, 207, 158, 0.15);
  border-color: #0ecf9e;
  color: #0ecf9e;
}
.msg-tab-badge {
  display: inline-block;
  min-width: 1.1em;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: middle;
  border-radius: 999px;
  background: #f5a623;
  color: #1a1a2e;
}
.msg-center-dispatcher-hint {
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 10px;
}
.msg-sent-status-row { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.msg-sent-when { font-weight: 400; color: #7a7a9e; }

body:not(.dark-mode) .msg-card { background: #f4fbfb; border-color: #b0d8d8; }
body:not(.dark-mode) .msg-date { color: #88a0a0; }
body:not(.dark-mode) .msg-title { color: #007a7a; }
body:not(.dark-mode) .msg-body { color: #1a2e2e; }
body:not(.dark-mode) .msg-from { color: #668888; }
body:not(.dark-mode) .msg-muted { color: #88a0a0; }
body:not(.dark-mode) .msg-error { color: #cc2244; }
body:not(.dark-mode) .msg-generic-title { color: #1a2e2e; }
body:not(.dark-mode) .msg-generic-body { color: #445566; }
body:not(.dark-mode) .msg-btn-approve { background: linear-gradient(135deg, #0ecf9e, #0ba37a); color: #003333; }
body:not(.dark-mode) .msg-btn-decline { border-color: #cc2244; color: #cc2244; }
body:not(.dark-mode) .msg-btn-decline:hover { background: rgba(204, 34, 68, 0.08); }
body:not(.dark-mode) .msg-status { color: #88a0a0; }
body:not(.dark-mode) .msg-status-approved { color: #007a7a; }
body:not(.dark-mode) .msg-status-declined { color: #cc2244; }
body:not(.dark-mode) .msg-status-pending { color: #b8860b; }
body:not(.dark-mode) .msg-center-tab {
  background: #f4fbfb;
  border-color: #b0d8d8;
  color: #668888;
}
body:not(.dark-mode) .msg-center-tab:hover {
  color: #1a2e2e;
  border-color: #88b8b8;
}
body:not(.dark-mode) .msg-center-tab.active {
  background: #e4f3f3;
  border-color: #007a7a;
  color: #007a7a;
}
body:not(.dark-mode) .msg-tab-badge {
  background: #c98a00;
  color: #fff;
}
body:not(.dark-mode) .msg-sent-when { color: #668888; }

body:not(.dark-mode) .news-card .news-title,
body:not(.dark-mode) .profile-card .pf-value,
body:not(.dark-mode) .detail-row .dv,
body:not(.dark-mode) .ie-option .ie-title,
body:not(.dark-mode) .ie-card h3,
body:not(.dark-mode) .customize-list li .col-label,
body:not(.dark-mode) .gh-meta .gh-total { color: #1a2e2e; }
body:not(.dark-mode) .news-card .news-body { color: #445566; }
body:not(.dark-mode) .exp-row .exp-amount { color: #cc2244; }
body:not(.dark-mode) .empty-state { color: #99aaaa; }
body:not(.dark-mode) .load-row { border-bottom-color: #d0e8e8; color: #1a2e2e; }
body:not(.dark-mode) .load-row:hover { background: #e4f3f3; }
body:not(.dark-mode) .load-row.child-row { background: #f4fbfb; border-left-color: #a0d0d0; }
body:not(.dark-mode) .load-row.linked-group-summary { background: #e0f8f0; border-left-color: #007a7a; }
body:not(.dark-mode) .load-row.linked-group-summary:hover { background: #d0f0e8; }
body:not(.dark-mode) .exp-row { border-bottom-color: #d0e8e8; color: #1a2e2e; }
body:not(.dark-mode) .exp-row:hover { background: #e4f3f3; }
body:not(.dark-mode) .exp-row.selected { background: #d8eeee; border-left-color: #007a7a; }
body:not(.dark-mode) .exp-row .exp-cat-badge { background: #e0f0f0; color: #007a7a; }
body:not(.dark-mode) .exp-detail-card { background: #f4fbfb; }
body:not(.dark-mode) .exp-detail-card .detail-row { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .exp-detail-card .detail-label { color: #668888; }
body:not(.dark-mode) .exp-detail-card .detail-val { color: #1a2e2e; }
body:not(.dark-mode) .exp-detail-card .detail-cat { background: #e0f0f0; color: #007a7a; }
body:not(.dark-mode) .exp-detail-card .detail-actions { border-top-color: #d0e8e8; }
body:not(.dark-mode) .exp-edit-section-title { color: #007a7a; border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .exp-edit-field input, body:not(.dark-mode) .exp-edit-field select { background: #fff; border-color: #b0d8d8; color: #1a2e2e; }
body:not(.dark-mode) .exp-edit-field label { color: #668888; }
body:not(.dark-mode) .exp-split-resizer { background: #d0e8e8; }
body:not(.dark-mode) .exp-split-resizer:hover, body:not(.dark-mode) .exp-split-resizer.active { background: #007a7a; }
body:not(.dark-mode) .exp-list-panel { border-right-color: #d0e8e8; }
body:not(.dark-mode) .exp-detail-back-btn { background: #e4f3f3; border-color: #b0d8d8; color: #1a2e2e; }
body:not(.dark-mode) .exp-detail-panel { background: #ffffff; }
body:not(.dark-mode) .rev-split-resizer { background: #d0e8e8; }
body:not(.dark-mode) .rev-split-resizer:hover, body:not(.dark-mode) .rev-split-resizer.active { background: #007a7a; }
body:not(.dark-mode) .rev-list-panel { border-right-color: #d0e8e8; }
body:not(.dark-mode) .rev-detail-back-btn { background: #e4f3f3; border-color: #b0d8d8; color: #1a2e2e; }
body:not(.dark-mode) .rev-detail-panel { background: #ffffff; }
body:not(.dark-mode) .rev-detail-card { background: #f4fbfb; }
body:not(.dark-mode) .rev-detail-card .detail-row { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .rev-detail-card .dl { color: #668888; }
body:not(.dark-mode) .rev-detail-card .dv { color: #1a2e2e; }
body:not(.dark-mode) .rev-detail-card .detail-section-label { color: #007a7a; border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .rev-detail-card .detail-actions { border-top-color: #d0e8e8; }
body:not(.dark-mode) .rev-edit-field input, body:not(.dark-mode) .rev-edit-field select { background: #fff; border-color: #b0d8d8; color: #1a2e2e; }
body:not(.dark-mode) .rev-edit-field label { color: #668888; }
body:not(.dark-mode) .load-row.selected { background: #d8eeee; border-left-color: #007a7a; }
body:not(.dark-mode) .addr-warn:hover::after { background: #fff; color: #c08a00; border-color: #e6a800; }
body:not(.dark-mode) .ov-row { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .detail-row { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .detail-section-label { color: #e94560; }
body:not(.dark-mode) .profile-card .pf-row { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .form-group input,
body:not(.dark-mode) .form-group select,
body:not(.dark-mode) .form-group textarea,
body:not(.dark-mode) .list-controls input[type="text"],
body:not(.dark-mode) .list-controls select,
body:not(.dark-mode) .ov-date-row input[type="date"],
body:not(.dark-mode) .fuel-map-controls select,
body:not(.dark-mode) .fuel-map-controls input,
body:not(.dark-mode) #fbMessage { background: #f4fbfb; border-color: #b0d0d0; color: #1a2e2e; }
body:not(.dark-mode) .form-group input:focus,
body:not(.dark-mode) .form-group select:focus { border-color: #007a7a; }
body:not(.dark-mode) .form-group input::placeholder,
body:not(.dark-mode) .list-controls input::placeholder { color: #99aaaa; }
body:not(.dark-mode) .offset-btn { background: #e4f3f3; border-color: #b0d0d0; color: #007a7a; }
body:not(.dark-mode) .offset-btn:active { background: #d0e8e8; }
body:not(.dark-mode) .cat-selector input { background: #f4fbfb; border-color: #b0d0d0; color: #1a2e2e; }
body:not(.dark-mode) .cat-selector input:focus { background: #ffffff; border-color: #007a7a; }
body:not(.dark-mode) .cat-selector input::placeholder { color: #99aaaa; }
body:not(.dark-mode) .cat-dropdown { background: #ffffff; border-color: #b0d0d0; }
body:not(.dark-mode) .cat-dropdown-item { color: #1a2e2e; border-bottom-color: #e8f4f4; }
body:not(.dark-mode) .cat-dropdown-item:hover { background: #e4f3f3; }
body:not(.dark-mode) .cat-dropdown-item.new-entry { color: #007a7a; }
body:not(.dark-mode) .address-suggestions { background: #ffffff; border-color: #b0d0d0; }
body:not(.dark-mode) .address-suggestions .sug-item { color: #1a2e2e; border-bottom-color: #e8f4f4; }
body:not(.dark-mode) .address-suggestions .sug-item:hover { background: #e4f3f3; color: #1a2e2e; }
body:not(.dark-mode) .address-suggestions .sug-item small { color: #668888; }
body:not(.dark-mode) .btn-primary { background: #007a7a; }
body:not(.dark-mode) .btn-primary:hover { background: #006060; }
body:not(.dark-mode) .btn-secondary { background: #e4f3f3; color: #1a2e2e; border: 1px solid #b0d0d0; }
body:not(.dark-mode) .fuel-map-controls button { background: #007a7a; }
body:not(.dark-mode) .fuel-map-controls button.secondary { background: #e4f3f3; border-color: #b0d0d0; color: #1a2e2e; }
body:not(.dark-mode) .expand-arrow { color: #99aaaa; }
body:not(.dark-mode) .expand-arrow:hover { color: #007a7a; }
body:not(.dark-mode) .cat-chip { background: #e4f3f3; border-color: #b0d0d0; color: #557777; }
body:not(.dark-mode) .cat-chip.selected { background: #007a7a; color: #fff; border-color: #007a7a; }
body:not(.dark-mode) .cat-chip.add-chip { color: #007a7a; border-color: #007a7a; }
body:not(.dark-mode) .cat-chip.add-chip:hover { background: #d0eee8; }
body:not(.dark-mode) .cust-back-bar { background: #e4f3f3; border-bottom-color: #b0d8d8; color: #007a7a; }
body:not(.dark-mode) .cust-back-bar:hover { background: #d0e8e8; }
body:not(.dark-mode) .link-toolbar { background: #d0e8e8; border-bottom-color: #a0c8c8; }
body:not(.dark-mode) .link-toolbar .sel-count { color: #445566; }
body:not(.dark-mode) .group-header { background: linear-gradient(135deg, #d8f0f0 0%, #e4f3f3 100%); border-color: #b0d8d8; border-left-color: #007a7a; }
body:not(.dark-mode) #settlementModalInner { background: #ffffff; border-color: #b0d0d0; }
body:not(.dark-mode) #settlementModal .settle-modal-sticky-bottom { background: #ffffff; border-top-color: #d0e8e8; }
body:not(.dark-mode) .settle-modal-header { background: #e4f3f3; }
body:not(.dark-mode) .settle-section { border-bottom-color: #d0e8e8; }
body:not(.dark-mode) .settle-load-row,
body:not(.dark-mode) .settle-exp-row { background: #e4f3f3; }
body:not(.dark-mode) .settlement-badge.correct { background: rgba(0,122,122,0.12); color: #007a7a; }
body:not(.dark-mode) .dev-notice { background: linear-gradient(135deg, #e8f8ef, #e0f4f8); border-bottom-color: #007a7a; color: #007a7a; }
body:not(.dark-mode) .dev-notice a { color: #e94560; }
body:not(.dark-mode) .login-card { background: #ffffff; border-color: #b0d0d0; }
body:not(.dark-mode) .login-card h2 { color: #007a7a; }
body:not(.dark-mode) .login-card p { color: #668888; }
body:not(.dark-mode) .login-card-close { color: #99aaaa; }
body:not(.dark-mode) .login-card-close:hover { color: #1a2e2e; }
body:not(.dark-mode) .login-input { background: #f4fbfb; border-color: #b0d0d0; color: #1a2e2e; }
body:not(.dark-mode) .login-input::placeholder { color: #99aaaa; }
body:not(.dark-mode) .login-select { background: #f4fbfb; border-color: #b0d0d0; color: #1a2e2e; }
body:not(.dark-mode) .login-btn-email { background: #e4f3f3; color: #1a2e2e; border-color: #b0d0d0; }
body:not(.dark-mode) .login-divider { color: #99aaaa; }
body:not(.dark-mode) .login-divider::before, body:not(.dark-mode) .login-divider::after { background: #b0d0d0; }
body:not(.dark-mode) .ie-close { background: #e4f3f3; border-color: #b0d0d0; color: #668888; }
body:not(.dark-mode) .ie-close:hover { color: #1a2e2e; }
body:not(.dark-mode) .ie-option .ie-badge { background: #e4f3f3; color: #668888; }
body:not(.dark-mode) .split-section { background: #f4fbfb; border-color: #b0d0d0; }
body:not(.dark-mode) .split-section h4 { color: #668888; }
body:not(.dark-mode) .fuel-savings { background: #e0f8f0; border-color: #a0ddd0; }
body:not(.dark-mode) .map-layer-toggle { background: #ffffff; border-color: #b0d8d8; }
body:not(.dark-mode) .map-layer-toggle button { color: #668888; }
body:not(.dark-mode) .map-layer-toggle button.active { background: #007a7a; color: #fff; }
body:not(.dark-mode) .ct-btns { background: #e0eee8; }
body:not(.dark-mode) .ct-btn { color: #668888; }
body:not(.dark-mode) .ct-btn.active { background: #ffffff; color: #1a2e2e; }
body:not(.dark-mode) .chart-hdr-title { color: #668888; }
body:not(.dark-mode) .checkbox-row label { color: #445566; }
body:not(.dark-mode) .badge-load { background: #d8e8e8; color: #5a8a8a; }
body:not(.dark-mode) .img-upload-area { border-color: #b0d0d0; color: #99aaaa; }
body:not(.dark-mode) .img-upload-area:hover { border-color: #007a7a; background: #e4f3f3; }
body:not(.dark-mode) .home-title { color: #007a7a; }
body:not(.dark-mode) .home-desc { color: #557777; }
body:not(.dark-mode) .home-cta {
  background: #007a7a;
  box-shadow: 0 4px 14px rgba(0,122,122,0.3);
}
body:not(.dark-mode) .home-cta:hover {
  background: #006060;
  box-shadow: 0 6px 18px rgba(0,122,122,0.35);
}
body:not(.dark-mode) .home-footer { border-top-color: #b0d8d8; }
body:not(.dark-mode) .footer-links a { color: #557777; }
body:not(.dark-mode) .footer-links a:hover { color: #007a7a; }
body:not(.dark-mode) .footer-copy { color: #99aaaa; }
body:not(.dark-mode) .legal-back { color: #557777; }
body:not(.dark-mode) .legal-back:hover { color: #007a7a; }
body:not(.dark-mode) .legal-page h1 { color: #007a7a; }
body:not(.dark-mode) .legal-body { color: #445566; }
body:not(.dark-mode) .legal-body h2 { color: #1a2e2e; }
body:not(.dark-mode) .legal-body a { color: #007a7a; }

/* ===== Tools page (split break calculator, etc.) ===== */
.tools-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  box-sizing: border-box;
}
.tools-page-title {
  font-size: 22px;
  color: #e94560;
  margin: 0 0 8px;
  font-weight: 700;
}
.tools-page-lead {
  font-size: 14px;
  color: #a0a0c0;
  margin: 0 0 20px;
  line-height: 1.5;
}
.tools-tool-card {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 10px;
  padding: 16px 14px 18px;
  margin-bottom: 16px;
}
.tools-tool-card-muted {
  opacity: 0.85;
}
.tools-tool-title {
  font-size: 16px;
  font-weight: 700;
  color: #0ecf9e;
  margin: 0 0 8px;
}
.tools-tool-desc {
  font-size: 13px;
  color: #99aabb;
  line-height: 1.45;
  margin: 0 0 14px;
}
.tools-page .form-group label {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: #c5d0e0;
  margin-bottom: 4px;
}
.tools-field-hint {
  display: block;
  font-size: 12px;
  color: #7a8a9e;
  margin-top: 6px;
  line-height: 1.4;
  font-weight: 400;
}
.tools-duration-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #c5d0e0;
  margin-bottom: 4px;
}
.tools-duration-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tools-duration-h,
.tools-duration-m {
  width: 3.25rem;
  min-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tools-duration-m {
  width: 3rem;
}
.tools-duration-colon {
  font-size: 18px;
  font-weight: 600;
  color: #8899aa;
  line-height: 1;
  user-select: none;
}
.tools-start-row .form-group {
  flex: 1;
  min-width: 0;
}
.tools-start-row .form-group input[type="time"] {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
body:not(.dark-mode) .tools-duration-label {
  color: #445566;
}
.tools-duty-legend {
  font-size: 13px;
  font-weight: 600;
  color: #c5d0e0;
  padding: 0;
  margin-bottom: 8px;
}
.tools-form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0ecf9e;
  margin: 22px 0 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 52, 96, 0.9);
}
.tools-form-section-lead {
  font-size: 12px;
  color: #8899aa;
  line-height: 1.45;
  margin: 0 0 14px;
}
.tools-form-part2 {
  margin-bottom: 0;
}
.tools-current-time-group {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 280px;
}
.tools-current-time-group input[type="time"] {
  width: 100%;
  max-width: 100%;
}
body:not(.dark-mode) .tools-form-section-title {
  color: #007a7a;
  border-top-color: #c0dede;
}
body:not(.dark-mode) .tools-form-section-lead {
  color: #668888;
}
.tools-break-controls-row {
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 4px;
  gap: 12px 16px;
}
.tools-break-col-seg {
  flex: 1 1 200px;
  min-width: 0;
}
.tools-break-col-duration {
  flex: 1 1 160px;
  min-width: 0;
}
.tools-break-notice {
  margin: 8px 0 0;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #f5a623;
  line-height: 1.35;
}
.tools-break-notice[hidden] {
  display: none !important;
}
.tools-break-constraint-hint {
  margin: 12px 0 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #aabbcc;
  background: rgba(15, 52, 96, 0.35);
  border: 1px solid #1a4a8a;
  border-radius: 8px;
}
.tools-break-constraint-hint[hidden] {
  display: none !important;
}
.tools-seg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
body:not(.dark-mode) .tools-break-constraint-hint {
  color: #445566;
  background: #e8f4f4;
  border-color: #b0d8d8;
}
.tools-seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tools-seg-row-outer {
  position: relative;
}
.tools-seg-sleeper-with-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tools-seg-info-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #2a5a8a;
  border-radius: 50%;
  background: #0f3460;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #7a9ebe;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tools-seg-info-btn:hover {
  border-color: #0ecf9e;
  color: #0ecf9e;
  background: #16213e;
}
.tools-seg-info-popup {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 50;
  max-width: min(320px, 92vw);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #d0d8e8;
  background: #1a1a2e;
  border: 1px solid #0ecf9e;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.tools-seg-info-popup p {
  margin: 0;
}
.tools-seg-btn.tools-seg-both-allowed {
  background: rgba(14, 207, 158, 0.14);
  color: #e0e8e8;
}
.tools-seg-btn.tools-seg-off.tools-seg-both-allowed {
  border-color: #0ecf9e;
  box-shadow: 0 0 0 1px rgba(14, 207, 158, 0.25);
}
.tools-seg-btn.tools-seg-sleeper.tools-seg-both-allowed {
  border-color: #f5a623;
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.3);
}
.tools-seg-btn.tools-seg-off.tools-seg-both-allowed.is-active {
  background: #0ecf9e;
  color: #0f3460;
  border-color: #0ecf9e;
  box-shadow: none;
}
.tools-seg-btn.tools-seg-sleeper.tools-seg-both-allowed.is-active {
  background: #f5a623;
  color: #0f3460;
  border-color: #f5a623;
  box-shadow: none;
}
.tools-seg-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  border: 1px solid #555;
  background: #1a1a2e;
  color: #7a7a9e;
}
.tools-seg-btn.tools-seg-off {
  border-color: #0ecf9e;
}
.tools-seg-btn.tools-seg-sleeper {
  border-color: #f5a623;
}
.tools-seg-btn.tools-seg-off.is-active {
  background: #0ecf9e;
  color: #0f3460;
  border-color: #0ecf9e;
}
.tools-seg-btn.tools-seg-sleeper.is-active {
  background: #f5a623;
  color: #0f3460;
  border-color: #f5a623;
}
.tools-out-clock-row {
  margin-top: 8px;
}
.tools-out-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 32px;
  width: 100%;
  background: #0f3460;
  border: 1px solid #1a4a8a;
  color: #e0e0e0;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}
.tools-result-pending .tools-out-clock {
  color: #6a7a8e;
  border-color: #243a5a;
  background: rgba(15, 52, 96, 0.35);
}
.tools-result {
  margin-top: 16px;
  padding: 14px 12px;
  border-radius: 8px;
  border: 1px solid #1a4a8a;
  background: rgba(15, 52, 96, 0.45);
}
.tools-result-part2 {
  margin-top: 18px;
}
.tools-result-footnote {
  margin: 12px 0 0;
  font-size: 11px;
  color: #778899;
  line-height: 1.45;
}
body:not(.dark-mode) .tools-result-footnote {
  color: #668888;
}
.tools-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #7a8a9e;
  margin-bottom: 10px;
}
.tools-out-form {
  margin-top: 4px;
}
.tools-out-form .form-row {
  margin-bottom: 0;
}
.tools-out-box {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 32px;
  background: #0f3460;
  border: 1px solid #1a4a8a;
  color: #e0e0e0;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.tools-result-pending .tools-out-box {
  color: #6a7a8e;
  border-color: #243a5a;
  background: rgba(15, 52, 96, 0.35);
}
.tools-disclaimer {
  font-size: 12px;
  color: #778899;
  margin: 14px 0 0;
  line-height: 1.45;
}
.tools-back-wrap {
  margin: 20px 0 0;
}
.tools-back-link {
  font-size: 13px;
  color: #7a7a9e;
  text-decoration: none;
}
.tools-back-link:hover {
  color: #0ecf9e;
}
body:not(.dark-mode) .tools-page-title {
  color: #007a7a;
}
body:not(.dark-mode) .tools-page-lead {
  color: #557777;
}
body:not(.dark-mode) .tools-tool-card {
  background: #ffffff;
  border-color: #c0dede;
}
body:not(.dark-mode) .tools-tool-title {
  color: #007a7a;
}
body:not(.dark-mode) .tools-tool-desc {
  color: #668888;
}
body:not(.dark-mode) .tools-page .form-group label,
body:not(.dark-mode) .tools-duty-legend {
  color: #445566;
}
body:not(.dark-mode) .tools-field-hint {
  color: #668888;
}
body:not(.dark-mode) .tools-seg-btn {
  background: #f0f8f8;
  border-color: #b0d8d8;
  color: #557777;
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-off {
  border-color: #007a7a;
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-sleeper {
  border-color: #c98a20;
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-off.is-active {
  background: #007a7a;
  color: #fff;
  border-color: #007a7a;
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-sleeper.is-active {
  background: #e8a020;
  color: #1a1a1a;
  border-color: #c98a20;
}
body:not(.dark-mode) .tools-seg-info-btn {
  background: #e4f3f3;
  border-color: #b0d8d8;
  color: #557777;
}
body:not(.dark-mode) .tools-seg-info-btn:hover {
  border-color: #007a7a;
  color: #007a7a;
  background: #d0e8e8;
}
body:not(.dark-mode) .tools-seg-info-popup {
  background: #ffffff;
  color: #334455;
  border-color: #007a7a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-both-allowed {
  background: #e8f6f4;
  color: #1a2e2e;
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-off.tools-seg-both-allowed {
  border-color: #007a7a;
  box-shadow: 0 0 0 1px rgba(0, 122, 122, 0.2);
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-sleeper.tools-seg-both-allowed {
  border-color: #c98a20;
  box-shadow: 0 0 0 1px rgba(201, 138, 32, 0.25);
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-off.tools-seg-both-allowed.is-active {
  background: #007a7a;
  color: #fff;
  border-color: #007a7a;
  box-shadow: none;
}
body:not(.dark-mode) .tools-seg-btn.tools-seg-sleeper.tools-seg-both-allowed.is-active {
  background: #e8a020;
  color: #1a1a1a;
  border-color: #c98a20;
  box-shadow: none;
}
body:not(.dark-mode) .tools-break-notice {
  color: #b86a00;
}
body:not(.dark-mode) .tools-result {
  background: #f4fbfb;
  border-color: #b0d8d8;
}
body:not(.dark-mode) .tools-result-label {
  color: #668888;
}
body:not(.dark-mode) .tools-out-box {
  background: #f0f8f8;
  border-color: #b0d8d8;
  color: #1a2e2e;
}
body:not(.dark-mode) .tools-result-pending .tools-out-box {
  color: #99aaaa;
  border-color: #c0dede;
  background: #e8f4f4;
}
body:not(.dark-mode) .tools-out-clock {
  background: #f0f8f8;
  border-color: #b0d8d8;
  color: #1a2e2e;
}
body:not(.dark-mode) .tools-result-pending .tools-out-clock {
  color: #99aaaa;
  border-color: #c0dede;
  background: #e8f4f4;
}
body:not(.dark-mode) .tools-disclaimer {
  color: #668888;
}
body:not(.dark-mode) .tools-back-link {
  color: #557777;
}
body:not(.dark-mode) .tools-back-link:hover {
  color: #007a7a;
}

/* ===== Truckers directory ===== */
.dir-page {
  padding: 16px 16px 88px;
  max-width: 640px;
  margin: 0 auto;
}
.dir-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #e94560;
  margin: 0 0 8px;
}
.dir-page-note {
  font-size: 12px;
  color: #8899aa;
  margin: 0 0 20px;
  line-height: 1.45;
}
#directoryLoading {
  text-align: center;
  padding: 32px;
  color: #aabbcc;
  font-size: 14px;
}
#directoryError {
  display: none;
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid rgba(233, 69, 96, 0.4);
  color: #e94560;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}
.dir-section {
  margin-bottom: 28px;
}
.dir-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0ecf9e;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #0f3460;
}
.dir-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 52, 96, 0.5);
}
.dir-row:last-child { border-bottom: none; }
.dir-row-main {
  flex: 1;
  min-width: 0;
}
.dir-row-name {
  font-weight: 600;
  font-size: 14px;
  color: #e0e0e0;
  margin-bottom: 4px;
}
.dir-row-desc {
  font-size: 12px;
  color: #99aabb;
  line-height: 1.4;
  margin-bottom: 4px;
}
.dir-row-phone {
  font-size: 13px;
  color: #c5d0e0;
  font-variant-numeric: tabular-nums;
}
.dir-row-meta {
  font-size: 11px;
  color: #778899;
  margin-top: 4px;
}
.dir-row-email {
  display: inline-block;
  font-size: 12px;
  color: #0ecf9e;
  margin-top: 6px;
  word-break: break-all;
}
.dir-row-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.dir-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a4a7a 0%, #0f3460 100%);
  border: 1px solid #2a5a9a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}
.dir-call-btn:active {
  transform: scale(0.96);
}
.dir-sms-btn {
  background: linear-gradient(180deg, #2a5a6a 0%, #1a3a4a 100%);
  border-color: #3a7a8a;
}
.dir-call-icon {
  font-size: 18px;
  line-height: 1;
}
.dir-hp-section .dir-section-title {
  color: #e94560;
}
.dir-hp-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #aabbcc;
  margin-bottom: 6px;
}
.dir-hp-select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #0f3460;
  background: #16213e;
  color: #e0e0e0;
  margin-bottom: 14px;
}
.dir-hp-card {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 12px;
  padding: 14px 16px;
}
.dir-hp-name {
  font-weight: 700;
  font-size: 15px;
  color: #e0e0e0;
  margin-bottom: 10px;
}
.dir-hp-line {
  font-size: 13px;
  color: #aabbcc;
  margin-bottom: 8px;
  line-height: 1.45;
}
.dir-hp-alt-wrap,
.dir-hp-road-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dir-hp-alt-num {
  color: #e0e0e0;
  font-variant-numeric: tabular-nums;
}
.dir-hp-call {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  background: #e94560;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}
.dir-hp-road-link {
  color: #0ecf9e;
  font-variant-numeric: tabular-nums;
}
body.dark-mode .dir-page-title { color: #ff6b8a; }
body.dark-mode .dir-section-title { color: #5eead4; }
body.dark-mode .dir-row-name { color: #e8eaed; }
body.dark-mode .dir-hp-select {
  background: #1a1a2e;
  border-color: #2a3a5a;
  color: #e0e0e0;
}
body.dark-mode .dir-hp-card {
  background: #1a1a2e;
  border-color: #2a3a5a;
}
body:not(.dark-mode) .dir-page-title { color: #c73e54; }
body:not(.dark-mode) .dir-section-title { color: #0d9488; }
body:not(.dark-mode) .dir-row-name { color: #1a1a2e; }
body:not(.dark-mode) .dir-row-desc,
body:not(.dark-mode) .dir-page-note { color: #5a6a7a; }
body:not(.dark-mode) .dir-row-phone { color: #334455; }
body:not(.dark-mode) .dir-hp-select {
  background: #fff;
  border-color: #c5d5e5;
  color: #1a1a2e;
}
body:not(.dark-mode) .dir-hp-card {
  background: #f5f8fc;
  border-color: #d0dce8;
}
body:not(.dark-mode) .dir-hp-name { color: #1a1a2e; }
body:not(.dark-mode) .dir-hp-line { color: #556677; }
body:not(.dark-mode) .dir-row { border-bottom-color: #dde5ee; }
body:not(.dark-mode) .dir-section-title { border-bottom-color: #c5d5e5; }
