    /* ── TOKENS ──────────────────────────────────────────────────────────── */
    :root {
      --navy:       #1B2A4A;
      --navy-dark:  #0D1623;
      --navy-mid:   #243558;
      --red:        #C41230;
      --red-dark:   #A50F28;
      --white:      #FFFFFF;
      --off-white:  #F8F9FC;
      --gray-50:    #F8FAFC;
      --gray-100:   #F1F5F9;
      --gray-200:   #E2E8F0;
      --gray-300:   #CBD5E1;
      --gray-400:   #94A3B8;
      --gray-600:   #475569;
      --gray-800:   #1E293B;
      --green:      #16A34A;
      --amber:      #D97706;
      --font-display: 'Barlow Condensed', sans-serif;
      --font-body:    'Barlow', sans-serif;
      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 14px;
      --radius-xl: 20px;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
      --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: var(--font-body);
      background: var(--navy-dark);
      min-height: 100vh;
      display: flex;
      overflow: hidden;
    }

    /* ── LEFT PANEL — BRAND ──────────────────────────────────────────────── */
    .brand-panel {
      width: 52%;
      min-height: 100vh;
      background: linear-gradient(160deg, #0D1623 0%, #1B2A4A 45%, #243558 100%);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 48px 56px 48px;
      position: relative;
      overflow: hidden;
    }

    /* Grid texture */
    .brand-panel::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
      background-size: 48px 48px;
      pointer-events: none;
    }

    /* Red accent stripe top */
    .brand-panel::after {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: var(--red);
    }

    /* Animated road strip */
    .road-strip {
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 56px;
      background: #0A0F1A;
      overflow: hidden;
    }
    .road-line {
      position: absolute;
      top: 50%; transform: translateY(-50%);
      height: 3px; width: 80px;
      background: rgba(255,255,255,0.15);
      border-radius: 2px;
      animation: roadMove 1.4s linear infinite;
    }
    .road-line:nth-child(1)  { left: 5%;   animation-delay: 0s; }
    .road-line:nth-child(2)  { left: 22%;  animation-delay: -0.28s; }
    .road-line:nth-child(3)  { left: 39%;  animation-delay: -0.56s; }
    .road-line:nth-child(4)  { left: 56%;  animation-delay: -0.84s; }
    .road-line:nth-child(5)  { left: 73%;  animation-delay: -1.12s; }
    .road-line:nth-child(6)  { left: 90%;  animation-delay: -1.40s; }
    @keyframes roadMove {
      from { transform: translateX(0) translateY(-50%); }
      to   { transform: translateX(-140px) translateY(-50%); }
    }

    /* Big truck SVG watermark */
    .truck-bg {
      position: absolute;
      bottom: 56px; right: -30px;
      opacity: 0.05;
      font-size: 260px;
      line-height: 1;
      pointer-events: none;
      user-select: none;
    }

    .brand-logo {
      position: relative;
      z-index: 1;
    }
    .brand-logo-text {
      font-family: var(--font-display);
      font-weight: 900;
      font-size: 42px;
      letter-spacing: -0.5px;
      line-height: 1;
    }
    .brand-logo-text .auto  { color: rgba(255,255,255,0.95); }
    .brand-logo-text .haul  { color: var(--red); }
    .brand-logo-text .dot   { color: rgba(255,255,255,0.25); font-size: 32px; }
    .brand-tagline {
      font-size: 13px;
      color: rgba(255,255,255,0.3);
      margin-top: 5px;
      font-weight: 400;
      letter-spacing: 0.5px;
    }

    /* Center content */
    .brand-center {
      position: relative;
      z-index: 1;
    }
    .brand-headline {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 52px;
      line-height: 1.05;
      color: white;
      letter-spacing: -0.5px;
      margin-bottom: 20px;
    }
    .brand-headline em {
      color: var(--red);
      font-style: normal;
    }
    .brand-sub {
      font-size: 16px;
      color: rgba(255,255,255,0.45);
      line-height: 1.7;
      max-width: 380px;
      margin-bottom: 36px;
    }

    /* Stats row */
    .brand-stats {
      display: flex;
      gap: 28px;
      flex-wrap: wrap;
    }
    .brand-stat {
      display: flex;
      flex-direction: column;
    }
    .brand-stat-num {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 28px;
      color: white;
      line-height: 1;
    }
    .brand-stat-lbl {
      font-size: 11px;
      color: rgba(255,255,255,0.3);
      font-weight: 500;
      margin-top: 3px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .brand-stat-divider {
      width: 1px;
      height: 36px;
      background: rgba(255,255,255,0.1);
      align-self: center;
    }

    /* Trust badges */
    .brand-trust {
      position: relative;
      z-index: 1;
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }
    .brand-trust-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: rgba(255,255,255,0.3);
    }
    .brand-trust-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--green);
      flex-shrink: 0;
    }

    /* ── RIGHT PANEL — LOGIN FORM ────────────────────────────────────────── */
    .login-panel {
      flex: 1;
      background: var(--off-white);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px 48px;
      position: relative;
      overflow-y: auto;
    }

    /* Subtle grid */
    .login-panel::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(var(--gray-200) 1px, transparent 1px),
        linear-gradient(90deg, var(--gray-200) 1px, transparent 1px);
      background-size: 40px 40px;
      opacity: 0.5;
      pointer-events: none;
    }

    .login-wrap {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 400px;
    }

    /* Portal toggle — Shipper vs Carrier */
    .portal-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      background: white;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      overflow: hidden;
      margin-bottom: 28px;
      box-shadow: var(--shadow-sm);
    }
    .portal-btn {
      padding: 13px 8px;
      text-align: center;
      cursor: pointer;
      transition: all 0.18s;
      border: none;
      background: transparent;
      font-family: var(--font-body);
    }
    .portal-btn-icon { font-size: 18px; display: block; margin-bottom: 4px; }
    .portal-btn-label {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 15px;
      color: var(--gray-400);
      display: block;
    }
    .portal-btn-sub {
      font-size: 11px;
      color: var(--gray-300);
      display: block;
      margin-top: 1px;
    }
    .portal-btn.active {
      background: var(--navy);
    }
    .portal-btn.active .portal-btn-label { color: white; }
    .portal-btn.active .portal-btn-sub   { color: rgba(255,255,255,0.45); }

    /* CDHS annotation */
    .cdhs-row {
      display: flex;
      align-items: center;
      gap: 5px;
      margin-top: 4px;
      flex-wrap: wrap;
    }
    .cdhs-id {
      font-family: 'Courier New', monospace;
      font-size: 10px;
      background: rgba(27,42,74,0.07);
      color: var(--navy);
      border-radius: 4px;
      padding: 1px 6px;
      font-weight: 600;
    }
    .cdhs-type {
      font-size: 10px;
      color: var(--gray-300);
      font-style: italic;
    }

    /* Card */
    .login-card {
      background: white;
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-xl);
      padding: 32px;
      box-shadow: var(--shadow-md);
      margin-bottom: 16px;
    }

    .login-card-header { margin-bottom: 24px; }
    .login-card-title {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 26px;
      color: var(--navy);
      margin-bottom: 4px;
    }
    .login-card-sub { font-size: 13px; color: var(--gray-400); line-height: 1.5; }

    /* Fields */
    .field-group { margin-bottom: 18px; }
    .field-group label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--navy);
      margin-bottom: 6px;
    }
    .field-group input {
      width: 100%;
      height: 44px;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-md);
      padding: 0 14px;
      font-family: var(--font-body);
      font-size: 14px;
      color: var(--gray-800);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
      background: white;
    }
    .field-group input:focus {
      border-color: var(--navy);
      box-shadow: 0 0 0 3px rgba(27,42,74,0.08);
    }
    .field-group input.valid   { border-color: var(--green); }
    .field-group input.invalid { border-color: var(--red); }

    /* Password wrap */
    .pwd-wrap {
      position: relative;
    }
    .pwd-wrap input { padding-right: 46px; }
    .pwd-toggle {
      position: absolute;
      right: 12px; top: 50%;
      transform: translateY(-50%);
      background: none; border: none;
      cursor: pointer; font-size: 16px;
      color: var(--gray-400);
      padding: 0; line-height: 1;
    }

    /* Forgot password */
    .forgot-row {
      display: flex;
      justify-content: flex-end;
      margin-top: -10px;
      margin-bottom: 18px;
    }
    .forgot-link {
      font-size: 12px;
      color: var(--gray-400);
      text-decoration: none;
      font-weight: 500;
      transition: color 0.15s;
    }
    .forgot-link:hover { color: var(--navy); }

    /* Remember me */
    .remember-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 22px;
    }
    .remember-row input[type="checkbox"] { accent-color: var(--navy); width: 15px; height: 15px; }
    .remember-row label { font-size: 13px; color: var(--gray-600); cursor: pointer; }

    /* Submit button */
    .btn-login {
      width: 100%;
      height: 48px;
      background: var(--navy);
      color: white;
      border: none;
      border-radius: var(--radius-md);
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 18px;
      letter-spacing: 0.3px;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 16px;
    }
    .btn-login:hover  { background: var(--navy-mid); }
    .btn-login:active { transform: scale(0.98); }
    .btn-login.carrier-mode { background: #0F4C75; }
    .btn-login.carrier-mode:hover { background: #0A3A5C; }

    /* Divider */
    .or-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }
    .or-divider hr { flex: 1; border: none; border-top: 1px solid var(--gray-200); }
    .or-divider span { font-size: 12px; color: var(--gray-300); font-weight: 500; white-space: nowrap; }

    /* Google SSO */
    .btn-google {
      width: 100%;
      height: 44px;
      background: white;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-md);
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 600;
      color: var(--gray-800);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: border-color 0.15s, box-shadow 0.15s;
      margin-bottom: 20px;
    }
    .btn-google:hover {
      border-color: var(--gray-400);
      box-shadow: var(--shadow-sm);
    }
    .google-icon {
      width: 20px; height: 20px;
      background: white;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 15px;
    }

    /* Error message */
    .login-error {
      background: #FEF2F4;
      border: 1px solid #FECDD3;
      border-radius: var(--radius-md);
      padding: 10px 14px;
      font-size: 13px;
      color: #BE123C;
      margin-bottom: 16px;
      display: none;
      align-items: center;
      gap: 8px;
    }
    .login-error.visible { display: flex; }

    /* Processing state */
    .login-spinner {
      width: 18px; height: 18px;
      border: 2px solid rgba(255,255,255,0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      display: none;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Signup link */
    .signup-row {
      text-align: center;
      font-size: 13px;
      color: var(--gray-400);
    }
    .signup-row a {
      color: var(--navy);
      font-weight: 600;
      text-decoration: none;
    }
    .signup-row a:hover { text-decoration: underline; }

    /* Backend CDHS panel */
    .s3-backend {
      background: #F8FAFF;
      border: 1px solid #E8EEF8;
      border-radius: var(--radius-md);
      padding: 12px 14px;
      margin-top: 12px;
    }
    .s3-backend-title {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--gray-400);
      margin-bottom: 8px;
    }
    .s3-backend-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }
    .s3-backend-item {}
    .s3-backend-lbl { font-size: 10px; color: var(--gray-400); }
    .s3-backend-val { font-size: 11px; color: var(--navy); font-weight: 600; }

    /* ── RESPONSIVE ──────────────────────────────────────────────────────── */
    @media (max-width: 900px) {
      .brand-panel { display: none; }
      .login-panel {
        background: var(--navy-dark);
        padding: 24px 20px;
      }
      .login-panel::before {
        background-image:
          linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
          linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
      }
      .login-card { border: 1px solid rgba(255,255,255,0.08); }
    }
  </style>

