/* Latentra — Auth pages (login, signup, password reset, verify) */

:root {
  --bg: #0a0a0a;
  --panel: #111;
  --panel-2: #161616;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f5f5f5;
  --muted: rgba(255,255,255,0.55);
  --muted-2: rgba(255,255,255,0.35);
  --accent: #00d68f;
  --accent-soft: rgba(0,214,143,0.12);
  --danger: #ff5757;
  --danger-soft: rgba(255,87,87,0.10);
  --success: #00d68f;
  --success-soft: rgba(0,214,143,0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────── */
.auth-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.auth-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.auth-logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px;
}
.auth-logo-text { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.auth-accent { color: var(--accent); }
.auth-nav { display: flex; gap: 24px; align-items: center; }
.auth-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.auth-nav a:hover { color: var(--text); }
.auth-nav a.btn-primary { color: #0a0a0a; }

/* ── Layout ───────────────────────────── */
.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.auth-card-wide { max-width: 720px; }
.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.auth-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
  line-height: 1.5;
}

/* ── Form ─────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.auth-input {
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #1a1a1a;
}
.auth-input::placeholder { color: var(--muted-2); }
.auth-hint {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* ── Buttons ──────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  border: 0;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.15s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary.btn-block { display: block; width: 100%; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-secondary:hover { background: var(--panel-2); }

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

/* ── Alerts ───────────────────────────── */
.auth-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
  line-height: 1.5;
}
.auth-alert-error {
  background: var(--danger-soft);
  border-color: rgba(255,87,87,0.3);
  color: #ffb0b0;
}
.auth-alert-success {
  background: var(--success-soft);
  border-color: rgba(0,214,143,0.3);
  color: var(--accent);
}
.auth-alert-info {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-strong);
  color: var(--muted);
}

/* ── Divider + footer-link row ─────────── */
.auth-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.auth-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* ── Inline error per field ───────────── */
.auth-field-error {
  font-size: 12px;
  color: #ff8a8a;
  margin-top: 4px;
}

/* ── Page footer ──────────────────────── */
.auth-page-foot {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 520px) {
  .auth-card { padding: 28px 20px; border-radius: 12px; }
  .auth-row { grid-template-columns: 1fr; }
  .auth-title { font-size: 24px; }
}

/* ── Strength meter ───────────────────── */
.pw-meter {
  height: 4px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.pw-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--danger);
  transition: width 0.2s, background 0.2s;
}
.pw-meter-fill.weak { background: #ff8a3d; width: 33%; }
.pw-meter-fill.ok { background: #ffd84d; width: 66%; }
.pw-meter-fill.strong { background: var(--accent); width: 100%; }
