/* SPM GoEV - Mitra App Design System
   Palet diambil langsung dari berkas logo di files/images/logo/:
     merah   #B5262C (light lockup) / #CB2235 (dark lockup)
     hijau   #2E9E4B (light lockup) / #2C8738 (dark lockup)
     grafit  #1D2025 (latar lockup dark)
   --brand-* adalah warna logo apa adanya dan TIDAK berubah antar tema.
   --primary / --primary-red adalah turunannya yang dipakai UI, dan memang
   bergeser terang/gelap supaya kontras teks tetap terbaca di dua tema. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Warna logo — konstan di semua tema */
  --brand-red: #C2222B;
  --brand-red-deep: #8A171D;
  --brand-green: #2E9E4B;
  --brand-green-deep: #1E7A3A;
  --brand-graphite: #1D2025;

  --bg-dark: #13161A;
  --bg-card: rgba(29, 32, 37, 0.88);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --bg-card-hover: rgba(40, 44, 50, 0.9);

  --primary: #35B55A; /* hijau logo, dinaikkan luminansinya untuk latar gelap */
  --primary-glow: rgba(53, 181, 90, 0.3);

  /* Merah logo; versi terang dipakai untuk teks di atas latar gelap */
  --primary-red: #C2222B;
  --primary-red-light: #F09A9F;
  --primary-red-glow: rgba(194, 34, 43, 0.4);

  --primary-gradient: linear-gradient(135deg, #35B55A 0%, #8A171D 100%);
  --green-gradient: linear-gradient(135deg, #35B55A 0%, #1E7A3A 100%);
  --red-gradient: linear-gradient(135deg, #C2222B 0%, #7A1219 100%);
  
  --secondary: #C2222B;
  
  --accent-amber: #F59E0B;
  --accent-amber-glow: rgba(245, 158, 11, 0.2);
  --accent-red: #C2222B;
  --accent-red-glow: rgba(194, 34, 43, 0.35);
  --accent-green: #35B55A;
  --accent-green-glow: rgba(53, 181, 90, 0.25);
  
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-subdued: #6B7280;
  
  --nav-height: 68px;
  --header-height: 64px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 22px rgba(53, 181, 90, 0.35);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-dark: #F4F6F4;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-border: rgba(0, 0, 0, 0.08);
  --bg-card-hover: rgba(243, 244, 246, 1);

  /* Hijau #35B55A hanya ~2.2:1 di atas putih — tidak terbaca sebagai teks.
     Light mode memakai hijau tua logo, merahnya sedikit digelapkan. */
  --primary: #1E7A3A;
  --primary-glow: rgba(30, 122, 58, 0.25);
  --primary-red: #A81F26;
  --primary-red-light: #A81F26;
  --accent-green: #1E7A3A;
  --accent-red: #A81F26;
  --secondary: #A81F26;
  --green-gradient: linear-gradient(135deg, #2E9E4B 0%, #1B6B33 100%);
  --red-gradient: linear-gradient(135deg, #B5262C 0%, #7A1219 100%);

  --text-main: #111827;
  --text-muted: #4B5563;
  --text-subdued: #6B7280;
  
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] body {
  background-color: #E7EAE7;
}

[data-theme="light"] .device-container {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 0 12px #D1D5DB;
}

[data-theme="light"] .app-header {
  background: linear-gradient(90deg, rgba(194, 34, 43, 0.08) 0%, rgba(255, 255, 255, 0.96) 50%, rgba(53, 181, 90, 0.08) 100%);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #C2222B, #35B55A) 1;
}

[data-theme="light"] .app-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hero-shift-card {
  background: linear-gradient(145deg, #FDF1F1, #EDF9EF);
  border: 1px solid rgba(168, 30, 38, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero-shift-card .car-info h2,
[data-theme="light"] .card-title,
[data-theme="light"] .sub-balance-val,
[data-theme="light"] .balance-amount,
[data-theme="light"] .banner-content h4,
[data-theme="light"] .ledger-title,
[data-theme="light"] .modal-title,
[data-theme="light"] .check-label,
[data-theme="light"] .driver-name {
  color: #111827 !important;
}

[data-theme="light"] .wallet-card {
  background: linear-gradient(135deg, #FDF2F2, #EFFAF1);
  border: 1px solid rgba(53, 181, 90, 0.25);
}

[data-theme="light"] .sub-balances,
[data-theme="light"] .shift-timer-box,
[data-theme="light"] .ledger-item {
  background: rgba(243, 244, 246, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .modal-sheet {
  background: #FFFFFF;
  border-top: 1px solid rgba(0,0,0,0.1);
  color: #111827;
}

[data-theme="light"] .form-input {
  background: #F9FAFB;
  border: 1px solid #D1D5DB;
  color: #111827;
}

[data-theme="light"] .icon-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: #111827;
}

[data-theme="light"] .quick-item {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: #0B0D10;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Device Wrapper for Desktop Testing */
.device-container {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  max-height: 920px;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 12px #2A2E35;
  border-radius: 36px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .device-container {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Screen Mode Toggle Bar for Desktop */
.device-container.full-screen {
  max-width: 100% !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Header Bar - Dual Maroon Red & Emerald Green Glow */
.app-header {
  height: var(--header-height);
  background: linear-gradient(90deg, rgba(194, 34, 43, 0.25) 0%, rgba(19, 22, 26, 0.96) 50%, rgba(53, 181, 90, 0.18) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #C2222B, #35B55A) 1;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8A171D 0%, #35B55A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 14px rgba(168, 30, 38, 0.5), 0 0 14px rgba(53, 181, 90, 0.4);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.driver-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.driver-badge {
  background: rgba(76, 199, 99, 0.15);
  color: var(--primary);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.garage-name {
  font-size: 11px;
  color: var(--text-muted);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: var(--accent-red-glow);
}

/* App Main Viewport */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + 24px);
  scroll-behavior: smooth;
}

/* Navigation Bar */
.app-nav {
  height: var(--nav-height);
  background: rgba(24, 27, 32, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--bg-card-border);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-subdued);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  width: 20%;
  height: 100%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-subdued);
  transition: all 0.2s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active svg {
  stroke: var(--primary);
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(53, 181, 90, 0.5));
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, #C2222B 0%, #35B55A 100%);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 8px rgba(194, 34, 43, 0.5);
}

/* Cards & Components */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}



/* Active Shift Hero Card - Maroon & Green Dual Tone */
.hero-shift-card {
  background: linear-gradient(145deg, rgba(48, 15, 18, 0.95), rgba(13, 31, 20, 0.95));
  border: 1px solid rgba(168, 30, 38, 0.4);
  box-shadow: 0 8px 26px rgba(194, 34, 43, 0.25), 0 0 18px rgba(53, 181, 90, 0.15);
}

.hero-shift-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(194, 34, 43, 0.25) 0%, rgba(53, 181, 90, 0.1) 50%, transparent 70%);
  pointer-events: none;
}

.shift-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(53, 181, 90, 0.15);
  color: var(--primary);
  border: 1px solid rgba(53, 181, 90, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(53, 181, 90, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(53, 181, 90, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(53, 181, 90, 0); }
}

.car-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.car-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.car-nopol {
  display: inline-block;
  background: rgba(194, 34, 43, 0.25);
  border: 1px solid rgba(168, 30, 38, 0.5);
  color: #F09A9F;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
  letter-spacing: 1px;
}

.car-battery-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.battery-percent {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.battery-label {
  font-size: 10px;
  color: var(--text-muted);
}

.shift-timer-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-label {
  font-size: 12px;
  color: var(--text-muted);
}

.timer-countdown {
  font-size: 18px;
  font-weight: 800;
  font-family: monospace;
  color: var(--accent-amber);
  letter-spacing: 1px;
}

.shift-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--green-gradient);
  color: #08210F;
  box-shadow: 0 4px 16px rgba(53, 181, 90, 0.35);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(53, 181, 90, 0.25);
}

.btn-red, .btn-secondary {
  background: rgba(194, 34, 43, 0.22);
  color: #F4A7AB;
  border: 1px solid rgba(168, 30, 38, 0.45);
}

.btn-secondary:active, .btn-red:active {
  background: rgba(194, 34, 43, 0.35);
  transform: scale(0.97);
}

.btn-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: var(--red-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(194, 34, 43, 0.45);
}

.btn-full {
  width: 100%;
}

/* Deposit & Wallet Card - Dual Tone */
.wallet-card {
  background: linear-gradient(135deg, rgba(40, 17, 20, 0.92), rgba(21, 29, 25, 0.92));
  border: 1px solid rgba(168, 30, 38, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.wallet-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.balance-amount {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.balance-shifts {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(53, 181, 90, 0.15);
  padding: 4px 10px;
  border-radius: 12px;
}

.sub-balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-balance-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-balance-label {
  font-size: 11px;
  color: var(--text-muted);
}

.sub-balance-val {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Banner Alert - Maroon & Green Glow */
.banner-alert {
  background: linear-gradient(135deg, rgba(194, 34, 43, 0.2), rgba(53, 181, 90, 0.15));
  border: 1px solid rgba(168, 30, 38, 0.4);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.banner-alert:active {
  transform: scale(0.98);
}

.banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(53, 181, 90, 0.2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-content h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.banner-content p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Quick Menu Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.quick-item {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-item:active {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.quick-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* Ledger List */
.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ledger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ledger-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ledger-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.ledger-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.ledger-date {
  font-size: 10px;
  color: var(--text-muted);
}

.ledger-amount {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.ledger-amount.plus {
  color: var(--primary);
}

.ledger-amount.minus {
  color: var(--text-main);
}

/* Modals */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-height: 85%;
  background: #1A1D22;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 20px 30px 20px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 16px auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* Photo Handover Grid */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.photo-slot {
  aspect-ratio: 4/3;
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.photo-slot.filled {
  border-style: solid;
  border-color: var(--primary);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.photo-stamp {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #4CC763;
  font-family: monospace;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1.2;
}

/* Camera Viewport Modal */
.camera-container {
  width: 100%;
  height: 280px;
  background: #000;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid var(--bg-card-border);
}

.camera-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay-frame {
  position: absolute;
  inset: 20px;
  border: 2px dashed rgba(76, 199, 99, 0.6);
  border-radius: 16px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  text-align: center;
}

.camera-gps-live {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.75);
  color: #4CC763;
  font-family: monospace;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(76, 199, 99, 0.4);
}

/* Tabs View Container */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

/* Toast Notifications */
.toast-container {
  position: absolute;
  top: 70px;
  left: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(24, 27, 32, 0.95);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Progress Step Wizard */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2A2E35;
  border: 2px solid rgba(255,255,255,0.2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.step-item.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  box-shadow: var(--primary-glow);
}

.step-item.completed .step-num {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #000;
}

.step-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Custom Checkbox Toggle */
.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.check-label {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #3A3F47;
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Inputs & Form Groups */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.radio-card {
  border: 1px solid var(--bg-card-border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-card.active {
  border-color: var(--primary);
  background: rgba(76, 199, 99, 0.1);
  color: var(--primary);
  font-weight: 700;
}

/* ---------------------------------------------------------------
   Avatar menu — prototype view controls
   Replaces the old .desktop-bar, which was position:fixed at
   z-index 9999 and therefore painted over the app header.
   --------------------------------------------------------------- */
.header-profile {
  position: relative;
}

button.avatar-box {
  position: relative;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: transform 0.15s ease;
}
button.avatar-box:hover {
  transform: scale(1.06);
}
button.avatar-box[aria-expanded="true"] {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.avatar-caret {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  font-size: 9px;
  line-height: 15px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(19, 22, 26, 0.9);
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  background: rgba(24, 27, 32, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px;
  z-index: 300; /* above header content, below modals */
  display: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.avatar-menu.open {
  display: block;
}

.avatar-menu-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 8px 6px;
}

.avatar-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background 0.15s;
}
.avatar-menu-item:hover {
  background: rgba(255, 255, 255, 0.09);
}
.avatar-menu-item.active {
  background: var(--primary);
  color: #000;
  font-weight: 700;
}

.avatar-menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .avatar-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .avatar-menu-item {
  color: #1A1D22;
}
[data-theme="light"] .avatar-menu-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ---------------------------------------------------------------
   Perbaikan kontras light mode untuk komponen bermerek
   Nilai merah/hijau versi gelap tidak terbaca di atas latar terang,
   jadi komponen yang meng-hardcode warna teks diberi pasangan terang.
   --------------------------------------------------------------- */
[data-theme="light"] .btn-red,
[data-theme="light"] .btn-secondary {
  background: rgba(181, 38, 44, 0.10);
  color: #A81F26;
  border: 1px solid rgba(181, 38, 44, 0.30);
}
[data-theme="light"] .btn-secondary:active,
[data-theme="light"] .btn-red:active {
  background: rgba(181, 38, 44, 0.18);
}
[data-theme="light"] .car-nopol {
  background: rgba(181, 38, 44, 0.10);
  border-color: rgba(181, 38, 44, 0.35);
  color: #A81F26;
}
[data-theme="light"] .car-info h2,
[data-theme="light"] .ledger-title,
[data-theme="light"] .check-label,
[data-theme="light"] .balance-amount,
[data-theme="light"] .sub-balance-val,
[data-theme="light"] .modal-title {
  color: #111827;
}
[data-theme="light"] .status-tag {
  background: rgba(30, 122, 58, 0.12);
  border-color: rgba(30, 122, 58, 0.35);
}
[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
}
[data-theme="light"] .step-item.active .step-num,
[data-theme="light"] .step-item.completed .step-num {
  color: #fff;
}
[data-theme="light"] .avatar-caret {
  box-shadow: 0 0 0 2px #fff;
}

/* ---------------------------------------------------------------
   Splash screen
   Berada di dalam .device-container supaya di desktop tetap terasa
   seperti aplikasi, bukan halaman web yang menutupi seluruh layar.
   --------------------------------------------------------------- */
.splash-screen {
  position: absolute;
  inset: 0;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(194, 34, 43, 0.28) 0%, transparent 55%),
    radial-gradient(120% 80% at 85% 100%, rgba(46, 158, 75, 0.26) 0%, transparent 55%),
    linear-gradient(160deg, #1D2025 0%, #13161A 55%, #0B0D10 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

[data-theme="light"] .splash-screen {
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(181, 38, 44, 0.14) 0%, transparent 55%),
    radial-gradient(120% 80% at 85% 100%, rgba(46, 158, 75, 0.16) 0%, transparent 55%),
    linear-gradient(160deg, #FFFFFF 0%, #F4F6F4 60%, #E7EAE7 100%);
}

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

.splash-logo {
  width: min(74%, 300px);
  height: auto;
  animation: splashRise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="light"] .splash-logo {
  /* Gap knockout di dalam huruf transparan; di latar terang perlu sedikit
     bayangan agar lockup tidak terlihat mengambang. */
  filter: drop-shadow(0 6px 18px rgba(17, 24, 39, 0.12));
}

@keyframes splashRise {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-tagline {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: splashRise 0.8s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.splash-progress {
  width: 140px;
  height: 4px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.splash-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-green));
  animation: splashSlide 1.15s ease-in-out infinite;
}

@keyframes splashSlide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

.splash-version {
  position: absolute;
  bottom: 26px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-subdued);
}

/* ---------------------------------------------------------------
   Halaman login (mock)
   Tidak ada autentikasi sungguhan — prototipe menerima input apa pun
   yang lolos validasi bentuk. Lihat js/app.js: submitLogin().
   --------------------------------------------------------------- */
.login-screen {
  position: absolute;
  inset: 0;
  z-index: 1500;
  overflow-y: auto;
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(110% 60% at 100% 0%, rgba(46, 158, 75, 0.16) 0%, transparent 60%),
    radial-gradient(110% 60% at 0% 0%, rgba(194, 34, 43, 0.18) 0%, transparent 60%),
    var(--bg-dark);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

[data-theme="light"] .login-screen {
  background:
    radial-gradient(110% 60% at 100% 0%, rgba(46, 158, 75, 0.12) 0%, transparent 60%),
    radial-gradient(110% 60% at 0% 0%, rgba(181, 38, 44, 0.10) 0%, transparent 60%),
    var(--bg-dark);
}

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

.login-theme-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
}

[data-theme="light"] .login-theme-btn {
  background: rgba(0, 0, 0, 0.04);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 18px 0 26px;
}

.login-logo {
  width: min(66%, 240px);
  height: auto;
}

[data-theme="light"] .login-logo {
  filter: drop-shadow(0 4px 14px rgba(17, 24, 39, 0.10));
}

.login-subtitle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.login-card > p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.login-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  transition: border-color 0.2s;
}

[data-theme="light"] .login-input-wrap {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.login-input-wrap:focus-within {
  border-color: var(--primary);
}

.login-input-wrap.invalid {
  border-color: var(--primary-red);
}

.login-input-prefix {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.login-input-wrap .form-input {
  background: transparent;
  border: none;
  padding: 12px 0;
  color: var(--text-main);
}

.login-input-wrap .form-input:focus {
  border: none;
}

.pin-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
}

.login-error {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-red-light);
  margin-top: 6px;
}

.login-error.show {
  display: block;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.login-remember input {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

.login-link {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-subdued);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bg-card-border);
}

.login-demo {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  background: rgba(46, 158, 75, 0.10);
  border: 1px dashed rgba(46, 158, 75, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.login-demo b {
  color: var(--primary);
}

.login-foot {
  margin-top: auto;
  padding-top: 22px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--text-subdued);
}
