/* ─────────────────────────────────────────────────────────
   auth.css  —  Login, Register, Forgot-password
   Light-mode, standalone (no dependency on main.css)
   Matches: login.php, register.php, forgot-password.php
   ───────────────────────────────────────────────────────── */

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

:root {
  --a-bg:        #FAFAF8;
  --a-card:      #FFFFFF;
  --a-border:    #E2E2DC;
  --a-border-2:  #C8C8C2;
  --a-text-0:    #1A1A18;
  --a-text-1:    #3D3D38;
  --a-text-2:    #6B6B64;
  --a-text-3:    #9E9E94;
  --a-accent:    #1A8A75;
  --a-accent-h:  #157A67;
  --a-deco:      #6DDEC5;
  --a-error-bg:  #FFF1F1;
  --a-error:     #C0392B;
  --a-ok-bg:     #F0FBF8;
  --a-ok:        #1A8A75;
  --font:        'DM Sans', system-ui, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--a-bg);
  color: var(--a-text-0);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */

/* Two-column layout: brand (left) + card-wrap (right) */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Single-column centered layout (forgot-password) */
.auth-layout.auth-layout-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: var(--a-bg);
}

.auth-layout.auth-layout-centered .auth-card-wrap {
  background: transparent;
  padding: 0;
  max-width: 440px;
  width: 100%;
}

.auth-layout.auth-layout-centered .auth-card {
  background: var(--a-card);
  border: 1px solid var(--a-border);
  border-radius: 16px;
  padding: 44px 40px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07);
}

/* ══════════════════════════════════════════════
   BRAND PANEL (left, dark)
   ══════════════════════════════════════════════ */
.auth-brand {
  background: #1A1A18;
  display: flex;
  flex-direction: column;
  padding: 52px 56px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.auth-brand .auth-logo {
  color: #F5F0E8;
  margin-bottom: auto; /* push content to bottom */
}

/* Decorative accent circle */
.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109,222,197,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand panel headline (optional, for future use) */
.auth-brand-headline {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
  color: #F5F0E8;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  margin-top: 48px;
}

.auth-brand-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  max-width: 340px;
}

/* Feature list in brand panel (register.php) */
.auth-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 52px;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

/* Testimonial in brand panel (login.php) */
blockquote.auth-testimonial {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
}

blockquote.auth-testimonial p {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  font-style: italic;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
}

blockquote.auth-testimonial cite {
  font-style: normal;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

/* ══════════════════════════════════════════════
   CARD WRAP (right panel)
   ══════════════════════════════════════════════ */
.auth-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 48px;
  background: var(--a-bg);
  overflow-y: auto;
  min-height: 100vh;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

/* Card header (title + subtitle wrapper) */
.auth-header {
  margin-bottom: 28px;
}

/* ══════════════════════════════════════════════
   LOGO
   ══════════════════════════════════════════════ */

/* Logo in brand panel */
.auth-brand .auth-logo {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #F5F0E8;
  text-decoration: none;
}

.auth-brand .auth-logo span { color: var(--a-deco); }

/* Inline logo (forgot-password, centered layout) */
.auth-logo-inline {
  display: inline-block;
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--a-text-0);
  text-decoration: none;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.auth-logo-inline span { color: var(--a-accent); }

/* ══════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════ */
.auth-title {
  font-family: var(--font);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--a-text-0);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--a-text-2);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════ */
.auth-error {
  background: var(--a-error-bg);
  color: var(--a-error);
  border: 1px solid rgba(192,57,43,0.18);
  border-radius: 8px;
  padding: 11px 15px;
  font-size: 0.875rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth-success {
  background: var(--a-ok-bg);
  color: var(--a-ok);
  border: 1px solid rgba(26,138,117,0.18);
  border-radius: 8px;
  padding: 20px;
  font-size: 0.875rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth-success .auth-title {
  color: var(--a-ok);
  font-size: 1.25rem;
  margin-top: 4px;
  margin-bottom: 8px;
}

.auth-success .auth-subtitle {
  color: var(--a-ok);
  opacity: 0.85;
}

/* ══════════════════════════════════════════════
   GOOGLE BUTTON
   ══════════════════════════════════════════════ */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--a-border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--a-text-0);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 20px;
}

.btn-google:hover {
  background: #F8F8F6;
  border-color: var(--a-border-2);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.btn-google svg { flex-shrink: 0; }

/* ══════════════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════════════ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--a-text-3);
  margin: 4px 0 20px;
}

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

/* ══════════════════════════════════════════════
   FORM
   ══════════════════════════════════════════════ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--a-text-1);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--a-border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--a-text-0);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

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

.form-input:focus {
  border-color: var(--a-accent);
  box-shadow: 0 0 0 3px rgba(26,138,117,0.12);
}

.form-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #F5F5F2;
}

/* ══════════════════════════════════════════════
   FORGOT / SWITCH / LEGAL
   ══════════════════════════════════════════════ */
.auth-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-forgot a {
  font-size: 0.8125rem;
  color: var(--a-text-2);
  transition: color 0.15s;
}

.auth-forgot a:hover { color: var(--a-accent); }

.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--a-text-2);
  margin-top: 20px;
}

.auth-switch a {
  color: var(--a-accent);
  font-weight: 500;
}

.auth-switch a:hover { text-decoration: underline; }

.auth-legal {
  text-align: center;
  font-size: 0.75rem;
  color: var(--a-text-3);
  line-height: 1.55;
  margin-top: -4px;
}

.auth-legal a {
  color: var(--a-text-2);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn-auth-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--a-accent);
  color: #FFFFFF;
  border: none;
  border-radius: 9px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: -0.01em;
}

.btn-auth-primary:hover {
  background: var(--a-accent-h);
  transform: translateY(-1px);
}

.btn-auth-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-auth-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  color: var(--a-text-1);
  border: 1.5px solid var(--a-border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 12px;
}

.btn-auth-ghost:hover {
  border-color: var(--a-border-2);
  background: #F5F5F2;
}

/* ══════════════════════════════════════════════
   CREATOR CODE BADGE
   ══════════════════════════════════════════════ */
.creator-code-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(26,138,117,0.08);
  color: var(--a-accent);
  border: 1px solid rgba(26,138,117,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: -4px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-card-wrap {
    padding: 40px 24px;
    min-height: 100vh;
  }
}

@media (max-width: 480px) {
  .auth-card-wrap { padding: 28px 16px; }
  .auth-layout.auth-layout-centered { padding: 24px 16px; }
  .auth-layout.auth-layout-centered .auth-card { padding: 32px 20px; }
  .auth-title { font-size: 1.375rem; }
}
