/* ============================================================
   THEME: MODERN CARD
   Philosophy: Clean, minimal depth. Professional slate + sky blue.
   No harsh gradients, no visible borders — only subtle shadows.
   Layout: sidebar_right, two-column above 1024px
   Font: Poppins
   ============================================================ */

/* ---- Color tokens (RR teal via rr-kit when loaded) ---- */
:root {
  --theme-primary:       #1e3a5f;
  --theme-accent:        var(--rr-accent, #138577);
  --theme-accent-hover:  var(--rr-accent-deep, #0f6f64);
  --theme-bg:            #eef1f4;
  --theme-surface:       #ffffff;
  --theme-text:          #1e3a5f;
  --theme-muted:         #64748b;
  --theme-border:        #dde3ea;
  --theme-input-bg:      #f8fafc;
  --theme-error:         #ef4444;
  --theme-success:       #10b981;
  --theme-font-family:   var(--rr-text, 'Inter', system-ui, sans-serif);
  --theme-border-radius: 10px;
  --theme-input-radius:  6px;
  --shadow-sm:           0 1px 4px rgba(30, 58, 95, 0.06);
  --shadow-md:           0 4px 16px rgba(30, 58, 95, 0.08);
}

/* ---- Page wrapper ---- */
.theme-modern {
  background: var(--theme-bg);
  min-height: 100vh;
  font-family: var(--theme-font-family);
  color: var(--theme-text);
}

/* ---- Registration header (branded logo + title from header.html) ---- */
.theme-modern .registration-header {
  background: var(--theme-surface);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--theme-border);
  color: var(--theme-text);
}

.theme-modern .registration-header--branded {
  padding-top: 1.5rem;
}

.theme-modern .header-content {
  max-width: 640px;
  margin: 0 auto;
}

.theme-modern .header-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.25rem;
  padding: 0.25rem 1rem;
  max-width: min(100%, 480px);
}

.theme-modern .header-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(80px, 16vw, 128px);
  object-fit: contain;
}

.theme-modern .header-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-accent);
  margin: 0 0 0.5rem;
}

.theme-modern .header-title {
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--theme-text);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.theme-modern .header-tagline {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--theme-muted);
  margin: 0;
  line-height: 1.45;
  max-width: 36ch;
  margin-inline: auto;
}

.theme-modern .header-payment-badge {
  color: var(--theme-text);
}

/* Legacy fallback badge when no logo is configured */
.theme-modern .header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(19, 133, 119, 0.08);
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 1px solid rgba(19, 133, 119, 0.18);
}

.theme-modern .header-icon {
  width: 24px;
  height: 24px;
  color: var(--theme-accent);
}

/* Legacy sidebar copy classes (if still rendered elsewhere) */
.theme-modern .event-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--theme-text);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.theme-modern .event-description {
  font-size: 13px;
  color: var(--theme-muted);
  margin: 0;
  line-height: 1.6;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.theme-modern .registration-header p,
.theme-modern .registration-header div:not(.header-badge):not(.header-logo-wrap):not(.header-payment-badge) {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ---- Compact progress stepper ---- */
.theme-modern .progress-container {
  max-width: 1060px;
  margin: 0 auto 1rem;
  padding: 0.625rem 1rem;
  position: static;
  z-index: auto;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.theme-modern .progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
  text-align: left;
}

.theme-modern .progress-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-muted);
}

.theme-modern .progress-text strong {
  color: var(--theme-accent);
  font-weight: 700;
}

.theme-modern .progress-track {
  display: block;
  height: 3px;
  margin-bottom: 0.625rem;
  background: var(--theme-border);
  border-radius: 0;
}

.theme-modern .progress-track-fill,
.theme-modern .progress-bar {
  background: var(--theme-accent);
  box-shadow: none;
  border-radius: 0;
}

.theme-modern .progress-steps {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  color: inherit;
}

.theme-modern .progress-step {
  flex: 1 1 0;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  opacity: 0.55;
}

.theme-modern .progress-step.active,
.theme-modern .progress-step.completed {
  opacity: 1;
}

.theme-modern .step-indicator {
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
}

.theme-modern .step-number {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  min-width: 1.5rem !important;
  min-height: 1.5rem !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: var(--theme-input-radius) !important;
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-input-bg) !important;
  color: var(--theme-muted) !important;
  box-shadow: none !important;
  transform: none !important;
}