/* ── FIELD ERRORS ── */
.field-error {
  font-size: 12px;
  color: #BE123C;
  margin-top: 4px;
  min-height: 0;
}

/* ── TRUCK LOADER ANIMATION ── */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: loaderFadeIn 0.3s ease;
}
@keyframes loaderFadeIn { from { opacity: 0; } to { opacity: 1; } }
.loader-content { text-align: center; max-width: 460px; width: 100%; padding: 0 24px; }
.loader-road-container { position: relative; height: 120px; margin-bottom: 32px; overflow: hidden; }
.loader-road { position: absolute; bottom: 20px; left: 0; right: 0; height: 40px; background: #374151; border-radius: 4px; overflow: hidden; }
.loader-road-line { position: absolute; top: 50%; left: 0; width: 200%; height: 3px; transform: translateY(-50%); background: repeating-linear-gradient(90deg,#FCD34D 0px,#FCD34D 24px,transparent 24px,transparent 40px); animation: roadScroll 1s linear infinite; }
@keyframes roadScroll { 0% { transform: translateY(-50%) translateX(0); } 100% { transform: translateY(-50%) translateX(-40px); } }
.loader-truck { position: absolute; bottom: 32px; font-size: 48px; line-height: 1; animation: truckDrive 3s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
@keyframes truckDrive { 0% { left: -60px; transform: scaleX(-1); } 50% { left: calc(50% - 24px); transform: scaleX(-1) translateY(-4px); } 100% { left: calc(100% + 60px); transform: scaleX(-1); } }
.loader-text { font-family: var(--font-display, 'Barlow Condensed', sans-serif); font-size: 22px; font-weight: 700; color: var(--navy, #0F1B2D); margin-bottom: 16px; letter-spacing: 0.5px; }
.loader-dots { display: flex; justify-content: center; gap: 8px; }
.loader-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red, #C8102E); animation: dotPulse 1.4s ease-in-out infinite; }
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
