:root {
  --bg-color: #08090c;
  --surface-color: rgba(24, 28, 36, 0.75);
  --surface-light: rgba(35, 42, 54, 0.85);
  --primary-color: #00d2ff;
  --primary-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  --secondary-color: #3a7bd5;
  --text-primary: #ffffff;
  --text-secondary: #9ba1a6;
  --danger-color: #ff4b4b;
  --success-color: #00e676;
  --warning-color: #ffb74d;
  --glass-bg: rgba(18, 22, 28, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
  --primary-glow: 0 0 15px rgba(0, 210, 255, 0.4);
  --card-border-glow: linear-gradient(135deg, rgba(0, 210, 255, 0.25) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 0, 170, 0.1) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
}

/* App Container */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: 
    radial-gradient(circle at 80% 20%, rgba(0, 210, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255, 0, 170, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, #151b26 0%, #090b0e 100%);
  box-shadow: 0 0 40px rgba(0, 210, 255, 0.12), 0 0 80px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  z-index: 5;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

/* cyber mesh grid inside the app */
.app-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Layout */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease-in-out;
  padding-bottom: 80px;
  /* Space for bottom nav */
}

.screen-content {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.screen-content::-webkit-scrollbar {
  display: none;
}

/* Header */
.header {
  padding: 20px 24px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  border-bottom: 1px solid var(--glass-border);
}

.header h1 {
  font-size: 1.25rem;
  margin: 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-icon {
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Glass Cards */
.card {
  background: var(--surface-color);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4), 
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(0, 210, 255, 0.2);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.5), 
    0 0 20px rgba(0, 210, 255, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.card:active {
  transform: scale(0.98);
}

.card-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Forms & Inputs */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}

.input-field {
  width: 100%;
  background: #172235;
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  color: var(--text-primary);
  padding: 15px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  outline: none;
}

.input-field::placeholder {
  color: #7c8ea6;
  opacity: 1;
  font-weight: 400;
}

.input-field:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.5);
}

.input-field:focus {
  border-color: var(--primary-color);
  background: #1b2940;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.22), 0 0 18px rgba(0, 210, 255, 0.14);
}

select.input-field {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
  padding-right: 40px;
}

select.input-field::-ms-expand,
select.input-field::picker-icon {
  display: none;
}

select.input-field option {
  background: var(--surface-light);
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.2);
}

.btn-secondary {
  background: var(--surface-light);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  padding: 12px 0 24px 0;
  /* Extra padding for iOS home indicator */
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-item ion-icon {
  font-size: 1.5rem;
}

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

.nav-item.active ion-icon {
  animation: bounce 0.5s ease;
}

/* Tire Status Visualization */
.tire-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.tire-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) 0%, var(--primary-color) 70%, var(--surface-light) 70%, var(--surface-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.2);
  margin-bottom: 16px;
}

.tire-circle-inner {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--surface-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tire-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.tire-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Lists */
.list-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--surface-light);
  border-radius: 12px;
  margin-bottom: 12px;
  gap: 16px;
  border: 1px solid var(--glass-border);
}

.list-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 210, 255, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.list-content {
  flex: 1;
}

.list-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* Toast */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: rgba(0, 230, 118, 0.9);
  color: #000;
  padding: 16px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.3s ease forwards, fadeOut 0.3s ease 2.7s forwards;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Range Slider */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 26px;
  width: 26px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  margin-top: -11px;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.5), inset 0 2px 4px rgba(255,255,255,0.4);
  border: 2px solid #ffffff;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  border: none;
}

/* Danger status */
.status-danger .tire-circle {
  background: conic-gradient(var(--danger-color) 0%, var(--danger-color) 20%, var(--surface-light) 20%, var(--surface-light) 100%);
  box-shadow: 0 0 30px rgba(255, 75, 75, 0.2);
}

.status-danger .tire-value {
  color: var(--danger-color);
}

/* ==================================================
   New 4-Tire Car UI
   ================================================== */
.car-ui-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
}
.car-body {
  position: relative;
  width: 120px;
  height: 240px;
  background: var(--surface-light);
  border: 2px solid var(--glass-border);
  border-radius: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.car-front {
  position: absolute;
  top: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  font-weight: 600;
}
.tire-btn {
  position: absolute;
  min-width: 70px;
  height: 80px;
  padding: 0 8px;
  background: var(--surface-color);
  border: 2px solid var(--primary-color);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  white-space: nowrap;
}
.tire-btn:active {
  transform: scale(0.95);
  background: rgba(0, 210, 255, 0.2);
}
.tire-btn.fl { top: 20px; right: calc(100% - 25px); }
.tire-btn.fr { top: 20px; left: calc(100% - 25px); }
.tire-btn.rl { bottom: 20px; right: calc(100% - 25px); }
.tire-btn.rr { bottom: 20px; left: calc(100% - 25px); }

.tire-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0px; }
.tire-val { font-size: 1.4rem; font-weight: bold; color: var(--text-primary); }

