/* ======= AUTH PAGE STYLES ======= */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left Panel */
.auth-left {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-12);
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(202, 255, 71, 0.06), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(192, 132, 252, 0.06), transparent 50%);
  pointer-events: none;
  opacity: var(--theme-glow-opacity, 1);
}

[data-theme="light"] {
  --theme-glow-opacity: 0.4;
}

.auth-orb-wrap {
  perspective: 1000px;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth-orb {
  width: 280px;
  height: 280px;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(192, 132, 252, 0.9), transparent 60%),
    radial-gradient(ellipse at 75% 75%, rgba(255, 69, 69, 0.8), transparent 55%),
    radial-gradient(ellipse at 75% 25%, rgba(71, 202, 255, 0.7), transparent 50%),
    conic-gradient(from 180deg, #C084FC, #FF4545, #47CAFF, #CAFF47, #C084FC);
  filter: blur(10px) saturate(1.3);
  will-change: transform, border-radius;
}

.auth-orb-label {
  position: absolute;
  bottom: -var(--s-8);
  text-align: center;
}

.auth-left-tagline {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  max-width: 340px;
  margin-top: var(--s-8);
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-left-sub {
  font-family: var(--font-sub);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--s-3);
  max-width: 300px;
  line-height: 1.6;
}

.auth-left-logo {
  position: absolute;
  top: var(--s-6);
  left: var(--s-6);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.auth-left-logo span { color: var(--lime); }

/* Right Panel */
.auth-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-12) var(--s-10);
  overflow-y: auto;
}

.auth-header {
  margin-bottom: var(--s-8);
}

.auth-header h1 {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-2);
}

.auth-header p {
  font-family: var(--font-sub);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: var(--s-1);
  margin-bottom: var(--s-6);
  width: fit-content;
}

.auth-tab {
  padding: var(--s-2) var(--s-5);
  border-radius: var(--r-full);
  font-family: var(--font-sub);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  transition: background var(--t-fast), color var(--t-fast);
}

.auth-tab.active {
  background: var(--lime);
  color: var(--bg);
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 420px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.form-label {
  font-family: var(--font-sub);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  min-height: 48px;
}

.form-input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(202, 255, 71, 0.1);
}

.form-input::placeholder {
  color: var(--text-subtle);
}

/* Role Selector */
.role-selector {
  display: none;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}

.role-selector.visible {
  display: flex;
}

.role-selector-label {
  font-family: var(--font-sub);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.role-card {
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  background: var(--surface);
  transition: border-color var(--t-normal), background var(--t-normal), transform var(--t-fast);
  cursor: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.role-card:hover {
  border-color: rgba(202, 255, 71, 0.4);
  transform: translateY(-2px);
}

.role-card.selected {
  border-color: var(--lime);
  background: rgba(202, 255, 71, 0.06);
}

.role-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: background var(--t-normal);
}

.role-card.selected .role-icon {
  background: rgba(202, 255, 71, 0.2);
}

.role-card-title {
  font-family: var(--font-sub);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.role-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-2) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font-sub);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast);
  min-height: 48px;
}

.btn-google:hover {
  border-color: rgba(202, 255, 71, 0.4);
  background: var(--bg-alt);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Submit button full-width */
.btn-submit {
  width: 100%;
  padding: var(--s-4);
  background: var(--lime);
  color: var(--bg);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-sub);
  font-size: 1rem;
  font-weight: 700;
  min-height: 52px;
  transition: box-shadow var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
}

.btn-submit:hover:not(:disabled) {
  box-shadow: var(--shadow-lime);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.5;
}

.btn-submit.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--hero-overlay);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--s-2);
  vertical-align: middle;
}

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

.auth-footer-link {
  font-family: var(--font-sub);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--s-4);
}

.auth-footer-link a {
  color: var(--lime);
  font-weight: 600;
}

.auth-error {
  display: none;
  margin-top: var(--s-2);
}
.auth-error.show { display: flex; }

/* Responsive */
@media (max-width: 768px) {
  .auth-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-left {
    padding: var(--s-8) var(--s-5);
    min-height: 240px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .auth-orb-wrap {
    width: 200px;
    height: 200px;
  }

  .auth-orb {
    width: 170px;
    height: 170px;
  }

  .auth-left-tagline {
    font-size: 1.2rem;
    margin-top: var(--s-5);
  }

  .auth-left-sub { display: none; }

  .auth-right {
    padding: var(--s-6) var(--s-5);
  }

  .role-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .role-cards { grid-template-columns: 1fr; }
}
