:root {
  --primary-0: #00291b;
  --primary-10: #003d28;
  --primary-20: #006643;
  --primary-30: #008858;
  --primary-40: #00b274;
  --primary-50: #34c57e;
  --primary-60: #5ed49a;
  --primary-80: #8de3b8;
  --primary-90: #adebd2;
  --primary-95: #ebfaf4;
  --primary-99: #f6fffb;
  --secondary-20: #1f3c70;
  --secondary-30: #274b8c;
  --secondary-40: #325fb4;
  --secondary-60: #5f88d3;
  --secondary-80: #c3d2ee;
  --secondary-90: #dfe7f6;
  --secondary-95: #eff3fa;
  --neutral-10: #151618;
  --neutral-20: #25272a;
  --neutral-25: #2a2d31;
  --neutral-40: #373c41;
  --neutral-60: #62676c;
  --neutral-70: #8b9094;
  --neutral-80: #b4b8bb;
  --neutral-90: #dde0e2;
  --neutral-92: #e4e6e8;
  --neutral-94: #ebecee;
  --neutral-96: #f1f3f3;
  --neutral-98: #f8f9f9;
  --neutral-100: #ffffff;
  --danger-20: #912018;
  --danger-40: #d92d20;
  --danger-50: #f04438;
  --danger-90: #fee4e2;
  --danger-95: #fef3f2;
  --positive-20: #085d3a;
  --positive-40: #079455;
  --positive-50: #17b26a;
  --positive-90: #dcfae6;
  --positive-95: #ecfdf3;
  --warning-20: #93370d;
  --warning-40: #dc6803;
  --warning-50: #f79009;
  --warning-60: #fdb022;
  --warning-90: #fef0c7;
  --warning-95: #fffaeb;
  --info-40: #0086c9;
  --info-50: #0ba5ec;
  --info-90: #addfff;
  --info-95: #f0f9ff;
  --bg-primary-dark: var(--primary-30);
  --bg-primary-medium: var(--primary-40);
  --bg-primary-light: var(--primary-90);
  --bg-primary-lighter: var(--primary-95);
  --bg-neutral-lighter: var(--neutral-100);
  --bg-neutral-light: var(--neutral-98);
  --bg-neutral-medium: var(--neutral-96);
  --bg-neutral-dark: var(--neutral-94);
  --fg-neutral-default: var(--neutral-20);
  --fg-neutral-light: var(--neutral-40);
  --fg-neutral-lighter: var(--neutral-60);
  --fg-neutral-lightest: var(--neutral-80);
  --fg-primary-default: var(--primary-30);
  --fg-primary-dark: var(--primary-20);
  --stroke-neutral-default: var(--neutral-90);
  --stroke-neutral-lighter: var(--neutral-94);
  --stroke-primary-default: var(--primary-30);
  --btn-bg-primary: var(--primary-30);
  --btn-fg-primary: #ffffff;
  --btn-bg-secondary: var(--secondary-90);
  --btn-fg-secondary: var(--secondary-40);
  --btn-bg-disabled: var(--neutral-94);
  --btn-fg-disabled: var(--neutral-80);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 20px;
  --radius-4xl: 24px;
  --radius-full: 1000px;
  --sp-xs: 4px;
  --sp-sm: 6px;
  --sp-md: 8px;
  --sp-lg: 12px;
  --sp-xl: 16px;
  --sp-2xl: 20px;
  --sp-3xl: 24px;
  --sp-4xl: 32px;
  --sp-5xl: 40px;
  --sp-6xl: 48px;
  --sp-7xl: 64px;
  --shadow-sm: 0 4px 6px -1px rgba(62, 67, 76, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(62, 67, 76, 0.1), 0 4px 6px -2px rgba(62, 67, 76, 0.05);
}

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

html {
  font-size: 16px;
}

body {
  font-family: "Anuphan", sans-serif;
  font-weight: 400;
  background: var(--bg-neutral-light);
  color: var(--fg-neutral-default);
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-neutral-lighter);
  border-bottom: 1px solid var(--stroke-neutral-default);
  box-shadow: var(--shadow-sm);
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-3xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
}
.topnav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  text-decoration: none;
}
.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-primary-dark);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-icon svg {
  width: 22px;
  height: 22px;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-primary-default);
  letter-spacing: -0.3px;
}
.brand-sub {
  font-size: 11px;
  color: var(--fg-neutral-lighter);
  line-height: 1;
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-primary-lighter);
  border: 2px solid var(--stroke-primary-default);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-primary-dark);
  transition: opacity 0.15s;
}
.avatar-btn:hover {
  opacity: 0.8;
}