.sparkline-wrapper {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.sparkline-left {
  right: 100%;
  margin-right: 12px;
}
.sparkline-right {
  left: 100%;
  margin-left: 12px;
}

/* ==================================================
   iOS Style Scroll Picker Modal
   ================================================== */
.picker-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: auto;
}
.picker-modal.hidden {
  display: none;
}
.picker-overlay {
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
}
.picker-content {
  position: relative;
  background: var(--surface-light);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
}
.picker-cancel { color: var(--text-secondary); cursor: pointer; padding: 8px; }
.picker-confirm { color: var(--primary-color); font-weight: bold; cursor: pointer; padding: 8px; }
.picker-title { font-weight: 600; font-size: 1.1rem;}

.picker-wheel-container {
  position: relative;
  height: 220px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.picker-highlight {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 44px;
  margin-top: -22px;
  background: rgba(255,255,255,0.08);
  border-top: 1px solid var(--primary-color);
  border-bottom: 1px solid var(--primary-color);
  pointer-events: none;
}
.picker-scroll {
  height: 100%;
  width: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}
.picker-scroll::-webkit-scrollbar { display: none; }
.picker-item {
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  scroll-snap-align: center;
  color: var(--text-primary);
  transition: all 0.2s;
}
.picker-padding {
  height: 88px;
}

/* ==================================================
   Desktop Premium Outer Styling
   ================================================== */
body {
  background: #060709;
  position: relative;
  min-height: 100vh;
}

/* Outer Desktop Background Grid */
.desktop-bg-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 210, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 255, 0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  z-index: 1;
  pointer-events: none;
}

/* Ambient glow orbs */
.desktop-bg-decor {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #00d2ff 0%, transparent 70%);
  top: -100px;
  left: calc(50% - 600px);
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ff00aa 0%, transparent 70%);
  bottom: -150px;
  right: calc(50% - 700px);
  animation-delay: -7s;
  animation-duration: 25s;
}

/* Tech Lab Typography */
.lab-watermark {
  position: absolute;
  color: rgba(255, 255, 255, 0.02);
  font-family: monospace;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  font-weight: 700;
  white-space: nowrap;
}

.watermark-left {
  top: 20%;
  left: 2%;
  transform: rotate(-90deg);
  transform-origin: left top;
}

.watermark-right {
  bottom: 20%;
  right: 2%;
  transform: rotate(90deg);
  transform-origin: right bottom;
}

/* Animations */
@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(80px, 120px) scale(1.15);
  }
}

@keyframes pulseGlow {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.15) translate(10px, -10px);
    opacity: 0.9;
  }
}

/* Custom Scrollbar for App Container */
.screen-content::-webkit-scrollbar {
  width: 4px;
  display: block;
}
.screen-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.screen-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}
.screen-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Premium Login Form Styling & HUD Elements */
.login-hud-container {
  position: absolute;
  width: 100%;
  height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 0;
  top: 15%;
}

.login-hud-circle {
  position: absolute;
  border: 1px dashed rgba(0, 210, 255, 0.08);
  border-radius: 50%;
  animation: spinHud 60s linear infinite;
}
.login-hud-circle.outer {
  width: 280px;
  height: 280px;
  animation-duration: 90s;
}
.login-hud-circle.inner {
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 0, 170, 0.04);
  animation-direction: reverse;
  animation-duration: 45s;
}