.theme-modern .progress-step.active .step-indicator,
.theme-modern .progress-step.completed .step-indicator {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.theme-modern .progress-step.active .step-number {
  background: var(--theme-accent) !important;
  border-color: var(--theme-accent-hover) !important;
  color: #fff !important;
}

.theme-modern .progress-step.completed .step-number {
  background: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: #fff !important;
}

.theme-modern .step-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--theme-muted) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
  text-align: left;
}

.theme-modern .progress-step.active .step-label {
  color: var(--theme-text) !important;
  font-weight: 600;
}

.theme-modern .progress-step.completed .step-label {
  color: var(--theme-text) !important;
}

.theme-modern .step-connector {
  flex: 0 0 1.5rem;
  height: 1px;
  min-width: 1rem;
  margin-top: 0;
  align-self: center;
  background: var(--theme-border);
  border-radius: 0;
}

.theme-modern .step-connector.active,
.theme-modern .step-connector.completed {
  background: var(--theme-accent);
}

/* ---- Layout ---- */
.theme-modern .registration-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  max-width: 1060px;
  margin: 28px auto 0;
  padding: 0 24px 80px;
}

/* ---- Form main ---- */
.theme-modern .form-main {
  padding: 0;
  order: 1;
  /* Reset enhanced-v2 glass card — transform/overflow create a containing block
     that traps position:fixed nav inside the form instead of the viewport. */
  transform: none;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.theme-modern .form-main:hover {
  transform: none;
  box-shadow: none;
}

.theme-modern .form-main::before,
.theme-modern .form-main::after {
  display: none;
}

/* ---- Sidebar card — right side ---- */
.theme-modern .event-sidebar {
  order: 2;
  position: sticky;
  top: 80px;
  align-self: start;
}

.theme-modern .event-info-card {
  background: var(--theme-surface);
  border-radius: var(--theme-border-radius);
  box-shadow: var(--shadow-sm);
  border: none;
  padding: 20px;
}

.theme-modern .event-info-header {
  margin-bottom: 12px;
}

.theme-modern .event-info-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--theme-text);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.theme-modern .event-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--theme-border);
}

.theme-modern .detail-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-modern .detail-icon svg {
  width: 14px;
  height: 14px;
  color: var(--theme-accent);
}

.theme-modern .detail-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--theme-muted);
  margin-bottom: 2px;
}

.theme-modern .detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text);
  line-height: 1.3;
}

.theme-modern .detail-description {
  font-size: 11px;
  color: var(--theme-muted);
}

/* ---- Suppress base CSS bleeding into sidebar event details ---- */
.theme-modern .pricing-detail,
.theme-modern .event-detail.pricing-detail {
  background: transparent !important;
  border: none !important;
  border-top: 1px solid var(--theme-border) !important;
  box-shadow: none !important;
  border-left: none !important;
}

.theme-modern .event-status .status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---- Kit / race info section in sidebar ---- */
.theme-modern .kit-section,
.theme-modern .kit-list {
  border: none;
  background: transparent;
  padding: 0;
}

.theme-modern .kit-item {
  font-size: 12px;
  color: var(--theme-muted);
  padding: 4px 0;
}

/* ---- Referral section ---- */
.theme-modern .referral-section {
  background: var(--theme-input-bg);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
  padding: 16px;
  margin-bottom: 16px;
}

/* ---- Group booking toggle — theme-aware card ---- */
.theme-modern .group-registration-toggle {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-border-radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
}

.theme-modern .group-toggle-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text);
}

.theme-modern .group-toggle-hint {
  font-size: 12px;
  color: var(--theme-muted);
}

.theme-modern .group-toggle-track {
  background: var(--theme-border);
}

.theme-modern .group-toggle-switch input:checked + .group-toggle-track {
  background: var(--theme-accent);
}

.theme-modern .group-add-btn {
  color: var(--theme-accent);
  border-color: var(--theme-accent);
  border-radius: var(--theme-input-radius);
}

.theme-modern .group-add-btn:hover {
  background: var(--theme-accent);
  color: #fff;
}

.theme-modern .group-total-bar {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

.theme-modern .group-total-amount {
  color: var(--theme-accent);
}

.theme-modern #group-registration-section {
  border-top-color: var(--theme-border);
}

/* ---- Form section cards — shadow only, no border ---- */
.theme-modern .form-section.active {
  background: var(--theme-surface);
  border-radius: var(--theme-border-radius);
  box-shadow: var(--shadow-sm);
  border: none;
  padding: 28px 28px 24px;
  margin-bottom: 12px;
}

/* ---- Payment section card ---- */
.theme-modern .payment-step,
.theme-modern .payment-section {
  background: var(--theme-surface);
  border-radius: var(--theme-border-radius);
  box-shadow: var(--shadow-sm);
  border: none;
  padding: 28px;
}

