:root {
  color-scheme: light;
  --blue-900: #082b6f;
  --blue-800: #0a3f9c;
  --blue-700: #0b63ce;
  --blue-100: #dceeff;
  --blue-050: #f2f8ff;
  --green-700: #239624;
  --green-600: #39b531;
  --green-100: #dff8dc;
  --teal-100: #dbf4ef;
  --gold-100: #fff1c8;
  --rose-100: #ffe2e2;
 --ink: #152033;
 --muted: #60708a;
 --line: #d9e3f0;
 --surface: #ffffff;
 --surface-2: #f7fbff;
 --warning: #9a6412;
 --warning-bg: #fff5df;
 --danger-bg: #fff0f0;
 --shadow: 0 18px 42px rgba(23, 48, 80, 0.11);
 --shadow-soft: 0 10px 26px rgba(23, 48, 80, 0.08);
 --radius: 8px;
 --radius-sm: 6px;
 --tap: 48px;
  /* Section-specific accent colors */
  --accent-dashboard: #0b63ce;
  --accent-dashboard-bg: #f2f8ff;
  --accent-receipts: #239624;
  --accent-receipts-bg: #dff8dc;
  --accent-mileage: #e67e22;
  --accent-mileage-bg: #fef3e7;
  --accent-vehicles: #0d9488;
  --accent-vehicles-bg: #dbf4ef;
  --accent-earnings: #d97706;
  --accent-earnings-bg: #fff1c8;
  --accent-plans: #7c3aed;
  --accent-plans-bg: #ede9fe;
  --accent-export: #4f46e5;
  --accent-export-bg: #e0e7ff;
  --accent-account: #475569;
  --accent-account-bg: #f1f5f9;
 font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-2);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(57, 181, 49, 0.08), transparent 28%),
    radial-gradient(circle at 88% 2%, rgba(11, 99, 206, 0.1), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 36%, #f7fafc 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue-700);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 84px;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 10px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(207, 219, 233, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.94));
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--blue-900);
  text-decoration: none;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(8, 43, 111, 0.16);
}

.brand strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.1;
}

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

.year-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.year-picker span {
  font-size: 0.86rem;
  line-height: 1.1;
}

.year-picker select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0 16px 0 8px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--blue-800);
  font-weight: 900;
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 16px 0 48px;
}

.brand-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, #ffffff, #f5faff 58%, #f7fff6);
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
}

.brand-ribbon span {
  color: var(--blue-900);
  font-weight: 1000;
}

.brand-ribbon strong {
  color: var(--blue-900);
  font-size: 1.05rem;
}

.view {
  display: none;
  animation: fadeSlide 180ms ease-out;
}

.view.active {
  display: block;
}

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

.auth-view {
  display: none;
  grid-template-columns: minmax(280px, 0.88fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.auth-view.active {
  display: grid;
}

.auth-art,
.auth-panel,
.panel,
.usage-card,
.hub-card,
.plan-card {
  border: 1px solid rgba(217, 227, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 620px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 32%, rgba(220, 238, 255, 0.84), transparent 42%),
    linear-gradient(180deg, #ffffff, #f4f9ff);
}

.auth-art img {
  width: min(112%, 680px);
  height: auto;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.98));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-800);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 800px;
  color: var(--blue-900);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  color: var(--blue-900);
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.lead {
  margin: 18px 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
}

.notice {
  border: 1px solid #cbd9ea;
  border-left: 4px solid var(--blue-800);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f5faff);
  padding: 12px 14px;
  color: var(--ink);
  line-height: 1.45;
}

.notice.subtle {
  margin-top: 16px;
  border-color: var(--line);
  border-left-color: var(--green-600);
  background: #fbfefd;
  color: var(--muted);
}

.auth-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-status[data-status="error"] {
  color: #a23232;
}

.auth-status[data-status="success"] {
  color: var(--green-700);
}

.auth-grid,
.recovery-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.recovery-details {
  margin-top: 24px;
  border: 1px solid rgba(195, 216, 239, 0.78);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 251, 255, 0.9)),
    repeating-linear-gradient(135deg, rgba(11, 99, 206, 0.035) 0 1px, transparent 1px 12px);
  overflow: hidden;
}

.recovery-details summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--blue-900);
  cursor: pointer;
  list-style: none;
}

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

.recovery-details small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}


.recovery-grid {
  margin: 0;
  border-top: 1px solid #dbe6f2;
  padding: 12px 14px 4px;
}

.recovery-grid button {
  align-self: end;
}

.plans-compare-details {
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #4c5d73;
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.14);
}

input:disabled,
select:disabled {
  border-color: #d9e2ee;
  background: #edf2f7;
  color: #7a8aa0;
  cursor: not-allowed;
}

