/* ============================================================
   PaCIM Partnerprogramm – Reisebüro-Registrierung
   Baut auf den Variablen aus login.css auf (gleiche Theme-Tokens).
   ============================================================ */

body.preg-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--body-bg);
  background-image:
    radial-gradient(1100px circle at 100% -10%, var(--primary-lt), transparent 45%),
    radial-gradient(800px circle at -10% 110%, var(--primary-lt), transparent 42%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.preg-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.preg-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15,23,42,0.14), 0 0 0 1px rgba(4,32,69,0.02);
  overflow: hidden;
}

/* ---------------- Hero / Marketing ---------------- */
.preg-hero {
  position: relative;
  color: #eaf2fb;
  background: linear-gradient(155deg, var(--primary) 0%, var(--primary-dk) 78%);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.preg-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px circle at 110% -5%, rgba(255,255,255,0.16), transparent 60%),
    radial-gradient(360px circle at -15% 105%, rgba(255,255,255,0.10), transparent 60%);
  pointer-events: none;
}
.preg-hero > * { position: relative; z-index: 1; }

.preg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}
.preg-logo {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.preg-brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; color: #fff; }
.preg-brand-name small { font-weight: 400; opacity: 0.7; margin-left: 2px; }

.preg-hero h1 {
  font-size: 25px;
  line-height: 1.22;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -0.3px;
}
.preg-hero .preg-lead {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(234,242,251,0.82);
  margin: 0 0 28px;
}

.preg-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.preg-benefits li { display: flex; gap: 12px; align-items: flex-start; }
.preg-benefits .ic {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
}
.preg-benefits .ic .material-icons { font-size: 19px; color: #fff; }
.preg-benefits .bt { font-size: 14px; font-weight: 600; color: #fff; }
.preg-benefits .bd { font-size: 12.5px; line-height: 1.5; color: rgba(234,242,251,0.72); }

.preg-hero-foot {
  margin-top: auto;
  padding-top: 28px;
  font-size: 12px;
  color: rgba(234,242,251,0.6);
}
.preg-hero-foot a { color: #fff; text-decoration: underline; }

/* ---------------- Formular ---------------- */
.preg-form-wrap { padding: 40px 38px; }
.preg-form-head h2 {
  font-size: 21px; font-weight: 600; margin: 0 0 4px; color: var(--text);
  letter-spacing: -0.2px;
}
.preg-form-head p { font-size: 13px; color: var(--text-secondary); margin: 0 0 22px; }

.preg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 14px;
}
.preg-field { margin: 0; }
.preg-field.col-2 { grid-column: 1 / -1; }
.preg-field label {
  display: block;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.preg-field label .req { color: var(--red); margin-left: 2px; }
.preg-field input {
  width: 100%; height: 42px;
  padding: 0 12px;
  font: inherit; font-size: 14px;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.preg-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}
.preg-field input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-lt); }
.preg-field .hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.preg-genpw {
  background: none; border: none; padding: 0;
  font: inherit; font-size: 11.5px;
  color: var(--primary); cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
  text-decoration: none;
}
.preg-genpw:hover { text-decoration: underline; }
.preg-genpw .material-icons { font-size: 14px; }

/* Honeypot */
.preg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pw-Toggle */
.preg-pw { position: relative; }
.preg-pw input { padding-right: 42px; }
.preg-pw .toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--text-muted); line-height: 0;
}
.preg-pw .toggle .material-icons { font-size: 19px; }

/* Consent */
.preg-consent {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}
.preg-consent input { width: 17px; height: 17px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--primary); }
.preg-consent a { color: var(--primary); text-decoration: underline; }

/* Alert / Status */
.preg-alert {
  display: none;
  align-items: center; gap: 8px;
  border-radius: var(--radius);
  padding: 11px 13px;
  font-size: 13px;
  margin-bottom: 18px;
}
.preg-alert.show { display: flex; }
.preg-alert.err { background: var(--red-lt); color: var(--red); border: 1px solid rgba(214,57,57,0.25); }
.preg-alert .material-icons { font-size: 18px; }

/* Button */
.preg-btn {
  grid-column: 1 / -1;
  width: 100%; height: 46px;
  margin-top: 8px;
  border: none; border-radius: var(--radius);
  background: var(--primary); color: #fff;
  font: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 150ms, transform 80ms;
}
.preg-btn:hover { background: var(--primary-dk); }
.preg-btn:active { transform: translateY(1px); }
.preg-btn:disabled { opacity: 0.65; cursor: default; }
.preg-btn .spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: preg-spin 0.7s linear infinite; display: none;
}
.preg-btn.loading .spin { display: inline-block; }
@keyframes preg-spin { to { transform: rotate(360deg); } }

.preg-foot {
  text-align: center;
  font-size: 12.5px; color: var(--text-secondary);
  margin-top: 18px;
}
.preg-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }
.preg-foot a:hover { text-decoration: underline; }

/* ---------------- Erfolgs-Zustand ---------------- */
.preg-success { display: none; text-align: center; padding: 18px 6px 6px; }
.preg-success.show { display: block; }
.preg-success .badge-ok {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(40,167,69,0.12); color: #2e9e4f;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.preg-success .badge-ok .material-icons { font-size: 36px; }
.preg-success h2 { font-size: 20px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.preg-success p { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin: 0 auto 22px; max-width: 380px; }

/* ---------------- Teilnahmebedingungen – Modal ---------------- */
.pt-modal { position: fixed; inset: 0; z-index: 1080; display: none; }
.pt-modal.open { display: block; }
.pt-modal-backdrop { position: absolute; inset: 0; background: rgba(8,18,33,0.55); backdrop-filter: blur(2px); }
.pt-modal-dialog {
  position: relative;
  max-width: 720px;
  margin: 5vh auto;
  max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(8,18,33,0.45);
  overflow: hidden;
  animation: pt-pop 160ms ease-out;
}
@keyframes pt-pop { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pt-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
}
.pt-modal-head h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); }
.pt-modal-x { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; line-height: 0; border-radius: 6px; }
.pt-modal-x:hover { background: var(--primary-lt); color: var(--text); }
.pt-modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.65;
}
.pt-modal-body .pt-h { font-size: 14.5px; font-weight: 600; color: var(--text); margin: 18px 0 6px; }
.pt-modal-body .pt-h:first-child { margin-top: 0; }
.pt-modal-body p { margin: 0 0 10px; }
.pt-modal-body .pt-list { margin: 0 0 10px; padding-left: 20px; }
.pt-modal-body .pt-list li { margin-bottom: 4px; }
.pt-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
}
.pt-btn-pdf {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  color: var(--primary);
}
.pt-btn-pdf:hover { text-decoration: underline; }
.pt-btn-pdf .material-icons { font-size: 18px; }
.pt-btn-close {
  border: 1px solid var(--border-color); background: var(--bg-surface);
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 8px 18px; border-radius: var(--radius); cursor: pointer;
}
.pt-btn-close:hover { background: var(--primary-lt); }
body.pt-noscroll { overflow: hidden; }

/* ---------------- Responsive ---------------- */
@media (max-width: 800px) {
  .preg-shell { grid-template-columns: 1fr; max-width: 480px; }
  .preg-hero { padding: 30px 28px; }
  .preg-hero .preg-benefits { display: none; }
  .preg-hero h1 { font-size: 21px; margin-bottom: 8px; }
  .preg-hero .preg-lead { margin-bottom: 0; }
  .preg-hero-foot { display: none; }
  .preg-form-wrap { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .preg-grid { grid-template-columns: 1fr; }
}