.notif-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-neutral-medium);
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.notif-btn:hover {
  background: #e4e6e8;
}

.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger-40);
  border-radius: var(--radius-full);
  border: 2px solid #ffffff;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-5xl) var(--sp-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-neutral-default);
}

.section-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-primary-default);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover {
  text-decoration: underline;
}

.welcome-banner {
  background: linear-gradient(135deg, var(--primary-10) 0%, var(--primary-20) 60%, var(--primary-30) 100%);
  border-radius: var(--radius-3xl);
  padding: var(--sp-5xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4xl);
  overflow: hidden;
  position: relative;
}
.welcome-banner::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
}
.welcome-banner::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: 120px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
}

.welcome-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  z-index: 1;
}

.welcome-greeting {
  font-size: 14px;
  color: var(--primary-60);
  font-weight: 500;
}

.welcome-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.welcome-id {
  font-size: 13px;
  color: var(--primary-80);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}
.welcome-id code {
  font-family: "Anuphan", monospace;
  letter-spacing: 1px;
}

.welcome-chips {
  display: flex;
  gap: var(--sp-md);
  margin-top: var(--sp-sm);
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 4px var(--sp-lg);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.chip-success {
  background: rgba(23, 178, 106, 0.2);
  color: #079455;
}
.chip-success .chip-dot {
  background: #17b26a;
}
.chip-warning {
  background: rgba(253, 176, 34, 0.2);
  color: var(--warning-60);
}
.chip-warning .chip-dot {
  background: #fdb022;
}
.chip-info {
  background: rgba(11, 165, 236, 0.2);
  color: #7cd4fd;
}
.chip-info .chip-dot {
  background: #0ba5ec;
}

.welcome-qr {
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
}

.qr-frame {
  background: #fff;
  padding: var(--sp-xl);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.qr-label {
  font-size: 12px;
  color: var(--primary-80);
  text-align: center;
  font-weight: 500;
}

.qr-svg {
  display: block;
  image-rendering: pixelated;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-3xl);
}

.stat-card {
  background: #ffffff;
  border: 1px solid #ebecee;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(62, 67, 76, 0.05);
  transition: box-shadow 0.2s;
}
.stat-card:hover {
  box-shadow: 0 10px 15px -3px rgba(62, 67, 76, 0.1), 0 4px 6px -2px rgba(62, 67, 76, 0.05);
}
.stat-card {
  padding: var(--sp-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon-green {
  background: var(--bg-primary-lighter);
}
.stat-icon-blue {
  background: #eff3fa;
}
.stat-icon-orange {
  background: #fffaeb;
}
.stat-icon-red {
  background: #fef3f2;
}

.stat-label {
  font-size: 13px;
  color: var(--fg-neutral-lighter);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--fg-neutral-default);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: var(--sp-xs);
}

.stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-neutral-lighter);
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: 12px;
}

.trend-up {
  color: #079455;
}

.trend-down {
  color: #d92d20;
}

.trend-flat {
  color: var(--fg-neutral-lighter);
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-3xl);
}

.quota-card {
  background: #ffffff;
  border: 1px solid #ebecee;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(62, 67, 76, 0.05);
  transition: box-shadow 0.2s;
}
.quota-card:hover {
  box-shadow: 0 10px 15px -3px rgba(62, 67, 76, 0.1), 0 4px 6px -2px rgba(62, 67, 76, 0.05);
}
.quota-card {
  padding: var(--sp-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3xl);
}
.quota-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-xl);
}

.quota-fuel-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.fuel-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 6px var(--sp-lg);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}
.fuel-badge-91 {
  background: #fffaeb;
  color: #dc6803;
  border: 1px solid #fef0c7;
}
.fuel-badge-95 {
  background: #fef3f2;
  color: #d92d20;
  border: 1px solid #fee4e2;
}
.fuel-badge-diesel {
  background: #eff3fa;
  color: #325fb4;
  border: 1px solid #dfe7f6;
}
.fuel-badge-e20 {
  background: var(--primary-95);
  color: var(--primary-20);
  border: 1px solid var(--primary-90);
}

