:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: rgba(16, 27, 45, 0.82);
  --text: #e5edf7;
  --muted: #a2b2c6;
  --line: rgba(255, 255, 255, 0.16);
  --primary: #3b82f6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(800px 360px at 20% 0%, #2b4f83 0%, transparent 70%),
    radial-gradient(900px 420px at 100% 100%, #1e3f5f 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.topbar {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 36px;
  width: 36px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  padding: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lang-btn {
  border: 0;
  min-width: 48px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #b7c7db;
  background: transparent;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.88);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
}

.wrap {
  min-height: calc(100vh - 68px);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 18px 36px;
  display: grid;
  place-items: center;
}

.card {
  width: min(980px, 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(8px);
  padding: 28px 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  align-items: center;
}

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

.hero-media {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9db5d6;
}

.hero-logo {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  background: transparent;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.text {
  margin: 0 0 18px;
  line-height: 1.6;
  color: var(--muted);
}

.quick-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: #bfd2ea;
  background: rgba(255, 255, 255, 0.04);
}

.pill.ok {
  color: #c8f6dc;
  border-color: rgba(80, 220, 140, 0.6);
  background: rgba(24, 92, 56, 0.35);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta {
  margin: 18px 0 0;
  font-size: 13px;
  color: #93a9c3;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn.primary {
  border-color: transparent;
  background: var(--primary);
  color: #fff;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.auth-preferences {
  display: grid;
  gap: 6px;
  margin: 4px 0 2px;
}

.pref-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.pref-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.ghost-entry {
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
  background: #eff6ff !important;
}

.auth-error {
  margin: 2px 0 0;
  color: #b91c1c;
  font-size: 13px;
}

.help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.legal-links {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: #b9c7db;
}

.legal-links a,
.help a {
  color: #dbeafe;
  text-decoration: none;
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #1e293b;
}

.consent-line.optional {
  color: #334155;
}

.consent-line input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.consent-line span {
  line-height: 1.45;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-box {
  width: min(460px, 100%);
  background: #fff;
  color: #0f172a;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.35);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.icon-btn {
  border: 0;
  background: #eef2f7;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
}

.form {
  display: grid;
  gap: 8px;
}

input {
  width: 100%;
  border: 1px solid #d6deea;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #d6deea;
  background: #fff;
  color: #334155;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.pw-strength {
  display: grid;
  gap: 6px;
}

.pw-strength-bar {
  height: 8px;
  width: 100%;
  background: #e5ebf4;
  border-radius: 999px;
  overflow: hidden;
}

.pw-strength-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: #ef4444;
  transition: width 180ms ease, background-color 180ms ease;
}

.pw-strength-text {
  font-size: 12px;
  color: #475569;
}

.modal .actions {
  margin-top: 10px;
}

.modal .btn {
  color: #0f172a;
  border-color: #d6deea;
  background: #fff;
}

.modal .btn.primary {
  color: #fff;
  border-color: #3b82f6;
  background: #3b82f6;
}

.hidden { display: none !important; }

@media (max-width: 720px) {
  .topbar {
    padding-top: 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .card {
    padding: 18px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero-logo {
    max-height: 240px;
  }
  .hero-media {
    min-height: 160px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .lang-switcher {
    align-self: flex-start;
  }
}
