:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --panel2: #0f172a;
  --text: #e6edf7;
  --muted: #9aa8bf;
  --primary: #4f8cff;
  --danger: #ff4f6d;
  --warning: #ffca3a;
  --success: #2dd4bf;
  --border: rgba(255, 255, 255, .08);
  --input-border: rgba(148, 163, 184, 0.5);
  --input-border-focus: rgba(79, 140, 255, 0.85);
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #070b14);
}

a {
  color: inherit
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(15, 23, 42, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand a {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.layout {
  display: flex;
  min-height: calc(100vh - 58px)
}

.sidebar {
  width: 260px;
  padding: 16px;
  border-right: 1px solid var(--border);
  background: rgba(17, 26, 46, .65);
}

.sidebar-title {
  font-weight: 700;
  margin: 4px 0 12px 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em
}

/* Operator sidebar: role-based sections (Operator / Drivers / Clients) */
.nav-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.nav-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.nav-section-label {
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 10px 2px;
  opacity: .9;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  margin: 6px 0;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, .02);
}

.nav-link:hover {
  border-color: var(--border)
}

.nav-link.active {
  border-color: rgba(79, 140, 255, .45);
  background: rgba(79, 140, 255, .10)
}

/* Primary sidebar entry (Home) — outside grouped sections */
.nav-home {
  display: block;
  margin-bottom: 14px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(79, 140, 255, .4);
  background: rgba(79, 140, 255, .18);
}

.nav-home:hover {
  border-color: rgba(79, 140, 255, .55);
  background: rgba(79, 140, 255, .24);
}

.nav-home.active {
  border-color: rgba(79, 140, 255, .65);
  background: rgba(79, 140, 255, .28);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, .15);
}

/* Sidebar: grouped navigation (main section + sub-links) */
.nav-group {
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
  overflow: hidden;
}

.nav-group[open] {
  border-color: rgba(255, 255, 255, .12);
}

.nav-group-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  user-select: none;
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group[open] > .nav-group-summary {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
}

.nav-sub {
  padding: 6px 6px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-sub .nav-link {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
}

/* Single-page nav entries — same box + label style as collapsed nav-group */
.nav-group .nav-direct-link {
  display: block;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  text-decoration: none;
}

.nav-group .nav-direct-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .03);
  border-color: transparent;
}

.nav-group .nav-direct-link.active {
  color: var(--text);
  border-color: transparent;
  background: rgba(79, 140, 255, .10);
}

.content {
  flex: 1;
  padding: 18px;
}

.container {
  max-width: 1100px;
  margin: 0 auto
}

.grid {
  display: grid;
  gap: 12px
}

.grid>* {
  min-width: 0
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.card {
  background: rgba(17, 26, 46, .75);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.card h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase
}

.stat {
  font-size: 28px;
  font-weight: 800
}

.muted {
  color: var(--muted)
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.pill.success {
  border-color: rgba(45, 212, 191, .35);
  color: var(--success)
}

.pill.warning {
  border-color: rgba(255, 202, 58, .35);
  color: var(--warning)
}

.pill.danger {
  border-color: rgba(255, 79, 109, .35);
  color: var(--danger)
}

.btn {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
}

.btn:hover {
  border-color: rgba(79, 140, 255, .35)
}

.btn-primary {
  background: rgba(79, 140, 255, .15);
  border-color: rgba(79, 140, 255, .35)
}

.btn-danger {
  background: rgba(255, 79, 109, .12);
  border-color: rgba(255, 79, 109, .35)
}

.btn-sm {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px
}

/* Theme toggle should contrast current mode:
   dark mode => light button, light mode => dark button */
[data-theme-toggle] {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(148, 163, 184, 0.65);
  color: #0f172a;
  font-weight: 700;
}

[data-theme-toggle]:hover {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.85);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(17, 26, 46, .55);
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px
}

.table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .02)
}

.table tr:last-child td {
  border-bottom: none
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.table-wrap .table {
  min-width: 760px
}

.payroll-grid {
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  align-items: start
}

.payroll-grid .btn {
  white-space: nowrap
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: rgba(3, 6, 14, .35);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(148, 163, 184, 0.65);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.22);
}

/* Hide add/minus spinners on number inputs (all portals) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

label {
  color: var(--muted);
  font-size: 13px
}

.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-theme-float {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.auth-card {
  width: min(520px, 100%);
  padding: 18px;
}

/* Login pages — same truck hero treatment as index landing */
body.auth-hero-page {
  margin: 0;
  min-height: 100vh;
  background: #080f1e;
}

html[data-theme="light"] body.auth-hero-page {
  background: #0c4a6e;
}

.auth-hero-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.auth-hero-page .auth-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    115deg,
    rgba(8, 15, 30, 0.88) 0%,
    rgba(8, 15, 30, 0.55) 42%,
    rgba(12, 74, 110, 0.35) 100%
  );
  pointer-events: none;
}

body.auth-hero-page .auth-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  min-height: unset;
  margin: 0 auto;
  display: block;
  padding: 48px 8px 32px;
}

