:root {
  --auth-bg: #071226;
  --auth-bg-alt: #0a1830;
  --auth-panel: rgba(9, 21, 49, 0.94);
  --auth-panel-strong: rgba(11, 26, 59, 0.98);
  --auth-surface: rgba(255, 255, 255, 0.05);
  --auth-surface-strong: rgba(255, 255, 255, 0.08);
  --auth-border: rgba(255, 255, 255, 0.11);
  --auth-border-strong: rgba(255, 255, 255, 0.18);
  --auth-text: #f8fbff;
  --auth-muted: rgba(222, 232, 255, 0.74);
  --auth-accent: #ffb23f;
  --auth-accent-strong: #ff8c42;
  --auth-success: #10b981;
  --auth-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body[data-auth-variant] {
  margin: 0;
  min-height: 100vh;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 178, 63, 0.1), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(65, 129, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #071226 0%, #091734 54%, #0b1c40 100%);
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
}

body[data-auth-variant="signup"] {
  background:
    radial-gradient(circle at 14% 10%, rgba(16, 185, 129, 0.12), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(255, 178, 63, 0.14), transparent 28%),
    linear-gradient(180deg, #071226 0%, #0a1830 52%, #0b2141 100%);
}

.auth-entry-shell {
  width: min(1280px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(460px, 1.26fr);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--auth-shadow);
  background:
    linear-gradient(155deg, rgba(11, 24, 56, 0.96), rgba(7, 18, 43, 0.98)),
    radial-gradient(circle at top right, rgba(255, 178, 63, 0.08), transparent 30%);
}

body[data-auth-variant="signup"] .auth-entry-shell {
  grid-template-columns: minmax(300px, 0.72fr) minmax(460px, 1.28fr);
}

.auth-entry-showcase,
.auth-entry-panel {
  position: relative;
}

.auth-entry-showcase {
  padding: 24px 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 14%);
}

.auth-entry-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
  pointer-events: none;
}

body[data-auth-variant="signup"] .auth-entry-showcase {
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.06), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 14%);
}

.auth-entry-panel {
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(6, 16, 38, 0.96), rgba(8, 20, 45, 0.96)),
    radial-gradient(circle at top left, rgba(70, 136, 255, 0.1), transparent 20%);
}

.auth-entry-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-panel-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-entry-home,
.auth-entry-wordmark,
.auth-panel-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.auth-entry-home {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-entry-wordmark,
.auth-panel-brand {
  justify-content: center;
}

.auth-entry-wordmark img,
.auth-panel-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.auth-showcase-copy,
.auth-showcase-grid,
.auth-mobile-ribbon {
  position: relative;
  z-index: 1;
}

.auth-showcase-copy {
  max-width: 420px;
}

.auth-showcase-kicker {
  color: var(--auth-accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  font-weight: 800;
}

.auth-showcase-copy h1 {
  margin: 14px 0 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 8ch;
}

body[data-auth-variant="signup"] .auth-showcase-copy h1 {
  max-width: 8ch;
}

.auth-showcase-copy p {
  margin: 14px 0 0;
  color: var(--auth-muted);
  line-height: 1.68;
  font-size: 14px;
  max-width: 40ch;
}

.auth-showcase-grid {
  display: grid;
  gap: 14px;
}

.auth-showcase-row {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 14px;
}

body[data-auth-variant="signup"] .auth-showcase-grid {
  gap: 0;
  grid-template-columns: 1fr;
}

body[data-auth-variant="signup"] .auth-showcase-row {
  grid-template-columns: 1fr;
  gap: 14px;
}

.auth-showcase-card,
.auth-mobile-ribbon-card,
.auth-panel-side,
.auth-panel-side-item,
.auth-panel-footnote,
.auth-showcase-note,
.auth-inline-point {
  border: 1px solid var(--auth-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.auth-showcase-note {
  margin-top: auto;
  padding: 16px;
  border-radius: 14px;
  max-width: 420px;
}

.auth-showcase-note p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 800;
  color: rgba(232, 241, 255, 0.52);
}

.auth-showcase-note strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.12;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.auth-showcase-note span {
  display: block;
  margin-top: 10px;
  color: rgba(232, 241, 255, 0.76);
  line-height: 1.6;
  font-size: 13px;
}

.auth-showcase-card {
  padding: 20px;
  border-radius: 16px;
  min-height: 172px;
}

.auth-showcase-card.featured {
  background:
    linear-gradient(160deg, rgba(255, 178, 63, 0.14), rgba(255, 140, 66, 0.04)),
    rgba(255,255,255,0.05);
}

body[data-auth-variant="signup"] .auth-showcase-card.featured {
  background:
    linear-gradient(160deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.06)),
    rgba(255,255,255,0.05);
}

body[data-auth-variant="signup"] .auth-showcase-card {
  min-height: 0;
}

.auth-showcase-card p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 800;
  color: rgba(232, 241, 255, 0.52);
}

.auth-showcase-card strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.08;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.auth-showcase-card span {
  display: block;
  margin-top: 10px;
  color: rgba(232, 241, 255, 0.76);
  line-height: 1.7;
  font-size: 14px;
}

.auth-showcase-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.auth-showcase-badges span {
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.05);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e3edff;
}