@keyframes spinHud {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================================================
   Drag and Drop & Unified Modal Styling
   ================================================== */
.tire-btn.dragging {
  opacity: 0.5;
  border: 2px dashed var(--primary-color);
  transform: scale(0.9);
}

.tire-btn.drag-over {
  border: 2px solid #00e676;
  background: rgba(0, 230, 118, 0.2) !important;
  transform: scale(1.05);
}

.modal-tabs {
  display: flex;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 4px;
}

.modal-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.modal-tab.active {
  background: var(--primary-color);
  color: white;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ==================================================
   Signup & Profile Form High-Contrast Design System
   ================================================== */
.signup-shell {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.signup-main-card {
  position: relative;
  z-index: 30;
  background: rgba(13, 19, 34, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 22px;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.62),
    0 0 36px rgba(0, 210, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: visible;
}

.signup-hero-banner {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 21px;
  border-top-right-radius: 21px;
  padding: 22px 22px 20px;
  min-height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(96deg, rgba(10, 16, 30, 0.97) 0%, rgba(10, 16, 30, 0.90) 52%, rgba(10, 16, 30, 0.26) 100%),
    url('/data/signup_hero_banner.png') right center / cover no-repeat;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.signup-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 65%;
}

.signup-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.14);
  border: 1px solid rgba(0, 210, 255, 0.36);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.signup-hero-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.35px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.signup-hero-desc {
  font-size: 0.84rem;
  line-height: 1.52;
  color: #cbd5e1;
  margin: 0;
  word-break: keep-all;
}

.signup-card-body {
  padding: 22px 22px 24px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.form-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.1px;
  margin: 0;
}

.form-helper-note {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.45;
}

/* Read-only Vehicle Plate Badge */
.plate-readonly-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.10) 0%, rgba(37, 99, 235, 0.08) 100%);
  border: 1px solid rgba(0, 210, 255, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plate-readonly-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.plate-icon-chip {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(0, 210, 255, 0.14);
  border: 1px solid rgba(0, 210, 255, 0.32);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.plate-readonly-value {
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plate-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* EV Filter Toggle Switch */
.ev-toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 11px;
  border-radius: 999px;
  background: rgba(23, 34, 53, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #cbd5e1;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ev-toggle-switch:hover {
  border-color: rgba(52, 211, 153, 0.55);
  color: #ffffff;
}

.ev-toggle-switch.is-on {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.6);
  color: #6ee7b7;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.22);
}

.ev-switch-track {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #2b384f;
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ev-toggle-switch.is-on .ev-switch-track {
  background: linear-gradient(135deg, #10b981, #00d2ff);
  border-color: transparent;
}

.ev-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ev-toggle-switch.is-on .ev-switch-knob {
  transform: translateX(15px);
  background: #0b1322;
}

/* Maker / Model Dropdown Trigger Buttons */
.vehicle-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
}

.vehicle-select-btn {
  width: 100%;
  height: 48px;
  padding: 0 11px 0 10px;
  border-radius: 12px;
  background: #172235;
  border: 1.5px solid rgba(148, 163, 184, 0.34);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  font-size: 0.91rem;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.vehicle-select-btn:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.58);
  background: #1c2a42;
}

.vehicle-select-btn:focus-visible {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.24);
}

.vehicle-select-btn.is-selected {
  border-color: rgba(0, 210, 255, 0.58);
  color: #ffffff;
  background: #1a2840;
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.14);
}

.vehicle-select-btn.is-disabled,
.vehicle-select-btn:disabled {
  background: rgba(12, 18, 30, 0.55);
  border: 1.5px dashed rgba(148, 163, 184, 0.2);
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.72;
}

.vehicle-chevron-icon {
  flex-shrink: 0;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.vehicle-select-btn.is-selected .vehicle-chevron-icon {
  color: #38bdf8;
}

.vehicle-select-btn.is-disabled .vehicle-chevron-icon,
.vehicle-select-btn:disabled .vehicle-chevron-icon {
  color: #475569;
}

/* Optional PIN Section (Left-Aligned) */
.signup-pin-section {
  margin-top: 20px;
  margin-bottom: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.pin-optional-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
}

.pin-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.pin-input-left {
  text-align: left !important;
  padding: 13px 14px !important;
  font-size: 0.95rem !important;
  min-width: 0;
}

/* Primary CTA Button inside Signup */
.signup-cta-btn {
  margin-top: 24px;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #00d2ff 0%, #2563eb 100%);
  border: none;
  color: #ffffff;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.30);
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.signup-cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(0, 210, 255, 0.38);
}

.signup-cta-btn:active {
  transform: translateY(1px);
}

@media (max-width: 480px) {
  .signup-hero-banner {
    padding: 18px 16px;
    min-height: 128px;
    background:
      linear-gradient(96deg, rgba(10, 16, 30, 0.98) 0%, rgba(10, 16, 30, 0.92) 60%, rgba(10, 16, 30, 0.42) 100%),
      url('/data/signup_hero_banner.png') right center / cover no-repeat;
  }
  .signup-hero-copy {
    max-width: 74%;
  }
  .signup-hero-title {
    font-size: 1.06rem;
  }
  .signup-hero-desc {
    font-size: 0.8rem;
  }
  .signup-card-body {
    padding: 18px 16px 20px;
  }
  .vehicle-dropdown-grid {
    gap: 8px;
  }
  .vehicle-select-btn {
    padding: 0 9px;
    font-size: 0.86rem;
  }
}

@media (max-width: 350px) {
  .pin-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Measurement & Rotation History Page (/history) - 4-column (3 : 1)
   ===================================================================== */
.history-sort-bar {
  display: inline-flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 4px;
  border-radius: 10px;
}

.history-sort-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-sort-btn.active {
  background: var(--primary-color);
  color: #0f172a;
  font-weight: 700;
}

.history-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(0, 210, 255, 0.14);
  color: var(--primary-color);
  margin-left: 4px;
}

.history-split-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.history-col-measurements {
  grid-column: span 3;
  min-width: 0;
}

.history-col-rotations {
  grid-column: span 1;
  min-width: 0;
}

.history-record-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  border-left-width: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.history-record-card.history-epoch-0 {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.22);
  border-left-color: #64748b;
}

.history-record-card.history-epoch-1 {
  background: rgba(0, 210, 255, 0.09);
  border-color: rgba(0, 210, 255, 0.30);
  border-left-color: #00d2ff;
}

.history-record-card.history-epoch-2 {
  background: rgba(168, 85, 247, 0.10);
  border-color: rgba(168, 85, 247, 0.32);
  border-left-color: #a855f7;
}

.history-record-card.history-epoch-3 {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.32);
  border-left-color: #f59e0b;
}

