/* Auth page shared layout */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-aside {
  background: linear-gradient(180deg, var(--bg-elev-1), var(--bg));
  border-right: 1px solid var(--border);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, var(--accent-glow), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(34, 211, 238, 0.08), transparent 50%);
  pointer-events: none;
}
.auth-aside-content { position: relative; z-index: 1; }
.auth-aside .brand { font-size: 1.25rem; margin-bottom: 4rem; display: inline-block; }
.auth-aside h1 {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.auth-aside p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 420px;
  line-height: 1.6;
}
.auth-aside-foot {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.auth-main {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form {
  width: 100%;
  max-width: 400px;
}
.auth-form h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.auth-form .lead {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}
.field {
  margin-bottom: 1.25rem;
}
.field label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev-2);
}
.field input::placeholder { color: var(--text-faint); }
.field-help {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.375rem;
}
.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 0.375rem;
}
.field-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.field-row label { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.field-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}
.checkbox-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 2px 0 0 0;
  flex-shrink: 0;
}
.checkbox-row a { color: var(--accent); }

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-foot {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-foot a { color: var(--accent); }

.turnstile-mock {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.turnstile-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

/* Onboarding shared */
.onboard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.onboard-nav {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.onboard-nav .brand { font-size: 1.125rem; }
.onboard-nav .step-info {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.onboard-nav .step-info strong { color: var(--accent); }

.onboard-progress {
  height: 3px;
  background: var(--bg-elev-1);
  position: relative;
}
.onboard-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}

.onboard-body {
  flex: 1;
  padding: 4rem 2rem;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
.onboard-head {
  text-align: center;
  margin-bottom: 3rem;
}
.onboard-head h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.onboard-head p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 540px;
  margin: 0 auto;
}

.onboard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Proxyxin 2026 auth refresh
   ============================================================ */
body {
  background:
    linear-gradient(180deg, rgba(59,130,246,0.07), transparent 360px),
    radial-gradient(900px 420px at 50% -220px, rgba(255,255,255,0.10), transparent 70%),
    var(--bg) !important;
}

.auth-topnav {
  background: rgba(9,9,11,0.72);
  backdrop-filter: blur(14px);
}

.auth-topnav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Brand mark moved to .brand-mark span (defined inline in
   _auth_layout.html) — the old ::before rule duplicated the
   gradient square. Kept empty here so old browser caches don't
   re-render the floating square. */

.auth-main::before {
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) !important;
  background-size: 40px 40px !important;
  opacity: 0.45 !important;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.8), transparent 78%);
}

.auth-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    var(--bg-elev-1) !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 28px 90px rgba(0,0,0,0.48);
}

.auth-form input[type=email],
.auth-form input[type=password],
.auth-form input[type=text],
.auth-field input {
  background: rgba(0,0,0,0.28) !important;
  border-color: rgba(255,255,255,0.12) !important;
  border-radius: 8px !important;
}

.auth-form input:focus,
.auth-field input:focus {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.12);
}

.auth-h1 {
  line-height: 1.15;
}
