/* =============================================
   AUTH PAGE CSS
   ============================================= */

body.auth-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at top left, #162540 0%, #0a1020 55%, #060d1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding: 1.5rem var(--space-3);
  align-self: flex-start;
  padding-left: clamp(1.5rem, 5vw, 5rem);
}

.auth-main {
  width: min(1100px, 96vw);
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-4) 0 var(--space-6);
}

@media (max-width: 880px) {
  .auth-main { grid-template-columns: 1fr; }
  .auth-features { display: none; }
}

/* Auth Card */
.auth-card {
  background: linear-gradient(160deg, rgba(18,30,55,0.97), rgba(10,18,38,0.99));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(92,162,255,0.06);
}

.auth-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.03); }

.auth-panel { padding: var(--space-5); }
.auth-panel.hidden { display: none; }

.auth-heading {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(120deg, #fff, #93a3c2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-sub {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-form { display: flex; flex-direction: column; gap: var(--space-3); }

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }

.field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #b0c0de;
}

.field-group input {
  background: rgba(10,18,38,0.7);
  border: 1px solid #2a3a5a;
  border-radius: 10px;
  padding: 0.82rem 0.95rem;
  color: var(--text);
  font-size: 0.97rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92,162,255,0.15);
}

.field-group input::placeholder { color: #4a5c80; }

.auth-error {
  min-height: 20px;
  font-size: 0.87rem;
  color: #f25f6d;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
}

.auth-error:not(:empty) {
  background: rgba(242,95,109,0.1);
  border: 1px solid rgba(242,95,109,0.3);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.auth-submit {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 0.97rem;
  margin-top: 0.25rem;
  position: relative;
  overflow: hidden;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-footer-note {
  margin: var(--space-3) 0 0;
  font-size: 0.87rem;
  color: var(--muted);
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: inherit;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* Features panel */
.auth-features {
  padding-top: var(--space-3);
}

.auth-features h2 {
  font-size: 1.3rem;
  margin: 0 0 var(--space-4);
  color: var(--text);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.feature-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(92,162,255,0.1);
  border: 1px solid rgba(92,162,255,0.2);
  font-size: 1.2rem;
}

.feature-list li div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.feature-list li strong { font-size: 0.95rem; }
.feature-list li span { font-size: 0.87rem; color: var(--muted); }

.auth-guest-note {
  margin-top: var(--space-5);
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-guest-note a { color: var(--accent); }
.auth-guest-note a:hover { text-decoration: underline; }

/* Loading state */
.auth-submit .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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