/* ==========================================================================
   DOT OPERATIONS INC — MODERN COMPLIANCE & PERMITS PORTAL
   Design System & Styling — Clean Modern Light Theme
   ========================================================================== */

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

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

:root {
  /* Light Theme Color Palette */
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-card: #ffffff;
  --bg-surface-card-hover: #ffffff;
  --bg-surface-input: #ffffff;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-input: #afc9e2;
  --border-input-hover: #7ba4cb;
  --border-focus: #4f46e5;
  --border-glow: 0 0 0 3.5px rgba(175, 201, 226, 0.45);

  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --primary-glow: rgba(79, 70, 229, 0.25);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  
  --accent-cyan: #0284c7;
  --accent-cyan-soft: rgba(2, 132, 199, 0.08);
  --accent-emerald: #059669;
  --accent-emerald-soft: rgba(5, 150, 105, 0.08);
  --accent-amber: #d97706;
  --accent-amber-soft: rgba(217, 119, 6, 0.08);
  --accent-rose: #e11d48;
  --accent-rose-soft: rgba(225, 29, 72, 0.08);

  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glassmorphism */
  --glass-backdrop: blur(16px);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Navbar Dimensions */
  --nav-height: 72px;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1.25rem);
  font-size: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  padding-top: var(--nav-height);
}

/* Background Subtle Pastel Glows */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  filter: blur(140px);
}

body::before {
  top: -150px;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

body::after {
  bottom: 10%;
  right: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.06) 0%, transparent 70%);
}

/* Layout Utilities */
.container,
.hero-section.container,
.section.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ==========================================================================
   NAVIGATION BAR (ALWAYS FIXED AT TOP)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  border-bottom-color: var(--border-medium);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  width: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  min-width: 0;
}

.brand-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 52%, #0284c7 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-link:hover .brand-badge {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.brand-badge svg {
  width: 28px;
  height: 28px;
  flex: none;
  pointer-events: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
  line-height: 1.15;
}

.brand-title {
  line-height: 1.15;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.68rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--bg-surface-elevated);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.22);
  color: var(--primary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-phone-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* WebMCP Agentic Form Active Feedback */
form:tool-form-active {
  outline: 2px dashed var(--primary);
  outline-offset: 4px;
  background-color: rgba(79, 70, 229, 0.04);
  border-radius: var(--radius-md);
}

button:tool-submit-active {
  outline: 2px dashed var(--accent-amber);
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .nav-phone-btn {
    padding: 8px;
  }
  .nav-phone-btn span {
    display: none;
  }
}

/* User Profile Trigger & Dropdown */
.user-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.user-menu-btn > * {
  pointer-events: none;
}

.user-menu-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none !important;
}

.user-menu-btn.active,
.user-menu-btn[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.user-menu-btn .user-menu-chevron,
.user-menu-btn svg {
  color: var(--text-muted);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  flex-shrink: 0;
}

.user-menu-btn:hover .user-menu-chevron,
.user-menu-btn:hover svg,
.user-menu-btn.active .user-menu-chevron,
.user-menu-btn[aria-expanded="true"] .user-menu-chevron {
  color: var(--primary);
}

.user-menu-btn.active .user-menu-chevron,
.user-menu-btn[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

/* User Account Dropdown Card (Matches Screenshot) */
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 275px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s ease;
  pointer-events: none;
}

[data-theme="dark"] .user-menu-dropdown {
  background: var(--bg-surface-elevated, #1e293b);
  border-color: var(--border-medium, rgba(255, 255, 255, 0.1));
  box-shadow: 0 22px 50px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.user-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Individual Dropdown Item */
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  background: transparent;
  transition: all 0.16s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

[data-theme="dark"] .user-dropdown-item {
  color: #f1f5f9;
}

.user-dropdown-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #1e293b;
  transition: transform 0.18s ease, stroke 0.18s ease;
}

[data-theme="dark"] .user-dropdown-item svg {
  stroke: #cbd5e1;
}

.user-dropdown-item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  transform: translateX(2px);
}

.user-dropdown-item:hover svg {
  stroke: var(--primary, #2563eb);
  transform: scale(1.06);
}

/* Selected / Active Item State (Matches Screenshot 2) */
.user-dropdown-item.active {
  background: var(--primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  font-weight: 700;
}

.user-dropdown-item.active svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

.user-dropdown-item.active span {
  color: #ffffff !important;
}

.user-dropdown-item.active:hover {
  background: #1d4ed8 !important;
  transform: none;
}

#nav-user-name {
  display: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Mobile Toggle & Drawer Navigation */
.mobile-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  padding: 8px 10px;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-toggle:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 1.5rem;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.mobile-nav-close {
  background: transparent;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: var(--transition);
}

.mobile-nav-close:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 2rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--bg-surface-elevated);
  color: var(--primary);
}

.mobile-nav-link.active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.mobile-nav-auth {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--primary-dark);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.5);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-main);
}