/* ---- Section headings ---- */
.theme-modern .form-section h3,
.theme-modern .form-section h4,
.theme-modern .section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--theme-text);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Override the amber divider line injected by the base template */
.theme-modern .section-divider,
.theme-modern .form-section hr {
  border: none;
  border-top: 1px solid var(--theme-border);
  margin: 0 0 20px;
}

/* Suppress the gradient top-bar from registration-enhanced-v2.css .form-section::before */
.theme-modern .form-section::before {
  display: none !important;
}

/* Suppress amber gradient underline from registration-enhanced-v2.css .section-header::after */
.theme-modern .section-header::after {
  display: none !important;
}

/* Suppress section-header border + emoji from base CSS */
.theme-modern .section-header {
  border-bottom: none;
  padding-bottom: 0;
  text-align: left;
  margin-bottom: 16px;
}

.theme-modern .section-header h3::before {
  display: none !important;
}

.theme-modern .section-header h3 {
  justify-content: flex-start;
  color: var(--theme-text);
  font-size: 15px;
  font-weight: 700;
}

/* ---- Form group ---- */
.theme-modern .form-group {
  margin-bottom: 18px;
}

/* ---- Labels ---- */
.theme-modern .form-group label,
.theme-modern .form-group .field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text);
  margin-bottom: 6px;
  display: block;
  text-transform: none;
  letter-spacing: 0;
}

.theme-modern .form-group label .required,
.theme-modern .form-group label .required-mark {
  color: var(--theme-accent);
  margin-left: 2px;
}

/* ---- Inputs — light gray bg, no border except on focus ---- */
.theme-modern .form-group input[type="text"],
.theme-modern .form-group input[type="email"],
.theme-modern .form-group input[type="tel"],
.theme-modern .form-group input[type="date"],
.theme-modern .form-group input[type="number"],
.theme-modern .form-group select,
.theme-modern .form-group textarea {
  appearance: none;
  -webkit-appearance: none;
  background: var(--theme-input-bg);
  border: 1.5px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--theme-font-family);
  color: var(--theme-text);
  width: 100%;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: none;
}

.theme-modern .form-group input::placeholder,
.theme-modern .form-group textarea::placeholder {
  color: #94a3b8;
}

.theme-modern .form-group input:focus,
.theme-modern .form-group select:focus,
.theme-modern .form-group textarea:focus {
  border-color: var(--theme-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.theme-modern .form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.theme-modern .form-group textarea {
  min-height: 84px;
  resize: vertical;
}

/* ---- Checkbox / Radio ---- */
.theme-modern input[type="radio"],
.theme-modern input[type="checkbox"] {
  accent-color: var(--theme-accent);
}

.theme-modern .radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-modern .radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
  background: var(--theme-input-bg);
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--theme-text);
  transition: all 0.15s ease;
}

.theme-modern .radio-group label:has(input:checked) {
  border-color: var(--theme-accent);
  background: rgba(14, 165, 233, 0.04);
  color: var(--theme-text);
}

.theme-modern .checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color: var(--theme-text);
}

/* ---- Help text & errors ---- */
.theme-modern .field-help,
.theme-modern .help-text,
.theme-modern .helptext {
  font-size: 12px;
  color: var(--theme-muted);
  margin-top: 5px;
  line-height: 1.5;
}

.theme-modern .field-error,
.theme-modern .errorlist li {
  font-size: 12px;
  color: var(--theme-error);
  margin-top: 4px;
}

/* ---- Navigation buttons ---- */
.theme-modern .form-navigation {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--theme-border);
}

.theme-modern .form-navigation .btn-prev {
  grid-column: 1;
  justify-self: start;
}

.theme-modern .form-navigation .btn-next,
.theme-modern .form-navigation .btn-submit {
  grid-column: 2;
  justify-self: end;
  min-width: min(100%, 220px);
}

.theme-modern .form-navigation .btn-submit[style*="inline-block"],
.theme-modern .form-navigation .btn-next[style*="inline-block"] {
  display: inline-flex !important;
}

.theme-modern .btn-next,
.theme-modern .btn-submit {
  background: var(--theme-accent);
  color: #fff;
  border: 1px solid var(--theme-accent-hover);
  border-radius: var(--theme-input-radius);
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--theme-font-family);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0;
  box-shadow: var(--rr-btn-shadow, 0 6px 18px rgba(19, 133, 119, 0.26));
}