.fuel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fuel-dot-91 {
  background: #f79009;
}
.fuel-dot-95 {
  background: #f04438;
}
.fuel-dot-diesel {
  background: #325fb4;
}
.fuel-dot-e20 {
  background: var(--primary-40);
}

.fuel-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-neutral-default);
}

.fuel-period {
  font-size: 12px;
  color: var(--fg-neutral-lighter);
}

.quota-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px var(--sp-md);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.status-active {
  background: #ecfdf3;
  color: #079455;
}

.status-warning {
  background: #fffaeb;
  color: #dc6803;
}

.status-depleted {
  background: #fef3f2;
  color: #d92d20;
}

.quota-progress {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.quota-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.quota-used {
  font-size: 28px;
  font-weight: 700;
  color: var(--fg-neutral-default);
}

.quota-total {
  font-size: 14px;
  color: var(--fg-neutral-lighter);
}

.progress-bar {
  height: 10px;
  background: var(--bg-neutral-dark);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}
.progress-fill.progress-green {
  background: linear-gradient(90deg, var(--primary-40), var(--primary-50));
}
.progress-fill.progress-orange {
  background: linear-gradient(90deg, #dc6803, #f79009);
}
.progress-fill.progress-red {
  background: linear-gradient(90deg, #d92d20, #f04438);
}
.progress-fill.progress-blue {
  background: linear-gradient(90deg, #325fb4, #5f88d3);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--fg-neutral-lightest);
}

.quota-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--stroke-neutral-lighter);
}

.quota-reset {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: 12px;
  color: var(--fg-neutral-lighter);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0 var(--sp-xl);
  min-height: 40px;
  border-radius: var(--radius-full);
  font-family: "Anuphan", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--btn-bg-primary);
  color: var(--btn-fg-primary);
}
.btn-primary:hover {
  opacity: 0.85;
}
.btn-secondary {
  background: var(--btn-bg-secondary);
  color: var(--btn-fg-secondary);
}
.btn-secondary:hover {
  background: #c3d2ee;
}
.btn-ghost {
  background: transparent;
  color: var(--fg-primary-default);
  border: 1.5px solid var(--stroke-primary-default);
}
.btn-ghost:hover {
  background: var(--bg-primary-lighter);
}
.btn-sm {
  min-height: 32px;
  font-size: 13px;
  padding: 0 var(--sp-lg);
}
.btn-disabled {
  background: var(--btn-bg-disabled) !important;
  color: var(--btn-fg-disabled) !important;
  cursor: not-allowed;
  pointer-events: none;
}

.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3xl);
}

.vehicle-card {
  background: #ffffff;
  border: 1px solid #ebecee;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(62, 67, 76, 0.05);
  transition: box-shadow 0.2s;
}
.vehicle-card:hover {
  box-shadow: 0 10px 15px -3px rgba(62, 67, 76, 0.1), 0 4px 6px -2px rgba(62, 67, 76, 0.05);
}
.vehicle-card {
  padding: var(--sp-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  cursor: default;
}
.vehicle-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}

.vehicle-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  background: var(--bg-primary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vehicle-info {
  flex: 1;
  min-width: 0;
}

.vehicle-plate {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-neutral-default);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-province {
  font-size: 12px;
  color: var(--fg-neutral-lighter);
  margin-top: 2px;
}

.vehicle-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.vehicle-meta-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: 13px;
  color: var(--fg-neutral-light);
}

.vehicle-meta-label {
  color: var(--fg-neutral-lighter);
  min-width: 80px;
}

.vehicle-fuel-types {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.vehicle-actions {
  display: flex;
  gap: var(--sp-md);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--stroke-neutral-lighter);
}

.add-vehicle-card {
  background: var(--bg-neutral-lighter);
  border: 2px dashed var(--stroke-neutral-default);
  border-radius: var(--radius-2xl);
  padding: var(--sp-5xl) var(--sp-3xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  cursor: pointer;
  min-height: 200px;
  transition: border-color 0.2s, background 0.2s;
}
.add-vehicle-card:hover {
  border-color: var(--primary-40);
  background: var(--bg-primary-lighter);
}
.add-vehicle-card:hover .add-vehicle-icon {
  background: var(--primary-90);
}
.add-vehicle-card:hover .add-vehicle-label {
  color: var(--fg-primary-default);
}

.add-vehicle-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--bg-neutral-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.add-vehicle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-neutral-light);
  text-align: center;
}