.gradient-text {
  background: linear-gradient(135deg, #0f172a 20%, #4338ca 65%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* Quick USDOT Status Verification Box */
.usdot-quick-box {
  max-width: 620px;
  margin: 0 auto 3rem;
  padding: 8px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-input);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.03);
  display: flex;
  gap: 8px;
  align-items: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.usdot-quick-box:hover,
.usdot-quick-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), var(--border-glow);
}

.usdot-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  flex: 1;
}

.usdot-input-wrapper svg {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.usdot-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
}

.usdot-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Key Metrics Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-gradient);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ==========================================================================
   SERVICES GRID (7 JOINED SERVICES + UCR)
   ========================================================================== */
.section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.75rem;
}

.service-card {
  border-radius: var(--radius-lg);
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

.service-badge-pill {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-federal {
  background: rgba(79, 70, 229, 0.08);
  color: #4338ca;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.badge-state {
  background: rgba(2, 132, 199, 0.08);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-tax {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.service-icon-box.service-flag-box {
  width: 56px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.service-card-flag {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.service-card-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-features-list {
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.service-features-list svg {
  color: var(--accent-emerald);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.service-pricing-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.service-price-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.service-price-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* ==========================================================================
   INTERACTIVE FEE ESTIMATOR
   ========================================================================== */
.calc-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.contact-wrapper {
  grid-template-columns: 1fr 1.2fr;
}

.home-calc-wrapper,
.home-contact-wrapper {
  grid-template-columns: 1fr 1fr;
}

.calc-card {
  min-width: 0;
  width: 100%;
}

.page-hero-title {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0.75rem 0 1rem;
  color: var(--text-main);
}

.main-content {
  padding: 3rem 0 5rem;
}

.home-calc-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 5rem;
}

.calc-form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.input-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.input-hint.highlight {
  color: var(--primary);
  font-weight: 600;
}

.form-select, .form-input, textarea.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.form-select:hover, .form-input:hover, textarea.form-input:hover {
  border-color: var(--border-input-hover);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select:focus, .form-input:focus, textarea.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--border-glow), 0 1px 2px rgba(15, 23, 42, 0.05);
  background-color: #ffffff;
}

.form-input.is-invalid, .form-select.is-invalid {
  border-color: var(--accent-rose) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2) !important;
}

.form-input::placeholder, textarea.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.calc-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.calc-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

.calc-checkbox-card:hover {
  border-color: var(--border-input-hover);
  background: #e2e8f0;
}

.calc-checkbox-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
  box-shadow: 0 0 0 1px var(--primary);
}

.calc-checkbox-card[style*="border: none"]:has(input:checked) {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.calc-checkbox-card input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.vehicle-input-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vehicle-input-card:hover {
  border-color: var(--border-input-hover);
}

.calc-receipt-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.receipt-header {
  border-bottom: 1px solid var(--border-medium);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.receipt-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.receipt-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.receipt-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.75rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breakdown-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

.receipt-total-row {
  border-top: 1px solid var(--border-medium);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.receipt-total-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.receipt-total-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

/* ==========================================================================
   PERMIT FILING MULTI-STEP WIZARD
   ========================================================================== */
.wizard-container {
  max-width: 980px;
  margin: 0 auto;
}

.wizard-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 2.5rem;
  max-width: 640px;
  position: relative;
}

.wizard-stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: var(--border-medium);
  z-index: 0;
  transform: translateY(-50%);
}

.step-indicator {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.step-bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-medium);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
}

.step-indicator.active .step-bubble {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.step-indicator.completed .step-bubble {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
}

.step-title {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-indicator.active .step-title {
  color: var(--primary);
}

/* Wizard Card */
.wizard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.wizard-step-content,
.wizard-step-pane {
  display: none !important;
}

.wizard-step-content.active,
.wizard-step-pane.active {
  display: block !important;
  animation: fadeIn 0.25s ease-out;
}

html[data-wizard-step="2"] #wizard-step-1,
html[data-wizard-step="2"] #wizard-step-3,
html[data-wizard-step="3"] #wizard-step-1,
html[data-wizard-step="3"] #wizard-step-2 {
  display: none !important;
}

html[data-wizard-step="2"] #wizard-step-2,
html[data-wizard-step="3"] #wizard-step-3 {
  display: block !important;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-step-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.wizard-step-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Service Selection Cards inside Wizard */
.wizard-service-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .wizard-service-selector {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .wizard-service-selector {
    grid-template-columns: 1fr;
  }
}

.service-select-btn {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-height: 155px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.service-select-btn:hover {
  border-color: var(--primary);
  background: var(--bg-surface-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-select-btn.selected,
.service-select-btn.active {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.04);
  box-shadow: 0 0 0 2px #4f46e5;
}

.service-flag {
  display: block;
  margin-bottom: 10px;
}

.flag-thumb {
  width: 42px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: block;
}

.service-select-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.3;
}

.service-select-btn small {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}

.service-select-rate {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 700;
  margin-top: auto;
  display: block;
}

/* Wizard Form Grid */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

/* Wizard Navigation Footer */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* 3-Step Checkout Grid */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.checkout-payment-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   CLIENT PORTAL & DASHBOARD
   ========================================================================== */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.portal-carrier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-soft);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: var(--accent-emerald);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.portal-carrier-badge .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.portal-company-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 0.4rem 0;
}

.portal-carrier-sub {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  margin-top: 1rem;
  min-height: 700px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.portal-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: fit-content;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.portal-nav,
.portal-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.portal-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: all var(--transition);
}

.portal-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.portal-nav-item:hover {
  color: var(--primary);
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
}

.portal-nav-item:hover svg {
  transform: scale(1.08);
}

.portal-nav-item.active {
  color: #fff;
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.portal-nav-item.active svg {
  color: #fff;
}

.portal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.portal-tab-pane {
  display: none;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.portal-tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.portal-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.portal-tab-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

.portal-tab-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.portal-calc-summary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Data Tables */
.table-responsive,
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.custom-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th,
.data-table th {
  padding: 12px 16px;
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

.custom-table td,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.custom-table tr:hover td,
.data-table tr:hover td {
  background: #f8fafc;
  color: var(--text-main);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-status.approved, .badge-status.completed, .badge-status.active {
  background: var(--accent-emerald-soft);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-status.pending, .badge-status.processing {
  background: var(--accent-amber-soft);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-status.rejected, .badge-status.failed {
  background: var(--accent-rose-soft);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.2), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  position: relative;
}

.modal-window.modal-wide {
  max-width: 820px;
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.modal-body {
  padding: 1.75rem;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.3s ease-out;
  min-width: 280px;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.error {
  border-left: 4px solid var(--accent-rose);
}

.toast.info {
  border-left: 4px solid var(--primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: #f1f5f9;
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 10;
}

.footer-grid,
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-desc,
.footer-desc {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-top: 1rem;
  max-width: 380px;
}

.footer-heading,
.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-medium);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   BLOG & COMPLIANCE ARTICLES SECTION (LIGHT THEME)
   ========================================================================== */

/* Blog Navigation and Pills */
.blog-topics-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 1.5rem 0 2.5rem;
}

.topic-pill {
  appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topic-pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--bg-surface-elevated);
}

.topic-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Blog Search Box */
.blog-search-wrap {
  position: relative;
  max-width: 460px;
  width: 100%;
}

.blog-search-wrap svg.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.blog-search-input {
  width: 100%;
  padding: 12px 38px 12px 42px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.blog-search-input:hover {
  border-color: var(--border-input-hover);
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--border-glow), 0 1px 2px rgba(15, 23, 42, 0.05);
}

.blog-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: none;
}

.blog-search-clear:hover {
  color: var(--text-main);
}

/* Badges */
.badge-topic {
  display: inline-flex;
  align-items: center;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 11px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-readtime {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.725rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-trending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(225, 29, 72, 0.08);
  color: var(--accent-rose);
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.725rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Featured Article Spotlight Card */
.featured-article-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: var(--transition-smooth);
}

.featured-article-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.featured-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.featured-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.featured-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.featured-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.featured-title a:hover {
  color: var(--primary);
}

.featured-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 900px;
}

.featured-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.featured-fmcsa-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Articles Cards Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.blog-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.blog-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-desc {
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.blog-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.825rem;
  white-space: nowrap;
}

.blog-card-readtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-card-readtime svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.blog-card-dot {
  opacity: 0.4;
  font-size: 0.75rem;
}

.blog-card-date {
  color: var(--text-muted);
}

.blog-card-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.blog-card-link:hover {
  color: var(--primary-dark);
  gap: 7px;
}

.blog-card-tutorial {
  border-color: rgba(147, 51, 234, 0.2);
}

.blog-card-tutorial:hover {
  border-color: rgba(147, 51, 234, 0.45);
  box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.12);
}

.blog-card-link.tutorial-link {
  color: #a855f7;
}

.blog-card-link.tutorial-link:hover {
  color: #9333ea;
}

.video-player-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  aspect-ratio: 16/9;
  max-height: 520px;
}

.video-player-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 1280px) and (min-width: 1025px) {
  .desktop-nav {
    gap: 2px;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 0.8125rem;
  }
}

/* Article Reader View */
.reader-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.reader-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.reader-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.reader-breadcrumb a:hover {
  text-decoration: underline;
}

.reader-breadcrumb-separator {
  color: var(--border-medium);
}

.reader-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2rem;
}

.reader-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-surface-elevated);
}

.reader-article-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
}

.reader-article-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.reader-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.reader-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.reader-lead-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
}