label.is-disabled {
  color: #8a98aa;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid #e0e8f2;
  padding-top: 14px;
}

.save-status {
  color: var(--green-700);
  font-size: 0.88rem;
  font-weight: 900;
}

.save-status.is-error {
  color: #9a3535;
}

.primary,
.secondary {
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary {
  border: 1px solid var(--blue-700);
  background: linear-gradient(180deg, var(--blue-700), var(--blue-800));
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 99, 206, 0.2);
}

.primary:hover {
  background: var(--blue-800);
  transform: translateY(-1px);
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-800);
}

.secondary:hover {
  border-color: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(8, 43, 111, 0.1);
}

/* Section-specific primary button styles */
[data-section="account"] .primary:focus {
  border-color: var(--accent-account);
  background: linear-gradient(180deg, var(--accent-account), #334155);
  box-shadow: 0 10px 22px rgba(71, 85, 105, 0.2);
}


.sign-out-btn {
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 900;
  background: linear-gradient(180deg, var(--blue-700), var(--blue-800));
  color: #fff;
  border: 1px solid var(--blue-700);
  box-shadow: 0 10px 22px rgba(11, 99, 206, 0.2);
}
.sign-out-btn:hover {
  background: var(--blue-800);
  transform: translateY(-1px);
}
.back-to-login-btn {
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 900;
  background: linear-gradient(180deg, var(--blue-700), var(--blue-800));
  color: #fff;
  border: 1px solid var(--blue-700);
  box-shadow: 0 10px 22px rgba(11, 99, 206, 0.2);
}
.back-to-login-btn:hover {
  background: var(--blue-800);
  transform: translateY(-1px);
}
[data-section="export"] .primary,
[data-section="export"] .primary:focus {
  border-color: var(--accent-export);
  background: linear-gradient(180deg, var(--accent-export), #4338ca);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.2);
}

.plan-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: #cbd9ea;
  background: linear-gradient(180deg, #ffffff, #f5faff);
  color: var(--blue-800);
}

.plan-action span:last-child {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-weight: 1000;
}

.plan-action:hover {
  border-color: var(--blue-700);
  background: linear-gradient(180deg, #ffffff, #edf6ff);
}

.fine-print {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.onboarding-details {
  margin-top: 16px;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62)),
    radial-gradient(circle at 12% 12%, rgba(57, 181, 49, 0.1), transparent 30%),
    radial-gradient(circle at 90% 4%, rgba(11, 99, 206, 0.12), transparent 28%),
    repeating-linear-gradient(135deg, rgba(8, 43, 111, 0.035) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #ffffff, #f5faff);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(8, 43, 111, 0.08);
}

.onboarding-details summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  color: var(--blue-900);
  font-weight: 900;
  cursor: pointer;
}

.onboarding-details summary::marker {
  content: "";
}

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

.onboarding-details summary strong {
  display: block;
  font-size: 0.98rem;
}

.onboarding-details summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.summary-cue {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-800);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.onboarding-details[open] .summary-cue {
  transform: rotate(180deg);
}

.onboarding-details[open] summary {
  border-bottom: 1px solid #cbd9ea;
  background:
    linear-gradient(90deg, rgba(245, 250, 255, 0.96), rgba(239, 249, 242, 0.9)),
    repeating-linear-gradient(135deg, rgba(8, 43, 111, 0.04) 0 1px, transparent 1px 10px);
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 6% 100%, rgba(57, 181, 49, 0.12), transparent 28%);
}

.onboarding-grid label {
  border: 1px solid rgba(195, 216, 239, 0.7);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
  box-shadow: 0 8px 18px rgba(8, 43, 111, 0.05);
}

.policy-checks {
  display: grid;
  gap: 8px;
  border-top: 1px solid #dbe6f2;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(246, 251, 255, 0.76)),
    repeating-linear-gradient(135deg, rgba(8, 43, 111, 0.035) 0 1px, transparent 1px 11px);
  padding: 12px 14px 14px;
}

.policy-checks label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid rgba(195, 216, 239, 0.78);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 800;
}

.policy-checks input {
  width: 18px;
  min-height: 18px;
}

.turnstile-check {
  display: grid;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(195, 216, 239, 0.78);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
}

.turnstile-check[hidden] {
  display: none;
}