.theme-modern .btn-next:hover,
.theme-modern .btn-submit:hover {
  background: var(--theme-accent-hover);
  transform: translateY(-1px);
}

.theme-modern .btn-prev {
  background: transparent;
  color: var(--theme-muted);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--theme-font-family);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.theme-modern .btn-prev:hover {
  color: var(--theme-text);
  border-color: var(--theme-accent);
  background: var(--theme-input-bg);
}

/* ---- Sidebar footer link ---- */
.theme-modern .reg-sidebar-footer-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--theme-border);
}

.theme-modern .reg-sidebar-footer-actions__event-page {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: transparent;
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
  box-shadow: none;
}

.theme-modern .reg-sidebar-footer-actions__event-page:hover {
  background: var(--theme-input-bg);
  border-color: var(--theme-accent);
  color: var(--theme-accent-hover);
  transform: none;
  box-shadow: none;
}

/* ---- SSL / security badge ---- */
.theme-modern .ssl-badge,
.theme-modern .security-badge {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

/* ---- Order summary ---- */
.theme-modern .payment-summary,
.theme-modern .order-summary {
  background: var(--theme-input-bg);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.theme-modern .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 5px 0;
  color: var(--theme-text);
}

.theme-modern .summary-row .label { color: var(--theme-muted); }

.theme-modern .summary-row.total {
  font-weight: 700;
  font-size: 17px;
  border-top: 1px solid var(--theme-border);
  margin-top: 10px;
  padding-top: 14px;
  color: var(--theme-text);
}

/* ---- Status badges, kit items ---- */
.theme-modern .status-badge.status-open {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.2);
}

/* ---- Referral input ---- */
.theme-modern .referral-code-input {
  background: var(--theme-input-bg);
  border: 1.5px solid var(--theme-border);
  border-radius: var(--theme-input-radius);
}

.theme-modern .referral-apply-btn {
  background: var(--theme-primary);
  color: #fff;
  border-radius: 8px;
  border: none;
  font-family: var(--theme-font-family);
}

/* ---- Responsive ---- */
@media (max-width: 1060px) {
  .theme-modern .registration-layout {
    grid-template-columns: 1fr 260px;
    gap: 16px;
    padding: 0 16px 64px;
  }
}

@media (max-width: 860px) {
  .theme-modern .registration-layout {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 1rem auto 0;
    padding: 0 0.75rem 1rem;
  }

  .theme-modern .form-main { order: 1; }

  .theme-modern .event-sidebar {
    position: static;
    order: 2;
  }

  .theme-modern .event-sidebar .kit-gara-section {
    display: none;
  }

  .theme-modern .progress-container {
    max-width: 100%;
    margin: 0 0 0.75rem;
  }
}

@media (max-width: 768px) {
  /* Reserve space where the fixed nav sits in document flow */
  .theme-modern #registration-form {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0));
  }

  .theme-modern .progress-step .step-label {
    display: none;
  }

  .theme-modern .progress-step.active .step-label {
    display: inline;
    font-size: 0.75rem;
    max-width: 9rem;
  }

  .theme-modern .step-connector {
    flex: 0 0 0.75rem;
    min-width: 0.5rem;
  }

  .theme-modern .form-navigation {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    margin: 0;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom, 0));
    background: color-mix(in srgb, var(--theme-surface) 96%, transparent);
    border-top: 1px solid var(--theme-border);
    backdrop-filter: blur(8px);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    grid-template-columns: 1fr 1.4fr;
    gap: 0.5rem;
  }

  .theme-modern .form-navigation .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .theme-modern .form-navigation:has(.btn-prev[style*="none"]) {
    grid-template-columns: 1fr;
  }

  .theme-modern .form-navigation .btn-prev[style*="none"] {
    display: none !important;
  }

  .theme-modern .form-navigation:has(.btn-prev[style*="none"]) .btn-next,
  .theme-modern .form-navigation:has(.btn-prev[style*="none"]) .btn-submit {
    grid-column: 1;
    min-width: 0;
  }

  .theme-modern .form-navigation .btn-next,
  .theme-modern .form-navigation .btn-submit {
    grid-column: 2;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .theme-modern .registration-header {
    padding: 1.25rem 1rem 1rem;
  }

  .theme-modern .header-logo {
    max-height: clamp(64px, 18vw, 88px);
  }

  .theme-modern .header-title {
    font-size: 1.375rem;
  }

  .theme-modern .event-name { font-size: 19px; }

  .theme-modern .form-section.active {
    padding: 20px 16px;
    border-radius: var(--theme-border-radius);
  }
}