.reader-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
}

.reader-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
}

.reader-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 0.75rem;
}

.reader-body p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.reader-body ul, .reader-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.reader-body li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.reader-body strong {
  color: var(--text-main);
}

.reader-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-surface-elevated);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Article CTA Card */
.reader-cta-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(2, 132, 199, 0.05) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.reader-cta-text h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.reader-cta-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Related Guides Section */
.reader-related-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border-medium);
  padding-top: 2.5rem;
}

.reader-related-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

/* Details summary chevron rotation */
details summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  user-select: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

details[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--primary);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  :root {
    --nav-height: 64px;
  }
  .desktop-nav { display: none !important; }
  .mobile-toggle {
    display: inline-flex !important;
    margin-left: auto;
    margin-right: 0;
  }
  .nav-actions { display: none !important; }
  .nav-wrapper {
    height: var(--nav-height);
    justify-content: space-between;
  }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .calc-wrapper,
  .contact-wrapper,
  .home-calc-wrapper,
  .home-contact-wrapper {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar .portal-nav,
  .portal-sidebar .portal-nav-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    width: 100%;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .featured-title { font-size: 1.6rem; }
  .reader-title { font-size: 1.85rem; }
  .reader-article-card { padding: 2rem; }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }
  .site-header .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .nav-wrapper {
    height: var(--nav-height);
    justify-content: space-between;
  }
  .brand-link {
    gap: 8px;
    max-width: calc(100% - 56px);
  }
  .brand-badge {
    width: 36px;
    height: 36px;
  }
  .brand-badge svg {
    width: 24px;
    height: 24px;
  }
  .brand-title {
    font-size: 1rem;
    line-height: 1.15;
  }
  .brand-subtitle {
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    line-height: 1.15;
  }
  .nav-actions {
    display: none !important;
  }
  .mobile-toggle {
    margin-left: auto;
    margin-right: 0;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 8px;
  }
  .main-content {
    padding: 1.75rem 0 3.5rem;
  }
  .calc-wrapper,
  .contact-wrapper,
  .home-calc-wrapper,
  .home-contact-wrapper {
    padding: 1.5rem 1.15rem !important;
    border-radius: var(--radius-lg);
    gap: 1.5rem !important;
    margin-bottom: 2.5rem !important;
  }
  .home-calc-section {
    padding: 1.75rem 1.15rem !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 3.5rem !important;
  }
  .wizard-card {
    padding: 1.5rem 1.15rem !important;
    border-radius: var(--radius-lg);
  }
  .calc-card {
    min-width: 0;
    width: 100%;
  }
  .auth-page-wrapper {
    min-height: calc(100vh - var(--nav-height));
    min-height: calc(100dvh - var(--nav-height));
    padding: 1.5rem 1rem 3rem;
  }
  .services-grid { grid-template-columns: 1fr; }
  .container,
  .hero-section.container,
  .section.container {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .hero-section {
    padding-top: 2.75rem;
    padding-bottom: 2rem;
  }
  .section {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }
  .hero-title { font-size: clamp(2rem, 6vw, 2.5rem); }
  .stats-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }
  .stat-card {
    padding: 1.25rem 1.15rem;
  }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr !important; gap: 12px; }
  .wizard-stepper { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 10px; justify-content: flex-start; gap: 1.5rem; }
  .portal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .portal-header-actions {
    width: 100%;
  }
  .portal-header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .portal-layout {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .portal-sidebar {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
  }
  .portal-sidebar .portal-nav,
  .portal-sidebar .portal-nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .portal-content {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 1.25rem 1rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .portal-tab-pane {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .portal-tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .portal-tab-header .btn {
    width: 100%;
    justify-content: center;
  }
  .table-container,
  .table-responsive {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .modal-window {
    max-width: calc(100vw - 2rem) !important;
    margin: 1rem !important;
    border-radius: var(--radius-lg) !important;
  }
  .modal-header {
    padding: 1.25rem !important;
  }
  .modal-body {
    padding: 1.25rem !important;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .blog-grid { grid-template-columns: 1fr; }
  .featured-article-card { padding: 1.5rem; }
  .reader-article-card { padding: 1.5rem; }
  .reader-title { font-size: 1.6rem; }
  .section-title { font-size: 1.75rem; }
  .section-desc { font-size: 0.95rem; }
}

@media (max-width: 540px) {
  .usdot-quick-box {
    flex-direction: column;
    padding: 10px;
    border-radius: var(--radius-lg);
  }
  .usdot-quick-box .btn {
    width: 100%;
    justify-content: center;
  }
  .usdot-input-wrapper {
    padding-left: 6px;
    width: 100%;
  }
  .portal-header {
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
  }
  .portal-sidebar {
    padding: 0.875rem !important;
  }
  .portal-nav-item {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  .portal-content {
    padding: 1.15rem 0.875rem !important;
  }
  .portal-company-title {
    font-size: 1.45rem !important;
  }
  .portal-carrier-badge {
    font-size: 0.725rem !important;
    padding: 4px 10px !important;
  }
  .portal-calc-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .portal-calc-summary .btn {
    width: 100%;
    justify-content: center;
  }
  .auth-card {
    padding: 2rem 1.25rem;
  }
  .auth-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .site-header .container,
  .container,
  .hero-section.container,
  .section.container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .hero-section {
    padding-top: 2rem;
    padding-bottom: 1.75rem;
  }
  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .calc-wrapper,
  .contact-wrapper,
  .home-calc-wrapper,
  .home-contact-wrapper {
    padding: 1.25rem 0.9rem !important;
  }
  .wizard-card {
    padding: 1.25rem 0.9rem !important;
  }
  .home-calc-section {
    padding: 1.25rem 0.9rem !important;
  }
  .stat-card {
    padding: 1.1rem 1rem;
  }
  .auth-usdot-lookup-box .lookup-row {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .site-header .container,
  .container,
  .hero-section.container,
  .section.container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .brand-link {
    gap: 6px;
  }
  .brand-badge {
    width: 32px;
    height: 32px;
  }
  .brand-badge svg {
    width: 21px;
    height: 21px;
  }
  .brand-title {
    font-size: 0.88rem;
  }
  .brand-subtitle {
    font-size: 0.52rem;
    letter-spacing: 0.03em;
  }
}

/* =========================================================================
   DEDICATED AUTHENTICATION PAGES (Login, Register, Forgot Password)
   ========================================================================= */

.auth-page-wrapper {
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.25rem 4rem;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    var(--bg-base);
  position: relative;
}

.auth-page-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(100, 116, 139, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.6;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.5rem;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.auth-card.auth-card-wide {
  max-width: 660px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .brand-link {
  display: inline-flex;
  margin-bottom: 1.25rem;
}

.auth-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.45;
  margin-bottom: 1.5rem;
  display: none;
  align-items: flex-start;
  gap: 10px;
}

.auth-alert.show {
  display: flex;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #b91c1c;
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
}

.input-password-wrap {
  position: relative;
  width: 100%;
}

.input-password-wrap .form-input {
  padding-right: 44px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.btn-toggle-pwd:hover {
  color: var(--text-main);
}

.password-strength-wrap {
  margin-top: 6px;
}

.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-medium);
  overflow: hidden;
  margin-bottom: 4px;
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.25s ease, background-color 0.25s ease;
  background: #ef4444;
}

.password-strength-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Auth Form Remember Checkbox (Clean, No Border) */
.auth-remember-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  user-select: none;
}

.auth-remember-wrap input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

.auth-remember-wrap span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.15s ease;
}

.auth-remember-wrap:hover span {
  color: var(--text-main);
}

.auth-footer-nav {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer-nav a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer-nav a:hover {
  text-decoration: underline;
}

.auth-trust-strip {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  text-align: center;
  flex-wrap: wrap;
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-trust-item svg {
  color: var(--primary);
}

@media (max-width: 540px) {
  .auth-card {
    padding: 2rem 1.25rem;
  }
  .auth-title {
    font-size: 1.5rem;
  }
}

.auth-usdot-lookup-box {
  background: var(--bg-surface-elevated, rgba(248, 250, 252, 0.8));
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin-bottom: 1.5rem;
}

.auth-usdot-lookup-box .lookup-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 480px) {
  .auth-usdot-lookup-box .lookup-row {
    flex-direction: column;
  }
}

.auth-usdot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
}

/* Settings Tab - Sign Out Button */
#btn-settings-logout {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.08);
}

#btn-settings-logout:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: #dc2626 !important;
  color: #dc2626 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}

#btn-settings-logout:active {
  transform: translateY(0);
}