.turnstile-check p,
.turnstile-check [data-turnstile-status],
.turnstile-check [data-signin-turnstile-status],
.turnstile-check [data-recovery-turnstile-status] {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.turnstile-check [data-turnstile-status][data-status="success"] {
  color: var(--green-700);
}

.turnstile-check [data-turnstile-status][data-status="error"] {
  color: #a23232;
}

.auth-turnstile-check {
  margin-top: 14px;
}

.recovery-turnstile-check {
  grid-column: 1 / -1;
}

.turnstile-check [data-signin-turnstile-status][data-status="success"],
.turnstile-check [data-recovery-turnstile-status][data-status="success"] {
  color: var(--green-700);
}

.turnstile-check [data-signin-turnstile-status][data-status="error"],
.turnstile-check [data-recovery-turnstile-status][data-status="error"] {
  color: #a23232;
}

.auth-readiness {
  border: 1px solid rgba(195, 216, 239, 0.84);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 255, 0.92)),
    repeating-linear-gradient(135deg, rgba(40, 174, 38, 0.045) 0 1px, transparent 1px 12px);
  padding: 12px;
}

.auth-readiness strong {
  color: var(--blue-900);
}

.auth-readiness p {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.auth-readiness ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-readiness li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(195, 216, 239, 0.72);
  padding-top: 7px;
  color: #4c5d73;
  font-size: 0.82rem;
}

.auth-readiness li strong {
  text-align: right;
}

.help-label {
  position: relative;
}

.inline-help {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-800);
  font-size: 0.78rem;
  font-weight: 1000;
  cursor: help;
}

.field-popover {
  position: absolute;
  z-index: 35;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  width: min(360px, calc(100vw - 64px));
  border: 1px solid #c3d8ef;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(8, 43, 111, 0.18);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.42;
}

.help-label:hover .field-popover,
.help-label:focus-within .field-popover {
  display: block;
}

.create-account-button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  box-shadow: 0 12px 22px rgba(35, 150, 36, 0.18);
}

.create-account-button:disabled {
  border-color: #cdd8e5;
  background: linear-gradient(180deg, #eef3f8, #dfe8f1);
  box-shadow: none;
  color: #7a8aa0;
  cursor: not-allowed;
}

.verification-notice {
  display: grid;
  gap: 4px;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f5faff);
  padding: 12px 14px;
}

.verification-notice[hidden] {
  display: none;
}

.verification-notice strong {
  color: var(--blue-900);
}

.verification-notice span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.38;
}

.verification-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid rgba(195, 216, 239, 0.86);
  border-left: 4px solid var(--green-600);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 252, 248, 0.94)),
    repeating-linear-gradient(135deg, rgba(57, 181, 49, 0.045) 0 1px, transparent 1px 12px);
  padding: 14px;
}

.verification-panel[hidden] {
  display: none;
}

.verification-panel strong {
  color: var(--blue-900);
  font-size: 1rem;
}

.verification-panel p,
.verification-panel small {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.42;
}

.verification-panel span {
  color: var(--blue-800);
  font-weight: 1000;
}

.verification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.policy-popover {
  position: absolute;
  z-index: 30;
  left: 28px;
  bottom: calc(100% + 8px);
  display: none;
  width: min(360px, calc(100vw - 64px));
  border: 1px solid #c3d8ef;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(8, 43, 111, 0.18);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.42;
}

.policy-popover::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 100%;
  border: 8px solid transparent;
  border-top-color: #ffffff;
}

.policy-item:hover .policy-popover,
.policy-item:focus-within .policy-popover,
.policy-item:focus .policy-popover {
  display: block;
}

.policy-update-gate {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  border: 1px solid #b9d6f4;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 248, 255, 0.94)),
    radial-gradient(circle at 100% 0%, rgba(74, 163, 255, 0.16), transparent 34%);
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 4vw, 28px);
}

.policy-update-gate[hidden] {
  display: none;
}

.policy-update-gate h2 {
  margin: 0;
  color: var(--blue-900);
}

.policy-update-gate p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.policy-version-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.policy-version-list div {
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
}

.policy-version-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.policy-version-list dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.trust-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-800);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.starter-plan-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.starter-plan-row article {
  border: 1px solid #d3deeb;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(23, 48, 80, 0.05);
}

.starter-plan-row strong,
.starter-plan-row span,
.starter-plan-row small {
  display: block;
}

.starter-plan-row strong {
  color: var(--blue-900);
  font-size: 1rem;
}

.starter-plan-row span {
  margin-top: 4px;
  color: var(--blue-800);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.3;
}

.starter-plan-row small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.included-card {
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f6fbff);
  margin-top: 12px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.included-card strong {
  display: block;
  color: var(--blue-900);
  margin-bottom: 8px;
}

.included-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.included-card li::marker {
  color: var(--green-700);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 22px;
  border: 1px solid #d3deeb;
  border-left: 5px solid var(--blue-700);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

#receipts .section-head,
#vehicles .section-head,
#earnings .section-head,
#account .section-head,
#plans .section-head,
#hub .section-head {
  position: relative;
  overflow: hidden;
}

