/*
 * ZFrame — Split auth pages (Sign In / Sign Out)
 */

body.body--auth .top-nav,
body.body--auth .mobile-menu {
  display: none;
}

body.body--auth .main {
  max-width: none;
  padding: 0;
  min-height: 100vh;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Form panel ── */
.auth-split-form {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(28px, 6vw, 80px);
  background: var(--base-mid);
  border-right: 1px solid var(--panel-border);
}

.auth-brand {
  position: absolute;
  top: 36px;
  left: clamp(28px, 6vw, 80px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  text-decoration: none;
}

.auth-brand span {
  font-weight: 300;
  color: var(--slate-warm);
  margin-left: 4px;
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-heading {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.15;
}

.auth-subheading {
  font-size: 14px;
  color: var(--slate-warm);
  margin: 0 0 36px;
  line-height: 1.6;
}

.auth-form {
  text-align: left;
}

.auth-field {
  margin-bottom: 20px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ivory-muted);
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--graphite-soft);
  background: var(--base-deep);
  color: var(--ivory);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s var(--silk-ease), box-shadow 0.3s var(--silk-ease);
}

.auth-input::placeholder {
  color: var(--slate-warm);
}

.auth-input:focus {
  outline: none;
  border-color: var(--silver);
  box-shadow: 0 0 0 3px rgba(176, 184, 196, 0.12);
}

.auth-input.input-validation-error {
  border-color: rgba(239, 68, 68, 0.55);
}

.auth-field-error {
  display: block;
  font-size: 12px;
  color: #fca5a5;
  margin-top: 6px;
}

.auth-validation {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-size: 13px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--slate-warm);
  cursor: pointer;
  margin: 0;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--silver);
  cursor: pointer;
}

.auth-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--silver);
  text-decoration: none;
  transition: color 0.3s var(--silk-ease);
}

.auth-link:hover {
  color: var(--ivory);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  padding: 15px 28px;
  font-size: 11px;
}

.auth-submit--outline {
  background: transparent;
  color: var(--ivory-muted);
  border: 1px solid var(--graphite-soft);
  margin-top: 12px;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.auth-submit--outline:hover {
  color: var(--ivory);
  border-color: var(--slate-warm);
  box-shadow: none;
  transform: none;
}

.auth-submit--danger {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  color: #fecaca;
}

.auth-submit--danger:hover {
  box-shadow: 0 6px 30px rgba(153, 27, 27, 0.35);
}

.auth-footer {
  margin-top: 32px;
  font-size: 13px;
  color: var(--slate-warm);
  text-align: center;
}

.auth-footer a {
  color: var(--silver);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--ivory);
}

.auth-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 28px;
  border-radius: 100px;
  background: var(--base-deep);
  border: 1px solid var(--graphite-soft);
  font-size: 13px;
  color: var(--ivory-muted);
}

.auth-user-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

/* ── Visual panel ── */
.auth-split-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 30% 20%, rgba(176, 184, 196, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 80% 75%, rgba(124, 58, 237, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 40% 35% at 60% 40%, rgba(0, 255, 200, 0.06) 0%, transparent 45%),
    linear-gradient(160deg, #1a1f28 0%, #141820 45%, #10141c 100%);
}

.auth-visual-inner {
  position: relative;
  width: min(420px, 85%);
  aspect-ratio: 1;
}

.auth-visual-svg {
  width: 100%;
  height: 100%;
}

.auth-visual-caption {
  position: absolute;
  bottom: clamp(28px, 5vw, 48px);
  left: clamp(28px, 5vw, 48px);
  right: clamp(28px, 5vw, 48px);
  max-width: 320px;
}

.auth-visual-caption h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ivory);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.auth-visual-caption p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--slate-light);
  margin: 0;
}

/* Sign-out variant tweaks */
.auth-split--out .auth-split-visual {
  background:
    radial-gradient(ellipse 60% 50% at 70% 25%, rgba(176, 184, 196, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 25% 80%, rgba(239, 68, 68, 0.08) 0%, transparent 50%),
    linear-gradient(160deg, #181c24 0%, #12161e 50%, #0f1218 100%);
}

.auth-terms {
  margin-bottom: 0;
  align-items: flex-start;
  line-height: 1.5;
}

.auth-terms .auth-link {
  font-size: inherit;
}

.auth-terms-row {
  margin-bottom: 28px;
}

.auth-terms-row .auth-field-error {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-split-form {
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
    padding-top: 88px;
    padding-bottom: 48px;
    min-height: auto;
  }

  .auth-brand {
    top: 28px;
    left: 28px;
  }

  .auth-split-visual {
    min-height: 280px;
    order: -1;
  }

  .auth-visual-caption {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-split-form {
    padding: 80px 24px 40px;
  }

  .auth-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