.auth-mobile-ribbon {
  display: none;
}

.auth-panel-card {
  margin-top: 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(16, 34, 77, 0.92), rgba(8, 20, 46, 0.97));
  padding: 28px;
  box-shadow: 0 22px 44px rgba(0,0,0,0.24);
}

.auth-panel-card h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.auth-panel-subtitle {
  margin-top: 10px;
  color: var(--auth-muted);
  line-height: 1.7;
  font-size: 15px;
  max-width: 54ch;
}

.auth-panel-card-login .auth-panel-subtitle {
  max-width: 44ch;
}

.auth-invite-banner {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 178, 63, 0.26);
  background: linear-gradient(180deg, rgba(255, 178, 63, 0.12), rgba(255, 178, 63, 0.06));
  color: #fff4dc;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.auth-invite-banner i {
  color: var(--auth-accent);
}

.auth-inline-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.auth-inline-point {
  padding: 14px;
  border-radius: 12px;
}

.auth-inline-point strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.auth-inline-point span {
  display: block;
  margin-top: 6px;
  color: rgba(232, 241, 255, 0.76);
  line-height: 1.5;
  font-size: 13px;
}

.message {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-top: 18px;
  display: none;
}

.message.show {
  display: block;
}

.message.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

.message.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #bbf7d0;
}

.google-btn,
.submit-btn {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.google-btn {
  margin-top: 22px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(255,255,255,0.22);
  color: #12203e;
}

.submit-btn {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-strong) 100%);
  border: 1px solid transparent;
  color: #071226;
  box-shadow: 0 16px 28px rgba(255, 140, 66, 0.2);
}

.google-btn:hover,
.submit-btn:hover {
  transform: translateY(-1px);
}

.google-btn:disabled,
.submit-btn:disabled {
  opacity: 0.76;
  cursor: not-allowed;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 18px;
  color: rgba(229, 238, 255, 0.56);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.divider span {
  padding: 0 14px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  position: relative;
}

.input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(224, 234, 255, 0.56);
  transition: color 0.2s ease;
}

.input-group input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px 0 50px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(4, 12, 31, 0.38);
  color: var(--auth-text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.input-group input:focus {
  border-color: rgba(255, 178, 63, 0.78);
  box-shadow: 0 0 0 4px rgba(255, 178, 63, 0.1);
  background: rgba(4, 12, 31, 0.56);
}

.input-group:focus-within i {
  color: var(--auth-accent);
}

.actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.actions-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-muted);
}

.actions-row input[type="checkbox"] {
  accent-color: var(--auth-accent);
}

.actions-row a,
.alt-link a,
.legal-strip a {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 700;
}

.alt-link {
  margin-top: 20px;
  color: var(--auth-muted);
  font-size: 14px;
  text-align: center;
}

.legal-strip {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(224, 234, 255, 0.58);
}

.auth-panel-footnote {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  color: rgba(225, 236, 255, 0.76);
  font-size: 13px;
  line-height: 1.6;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: authSpin 1s linear infinite;
}

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

@media (max-width: 1080px) {
  .auth-entry-shell,
  body[data-auth-variant="signup"] .auth-entry-shell {
    grid-template-columns: 1fr;
  }

  .auth-entry-showcase {
    padding: 22px 22px 20px;
    gap: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .auth-entry-panel {
    padding: 22px;
  }

  .auth-showcase-copy h1 {
    max-width: none;
    font-size: clamp(36px, 8vw, 58px);
  }

  .auth-showcase-grid {
    display: none;
  }

  .auth-showcase-note {
    margin-top: 0;
    max-width: none;
  }

  .auth-panel-card,
  .auth-panel-card-login,
  .auth-panel-card-signup {
    margin-top: 18px;
    padding: 22px 18px 18px;
    border-radius: 16px;
  }

  .auth-inline-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-entry-shell {
    width: calc(100% - 14px);
    min-height: calc(100vh - 14px);
    margin: 7px auto;
    border-radius: 18px;
  }

  .auth-entry-showcase {
    display: none;
  }

  .auth-panel-topbar {
    display: flex;
  }

  .auth-entry-showcase {
    padding: 16px 16px 14px;
  }

  .auth-entry-showcase::before {
    background-size: 28px 28px;
  }

  .auth-entry-panel {
    padding: 16px;
  }

  .auth-entry-topbar {
    align-items: flex-start;
  }

  .auth-entry-home {
    min-height: 38px;
    padding: 0 12px;
    font-size: 11px;
  }

  .auth-entry-wordmark,
  .auth-panel-brand {
    justify-content: center;
  }

  .auth-entry-wordmark img,
  .auth-panel-brand img {
    width: 40px;
    height: 40px;
  }

  .auth-showcase-copy h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .auth-showcase-copy p,
  .auth-panel-subtitle,
  .auth-panel-side span {
    font-size: 14px;
    line-height: 1.6;
  }

  .auth-panel-card h2 {
    font-size: 28px;
  }

  .input-group input,
  .google-btn,
  .submit-btn {
    min-height: 52px;
  }

  .actions-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-strip {
    justify-content: flex-start;
  }
}