#receipts .section-head::after,
#vehicles .section-head::after,
#earnings .section-head::after,
#account .section-head::after,
#plans .section-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.62;
}

#hub .section-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.62;
}

#receipts .section-head {
  border-left-color: var(--accent-receipts);
  background:
    linear-gradient(180deg, #ffffff, var(--accent-receipts-bg));
}

#receipts .section-head::after {
  background:
    radial-gradient(circle at 92% 18%, rgba(57, 181, 49, 0.11), transparent 24%),
    repeating-linear-gradient(135deg, rgba(57, 181, 49, 0.04) 0 1px, transparent 1px 12px);
}

#vehicles .section-head {
  border-left-color: var(--accent-vehicles);
  background:
    linear-gradient(180deg, #ffffff, var(--accent-vehicles-bg));
}

#vehicles .section-head::after {
  background:
    radial-gradient(circle at 92% 18%, rgba(8, 120, 109, 0.13), transparent 25%),
    linear-gradient(135deg, transparent 0 58%, rgba(11, 124, 199, 0.06) 58% 62%, transparent 62%);
}

#earnings .section-head {
  border-left-color: var(--accent-earnings);
  background:
    linear-gradient(180deg, #ffffff, var(--accent-earnings-bg));
}

#earnings .section-head::after {
  background:
    radial-gradient(circle at 90% 16%, rgba(201, 148, 17, 0.14), transparent 25%),
    repeating-linear-gradient(135deg, rgba(201, 148, 17, 0.04) 0 1px, transparent 1px 12px);
}

#account .section-head {
  border-left-color: var(--accent-account);
  background:
    linear-gradient(180deg, #ffffff, var(--accent-account-bg));
}

#account .section-head::after {
  background:
    radial-gradient(circle at 90% 16%, rgba(71, 85, 105, 0.11), transparent 24%),
    repeating-linear-gradient(135deg, rgba(71, 85, 105, 0.035) 0 1px, transparent 1px 12px);
}

#plans .section-head {
  border-left-color: var(--accent-plans);
  background:
    linear-gradient(180deg, #ffffff, var(--accent-plans-bg));
}

#plans .section-head::after {
  background:
    radial-gradient(circle at 90% 16%, rgba(124, 58, 237, 0.12), transparent 24%),
    radial-gradient(circle at 76% 70%, rgba(124, 58, 237, 0.08), transparent 22%);
}

#hub .section-head {
  border-left-color: var(--accent-dashboard);
  background:
    linear-gradient(180deg, #ffffff, var(--accent-dashboard-bg));
}

#hub .section-head::after {
  background:
    radial-gradient(circle at 92% 18%, var(--accent-dashboard), transparent 24%),
    repeating-linear-gradient(135deg, rgba(11, 99, 206, 0.04) 0 1px, transparent 1px 12px);
}

.section-head p {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.5;
}

.section-head > * {
  position: relative;
  z-index: 1;
}

.module-visual {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 96px;
  height: 72px;
  border: 1px solid #d3deeb;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 48, 80, 0.08);
}

.module-visual span {
  position: relative;
  display: block;
}

.receipt-visual {
  background:
    linear-gradient(180deg, #ffffff, #f3fff2);
}

.receipt-visual span {
  width: 44px;
  height: 54px;
  border: 2px solid var(--blue-700);
  border-radius: 5px;
  background:
    linear-gradient(var(--green-600), var(--green-600)) 10px 36px / 24px 4px no-repeat,
    linear-gradient(var(--blue-700), var(--blue-700)) 10px 14px / 24px 4px no-repeat,
    linear-gradient(var(--blue-700), var(--blue-700)) 10px 24px / 18px 4px no-repeat,
    #ffffff;
}

.receipt-visual span::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 6px;
  width: 22px;
  height: 10px;
  border-left: 4px solid var(--green-600);
  border-bottom: 4px solid var(--green-600);
  transform: rotate(-45deg);
}

