/* ═══════════════════════════════════════════════════════════
   Glomax GPT — Auth Pages
   Brand: Teal × Indigo gradient, soft corporate
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Light theme (default) ─────────────────────────────── */
/* ── Light theme (default) ─────────────────────────────── */
:root {
  --bg:         #FFFFFF;
  --card:       #FFFFFF;
  --border:     #E2E2E2;
  --border2:    #C0C0C0;
  --text:       #050816;
  --text2:      #4A4A4A;
  --text3:      #7A7A7A;
  --accent:     #222222;
  --accent2:    #444444;
  --accent-h:   #000000;
  --accent-soft:rgba(0,0,0,.07);
  --accent-grad:linear-gradient(135deg,#222222,#444444);
  --error:      #ef4444;
  --success:    #10b981;
  --input-bg:   #F7F7F7;
  --input-focus:#FFFFFF;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.12);
  --font:       'Inter', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

/* ── Dark theme ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:         #050816;
  --card:       #2A2A2A;
  --border:     rgba(255,255,255,.10);
  --border2:    rgba(255,255,255,.18);
  --text:       #F0F0F0;
  --text2:      #A8A8A8;
  --text3:      #707070;
  --accent:     #E8E8E8;
  --accent2:    #AAAAAA;
  --accent-h:   #FFFFFF;
  --accent-soft:rgba(255,255,255,.08);
  --accent-grad:linear-gradient(135deg,#E8E8E8,#FFFFFF);
  --error:      #f87171;
  --success:    #34d399;
  --input-bg:   #2E2E2E;
  --input-focus:#333333;
  --shadow:     0 4px 24px rgba(0,0,0,.5);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ── Light theme explicit selector ─────────────────────── */
[data-theme="light"] {
  --bg:         #FFFFFF;
  --card:       #FFFFFF;
  --border:     #E2E2E2;
  --border2:    #C0C0C0;
  --text:       #050816;
  --text2:      #4A4A4A;
  --text3:      #7A7A7A;
  --accent:     #222222;
  --accent2:    #444444;
  --accent-h:   #000000;
  --accent-soft:rgba(0,0,0,.07);
  --accent-grad:linear-gradient(135deg,#222222,#444444);
  --error:      #ef4444;
  --success:    #10b981;
  --input-bg:   #F7F7F7;
  --input-focus:#FFFFFF;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Decorative gradient blobs */
.auth-bg::before {
  content: '';
  position: fixed;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(100,100,100,.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.auth-bg::after {
  content: '';
  position: fixed;
  bottom: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(80,80,80,.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

/* ── Logo ───────────────────────────────────────────────── */
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.auth-logo a:hover { text-decoration: none; }
.auth-logo-icon {
  width: 40px; height: 40px;
  background: var(--accent-grad);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(100,100,100,.35);
}

/* ── Google button — primary CTA ────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  font-family: var(--font);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.btn-google:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(100,100,100,.2);
  text-decoration: none;
  color: var(--text);
  transform: translateY(-1px);
}
.btn-google-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Divider ─────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: .8rem;
  color: var(--text3);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Headings ───────────────────────────────────────────── */
.auth-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.auth-subtitle {
  font-size: .875rem;
  color: var(--text3);
  margin-bottom: 20px;
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .875rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: rgba(239,68,68,.08);  color: var(--error);   border: 1px solid rgba(239,68,68,.2); }
.alert-success { background: rgba(16,185,129,.08); color: var(--success); border: 1px solid rgba(16,185,129,.2); }

/* ── Form ───────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.label-link {
  font-size: .78rem;
  font-weight: 400;
  color: var(--accent);
}
.label-link:hover { text-decoration: underline; }

.form-group input {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: all .2s ease;
  font-family: var(--font);
}
.form-group input:focus {
  background: var(--input-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(100,100,100,.12);
}
.form-group input::placeholder { color: var(--text3); }

.input-password {
  position: relative;
}
.input-password input { padding-right: 44px; }
.toggle-pass {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  padding: 4px;
  border-radius: 6px;
  transition: color .15s;
  display: flex; align-items: center;
}
.toggle-pass:hover { color: var(--text); }

/* Password strength */
.password-strength {
  display: flex; gap: 4px; margin-top: 8px;
}
.strength-bar {
  flex: 1; height: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background .3s;
}
.strength-bar.weak   { background: #ef4444; }
.strength-bar.medium { background: #f59e0b; }
.strength-bar.strong { background: #10b981; }
.strength-label {
  font-size: .75rem; color: var(--text3);
  margin-top: 4px; min-height: 18px;
}

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

/* Submit button */
.btn-auth {
  width: 100%;
  padding: 12px;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  font-family: var(--font);
  letter-spacing: -.01em;
  box-shadow: 0 4px 16px rgba(100,100,100,.35);
}
.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(100,100,100,.5);
}
.btn-auth:active { transform: translateY(0); }

/* Footer links */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .875rem;
  color: var(--text3);
}
.auth-footer a { color: var(--accent); font-weight: 600; }

.auth-terms {
  text-align: center;
  margin-top: 16px;
  font-size: .75rem;
  color: var(--text3);
  line-height: 1.6;
}
.auth-terms a { color: var(--text3); text-decoration: underline; }
.auth-terms a:hover { color: var(--accent); }

/* ── Feature pills ──────────────────────────────────────── */
.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--text3);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.feature-item svg { color: var(--accent); flex-shrink: 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: 16px; }
  .auth-title { font-size: 1.15rem; }
}

/* ── Auth Alert ── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: .845rem;
  margin-bottom: 14px;
  line-height: 1.45;
}
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }
.auth-alert-error {
  background: rgba(239,68,68,.09);
  border: 1px solid rgba(239,68,68,.22);
  color: #f87171;
}
.auth-alert-success {
  background: rgba(16,185,129,.09);
  border: 1px solid rgba(16,185,129,.22);
  color: #34d399;
}

/* ── Auth Header ── */
.auth-header { text-align: center; margin-bottom: 22px; }
.auth-header h1 { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.auth-header p { font-size: .875rem; color: var(--text2); }

/* ── Primary Button ── */
.btn-auth-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .925rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .15s;
  margin-top: 4px;
}
.btn-auth-primary:hover { background: #2563eb; transform: translateY(-1px); }
.btn-auth-primary:active { transform: translateY(0); }

/* ── Password wrapper ── */
.input-password-wrap { position: relative; }
.input-password-wrap .form-input { padding-right: 42px; width: 100%; box-sizing: border-box; }
.btn-pw-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}
.btn-pw-toggle:hover { color: var(--text); }

/* ── Check label ── */
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .845rem;
  color: var(--text2);
  cursor: pointer;
  line-height: 1.45;
}
.check-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: #3b82f6; }
.check-label a { color: #3b82f6; text-decoration: none; }
.check-label a:hover { text-decoration: underline; }

/* ── Form label link ── */
.form-label-link {
  float: right;
  font-size: .8rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}
.form-label-link:hover { text-decoration: underline; }

/* ── Auth footer ── */
.auth-footer {
  text-align: center;
  margin-top: 18px;
  font-size: .855rem;
  color: var(--text2);
}
.auth-footer a { color: #3b82f6; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Light theme overrides ── */
[data-theme="light"] .btn-auth-primary { background: #2563eb; }
[data-theme="light"] .btn-auth-primary:hover { background: #1d4ed8; }
[data-theme="light"] .auth-alert-error { color: #dc2626; }
[data-theme="light"] .auth-alert-success { color: #059669; }