body.auth-hero-page .auth-card--hero {
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 20px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

body.auth-hero-page .auth-card--hero h2 {
  color: #f8fafc;
}

body.auth-hero-page .auth-card--hero .muted {
  color: rgba(224, 242, 254, 0.88);
}

body.auth-hero-page .auth-card--hero label {
  color: #bae6fd;
}

body.auth-hero-page .auth-card--hero input {
  background: rgba(3, 6, 14, 0.5);
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #f8fafc;
}

body.auth-hero-page .auth-card--hero input:hover {
  border-color: rgba(125, 211, 252, 0.65);
}

body.auth-hero-page .auth-card--hero input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

body.auth-hero-page .auth-card--hero .btn-primary {
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  border-color: rgba(14, 165, 233, 0.65);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

body.auth-hero-page .auth-card--hero .btn-primary:hover {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
}

body.auth-hero-page .auth-card--hero .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(125, 211, 252, 0.25);
  color: #e0f2fe;
}

body.auth-hero-page .auth-card--hero .btn:not(.btn-primary):hover {
  background: rgba(125, 211, 252, 0.15);
  border-color: rgba(125, 211, 252, 0.4);
}

body.auth-hero-page .auth-card--hero .alert {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--border);
}

body.auth-hero-page .auth-theme-float .btn {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(125, 211, 252, 0.3);
  color: #e0f2fe;
  backdrop-filter: blur(8px);
}

body.auth-hero-page .auth-theme-float .btn:hover {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(14, 165, 233, 0.2);
}

.alert {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: rgba(255, 255, 255, .03);
}

.alert.warning {
  border-color: rgba(255, 202, 58, .35)
}

.alert.success {
  border-color: rgba(45, 212, 191, .35)
}

.alert.danger {
  border-color: rgba(255, 79, 109, .35)
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  object-fit: cover;
  display: block;
}

.img-preview {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: rgba(255, 255, 255, .02);
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 20, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: rgba(17, 26, 46, .95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

@media (max-width: 900px) {
  .sidebar {
    display: none
  }

  .grid-3 {
    grid-template-columns: 1fr
  }

  .grid-2 {
    grid-template-columns: 1fr
  }
}

@media (max-width: 1250px) {
  .payroll-grid {
    grid-template-columns: 1fr
  }
}

/* ----- Landing page (index) — full-bleed hero ----- */
body.page-landing .layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
}

.index-hero-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  min-height: 0;
}

.index-hero {
  flex: 1;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(24px, 5vw, 48px);
}

/* Full-bleed photo layer (DOM block is more reliable than ::before + var() on some hosts/CDNs) */
.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-attachment: scroll;
  pointer-events: none;
}

.index-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    115deg,
    rgba(8, 15, 30, 0.88) 0%,
    rgba(8, 15, 30, 0.55) 42%,
    rgba(12, 74, 110, 0.35) 100%
  );
  pointer-events: none;
}

.index-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.index-hero-card {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 32px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.index-hero-eyebrow {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.index-hero-title {
  margin: 0 0 12px 0;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.index-hero-lead {
  margin: 0 0 22px 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(224, 242, 254, 0.92);
}

.index-hero-card .btn-hero-login {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  border-color: rgba(14, 165, 233, 0.65);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.index-hero-card .btn-hero-login:hover {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  border-color: #0ea5e9;
}

.index-hero-features {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: 16px;
  padding: 18px 20px 20px;
}

.index-hero-features-title {
  margin: 0 0 12px 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bae6fd;
}

.index-hero-features ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(224, 242, 254, 0.9);
  font-size: 14px;
  line-height: 1.65;
}

.index-hero-features li::marker {
  color: #38bdf8;
}

@media (max-width: 600px) {
  .index-hero {
    background-position: center center;
    align-items: flex-end;
    padding-bottom: 32px;
  }

  .index-hero-inner {
    max-width: none;
  }
}

/* ----- Light theme: soft sky / light-blue accent (dark text for readability) ----- */
html[data-theme="light"] {
  --bg: #f0f9ff;
  --bg-deep: #e0f2fe;
  --panel: #ffffff;
  --panel2: #f8fcff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.14);
  --accent-mid: rgba(14, 165, 233, 0.22);
  --accent-border: rgba(14, 165, 233, 0.35);
  --accent-strong: rgba(2, 132, 199, 0.55);
  --danger: #dc2626;
  --warning: #b45309;
  --success: #047857;
  --border: rgba(14, 165, 233, 0.22);
  --input-border: rgba(15, 23, 42, 0.28);
  --input-border-focus: #0284c7;
}

html[data-theme="light"] body {
  background: linear-gradient(180deg, var(--bg) 0%, #dbeafe 55%, var(--bg-deep) 100%);
  color: var(--text);
}

html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(240, 249, 255, 0.95));
  border-bottom-color: var(--border);
  color: var(--text);
}

html[data-theme="light"] .topbar .muted {
  color: var(--muted);
}

html[data-theme="light"] .topbar strong {
  color: var(--text);
}

html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(224, 242, 254, 0.72));
  border-right-color: var(--border);
}

html[data-theme="light"] .nav-link {
  background: var(--accent-soft);
  color: var(--text);
}

