:root {
  --bg: #f4f0ff;
  --bg-soft: #fbf9ff;
  --surface: #ffffff;
  --surface-strong: #fbf7ff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #1f1740;
  --muted: #6f6790;
  --muted-strong: #544a7a;
  --border: #e5dbff;
  --border-strong: #d1c1ff;
  --primary: #6d28d9;
  --primary-2: #9f3df2;
  --accent: #ff4fb2;
  --accent-soft: #ffe3f4;
  --success: #18794e;
  --success-soft: #e8fff1;
  --danger: #d03f6c;
  --shadow-lg: 0 28px 70px rgba(81, 35, 157, 0.18);
  --shadow-md: 0 14px 32px rgba(91, 54, 161, 0.12);
  --shadow-sm: 0 6px 18px rgba(70, 44, 123, 0.08);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 0%, rgba(168, 85, 247, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(255, 79, 178, 0.18), transparent 22rem),
    linear-gradient(180deg, #f6f1ff 0%, #f8f5ff 40%, #f5f0ff 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
svg { fill: currentColor; }

.app-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.confirmation-topbar { justify-content: center; }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(70, 44, 123, 0.08);
}

.brand > img {
  display: block;
  width: 128px;
  height: auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  color: #fff;
  box-shadow: 0 14px 26px rgba(120, 42, 210, 0.28);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: lowercase;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.03em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(168, 133, 255, 0.25);
  border-radius: 999px;
  background: var(--surface-glass);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(126, 58, 193, 0.10);
}

.secure-pill svg,
.back-link svg,
.primary-button svg,
.info-row svg,
.trust-row svg,
.success-icon svg,
.booking-icon svg { width: 18px; height: 18px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(251,247,255,0.97));
  border: 1px solid rgba(214, 201, 255, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 26px 20px 22px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 188px;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 105, 190, 0.20), transparent 7rem),
    radial-gradient(circle at 18% 20%, rgba(147, 51, 234, 0.16), transparent 8rem),
    linear-gradient(180deg, rgba(132, 75, 255, 0.08), rgba(132, 75, 255, 0));
  pointer-events: none;
}

.hero-card > * { position: relative; z-index: 1; }

.hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.hero-copy { min-width: 0; }

.eyebrow-pill,
.step-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(209, 193, 255, 0.75);
  box-shadow: 0 4px 14px rgba(95, 58, 175, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-kicker { margin-bottom: 8px; }
.eyebrow-pill { margin-bottom: 10px; }

.hero-visual {
  position: relative;
  height: 154px;
  display: grid;
  place-items: center;
}

.hero-phone {
  position: relative;
  width: 106px;
  height: 144px;
  padding: 13px 10px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,240,255,0.95));
  box-shadow: 0 18px 34px rgba(100, 55, 187, 0.22);
}

.hero-phone::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 34px;
  height: 5px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(119, 95, 164, 0.35);
}

.hero-phone-header {
  height: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin-bottom: 8px;
}

.hero-phone-card {
  height: 24px;
  border-radius: 12px;
  background: rgba(116, 54, 206, 0.12);
  margin-top: 8px;
}

.hero-phone-card--large { height: 38px; }

.hero-bubble,
.hero-badge {
  position: absolute;
  border-radius: 999px;
}

.hero-bubble--a {
  width: 22px;
  height: 22px;
  top: 22px;
  left: 6px;
  background: rgba(255, 79, 178, 0.22);
}

.hero-bubble--b {
  width: 30px;
  height: 30px;
  right: 6px;
  bottom: 16px;
  background: rgba(126, 87, 255, 0.18);
}

.hero-badge {
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(118, 44, 198, 0.26);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px 0 26px;
}

.progress span {
  height: 7px;
  border-radius: 999px;
  background: #ece4ff;
}

.progress span.active {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.field-group { margin-top: 18px; }
.field-group:first-child { margin-top: 0; }

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--muted-strong);
}

.input,
select.input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  padding: 0 16px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 10px rgba(103, 59, 184, 0.03);
}

.input::placeholder { color: #9a8fb9; }

.input:focus,
select.input:focus {
  border-color: #a269ff;
  box-shadow: 0 0 0 4px rgba(132, 84, 255, 0.14), 0 10px 24px rgba(103, 59, 184, 0.08);
}

.input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(208, 63, 108, 0.09);
}

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 58px; }
.plate-wrap .input { padding-left: 60px; padding-right: 16px; }

