/* ============================================
   auth.css — Login & Register Page
   ============================================ */

:root {
  --black:   #0a0a0a;
  --black-2: #111111;
  --black-3: #1a1a1a;
  --grey-1:  #222222;
  --grey-2:  #333333;
  --grey-3:  #555555;
  --grey-4:  #888888;
  --grey-5:  #bbbbbb;
  --white-soft: #f0ece4;
  --accent:  #c9a96e;
  --accent-light: #f5e6c8;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --radius: 4px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.auth-body {
  min-height: 100vh;
  background: var(--black);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}

/* Auth as a section inside normal page layout */
.auth-section {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px 70px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* ── Ambient orbs ── */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #c9a96e, transparent);
  top: -200px; left: -200px;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7c5cbf, transparent);
  bottom: -150px; right: -150px;
}

/* ── Container ── */
.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ── Logo ── */
.auth-logo {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.auth-logo .logo-main {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  font-style: italic;
  background: linear-gradient(135deg, #c9a96e 0%, #f5e6c8 45%, #c9a96e 70%, #a07840 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo .logo-tld {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--grey-3);
  -webkit-text-fill-color: var(--grey-3);
}

/* ── Card ── */
.auth-card {
  width: 100%;
  background: var(--black-2);
  border: 1px solid var(--grey-2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}

/* ── Tabs ── */
.auth-tabs {
  display: flex;
  position: relative;
  border-bottom: 1px solid var(--grey-1);
  background: var(--black-3);
}
.auth-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  color: var(--grey-4);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition);
  position: relative;
  z-index: 1;
}
.auth-tab.active { color: var(--accent); }
.auth-tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: left 0.3s ease, width 0.3s ease;
  border-radius: 2px 2px 0 0;
}

/* ── Forms ── */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  animation: fadeUp 0.28s ease;
}
.auth-form.active { display: flex; }

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--grey-4);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* ── Fields ── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-4);
}

.field-input {
  background: var(--black-3);
  border: 1px solid var(--grey-2);
  border-radius: var(--radius);
  color: var(--white-soft);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input::placeholder { color: var(--grey-3); }
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}
.field-input.error { border-color: #e74c3c; }

.field-password-wrap {
  position: relative;
}
.field-password-wrap .field-input { padding-right: 42px; }
.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--grey-3);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  transition: color var(--transition);
}
.pw-toggle:hover { color: var(--grey-5); }

/* ── Checkbox ── */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--grey-4);
  line-height: 1.5;
}
.field-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Error message ── */
.auth-error {
  font-size: 0.75rem;
  color: #e74c3c;
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.2);
  border-radius: var(--radius);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.auth-error.visible {
  padding: 10px 14px;
  max-height: 60px;
}

/* ── Submit button ── */
.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #c9a96e, #a07840);
  border: none;
  border-radius: var(--radius);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity var(--transition), transform var(--transition);
  margin-top: 4px;
}
.auth-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-spinner { animation: spin 0.8s linear infinite; display: inline-block; }

/* ── Switch link ── */
.auth-switch {
  text-align: center;
  font-size: 0.78rem;
  color: var(--grey-4);
}
.auth-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}
.auth-link:hover { opacity: 0.75; }

/* ── Footer note ── */
.auth-footer-note {
  font-size: 0.68rem;
  color: var(--grey-3);
  text-align: center;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .field-row-2 { grid-template-columns: 1fr; }
  .auth-form { padding: 24px 20px; }
}
