/* ============================================================
   DrivHis — Styles
   ============================================================ */

:root {
  /* Brand */
  --amber:    #F59E0B;
  --amber-lt: #FCD34D;
  --amber-dk: #D97706;

  /* Blues / purples */
  --navy:     #070d2a;
  --blue:     #1e3a8a;
  --indigo:   #312e81;
  --purple:   #5b21b6;
  --violet:   #7c3aed;

  /* UI */
  --cream:    #F5F7FF;
  --warm-bg:  #EEF2FF;
  --card-bg:  #FFFFFF;
  --text:     #1a1a2e;
  --text-mid: #4a4a6a;
  --text-lt:  #8888aa;
  --border:   #dde3f8;
  --green:    #059669;
  --red:      #dc2626;
  --shadow:   0 2px 16px rgba(30,58,138,.10);
  --radius:   12px;
}

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

body {
  font-family: 'Georgia', serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
}

/* ── NAV ──────────────────────────────────────────────────── */
nav {
  background: rgba(7, 13, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--amber);
  letter-spacing: .5px;
  cursor: pointer;
  text-decoration: none;
}

.logo span { color: #fff; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  font-family: Arial, sans-serif;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}

nav .btn-nav {
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  transition: background .2s, transform .1s;
}

nav .btn-nav:hover { background: var(--amber-dk); transform: translateY(-1px); }

nav .btn-nav-ghost {
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 7px 18px;
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

nav .btn-nav-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ── PAGES ────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── HERO ─────────────────────────────────────────────────── */
#page-home .hero {
  position: relative;
  background: linear-gradient(135deg, #070d2a 0%, #0f1f5c 35%, #2a1060 65%, #1a0a4e 100%);
  color: #fff;
  padding: 100px 24px 90px;
  text-align: center;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Glowing orbs */
#page-home .hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(139,92,246,.18) 0%, transparent 70%);
  pointer-events: none;
}

#page-home .hero::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, rgba(59,130,246,.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Floating registration plates */
.hero-plates {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.fp {
  position: absolute;
  background: #FFDD00;
  color: #1a1a1a;
  font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 3px;
  padding: 7px 18px;
  border-radius: 5px;
  border: 2px solid #333;
  white-space: nowrap;
  opacity: 0;
  animation: floatPlate 18s ease-in-out infinite;
}

/* White front plates */
.fp.front {
  background: #fff;
}

/* Position each plate */
.fp1  { top:  8%; left:  4%; animation-delay:  0s;   animation-duration: 22s; font-size: .95rem; }
.fp2  { top: 15%; right: 5%; animation-delay: -5s;   animation-duration: 19s; }
.fp3  { top: 55%; left:  2%; animation-delay: -10s;  animation-duration: 25s; font-size: .85rem; }
.fp4  { top: 70%; right: 7%; animation-delay: -3s;   animation-duration: 21s; }
.fp5  { top: 35%; left:  8%; animation-delay: -8s;   animation-duration: 23s; font-size: .9rem;  }
.fp6  { top: 80%; left: 20%; animation-delay: -14s;  animation-duration: 20s; }
.fp7  { top: 20%; right:18%; animation-delay: -7s;   animation-duration: 24s; font-size:.85rem; }
.fp8  { top: 65%; right: 3%; animation-delay: -2s;   animation-duration: 26s; font-size:.9rem; }
.fp9  { top: 45%; right:12%; animation-delay: -11s;  animation-duration: 18s; }
.fp10 { top: 88%; left: 45%; animation-delay: -16s;  animation-duration: 22s; font-size:.8rem; }

@keyframes floatPlate {
  0%   { opacity: 0;    transform: translateY(10px)  rotate(-2deg); }
  10%  { opacity: 0.13; }
  50%  { opacity: 0.18; transform: translateY(-12px) rotate(1.5deg); }
  90%  { opacity: 0.13; }
  100% { opacity: 0;    transform: translateY(10px)  rotate(-2deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 16px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,.4);
  letter-spacing: -.5px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--amber-lt), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(200,210,255,.75);
  margin-bottom: 44px;
  line-height: 1.6;
}

/* Glassmorphism search */
.search-box {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.search-box input {
  flex: 1;
  padding: 20px 24px;
  font-size: 1.3rem;
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 800;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  letter-spacing: 4px;
  text-transform: uppercase;
  caret-color: var(--amber);
}

.search-box input::placeholder {
  letter-spacing: 1px;
  text-transform: none;
  color: rgba(200,210,255,.4);
  font-size: .95rem;
  font-weight: normal;
  font-family: 'Georgia', serif;
}

.search-box button {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dk) 100%);
  color: #fff;
  border: none;
  padding: 20px 32px;
  font-size: 1rem;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: bold;
  transition: opacity .2s, transform .1s;
  white-space: nowrap;
  letter-spacing: .5px;
}

.search-box button:hover { opacity: .9; transform: scale(1.02); }

/* Trust badges below search */
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: rgba(200,210,255,.55);
}

.trust-item span { font-size: 1rem; }

/* ── FEATURES GRID ────────────────────────────────────────── */
.features-section {
  background: var(--cream);
  padding: 64px 24px 56px;
}

.features-heading {
  text-align: center;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 8px;
}

.features-sub {
  text-align: center;
  color: var(--text-mid);
  font-family: Arial, sans-serif;
  font-size: .95rem;
  margin-bottom: 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(30,58,138,.14);
}

.feature-card .icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
  filter: saturate(1.2);
}