.history-record-card.history-epoch-4 {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.32);
  border-left-color: #10b981;
}

.history-record-card.is-tire-replacement {
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.16);
}

.history-record-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.history-record-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.history-record-date {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-record-mileage {
  font-size: 1rem;
  color: var(--primary-color);
}

.history-record-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.history-tire-replaced-badge {
  background: var(--primary-color);
  color: #0f172a;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.history-rep-wheel-tag {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.history-mode-tag {
  font-size: 0.74rem;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

.history-center-cell {
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-center-cell span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.history-center-cell strong {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.history-record-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-rotation-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.35);
  border-left: 4px solid #4CAF50;
  background: rgba(76, 175, 80, 0.07);
}

.history-rot-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.history-rot-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.history-rot-mileage {
  font-size: 0.95rem;
  color: #4CAF50;
}

.history-rot-map-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.history-rot-map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.18);
  padding: 4px 8px;
  border-radius: 6px;
}

.history-rot-foot {
  padding-top: 8px;
  border-top: 1px dashed rgba(76, 175, 80, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-rot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #4CAF50;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .history-center-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .history-split-grid {
    grid-template-columns: 1fr;
  }
  .history-col-measurements,
  .history-col-rotations {
    grid-column: span 1;
  }
}

.measure-history-cta-btn {
  margin-top: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
  font-weight: 700;
}

.measure-history-cta-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.36);
}

.measure-history-cta-btn:active {
  transform: translateY(1px);
}

/* Polestar Concept B Dashboard Hero KPI Card */
.dash-polestar-card {
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
}

.polestar-hero-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.polestar-gauge-stage {
  position: relative;
  width: 100%;
  max-width: 286px;
  aspect-ratio: 280 / 186;
  margin: 0 auto 12px;
}

.polestar-gauge-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.polestar-arc-track {
  fill: none;
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 16;
  stroke-linecap: round;
}

.polestar-arc-fill {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  transition: stroke-dasharray 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.polestar-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 42px;
  text-align: center;
  pointer-events: none;
}

.polestar-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.polestar-status-pill.is-new {
  background: rgba(14, 165, 233, 0.16);
  color: #7DD3FC;
}

.polestar-status-pill.is-good {
  background: rgba(16, 185, 129, 0.16);
  color: #6EE7B7;
}

.polestar-status-pill.is-inspect {
  background: rgba(245, 158, 11, 0.18);
  color: #FCD34D;
}

.polestar-status-pill.is-replace {
  background: rgba(239, 68, 68, 0.20);
  color: #FCA5A5;
}

.polestar-hero-value {
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #F8FAFC;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.polestar-hero-sub {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 0.96rem;
  font-weight: 600;
  color: #CBD5E1;
  letter-spacing: -0.01em;
}

.polestar-kpi-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.polestar-kpi-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 6px;
  position: relative;
  min-width: 0;
}

.polestar-kpi-cell + .polestar-kpi-cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255, 255, 255, 0.10);
}

.polestar-kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 6px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.polestar-kpi-value {
  font-size: clamp(1.06rem, 1.55vw, 1.28rem);
  font-weight: 900;
  color: #F8FAFC;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 440px) {
  .dash-polestar-card {
    padding: 22px 12px 18px;
  }
  .polestar-kpi-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.80fr) minmax(0, 1.05fr);
  }
  .polestar-kpi-cell {
    padding: 2px 4px;
  }
  .polestar-kpi-label {
    font-size: 0.71rem;
  }
  .polestar-kpi-value {
    font-size: 0.93rem;
  }
}