.vehicle-visual {
  background:
    linear-gradient(180deg, #ffffff, #effaf8);
}

.vehicle-visual span {
  width: 58px;
  height: 24px;
  border-radius: 8px 14px 7px 7px;
  background: linear-gradient(180deg, #0b7cc7, var(--blue-800));
}

.vehicle-visual span::before,
.vehicle-visual span::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border: 4px solid var(--blue-900);
  border-radius: 999px;
  background: #ffffff;
}

.vehicle-visual span::before {
  left: 7px;
}

.vehicle-visual span::after {
  right: 7px;
}

.earnings-visual {
  background:
    linear-gradient(180deg, #ffffff, #fff8e7);
}

.earnings-visual span {
  width: 48px;
  height: 48px;
  border: 3px solid #c99411;
  border-radius: 999px;
  background: #fffdf8;
}

.earnings-visual span::after {
  content: "$";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue-900);
  font-size: 1.5rem;
  font-weight: 1000;
}

.account-visual {
  background:
    linear-gradient(180deg, #ffffff, #f3f6ff);
}

.account-visual span {
  width: 46px;
  height: 38px;
  border: 3px solid var(--blue-800);
  border-radius: 7px;
  background:
    linear-gradient(var(--green-600), var(--green-600)) center / 18px 4px no-repeat,
    #ffffff;
}

.account-visual span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -20px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--blue-800);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.plans-visual {
  background:
    linear-gradient(180deg, #ffffff, #f5fff4);
}

.plans-visual span {
  width: 58px;
  height: 42px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, var(--blue-700), var(--blue-800));
}

.plans-visual span::before,
.plans-visual span::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 10px;
  border-radius: 999px 999px 0 0;
  background: var(--green-600);
}

.plans-visual span::before {
  left: 14px;
  height: 18px;
}

.plans-visual span::after {
  right: 14px;
  height: 28px;
}

.plan-pill {
  flex: 0 0 auto;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-800);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(23, 48, 80, 0.07);
}

.usage-card {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(57, 181, 49, 0.09), transparent 26%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.usage-card .label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.usage-card strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 1.35rem;
}

.usage-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.status-grid article {
  border: 1px solid #d3deeb;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 14px;
  box-shadow: 0 8px 20px rgba(23, 48, 80, 0.05);
}

.status-grid span,
.status-grid strong {
  display: block;
}

.status-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.status-grid strong {
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 1.08rem;
}

.meter {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.meter.large {
  height: 16px;
  margin: 6px 0 16px;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-600), var(--blue-700));
}

.hub-grid,
.plan-grid,
.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hub-card {
  min-height: 172px;
  border: 1px solid #d3deeb;
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.hub-card:hover {
  border-color: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(23, 48, 80, 0.12);
}

.hub-card strong,
.hub-card small {
  display: block;
}

.hub-card strong {
  margin-top: 14px;
  color: var(--blue-900);
  font-size: 1.08rem;
}

.hub-card small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 1.2rem;
  font-weight: 900;
}

.hub-card:nth-child(1) .card-icon {
  background: var(--green-100);
  color: var(--green-700);
}

.hub-card:nth-child(2) .card-icon {
  background: var(--teal-100);
  color: #08786d;
}

.hub-card:nth-child(3) .card-icon {
  background: var(--gold-100);
  color: #9a6412;
}

.hub-card:nth-child(5) .card-icon {
  background: var(--rose-100);
  color: #9a3535;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.7fr) minmax(180px, 0.7fr);
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid #d3deeb;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#vehicles .two-columns {
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
}

#vehicles .mileage-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
}

.form-panel {
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, #ffffff, #f9fcff);
}

.province-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0% 0%, rgba(57, 181, 49, 0.09), transparent 28%),
    linear-gradient(180deg, #ffffff, #f6fbff);
  padding: 12px 14px;
}

.province-confirm strong,
.province-confirm span {
  display: block;
}

.province-confirm strong {
  color: var(--blue-900);
  font-size: 0.92rem;
}

.province-confirm span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.38;
}

.tax-mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 0;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(11, 99, 206, 0.08), transparent 26%),
    linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 12px 14px;
}

.tax-mode-card strong,
.tax-mode-card span {
  display: block;
}

.tax-mode-card strong {
  color: var(--blue-900);
  font-size: 0.94rem;
}

.tax-mode-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.38;
}

.line-items {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.line-items[hidden] {
  display: none;
}

.line-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.line-item-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.match-badge {
  border-radius: 999px;
  background: var(--green-100);
  color: #126d18;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.match-badge.is-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.line-item-card {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid #d3deeb;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f9fcff);
  padding: 14px;
  box-shadow: 0 8px 20px rgba(23, 48, 80, 0.05);
}

.line-item-main,
.line-tax-detail {
  display: grid;
  gap: 10px;
}

.line-item-main {
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) 130px 110px;
}

.line-tax-detail {
  grid-template-columns: minmax(150px, 0.75fr) minmax(130px, 0.65fr) minmax(130px, 0.65fr) minmax(180px, 1fr);
  align-items: end;
  border-top: 1px solid #e0e8f2;
  padding-top: 12px;
}

.line-tax-detail[hidden] {
  display: none;
}

.line-tax-detail small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  padding-bottom: 7px;
}

.add-line-button {
  width: 100%;
}

.tax-summary-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, #ffffff, #f7fff6);
  padding: 12px 14px;
}

.tax-summary-box strong {
  color: var(--blue-900);
}

.tax-summary-box span {
  color: var(--muted);
  font-weight: 800;
}