.add-vehicle-hint {
  font-size: 12px;
  color: var(--fg-neutral-lightest);
  text-align: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: #2a2d31;
}
.form-label .required {
  color: #d92d20;
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 12px var(--sp-xl);
  border: 1.5px solid var(--stroke-neutral-default);
  border-radius: var(--radius-xl);
  font-family: "Anuphan", sans-serif;
  font-size: 15px;
  color: #151618;
  background: #ffffff;
  outline: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder {
  color: #8b9094;
}
.form-input:focus {
  border-color: #008858;
  box-shadow: 0 0 0 3px rgba(0, 178, 116, 0.12);
}
.form-input.error {
  border-color: #d92d20;
}
.form-input.error:focus {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12);
}

.form-input-prefix {
  position: relative;
}
.form-input-prefix .form-input {
  padding-left: 44px;
}
.form-input-prefix-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-neutral-lighter);
  pointer-events: none;
}

.form-select {
  width: 100%;
  padding: 12px var(--sp-xl);
  padding-right: 40px;
  border: 1.5px solid var(--stroke-neutral-default);
  border-radius: var(--radius-xl);
  font-family: "Anuphan", sans-serif;
  font-size: 15px;
  color: #151618;
  outline: none;
  cursor: pointer;
  appearance: none;
  background: #ffffff 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='%2362676c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center;
  transition: border-color 0.15s;
}
.form-select:focus {
  border-color: #008858;
  box-shadow: 0 0 0 3px rgba(0, 178, 116, 0.12);
}

.form-hint {
  font-size: 12px;
  color: var(--fg-neutral-lighter);
}

.form-error {
  font-size: 12px;
  color: #d92d20;
  display: none;
}
.form-error.visible {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
}

.fuel-checkbox-item {
  display: none;
}

.fuel-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 8px var(--sp-lg);
  border: 1.5px solid var(--stroke-neutral-default);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-neutral-light);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.fuel-checkbox-label:hover {
  border-color: var(--primary-40);
  background: var(--bg-primary-lighter);
  color: var(--fg-primary-dark);
}

.fuel-checkbox-item:checked + .fuel-checkbox-label {
  border-color: #008858;
  background: var(--bg-primary-lighter);
  color: var(--fg-primary-dark);
}

.fuel-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.history-card {
  background: var(--bg-neutral-lighter);
  border: 1px solid var(--stroke-neutral-lighter);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.history-card-header {
  padding: var(--sp-3xl);
  border-bottom: 1px solid var(--stroke-neutral-lighter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-neutral-medium);
}

th {
  padding: var(--sp-lg) var(--sp-xl);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-neutral-lighter);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: var(--sp-xl);
  font-size: 14px;
  color: var(--fg-neutral-default);
  border-bottom: 1px solid var(--stroke-neutral-lighter);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.12s;
}
tbody tr:hover {
  background: var(--bg-neutral-light);
}

.tx-station {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tx-station-name {
  font-weight: 500;
  font-size: 14px;
}
.tx-station-addr {
  font-size: 12px;
  color: var(--fg-neutral-lighter);
}

.fuel-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.fuel-tag-91 {
  background: #fffaeb;
  color: #dc6803;
}
.fuel-tag-95 {
  background: #fef3f2;
  color: #d92d20;
}
.fuel-tag-diesel {
  background: #eff3fa;
  color: #325fb4;
}
.fuel-tag-e20 {
  background: var(--primary-95);
  color: var(--primary-20);
}

.amount-cell {
  font-weight: 600;
}

.amount-positive {
  color: #079455;
}

.amount-negative {
  color: var(--fg-neutral-default);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--sp-md);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}
.status-pill.pill-approved {
  background: #ecfdf3;
  color: #079455;
}
.status-pill.pill-pending {
  background: #fffaeb;
  color: #dc6803;
}
.status-pill.pill-rejected {
  background: #fef3f2;
  color: #d92d20;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-3xl);
}