.feature-card h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 8px; }
.feature-card p { font-size: .88rem; color: var(--text-mid); line-height: 1.55; font-family: Arial, sans-serif; }

/* ── INNER PAGES CONTAINER ────────────────────────────────── */
.page-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── REG BADGE ────────────────────────────────────────────── */
.reg-badge {
  display: inline-block;
  background: #FFDD00;
  color: #000;
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 4px;
  padding: 10px 24px;
  border-radius: 8px;
  border: 2px solid #000;
  font-family: 'Arial Black', sans-serif;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ── VEHICLE HEADER ───────────────────────────────────────── */
.vehicle-header { margin-bottom: 36px; }

.vehicle-header h2 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 6px;
}

.vehicle-header .subtitle {
  color: var(--text-mid);
  font-family: Arial, sans-serif;
  font-size: .95rem;
  margin-bottom: 20px;
}

/* ── DVLA INFO STRIP ──────────────────────────────────────── */
.dvla-strip {
  background: var(--warm-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: var(--text-mid);
}

.dvla-strip span strong {
  color: var(--text);
  margin-right: 4px;
}

/* ── STATS BAR ────────────────────────────────────────────── */
.stats-bar {
  background: var(--warm-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  margin-bottom: 24px;
  overflow: hidden;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  font-family: Arial, sans-serif;
}

.stat-item:last-child { border-right: none; }
.stat-item .val { font-size: 1.5rem; font-weight: bold; color: var(--amber-dk); display: block; }
.stat-item .lbl { font-size: .75rem; color: var(--text-lt); text-transform: uppercase; letter-spacing: .5px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  transition: background .2s;
  display: inline-block;
}

.btn-primary:hover { background: var(--amber-dk); }
.btn-primary:disabled { background: var(--text-lt); cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: .95rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  display: inline-block;
}

.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ── TIMELINE ─────────────────────────────────────────────── */
.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border);
}

.timeline-entry {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  position: relative;
}

.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: .85rem;
  font-family: Arial, sans-serif;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 3px solid var(--cream);
  box-shadow: 0 2px 8px rgba(224,123,57,.3);
}

.timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  flex: 1;
  box-shadow: var(--shadow);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.entry-ownership {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: var(--text-lt);
  background: var(--warm-bg);
  padding: 4px 10px;
  border-radius: 20px;
}

.entry-meta {
  font-family: Arial, sans-serif;
  font-size: .85rem;
  color: var(--text-mid);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.entry-photo {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  display: block;
}

.entry-story {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 14px;
}

.entry-facts {
  background: var(--warm-bg);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.entry-facts strong {
  display: block;
  color: var(--amber-dk);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.entry-author {
  margin-top: 12px;
  font-family: Arial, sans-serif;
  font-size: .8rem;
  color: var(--text-lt);
  text-align: right;
}

.btn-edit {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mid);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: .78rem;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.btn-edit:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: var(--warm-bg);
}

/* ── NOT FOUND ────────────────────────────────────────────── */
#page-notfound .page-inner {
  text-align: center;
  padding-top: 80px;
}

.notfound-icon { font-size: 4rem; margin-bottom: 20px; }

#page-notfound h2 { font-size: 1.8rem; margin-bottom: 12px; }

#page-notfound p {
  color: var(--text-mid);
  font-family: Arial, sans-serif;
  margin-bottom: 32px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ── ADD FORM ─────────────────────────────────────────────── */
#page-add h2 { font-size: 1.7rem; margin-bottom: 6px; }

#page-add .subtitle {
  color: var(--text-mid);
  font-family: Arial, sans-serif;
  font-size: .9rem;
  margin-bottom: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.field label {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  font-weight: bold;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.field input,
.field textarea,
.field select {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Georgia', serif;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--amber);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* ── PHOTO UPLOAD GRID ────────────────────────────────────── */
.photo-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--warm-bg);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-new {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px rgba(124,58,237,.15);
}

.photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.photo-remove:hover { background: var(--red); }

.photo-add-tile {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-lt);
  font-family: Arial, sans-serif;
  transition: border-color .2s, background .2s, color .2s;
  position: relative;
  overflow: hidden;
}

.photo-add-tile:hover {
  border-color: var(--violet);
  background: var(--warm-bg);
  color: var(--violet);
}

.photo-add-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.photo-add-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
.photo-add-label { font-size: .72rem; text-align: center; }

/* ── PHOTO GALLERY (vehicle page) ─────────────────────────── */
.entry-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  display: block;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
}