.tax-summary-box b {
  color: var(--blue-900);
}

.upload-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border: 1px dashed #91abc9;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(8, 43, 111, 0.035) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 16px;
}

.upload-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.attachment-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.attachment-flow span {
  min-height: 38px;
  border: 1px solid #cfdbea;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6px;
}

.attachment-flow span.is-active {
  border-color: rgba(35, 150, 36, 0.36);
  background: linear-gradient(135deg, #f2fff0, #eef7ff);
  color: var(--blue-900);
}

.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-button {
  min-height: 42px;
  border: 1px solid #ccd9e8;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--blue-800);
  font-weight: 900;
  padding: 0 14px;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.danger-ghost {
  border-color: #efc7c7;
  color: #9b2323;
}

.danger-ghost:not(:disabled):hover {
  background: #fff5f5;
}

.attachment-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #cfdeee;
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.attachment-preview img {
  width: 96px;
  height: 118px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #d7e2ef;
}

.attachment-placeholder {
  display: grid;
  place-items: center;
  width: 96px;
  min-height: 118px;
  border: 1px dashed #aac0d8;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, #f7fbff, #ffffff);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
  padding: 8px;
}

.attachment-preview strong,
.attachment-preview span {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-open-preview {
  margin-top: 10px;
}

.crop-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(4, 20, 45, 0.3);
  padding: 22px;
}

.crop-dialog::backdrop {
  background: rgba(4, 20, 45, 0.72);
}

.crop-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.crop-dialog h2 {
  margin: 0;
}

.crop-dialog canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 52vh;
  margin: 16px auto;
  border-radius: var(--radius-sm);
  background: #e7eef7;
}

.crop-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.crop-controls label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.crop-controls input {
  width: 100%;
}

@media (max-width: 620px) {
  .crop-controls {
    grid-template-columns: 1fr;
  }
}

.attachment-preview strong {
  color: var(--blue-900);
  margin-bottom: 4px;
}

.attachment-preview span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.readability-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
}

.readability-check input {
  margin-top: 3px;
}

.help-panel,
.policy-panel {
  display: grid;
  gap: 10px;
}

.help-panel details,
.policy-panel details {
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
}

.help-panel summary,
.policy-panel summary {
  cursor: pointer;
  color: var(--blue-900);
  font-weight: 900;
}

.help-panel p,
.policy-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.compact-policy-stats div {
  min-height: 74px;
}

.retention-panel {
  display: grid;
  gap: 12px;
}

.retention-table {
  overflow: hidden;
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background: #fff;
}

.retention-row {
  display: grid;
  grid-template-columns: 0.7fr 0.9fr 1fr 1.25fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #e4edf7;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.retention-row:first-child {
  border-top: 0;
}

.retention-head {
  background: linear-gradient(135deg, #f5faff, #ffffff);
  color: var(--blue-900);
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.retention-status {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 0.76rem;
  font-weight: 900;
}

.retention-status.is-active {
  background: #e8f8ed;
  color: #12612a;
}

.retention-status.is-warning {
  background: #fff4d6;
  color: #7a4d00;
}

.entitlement-panel {
  display: grid;
  gap: 12px;
}

.entitlement-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.entitlement-list {
  display: grid;
  gap: 10px;
}

.entitlement-item {
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 12px;
}

.entitlement-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--blue-900);
}

.entitlement-heading span {
  border-radius: 999px;
  background: #e8f8ed;
  color: #12612a;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 900;
}

.entitlement-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.entitlement-meta dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.entitlement-meta dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.access-panel {
  display: grid;
  gap: 12px;
}

.access-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.access-summary {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
}

.access-summary strong {
  color: var(--blue-900);
}

