:root {
  color-scheme: light;
  --bg: #f3f1ef;
  --bg-overlay: rgba(255, 255, 255, 0.5);
  --card: rgba(183, 34, 34, 0.92);
  --card-border: rgba(255, 255, 255, 0.28);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.88);
  --body-text: #1d1d1f;
  --input-bg: rgba(84, 151, 255, 0.92);
  --input-border: rgba(255,255,255,0.36);
  --button-red: #c43838;
  --button-green: #25a244;
  --button-red-text: #ffffff;
  --button-green-text: #ffffff;
  --surface: #ffffff;
  --surface-text: #1c1f24;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #140f10;
  --bg-overlay: rgba(10, 10, 12, 0.55);
  --card: rgba(167, 39, 39, 0.9);
  --card-border: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.82);
  --body-text: #f1f4f8;
  --input-bg: rgba(84, 151, 255, 0.9);
  --input-border: rgba(255,255,255,0.25);
  --surface: #1e232c;
  --surface-text: #eff4fb;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--body-text);
  background: linear-gradient(180deg, var(--bg-overlay), var(--bg-overlay)), url("img/bg.png") center center / cover no-repeat fixed, var(--bg);
}
a { color: inherit; }
button, input, select { font: inherit; }
.hidden { display: none !important; }
.landing-page, .legal-page-wrap, .dashboard-page { min-height: calc(100vh - 110px); display: grid; place-items: center; padding: 32px 16px; }
.theme-toggle { position: fixed; top: 18px; left: 18px; z-index: 20; display: inline-flex; gap: 10px; align-items: center; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.18); color: #fff; border-radius: 999px; padding: 10px 14px; backdrop-filter: blur(8px); cursor: pointer; }
.welcome-card, .legal-page-card, .modal__dialog, .dashboard-shell { width: min(100%, 980px); border-radius: 26px; box-shadow: var(--shadow); }
.welcome-card { max-width: 620px; background: var(--card); border: 1px solid var(--card-border); color: var(--text); padding: 28px 24px; text-align: center; backdrop-filter: blur(10px); }
.welcome-card__eyebrow { margin: 0 0 14px; font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 700; }
.welcome-card__logo { width: min(220px, 55vw); max-width: 100%; height: auto; display: block; margin: 0 auto 16px; }
.welcome-card__headline { margin: 0 0 20px; font-size: clamp(1rem, 2vw, 1.3rem); }
.welcome-card__text { text-align: left; color: var(--muted); line-height: 1.6; display: grid; gap: 10px; margin-bottom: 22px; }
.entry-form, .auth-form { display: grid; gap: 14px; }
.consent-row { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--input-bg); border: 1px solid var(--input-border); color: #000000; }
.consent-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: #ffffff; flex: 0 0 auto; }
.inline-link, .text-link { border: 0; background: transparent; padding: 0; text-decoration: underline; cursor: pointer; }
.inline-link--dark, .text-link--dark { color: #000000; }
.entry-buttons { display: grid; gap: 12px; margin-top: 4px; }
.action-btn, .secondary-btn, .dashboard-nav__link { border: 0; border-radius: 16px; padding: 14px 16px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; }
.action-btn--locked { background: var(--button-red); color: var(--button-red-text); cursor: not-allowed; opacity: 0.9; }
.action-btn--ready { background: var(--button-green); color: var(--button-green-text); }
.action-btn:disabled { opacity: 1; }
.site-footer { padding: 12px 16px 24px; text-align: center; color: #ffffff; }
.footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a, .footer-copy a { text-decoration: underline; }
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(0, 0, 0, 0.55); z-index: 30; }
.modal.is-open { display: flex; }
.modal__dialog { background: var(--surface); color: var(--surface-text); padding: 20px; max-height: min(88vh, 900px); overflow: auto; }
.modal__dialog--iframe { width: min(100%, 860px); }
.modal__header h2 { margin: 0 0 14px; }
.modal__footer { margin-top: 18px; display: flex; }
.modal__footer--left { justify-content: flex-start; }
.modal__footer--embedded { margin-top: 16px; }
.modal iframe { width: 100%; height: min(65vh, 680px); border: 1px solid rgba(0,0,0,0.14); border-radius: 16px; background: #fff; }
.secondary-btn { background: #d7dbe2; color: #1b1e24; }
.auth-form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-form label { display: grid; gap: 6px; }
.auth-form input, .auth-form select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.15); background: rgba(0,0,0,0.03); color: inherit; }
.auth-form__full { grid-column: 1 / -1; }
.auth-feedback { min-height: 24px; margin: 14px 0 0; }
.legal-page-card, .dashboard-shell { background: rgba(255,255,255,0.92); color: #1c1f24; padding: 26px 22px; }
body[data-theme="dark"] .legal-page-card, body[data-theme="dark"] .dashboard-shell { background: rgba(30,35,44,0.96); color: #eff4fb; }
.legal-content { line-height: 1.65; }
.legal-bottom-left { margin-top: 24px; display: flex; justify-content: flex-start; }
.dashboard-shell { display: grid; gap: 18px; }
.dashboard-hero { display: flex; justify-content: space-between; gap: 20px; }
.dashboard-hero h1 { margin: 0 0 8px; }
.dashboard-hero__eyebrow { margin: 0 0 8px; font-weight: 700; opacity: .72; }
.dashboard-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.dashboard-nav__link { background: rgba(0,0,0,0.08); color: inherit; }
.dashboard-nav__link.is-active { background: var(--button-green); color: #fff; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dashboard-card { display: grid; gap: 8px; background: rgba(0,0,0,0.05); color: inherit; padding: 20px; border-radius: 20px; text-decoration: none; }
.dashboard-card--form { grid-column: 1 / -1; }
.status-box { padding: 14px 16px; border-radius: 14px; margin: 0; }
.status-box--success { background: rgba(37,162,68,0.15); }
.status-box--error { background: rgba(196,56,56,0.15); }
.profile-photo-block { display: grid; gap: 12px; }
.profile-photo-preview { width: 160px; height: 160px; object-fit: cover; border-radius: 20px; border: 1px solid rgba(0,0,0,0.14); }
@media (max-width: 640px) {
  .welcome-card { padding: 22px 16px; }
  .consent-row { align-items: flex-start; }
  .auth-form--grid, .dashboard-grid { grid-template-columns: 1fr; }
  .theme-toggle { top: 12px; left: 12px; }
}