.info-card {
  background: var(--bg-neutral-lighter);
  border: 1px solid var(--stroke-neutral-lighter);
  border-radius: var(--radius-2xl);
  padding: var(--sp-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  box-shadow: var(--shadow-sm);
}
.info-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-neutral-default);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.info-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-card-icon-green {
  background: var(--bg-primary-lighter);
}
.info-card-icon-blue {
  background: #eff3fa;
}
.info-card-icon-warn {
  background: #fffaeb;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  font-size: 13px;
  color: var(--fg-neutral-light);
  line-height: 1.5;
}
.info-row::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-40);
  flex-shrink: 0;
  margin-top: 5px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-lg);
  padding: var(--sp-xl) var(--sp-2xl);
  border-radius: var(--radius-xl);
  font-size: 14px;
  line-height: 1.5;
}
.alert-info {
  background: #f0f9ff;
  color: #0086c9;
  border: 1px solid #addfff;
}
.alert-warning {
  background: #fffaeb;
  color: #dc6803;
  border: 1px solid #fef0c7;
}
.alert-success {
  background: #ecfdf3;
  color: #079455;
  border: 1px solid #dcfae6;
}
.alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

footer {
  background: var(--bg-neutral-lighter);
  border-top: 1px solid var(--stroke-neutral-lighter);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-3xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
  font-size: 13px;
  color: var(--fg-neutral-lighter);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(21, 22, 24, 0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl);
}
.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg-neutral-lighter);
  border-radius: var(--radius-3xl);
  padding: var(--sp-5xl);
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3xl);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.2s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-neutral-default);
}
.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-neutral-medium);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-neutral-lighter);
  font-size: 18px;
  transition: background 0.15s;
}
.modal-close:hover {
  background: #e4e6e8;
}
.modal-qr-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3xl);
}
.modal-qr-frame {
  background: var(--bg-neutral-lighter);
  padding: var(--sp-4xl);
  border-radius: var(--radius-2xl);
  border: 2px solid var(--stroke-neutral-default);
}
.modal-qr-info {
  text-align: center;
}
.modal-qr-id {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--fg-neutral-default);
  font-family: monospace;
}
.modal-qr-hint {
  font-size: 13px;
  color: var(--fg-neutral-lighter);
  margin-top: var(--sp-xs);
}
.modal-step {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-xl);
  background: var(--bg-neutral-medium);
  border-radius: var(--radius-xl);
}
.modal-step-num {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.modal-step-label {
  font-size: 13px;
  color: var(--fg-neutral-light);
  font-weight: 500;
}
.modal-step-sep {
  flex: 1;
  height: 1px;
  background: var(--stroke-neutral-lighter);
}

.step-active {
  background: #008858;
  color: #fff;
}

.step-inactive {
  background: #dde0e2;
  color: var(--fg-neutral-lighter);
}

.step-done {
  background: #17b26a;
  color: #fff;
}

.select-car-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.select-car-item {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  padding: var(--sp-xl);
  border: 1.5px solid var(--stroke-neutral-default);
  border-radius: var(--radius-xl);
  cursor: pointer;
  background: transparent;
  width: 100%;
  font-family: "Anuphan", sans-serif;
  text-align: left;
  transition: all 0.15s;
}
.select-car-item:hover, .select-car-item.selected {
  border-color: #008858;
  background: var(--bg-primary-lighter);
}
.select-car-item:hover .select-car-thumb, .select-car-item.selected .select-car-thumb {
  background: var(--primary-90);
}
.select-car-item:hover .select-car-arrow, .select-car-item.selected .select-car-arrow {
  color: var(--fg-primary-default);
}

.select-car-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--bg-neutral-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.select-car-body {
  flex: 1;
  min-width: 0;
}

.select-car-plate {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-neutral-default);
  letter-spacing: 0.5px;
}

.select-car-sub {
  font-size: 12px;
  color: var(--fg-neutral-lighter);
  margin-top: 2px;
}

.select-car-arrow {
  color: var(--fg-neutral-lightest);
  flex-shrink: 0;
  transition: color 0.15s;
}

@media (max-width: 768px) {
  .topnav-inner {
    padding: var(--sp-xl);
  }
  .page {
    padding: var(--sp-3xl) var(--sp-xl);
    gap: var(--sp-4xl);
  }
  .welcome-banner {
    flex-direction: column;
  }
  .welcome-qr {
    width: 100%;
    align-items: flex-start;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quota-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  table {
    font-size: 13px;
  }
  th, td {
    padding: var(--sp-lg);
  }
  .tx-station-addr {
    display: none;
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .welcome-name {
    font-size: 22px;
  }
  .welcome-chips {
    gap: var(--sp-xs);
  }
}