.access-summary span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.access-chip {
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.access-chip.is-allowed {
  background: #e8f8ed;
  color: #12612a;
}

.access-chip.is-blocked {
  background: #fff4d6;
  color: #7a4d00;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d3deeb;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
}

.file-preview span {
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview strong {
  flex: 0 0 auto;
  color: var(--green-700);
  font-size: 0.9rem;
}

.stats {
  display: grid;
  gap: 12px;
  margin: 0;
}

.stats div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.stats dt {
  color: var(--muted);
  font-weight: 800;
}

.stats dd {
  margin: 0;
  color: var(--blue-900);
  font-weight: 900;
  text-align: right;
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  border: 1px solid #e0e8f2;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.record-row:last-child {
  margin-bottom: 0;
}

.record-row strong,
.record-row small {
  display: block;
}

.record-row small {
  margin-top: 3px;
  color: var(--muted);
}

.record-row span {
  color: var(--blue-900);
  font-weight: 900;
}

.record-row.compact {
  min-height: 54px;
  padding: 8px 0;
}

.receipt-search-summary {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.receipt-attachment-view {
  padding: 2px 0;
  font-size: 0.82rem;
}

.receipt-attachment-delete {
  padding: 2px 0;
  color: #9b2323;
  font-size: 0.82rem;
}

.preview-saved-row {
  border-color: #b9dcca;
  background:
    linear-gradient(90deg, rgba(57, 181, 49, 0.09), rgba(11, 99, 206, 0.04));
  padding-left: 10px;
  padding-right: 10px;
}

.mini-list {
  margin-top: 18px;
}

.plain-list {
  margin-top: 0;
}

.mini-list h3 {
  margin-bottom: 6px;
}

.text-button {
  min-height: 40px;
  margin-top: 12px;
  border: 1px solid #cbd9ea;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--blue-700);
  font-weight: 900;
  padding: 0 12px;
}

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

.warning-panel {
  background: linear-gradient(180deg, #fffaf0, #ffffff);
  border-color: #f4d698;
}

.warning-panel p {
  margin: 0;
  color: var(--warning);
  line-height: 1.45;
}

.package-options {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.package-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid #e0e8f2;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 800;
}

.package-options input {
  width: 18px;
  min-height: 18px;
}

.manifest-preview {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 12px;
}

.manifest-preview strong {
  color: var(--blue-900);
}

.manifest-preview dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.manifest-preview div {
  border: 1px solid #e1eaf4;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px 10px;
}

.manifest-preview dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manifest-preview dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.package-status {
  display: block;
  margin-top: 10px;
}

.compact-form {
  margin-top: 0;
}

.full-span {
  grid-column: 1 / -1;
}

.field-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

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

.plan-card {
  padding: 20px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.plan-card.featured {
  border-color: var(--blue-700);
  box-shadow: 0 18px 48px rgba(11, 99, 206, 0.16);
}

.plan-card.selected {
  border-color: var(--green-600);
  box-shadow: 0 18px 48px rgba(34, 171, 56, 0.18);
}

.plan-card strong {
  display: block;
  color: var(--blue-900);
  font-size: 2.1rem;
  line-height: 1;
}

.plan-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.35;
}

.plan-card li::marker {
  color: var(--green-700);
}

.plan-select-button {
  width: 100%;
  margin-top: 18px;
}

.plan-preview-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  background:
    linear-gradient(135deg, #ffffff, #f3fbff),
    radial-gradient(circle at 100% 0%, rgba(34, 171, 56, 0.12), transparent 36%);
}

.plan-preview-panel h2 {
  margin: 0;
  color: var(--blue-900);
}

.plan-preview-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.plan-preview-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.promo-status {
  border: 1px solid #d8e4f0;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.promo-status.is-valid {
  border-color: #bee6c8;
  background: #effbf2;
  color: #12612a;
}

.promo-status.is-invalid {
  border-color: #f0d2a4;
  background: #fff8e9;
  color: #7a4d00;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  border-top: 1px solid #cbd9ea;
  background:
    linear-gradient(90deg, var(--green-600), var(--blue-700)) top / 100% 4px no-repeat,
    radial-gradient(circle at 12% 18%, rgba(57, 181, 49, 0.16), transparent 28%),
    radial-gradient(circle at 48% 0%, rgba(11, 99, 206, 0.13), transparent 30%),
    radial-gradient(circle at 92% 22%, rgba(57, 181, 49, 0.1), transparent 24%),
    repeating-linear-gradient(135deg, rgba(8, 43, 111, 0.055) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(231, 242, 255, 0.97));
  box-shadow: 0 -14px 32px rgba(8, 43, 111, 0.13);
  backdrop-filter: blur(12px);
  padding: 9px 10px 8px;
}

.bottom-nav button {
  min-height: 58px;
  border: 1px solid rgba(203, 217, 234, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 255, 0.84));
  color: #34465f;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.bottom-nav button:nth-child(1) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 255, 0.9));
}

.bottom-nav button:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 252, 240, 0.9));
}

.bottom-nav button:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 250, 248, 0.9));
}

.bottom-nav button:nth-child(4) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 231, 0.9));
}

.bottom-nav button:nth-child(5) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 248, 252, 0.9));
}