.country-badge {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 34px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #1736b8, #1f4bf2);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.plate-input {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-meta {
  min-height: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 48px; }
.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 20px;
  height: 20px;
  color: var(--primary);
  transform: translateY(-50%);
  pointer-events: none;
}

.summary-card,
.booking-strip,
.ticket,
.notice-box {
  border-radius: 22px;
  border: 1px solid rgba(212, 196, 255, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,246,255,0.98));
  box-shadow: var(--shadow-sm);
}

.summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 18px 18px;
}

.summary-card span,
.booking-details small,
.ticket dt,
.ticket-reference span,
.ticket-head span:first-child {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
}

.summary-card strong,
.booking-strip strong { font-size: 24px; letter-spacing: -0.04em; }

.primary-button,
.secondary-button,
.button-link {
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 34px rgba(117, 45, 205, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-button:hover,
.primary-button:focus-visible { transform: translateY(-1px); box-shadow: 0 22px 38px rgba(117, 45, 205, 0.32); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { opacity: 0.7; cursor: wait; }

.primary-button svg,
.button-link svg { width: 18px; height: 18px; }

.info-row,
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.info-row span,
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(223, 213, 255, 0.85);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.booking-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  margin-bottom: 16px;
}

.booking-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.12), rgba(255, 79, 178, 0.12));
}

.booking-details span {
  display: block;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.booking-details small { margin-top: 4px; }

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card-brand {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  min-width: 48px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.10);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}


.payment-button {
  position: relative;
  overflow: hidden;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.payment-button.is-loading .spinner { display: inline-block; }
.payment-button.is-loading .button-arrow { display: none; }
.payment-button.is-loading .button-label { opacity: 0.96; }

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







.confirmation-card {
  text-align: center;
  padding-top: 30px;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 4px auto 18px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.12), rgba(255, 79, 178, 0.16));
  color: var(--primary);
  box-shadow: 0 14px 24px rgba(106, 56, 173, 0.14);
}

.ticket {
  text-align: left;
  margin-top: 8px;
  padding: 18px 18px;
}

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ticket-plate {
  margin: 14px 0 16px;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.ticket-grid dt { margin: 0; }
.ticket-grid dd {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.ticket-reference {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
}

.ticket-reference code {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.button-link { margin-top: 20px; }

.footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 10px 4px;
  color: var(--muted);
  font-size: 12px;
}

.footer a {
  text-decoration: none;
  color: var(--muted);
}

.footer-dot { opacity: 0.55; }

@media (max-width: 560px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-self: center;
    width: 100%;
    max-width: 180px;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .hero-card { padding: 22px 16px 18px; border-radius: 26px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .confirmation-topbar { align-items: center; }
  .field-row,
  .ticket-grid { grid-template-columns: 1fr; }
  .summary-card,
  .booking-strip,
  .ticket { border-radius: 20px; }
  .summary-card strong,
  .booking-strip strong { font-size: 22px; }
}

/* Benutzerkonto */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.account-login-button,
.account-logout-button,
.profile-account-link,
.account-link-button {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.account-login-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(117, 45, 205, 0.20);
}

.account-logged-in {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-logged-in[hidden] { display: none; }

.account-state {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(24, 121, 78, 0.18);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
}

.account-logout-button,
.account-link-button {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.profile-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(214, 201, 255, 0.9);
  border-radius: 22px;
  background: rgba(255,255,255,0.90);
  box-shadow: var(--shadow-md);
}

.profile-card[hidden] { display: none; }

.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-card h2,
.account-existing h2 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.profile-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.profile-account-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(244, 240, 255, 0.66);
}

.profile-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-grid dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.auth-card { padding-top: 28px; }

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 22px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(109, 40, 217, 0.07);
}

.auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}

.auth-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-message {
  min-height: 22px;
  margin: 12px 2px 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.auth-message.is-success { color: var(--success); }

.account-existing {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.74);
  text-align: center;
}

.account-existing[hidden] { display: none; }
.account-existing p { margin: 7px 0 0; color: var(--muted); }
.account-existing .secondary-button { color: var(--primary); background: rgba(109,40,217,0.08); }
.account-existing .account-link-button { margin-top: 10px; }

@media (max-width: 480px) {
  .topbar-actions { width: 100%; justify-content: space-between; }
  .topbar-actions .secure-pill { flex: 0 0 auto; }
  .account-logged-in { margin-left: auto; }
  .profile-grid { grid-template-columns: 1fr; }
}