.photo-gallery:has(.gallery-thumb:only-child) {
  grid-template-columns: 1fr;
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  background: var(--warm-bg);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.gallery-thumb:hover img { transform: scale(1.04); }

.gallery-more {
  position: absolute;
  inset: 0;
  background: rgba(10,10,30,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
}

/* ── LIGHTBOX ──────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 20, .94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#lb-img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  object-fit: contain;
  display: block;
}

.lb-close {
  position: fixed;
  top: 16px; right: 20px;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1001;
}

.lb-close:hover { background: rgba(255,255,255,.25); }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px; height: 64px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1001;
}

.lb-nav:hover { background: rgba(255,255,255,.25); }

#lb-prev { left: 12px; }
#lb-next { right: 12px; }

.lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-family: Arial, sans-serif;
  font-size: .85rem;
}

.ownership-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── BACK LINK ────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-mid);
  font-family: Arial, sans-serif;
  font-size: .88rem;
  cursor: pointer;
  margin-bottom: 28px;
  text-decoration: none;
  transition: color .2s;
}

.back-link:hover { color: var(--amber); }

/* ── EMPTY TIMELINE ───────────────────────────────────────── */
.empty-timeline {
  text-align: center;
  padding: 48px 24px;
  background: var(--card-bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-mid);
  font-family: Arial, sans-serif;
}

.empty-timeline .icon { font-size: 3rem; margin-bottom: 12px; }

/* ── LOADING SPINNER ──────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250,247,242,.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  font-family: Arial, sans-serif;
  font-size: 1.1rem;
  color: var(--text-mid);
  gap: 12px;
}

.loading-overlay .spin-dark {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── AUTH MODAL ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44,36,22,.55);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  overflow: hidden;
}

.modal-header {
  background: var(--text);
  padding: 20px 24px 0;
  display: flex;
  gap: 0;
}

.modal-tab {
  padding: 12px 20px;
  font-family: Arial, sans-serif;
  font-size: .95rem;
  color: #c9b89e;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.modal-tab.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.modal-body { padding: 28px 24px; }

.modal-body h3 { margin-bottom: 6px; font-size: 1.3rem; }

.modal-body .hint {
  font-family: Arial, sans-serif;
  font-size: .85rem;
  color: var(--text-mid);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-field label {
  font-family: Arial, sans-serif;
  font-size: .8rem;
  font-weight: bold;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.modal-field input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Georgia', serif;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}

.modal-field input:focus { border-color: var(--amber); }

.modal-error {
  background: #FFF0F0;
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: Arial, sans-serif;
  font-size: .88rem;
  color: var(--red);
  margin-bottom: 16px;
  display: none;
}

.modal-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── TOAST ────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: .95rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: transform .3s ease;
  z-index: 999;
  white-space: nowrap;
}

#toast.show { transform: translateX(-50%) translateY(0); }
#toast.success { background: var(--green); }
#toast.error   { background: var(--red); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  color: var(--text-lt);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  background: var(--cream);
}

footer a { color: var(--violet); text-decoration: none; }
footer a:hover { color: var(--amber); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .reg-badge { font-size: 1.1rem; padding: 8px 16px; }
  .timeline::before { left: 22px; }
  .timeline-dot { width: 44px; height: 44px; font-size: .75rem; }
  .stats-bar { flex-wrap: wrap; }
  .stat-item { min-width: 50%; border-bottom: 1px solid var(--border); }
}