html[data-theme="light"] .nav-link:hover {
  border-color: var(--accent-border);
}

html[data-theme="light"] .nav-link.active {
  border-color: var(--accent-strong);
  background: var(--accent-mid);
  color: #0f172a;
}

html[data-theme="light"] .nav-home {
  color: #0c4a6e;
  border-color: var(--accent-border);
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.9), var(--accent-mid));
}

html[data-theme="light"] .nav-home:hover {
  border-color: var(--accent-strong);
  background: linear-gradient(180deg, #e0f2fe, rgba(14, 165, 233, 0.28));
}

html[data-theme="light"] .nav-home.active {
  border-color: #0284c7;
  background: linear-gradient(180deg, #bae6fd, rgba(14, 165, 233, 0.32));
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2);
  color: #0f172a;
}

html[data-theme="light"] .nav-group {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--border);
}

html[data-theme="light"] .nav-group[open] {
  border-color: var(--accent-border);
}

html[data-theme="light"] .nav-group[open] > .nav-group-summary {
  background: var(--accent-soft);
  color: #0c4a6e;
}

html[data-theme="light"] .nav-group-summary {
  color: var(--muted);
}

html[data-theme="light"] .nav-group .nav-direct-link {
  color: var(--muted);
}

html[data-theme="light"] .nav-group .nav-direct-link:hover,
html[data-theme="light"] .nav-group .nav-direct-link.active {
  color: #0c4a6e;
  background: var(--accent-soft);
}

html[data-theme="light"] .sidebar-title {
  color: #0c4a6e;
}

html[data-theme="light"] .nav-section {
  border-bottom-color: var(--border);
}

html[data-theme="light"] .nav-section-label {
  color: #0369a1;
}

html[data-theme="light"] .card {
  background: var(--panel);
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(14, 165, 233, 0.08);
  color: var(--text);
}

html[data-theme="light"] .card h3 {
  color: #0c4a6e;
}

html[data-theme="light"] .table {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
}

html[data-theme="light"] .table th {
  background: var(--accent-soft);
  color: #0c4a6e;
}

html[data-theme="light"] .table td {
  color: var(--text);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff;
  border: 1px solid var(--input-border);
  color: var(--text);
}

html[data-theme="light"] input:hover,
html[data-theme="light"] select:hover,
html[data-theme="light"] textarea:hover {
  border-color: rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

html[data-theme="light"] .btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--border);
  color: #0c4a6e;
}

html[data-theme="light"] .btn:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .btn-primary {
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  border-color: #0284c7;
  color: #ffffff;
}

html[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  border-color: #0369a1;
}

html[data-theme="light"] .btn-danger {
  color: #991b1b;
}

html[data-theme="light"] .alert {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="light"] .modal-overlay {
  background: rgba(12, 74, 110, 0.35);
}

html[data-theme="light"] .modal-card {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="light"] .avatar,
html[data-theme="light"] .img-preview {
  background: var(--accent-soft);
  border-color: var(--border);
}

html[data-theme="light"] .pill.success {
  border-color: rgba(4, 120, 87, 0.35);
}

html[data-theme="light"] .pill.warning {
  border-color: rgba(180, 83, 9, 0.35);
}

html[data-theme="light"] .pill.danger {
  border-color: rgba(220, 38, 38, 0.35);
}

html[data-theme="light"] .stat {
  color: #0c4a6e;
}

html[data-theme="light"] .content {
  color: var(--text);
}

html[data-theme="light"] .content h2 {
  color: var(--text);
}

/* Landing + login heroes in light mode: light frosted panels, dark type */
html[data-theme="light"] body.page-landing .index-hero-card,
html[data-theme="light"] body.page-landing .index-hero-features {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] body.page-landing .index-hero-eyebrow {
  color: #0369a1;
}

html[data-theme="light"] body.page-landing .index-hero-title {
  color: var(--text);
}

html[data-theme="light"] body.page-landing .index-hero-lead {
  color: var(--muted);
}

html[data-theme="light"] body.page-landing .index-hero-features-title {
  color: #0c4a6e;
}

html[data-theme="light"] body.page-landing .index-hero-features ul {
  color: var(--text);
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero h2 {
  color: var(--text);
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero .muted {
  color: var(--muted);
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero label {
  color: #0c4a6e;
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero input {
  background: #ffffff;
  border: 1px solid var(--input-border);
  color: var(--text);
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero input:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border);
  color: #0c4a6e;
}

html[data-theme="light"] body.auth-hero-page .auth-card--hero .alert {
  color: var(--text);
}

html[data-theme="light"] body.auth-hero-page .auth-theme-float .btn {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  color: #0c4a6e;
}

/* In light mode, invert toggle button to dark style */
html[data-theme="light"] [data-theme-toggle] {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
}

html[data-theme="light"] [data-theme-toggle]:hover {
  background: #0f172a;
  border-color: #0f172a;
}

html[data-theme="light"] body.auth-hero-page .auth-theme-float [data-theme-toggle] {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
}

html[data-theme="light"] body.auth-hero-page .auth-theme-float [data-theme-toggle]:hover {
  background: #0f172a;
  border-color: #0f172a;
}