/* auth.css — login & signup forms.
   Inherits glass.css for the gradient background; adds a centered glass card. */

.auth-stage {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--pad);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-stroke);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
          backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  color: var(--ink);
}
.auth-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,
    rgba(255,255,255,.42) 0%,
    rgba(255,255,255,0) 45%);
  pointer-events: none;
}

.auth-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  color: var(--ink);
}
.auth-mark .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A3D, #FF3D7F);
  box-shadow: 0 0 0 2px rgba(255,255,255,.4),
              0 0 16px 2px rgba(255, 100, 150, .5);
}
.auth-mark .muted { opacity: .55; font-weight: 500; }

.auth-h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.auth-sub {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

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

.auth-row { display: flex; flex-direction: column; gap: 6px; }
.auth-lbl {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-prefix {
  position: absolute;
  left: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-faint);
  pointer-events: none;
}
.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: .5px solid rgba(0,0,0,.1);
  background: rgba(255,255,255,.6);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.auth-input:focus {
  border-color: rgba(28,8,40,.5);
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px rgba(28,8,40,.06);
}
.auth-input.has-prefix { padding-left: 30px; }

/* Segmented account-type toggle (creator / buyer) */
.auth-segmented {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(0,0,0,.06); border-radius: 14px;
  margin-bottom: 4px;
}
.auth-seg {
  flex: 1; height: 38px; border: 0; border-radius: 11px;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  color: var(--ink); background: transparent;
  transition: background .15s, color .15s, box-shadow .15s;
}
.auth-seg.active {
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 12px -6px rgba(28,8,40,.4), inset 0 1px 0 rgba(255,255,255,.9);
}

.auth-hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.auth-error {
  background: rgba(255, 75, 90, .15);
  border: .5px solid rgba(180, 30, 50, .35);
  color: #6f0a18;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  display: none;
}
.auth-error.visible { display: block; }

.auth-btn {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .005em;
  cursor: pointer;
  background: linear-gradient(180deg, #1c0828 0%, #2a0d3a 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 8px 22px -8px rgba(28,8,40,.5);
  transition: transform .12s, box-shadow .15s, opacity .15s;
}
.auth-btn:hover { transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.auth-foot a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1.5px solid rgba(28,8,40,.18);
}
.auth-foot a:hover { border-bottom-color: var(--ink); }

.auth-back {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  border: .5px solid var(--glass-stroke);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
  z-index: 5;
}
.auth-back:hover { background: var(--glass-bg-strong); }

/* ── Consent block (signup CGV + marketing opt-in) ── */
.auth-consent {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 4px;
}
.auth-consent-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.auth-consent-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 1px 0 0;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid rgba(28,8,40,.3);
  background: rgba(255,255,255,.7);
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
  transition: border-color .15s, background .15s;
}
.auth-consent-row input[type="checkbox"]:hover {
  border-color: rgba(28,8,40,.55);
}
.auth-consent-row input[type="checkbox"]:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.auth-consent-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-consent-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(28,8,40,.4);
  outline-offset: 2px;
}
.auth-consent-row a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid rgba(28,8,40,.25);
}
.auth-consent-row a:hover { border-bottom-color: var(--ink); }
.auth-consent-req,
.auth-consent-opt {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.auth-consent-req {
  background: rgba(180, 30, 50, .12);
  color: #8a1726;
}
.auth-consent-opt {
  background: rgba(28, 8, 40, .08);
  color: var(--ink-soft);
}
