/* Base Theme */
:root {
  --bg: #0c111b;
  --surface: #ffffff;
  --surface-muted: #f5f7fb;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #ef4444;
  --accent-2: #2563eb;
  --accent-3: #16a34a;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

/* Global Layout */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #e9efff 0%, #f7f7fb 45%, #f8fafc 100%);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-main {
  padding: 16px 0 48px;
}

/* Header */
.flash {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #c7f9cc;
  background: #e8f9ee;
  border-radius: 10px;
  color: #14532d;
}
.flash.error {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.site-header {
  background: linear-gradient(90deg, #0f172a 0%, #111827 40%, #0b1020 100%);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

.header-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.3px;
  font-size: 1.1rem;
}

.brand sup {
  color: var(--accent);
  font-size: 0.5rem;
  margin-left: 3px;
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav .nav-admin {
  color: #fecaca;
  font-weight: 700;
}

.email-warning {
  background: #fff3cd;
  color: #854d0e;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid #fde68a;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--accent-2); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-success { background: var(--accent-3); color: #fff; }
.btn-danger { background: #d43f3f; color: #fff; }

/* Sections & Cards */
.section {
  padding: 24px 0;
}

.section-title {
  margin: 0 0 16px;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  padding: 56px 0;
  color: #fff;
  background: linear-gradient(135deg, #0b1020 0%, #17213a 50%, #1d2a55 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
}

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 0 12px;
}

.hero-text {
  font-size: 1.05rem;
  opacity: 0.9;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(2px);
}

/* Event Cards */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.event-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.event-card__media {
  display: block;
  height: 150px;
  overflow: hidden;
}

.event-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.badge-neutral { background: #6b7280; }

.event-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Tables (Public) */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-list li { margin-bottom: 6px; }

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 10px;
  text-align: left;
}

.table th {
  background: #f8fafc;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 700px) {
  .nav { gap: 8px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}

/* Admin Shell */
.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  padding: 10px 20px;
}

.admin-header .admin-nav a {
  margin-right: 10px;
}

/* Tables & Forms (Admin Scope) */
.admin-main .table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.admin-main .table th,
.admin-main .table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.admin-main .table th {
  background: #f5f5f5;
  font-weight: 600;
}

.admin-main .form-row {
  margin-bottom: 12px;
}

.admin-main .form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-main .form-row input[type="text"],
.admin-main .form-row input[type="date"],
.admin-main .form-row input[type="number"],
.admin-main .form-row textarea,
.admin-main .form-row select {
  width: 100%;
  max-width: 400px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.input-error {
  border-color: #f97373 !important;
  background-color: #fef2f2;
}

/* Forms & Profile (Public) */
.form-card { max-width: 460px; margin: 0 auto; }
.form-title { margin: 0 0 12px; }
.form-field { margin-bottom: 12px; }
.form-label { display: block; font-weight: 600; margin-bottom: 4px; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.form-textarea { min-height: 110px; }
.form-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.form-error { font-size: 0.85rem; color: #b91c1c; margin-top: 4px; }

.register-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: start;
}
.register-errors {
  min-height: 120px;
  display: none;
  align-items: center;
  justify-content: center;
}
.register-errors-box {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #fecaca;
}

.profile-section { padding: 24px 0; }
.profile-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.profile-card { margin-bottom: 20px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.profile-row { display: flex; gap: 12px; flex-wrap: wrap; }
.avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }


@media (max-width: 900px) {
  .register-layout { grid-template-columns: 1fr; }
}

/* Results tables */
.results-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.results-table th,
.results-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.results-table thead th { background: var(--accent-2); color: #fff; }
.results-table .cell-center { text-align: center; }
.results-table .cell-strong { font-weight: 700; }
.results-table .cell-total { background: #e3f2fd; font-weight: 700; text-align: center; }
.results-table .row-podium { background: #fffbea; }
.results-table tbody tr:hover { background: #f0f8ff; }
.results-status-dns { color: #94a3b8; font-weight: 700; }
.results-status-dnf { color: #ef4444; font-weight: 700; }
.results-stage-penalty { font-size: 0.75rem; color: #ef4444; margin-top: 2px; }

/* Championships */
.champ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.champ-card { overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.champ-card__media { height: 200px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; font-size: 1.5rem; font-weight: 800; }
.champ-card__media img { width: 100%; height: 100%; object-fit: cover; }
.champ-card__body { padding: 16px; }
.champ-meta { color: var(--muted); font-size: 0.9rem; }

.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stage-card { padding: 16px; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.stage-title { color: var(--accent-2); font-weight: 700; margin-bottom: 6px; }

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { margin-bottom: 10px; }
.file-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--accent-2); color: #fff; text-decoration: none; }
.file-link:hover { filter: brightness(0.95); }

/* Garage */
.car-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.car-item { display: flex; flex-direction: column; overflow: hidden; }
.car-media { height: 150px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; }
.car-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.car-body { padding: 14px; flex-grow: 1; }
.car-actions { padding: 14px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.car-actions .btn { flex: 1 1 0; text-align: center; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.form-help { font-size: 0.85rem; color: var(--muted); }
.form-file { display: inline-block; }

/* Modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal__panel { background: #fff; border-radius: 12px; max-width: 520px; width: 100%; padding: 16px; position: relative; box-shadow: 0 20px 50px rgba(15,23,42,0.25); }
.modal__close { position: absolute; top: 8px; right: 10px; border: none; background: transparent; font-size: 1.4rem; cursor: pointer; color: #64748b; }
.modal__title { margin: 0 0 10px; font-size: 1.2rem; }
.modal__body { font-size: 0.9rem; color: #374151; }

/* Utilities (Public) */
.link { color: #0b6cff; text-decoration: none; }
.link:hover { text-decoration: underline; }
.mb-8 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* Event detail */
.event-layout { display: flex; flex-wrap: wrap; gap: 16px; }
.event-main { flex: 1 1 0; min-width: 260px; }
.event-aside { flex: 0 0 260px; min-width: 260px; }
.event-banner { height: 260px; border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.event-banner img { height: 100%; width: 100%; object-fit: cover; }
.event-info { display: flex; flex-wrap: wrap; gap: 12px; }
.event-info__item { flex: 1 1 160px; min-width: 160px; }
.event-info__label { font-size: 0.8rem; color: var(--muted); }
.event-info__value { font-size: 1rem; font-weight: 700; }
.event-desc { white-space: pre-line; margin: 0; }

.badge--neutral { background: #6b7280; }
.badge--cancelled { background: #dc2626; }
.badge--finished { background: #4b5563; }
.badge--soon { background: #f97316; }
.badge--open { background: #16a34a; }
.badge--progress { background: #0ea5e9; }

.list { margin: 0; padding-left: 18px; }
.list-reset { list-style: none; padding: 0; margin: 0; }
.list-spaced li { margin-bottom: 4px; }

.event-docs-title { margin: 0 0 10px; font-size: 1.1rem; }
.event-block-title { margin: 0 0 8px; font-size: 1.2rem; }
.event-block-text { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); }

.event-meta-title { margin: 0; font-size: 1.1rem; }
.event-meta-link { color: inherit; text-decoration: none; }
.event-date { font-weight: 700; color: #111827; }

/* Footer */
.site-footer { padding: 20px 0; text-align: center; color: #666; }

/* Forms small tweaks */
.form-actions .btn-full { width: 100%; }

/* Register errors list */
.list-errors { margin: 0; padding-left: 18px; }

/* Public cleanup for inline-style removal */
.inline-block { display: inline-block; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-4 { margin-top: 4px; }

.hero-panel-title { margin: 0 0 8px; font-weight: 700; }
.hero-list { margin: 0; padding-left: 20px; line-height: 1.5; }

.event-title { margin: 0 0 12px; font-size: 1.6rem; }
.event-reg-title { margin: 0 0 12px; font-size: 1.6rem; }
.event-subtitle { margin: 0 0 10px; font-size: 1.2rem; }
.event-track-title { margin: 0 0 8px; font-size: 1.2rem; }
.event-track-row { margin: 4px 0; }
.event-track-row-last { margin: 0; }
.file-group-title { display: block; margin-bottom: 4px; color: #374151; font-size: 0.95rem; }
.doc-link-sm { font-size: 0.9rem; }

.event-meta--bottom { margin-top: auto; }

.champ-card__title { margin: 0 0 6px; font-size: 1.1rem; }
.champ-card__action { margin-top: 10px; }
.champ-banner { height: 220px; border-radius: 14px; margin-bottom: 16px; }
.champ-banner img { height: 100%; }
.champ-card-desc { margin-bottom: 20px; }
.champ-class-title { margin: 16px 0 10px; color: var(--accent-2); }

.car-item-title { margin-top: 0; margin-bottom: 10px; }
.car-item-spec { margin: 0 0 5px; }
.required-mark { color: #dc2626; }
.car-photo-preview { max-width: 150px; max-height: 100px; margin-bottom: 10px; display: block; }

.form-field-grow { flex: 1 1 200px; }
.field-sm { max-width: 260px; }
.avatar-wrap { margin-bottom: 8px; }
.form-inline { display: inline; }

.modal-text { white-space: pre-line; margin: 0 0 10px; }
.modal-text-muted { margin: 0 0 10px; }
.modal-image-wrap { margin-top: 10px; text-align: center; }
.modal-image { max-width: 260px; max-height: 260px; object-fit: contain; }

.form-note-lg { font-size: 1rem; }
.form-label-inline { display: inline-block; margin-right: 8px; }

.participate-card { max-width: 600px; margin: 0 auto; }
.text-success { color: #16a34a; font-weight: 600; }
.text-danger { color: #dc2626; }
.mt-0 { margin-top: 0; }
.my-4 { margin: 4px 0; }
.w-100 { width: 100%; }
.btn-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
  min-height: 32px;
}
.btn-link-clean { text-decoration: none; }

/* Participate event page */
.confirm-registration { padding: 20px 0; }
.card-compact { padding: 12px; }
.label-check { display: flex; align-items: center; gap: 6px; }
.input-compact { width: 100%; padding: 8px; }
.input-file-top { margin-top: 4px; }
.selection-panel {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}
.selection-option {
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}
.check-sm { width: 18px; height: 18px; vertical-align: middle; margin-right: 8px; }
.text-500 { font-weight: 500; }
.text-600 { font-weight: 600; }
.text-muted-09 { font-size: 0.9rem; color: #666; }
.text-muted-085 { font-size: 0.85rem; color: #6b7280; }
.grid-auto-260 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.car-choice { border: 1px solid #ddd; border-radius: 8px; padding: 10px; display: block; cursor: pointer; }
.car-choice-row { display: flex; align-items: center; gap: 10px; }
.actions-row { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Legacy public actions */
.my-applications { padding: 20px 0; }
.garage { padding: 20px 0; }
.cars-table { width: 100%; border-collapse: collapse; }
.cars-table thead { background: #f8f8f8; }
.cars-table th { padding: 8px; border: 1px solid #eee; text-align: left; }
.cars-table td { padding: 8px; border: 1px solid #eee; vertical-align: middle; }
.cars-table .cell-actions { white-space: nowrap; }
.car-thumb { max-width: 100px; max-height: 80px; object-fit: contain; }
.mr-6 { margin-right: 6px; }
.ml-12 { margin-left: 12px; }
.text-333 { color: #333; }
.is-hidden { display: none; }
.card-pad-15 { padding: 15px; }

/* Public theme: Motorsport / Tech */
.public-theme {
  --bg: #070a12;
  --surface: #141b2b;
  --surface-muted: #1b2438;
  --text: #f5f7ff;
  --muted: #a9b2c8;
  --accent: #f26a21;
  --accent-2: #1e5bff;
  --accent-3: #2fa94d;
  --border: #2d364a;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(1, 5, 14, 0.45);
  background:
    radial-gradient(1200px 560px at 85% -10%, rgba(242, 106, 33, 0.2), transparent 60%),
    radial-gradient(1000px 520px at 0% 20%, rgba(30, 91, 255, 0.16), transparent 60%),
    linear-gradient(180deg, #0a0f1a 0%, #070a12 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-theme .site-main {
  flex: 1 0 auto;
}

.public-theme .site-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    linear-gradient(90deg, #0e1320 0%, #111a2b 55%, #0d1220 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-theme .nav a {
  color: #dbe3fb;
}

.public-theme .hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(900px 320px at 85% 15%, rgba(242, 106, 33, 0.28), transparent 62%),
    radial-gradient(900px 300px at 0% 25%, rgba(30, 91, 255, 0.22), transparent 62%),
    linear-gradient(130deg, #0d1423, #070a12);
  box-shadow: var(--shadow);
}

.public-theme .btn {
  border-radius: var(--radius);
  border-color: rgba(255, 255, 255, 0.18);
  background: #1b2438;
  color: #eaf0ff;
}

.public-theme .btn-primary {
  background: #f26a21;
  border-color: #f58a4f;
  color: #fff;
}

.public-theme .btn-secondary {
  background: #1e5bff;
  border-color: #4c7dff;
  color: #fff;
}

.public-theme .btn-outline {
  background: transparent;
  color: #e4ebff;
  border-color: #3c4a67;
}

.public-theme .btn-success {
  background: #2f8f46;
  border-color: #49a961;
  color: #fff;
}

.public-theme .btn-danger {
  background: #b63c3c;
  border-color: #cb5757;
  color: #fff;
}

.public-theme .btn:hover {
  filter: brightness(1.08);
}

.public-theme .card,
.public-theme .event-card,
.public-theme .champ-card,
.public-theme .stage-card,
.public-theme .car-item {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--surface);
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.public-theme .section-title,
.public-theme .event-title,
.public-theme .event-subtitle,
.public-theme .event-track-title,
.public-theme .champ-class-title,
.public-theme .event-block-title {
  color: #edf2ff;
}

.public-theme .event-desc,
.public-theme .champ-meta,
.public-theme .event-block-text,
.public-theme .form-note,
.public-theme .file-group-title {
  color: var(--muted);
}

.public-theme .event-date,
.public-theme .event-info__value {
  color: #f0f4ff;
}

.public-theme .badge {
  border-radius: var(--radius);
}

.public-theme .badge--open { background: #2f8f46; }
.public-theme .badge--soon { background: #c36422; }
.public-theme .badge--progress { background: #2454cc; }
.public-theme .badge--cancelled { background: #b63c3c; }
.public-theme .badge--finished,
.public-theme .badge--neutral { background: #3a4359; }

.public-theme .file-link {
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2b6bff, #1e5bff);
}

.public-theme .site-footer {
  color: #aeb7cf;
}

/* Links in public content */
.public-theme .site-main a:not(.btn):not(.event-meta-link):not(.file-link) {
  color: #ffb47d;
}

.public-theme .site-main a:not(.btn):not(.event-meta-link):not(.file-link):hover {
  color: #ffd2ad;
}

/* Table readability on dark theme */
.public-theme .table,
.public-theme .cars-table,
.public-theme .results-table {
  color: #e8eeff;
}

.public-theme .table th,
.public-theme .cars-table th,
.public-theme .results-table thead th {
  background: #1b2438;
  color: #f5f7ff;
  border-color: #2d364a;
}

.public-theme .table td,
.public-theme .cars-table td,
.public-theme .results-table td {
  background: #141b2b;
  border-color: #2d364a;
  color: #e8eeff;
}

.public-theme .cars-table thead {
  background: transparent;
}

.public-theme .results-table .cell-total {
  background: #1f2c46;
  color: #f5f7ff;
}

.public-theme .results-table .row-podium td {
  background: #1a263f;
}

.public-theme .results-table tbody tr:hover td {
  background: #1d2a44;
}

/* Form controls on dark theme */
.public-theme .form-input,
.public-theme .form-select,
.public-theme .form-textarea,
.public-theme .form-row input[type="text"],
.public-theme .form-row input[type="email"],
.public-theme .form-row input[type="password"],
.public-theme .form-row input[type="number"],
.public-theme .form-row input[type="date"],
.public-theme .form-row textarea,
.public-theme .form-row select,
.public-theme input[type="text"],
.public-theme input[type="email"],
.public-theme input[type="password"],
.public-theme input[type="number"],
.public-theme input[type="date"],
.public-theme textarea,
.public-theme select {
  background: #1b2438;
  color: #edf2ff;
  border: 1px solid #36425c;
}

.public-theme input::placeholder,
.public-theme textarea::placeholder {
  color: #9aa7c4;
}

.public-theme input:focus,
.public-theme textarea:focus,
.public-theme select:focus {
  outline: none;
  border-color: #4f6fb8;
  box-shadow: 0 0 0 2px rgba(79, 111, 184, 0.25);
}

/* Garage */
.garage-subnav .btn {
  min-width: 140px;
}

.garage-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.garage-car-card {
  display: flex;
  flex-direction: column;
}

.garage-car-media {
  height: 180px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.garage-car-media .car-thumb {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.garage-car-body {
  padding: 12px;
}

.garage-car-classes {
  margin-top: 10px;
  font-size: 0.9rem;
}

.garage-class-row {
  margin-top: 4px;
  color: var(--muted);
}

.garage-car-actions {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .garage-cards {
    grid-template-columns: 1fr;
  }
}
