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

:root {
  --primary: #1565c0;
  --primary-light: #e3f2fd;
  --text: #212121;
  --text-secondary: #616161;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --border: #e0e0e0;
  --danger: #c62828;
  --danger-light: #ffebee;
  --max-width: 720px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

header {
  text-align: center;
  padding: 40px 20px 32px;
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1e88e5 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

header::before {
  content: ''; position: absolute; top: -60%; right: -20%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%); border-radius: 50%;
}

header::after {
  content: ''; position: absolute; bottom: -40%; left: -10%; width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%); border-radius: 50%;
}

header > * {
  position: relative;
  z-index: 1;
}

header .header-logo {
  display: block;
  max-width: 320px;
  width: 65%;
  height: auto;
  margin: 0 auto 10px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

header p {
  font-size: 15px;
  color: #ffffff;
  opacity: 1;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

h2 {
  font-size: 20px;
  margin: 32px 0 12px;
  color: var(--primary);
}

h3 {
  font-size: 16px;
  margin: 20px 0 8px;
}

p, li {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}

.card.danger {
  border-color: var(--danger);
  background: var(--danger-light);
}

.badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.effective-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

footer {
  text-align: center;
  padding: 32px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

nav {
  text-align: center;
  padding: 12px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

nav a {
  margin: 0 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

nav a.active {
  color: var(--primary);
  font-weight: 700;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

/* Plan badge */
.plan-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-badge-trader { background: #d4a017; color: #fff; }
.plan-badge-basic { background: var(--primary); color: #fff; }
.plan-badge-free { background: #9e9e9e; color: #fff; }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin: 20px 0;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Progress bar */
.progress-bar-outer {
  background: var(--border);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
}
.progress-bar-inner {
  background: var(--primary);
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

/* Bulk result cards */
.result-card-bulk {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.result-card-bulk.error {
  border-color: var(--danger);
  background: var(--danger-light);
}
.result-card-bulk-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
}
.result-card-bulk-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-card-bulk-info {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

/* Garage vehicle cards */
.garage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.garage-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.garage-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.garage-card .vehicle-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.garage-card .vehicle-meta {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.garage-card .vehicle-plate {
  display: inline-block;
  background: #F2C10F;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 1px;
  border: 1px solid #000;
  margin-top: 6px;
}
.garage-card .vehicle-valuation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  color: #2e7d32;
  font-weight: 600;
}
.garage-card .garage-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.garage-limit-info {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 600px) {
  header { padding: 28px 16px 24px; }
  header h1 { font-size: 24px; }
  .container { padding: 16px 16px 48px; }
  nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  nav a { margin: 0 4px; }
  #auth-area { float: none !important; width: 100%; text-align: center; margin-top: 8px; }
  .result-card-bulk { flex-direction: column; }
  .result-card-bulk-thumb { width: 100%; height: 120px; }
  .garage-grid { grid-template-columns: 1fr; }
}