.bottom-nav button.active,
.bottom-nav button:hover {
  color: var(--blue-800);
  background:
    linear-gradient(180deg, #ffffff, #ecf7ff);
  transform: translateY(-2px);
}

.bottom-nav button.active {
  color: var(--blue-900);
  background:
    linear-gradient(180deg, #ffffff, #eef9f1);
  box-shadow:
    inset 0 0 0 2px rgba(35, 150, 36, 0.24),
    inset 0 -4px 0 rgba(11, 99, 206, 0.34),
    0 8px 18px rgba(8, 43, 111, 0.12);
}

@media (max-width: 940px) {
  .auth-view.active,
  .split-layout,
  .two-columns,
  .account-grid,
  .plan-grid,
  .filter-bar,
  .line-item-main,
  .line-tax-detail {
    grid-template-columns: 1fr;
  }

  .auth-art {
    display: none;
  }

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

  .status-grid,
  .starter-plan-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 64px;
    padding: 8px 12px;
  }

  .brand small,
  .year-picker span {
    display: none;
  }
  .brand-ribbon {
    display: grid;
  }

  main {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  .section-head {
    display: grid;
  }

  .module-visual {
    width: 100%;
    height: 54px;
  }

  .module-visual span {
    transform: scale(0.82);
  }

  .auth-grid,
  .form-grid,
  .onboarding-grid,
  .hub-grid,
  .status-grid,
  .starter-plan-row,
  .policy-version-list,
  .compact-policy-stats,
  .plan-preview-stats,
  .entitlement-meta,
  .access-grid,
  .manifest-preview dl {
    grid-template-columns: 1fr;
  }

  .line-item {
    grid-template-columns: 1fr;
  }

  .province-confirm {
    align-items: stretch;
    flex-direction: column;
  }

  .tax-mode-card {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-flow,
  .attachment-preview {
    grid-template-columns: 1fr;
  }

  .attachment-preview img,
  .attachment-placeholder {
    width: 100%;
    min-height: 150px;
  }

  .retention-head {
    display: none;
  }

  .retention-row {
    grid-template-columns: 1fr 1fr;
  }

  .retention-row span:nth-child(4),
  .retention-row span:nth-child(5) {
    grid-column: 1 / -1;
  }

  .hub-card {
    min-height: 136px;
  }

  .bottom-nav button {
    min-height: 54px;
    font-size: 0.8rem;
  }
  .tab-grid {

  grid-template-columns: 1fr;

  }

  .tab-card > summary {

  min-height: 120px;

  padding: 16px;

  }

}
/* === Splash screen === */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background:
    radial-gradient(circle at 50% 32%, rgba(220, 238, 255, 0.84), transparent 42%),
    linear-gradient(180deg, #ffffff, #f4f9ff);
  transition: opacity 0.45s ease-out;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: min(60vw, 280px);
  height: auto;
  animation: splashPulse 1.4s ease-in-out infinite alternate;
}

@keyframes splashPulse {
  from { transform: scale(1); opacity: 0.85; }
  to { transform: scale(1.03); opacity: 1; }
}

.splash-loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--line);
  border-top-color: var(--blue-700);
  border-radius: 50%;
  animation: splashSpin 0.8s linear infinite;
}

@keyframes splashSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-logo { animation: none; }
  .splash-loader { animation-duration: 1.6s; }
  .splash-screen.hidden { transition-duration: 0.01s; }
}

@supports (padding: env(safe-area-inset-top)) {
  .splash-screen {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}


/* === Collapsible tab cards === */
.tab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.tab-card {
  border: 1px solid #d3deeb;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.tab-card > summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  cursor: pointer;
  min-height: 160px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  list-style: none;
}

.tab-card > summary::-webkit-details-marker {
  display: none;
}

.tab-card > summary::marker {
  display: none;
  content: '';
}

.tab-card > summary::after {
  content: '\25BC';
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.tab-card > summary {
  position: relative;
}

.tab-card[open] > summary::after {
  transform: rotate(180deg);
}

.tab-card > summary:hover {
  border-color: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(23, 48, 80, 0.12);
}

.tab-card[open] {
  grid-column: 1 / -1;
}

.tab-card[open] > summary {
  min-height: auto;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.tab-card-content {
  padding: 20px;
  animation: fadeSlide 180ms ease-out;
}

.tab-card .card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 900;
  flex-shrink: 0;
}

.tab-card .card-icon.green { background: var(--green-100); color: var(--green-700); }
.tab-card .card-icon.teal { background: var(--teal-100); color: #08786d; }
.tab-card .card-icon.gold { background: var(--gold-100); color: #9a6412; }
.tab-card .card-icon.rose { background: var(--rose-100); color: #9a3535; }
.tab-card .card-icon.blue { background: var(--blue-100); color: var(--blue-800); }

.tab-card > summary strong {
  color: var(--blue-900);
  font-size: 1.08rem;
}

.tab-card > summary small {
  color: var(--muted);
  line-height: 1.35;
}

.vehicle-record-button {
  width: 100%;
  border: 1px solid transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.vehicle-record-button:hover,
.vehicle-record-button:focus-visible {
  background: var(--blue-100);
  border-color: var(--blue-700);
  outline: none;
}
