/* ══════════════════════════════════════════════════════════════════════════════
   VerbaSave — Auth page  (auth.css)
   Light theme · Inter · matching homepage palette
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --auth-bg:      #F8F7F2;
  --auth-card:    #ffffff;
  --auth-text:    #1A1A1A;
  --auth-text2:   #4A4A5A;
  --auth-text3:   #8A8A9A;
  --auth-border:  rgba(0,0,0,0.09);
  --auth-border2: rgba(0,0,0,0.14);
  --grad:         linear-gradient(135deg, #2563EB 0%, #0D9488 100%);
  --accent:       #2563EB;
  --accent-t:     #0D9488;
}

/* ── Reset + base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Background orbs (light, very subtle) ────────────────────────────────── */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: absolute;
  top: -200px; left: -160px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.07) 0%, transparent 70%);
}
.auth-bg::after {
  content: '';
  position: absolute;
  bottom: -180px; right: -140px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,.06) 0%, transparent 70%);
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.auth-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(248,247,242,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--auth-border);
  z-index: 100;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
  color: var(--auth-text);
  text-decoration: none;
}
.auth-logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Lang switcher — same as homepage */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--auth-border2);
  border-radius: 7px;
  padding: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--auth-text3);
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.lang-btn.active {
  background: #fff;
  color: var(--auth-text);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.lang-btn:hover:not(.active) { color: var(--auth-text2); }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  padding: 40px 36px 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  margin-top: 60px;
}

/* ── Card header ──────────────────────────────────────────────────────────── */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.auth-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
  flex-shrink: 0;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--auth-text);
  line-height: 1.2;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px;
  color: var(--auth-text2);
  margin-bottom: 28px;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text2);
  margin-bottom: 7px;
}
.field-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(37,99,235,.08);
  color: var(--accent);
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 999px;
  padding: 1px 7px;
  letter-spacing: .04em;
}

.input-wrap { position: relative; }

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--auth-border2);
  background: #FAFAF8;
  color: var(--auth-text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
.form-input::placeholder { color: var(--auth-text3); }
.form-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-input.error { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.form-input.ok    { border-color: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.08); }

/* password toggle */
.pwd-toggle {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-text3);
  padding: 2px;
  line-height: 1;
  font-size: 15px;
  transition: color .15s;
}
.pwd-toggle:hover { color: var(--auth-text2); }
.input-wrap .form-input { padding-right: 42px; }

/* ── Field hint ───────────────────────────────────────────────────────────── */
.field-hint {
  display: block;
  font-size: 11.5px;
  color: var(--auth-text3);
  margin-top: 5px;
}

/* ── Password strength ────────────────────────────────────────────────────── */
.pwd-strength { margin-top: 10px; }
.pwd-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,.07);
  margin-bottom: 10px;
  overflow: hidden;
}
.pwd-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width .25s, background .25s;
}
.pwd-fill.weak   { background: #EF4444; width: 33%; }
.pwd-fill.medium { background: #F59E0B; width: 66%; }
.pwd-fill.strong { background: #22C55E; width: 100%; }

.pwd-rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pwd-rules li {
  font-size: 12px;
  color: var(--auth-text3);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color .15s;
}
.pwd-rules li::before {
  content: '✗';
  font-size: 11px;
  color: #EF4444;
  font-weight: 700;
  flex-shrink: 0;
}
.pwd-rules li.ok { color: var(--auth-text2); }
.pwd-rules li.ok::before { content: '✓'; color: #22C55E; }

/* ── Submit button ────────────────────────────────────────────────────────── */
.btn-auth-primary {
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity .18s, transform .15s, box-shadow .18s;
  box-shadow: 0 4px 18px rgba(37,99,235,.28);
}
.btn-auth-primary:hover:not(:disabled) {
  opacity: .88;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,235,.36);
}
.btn-auth-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Divider ──────────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--auth-text3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border2);
}

/* ── OAuth button (Google) ────────────────────────────────────────────────── */
.oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--auth-border2);
  background: #fff;
  color: var(--auth-text2);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.oauth-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(37,99,235,.1);
  transform: translateY(-1px);
}
.oauth-btn svg { flex-shrink: 0; }

/* ── Feedback ─────────────────────────────────────────────────────────────── */
.form-error {
  font-size: 13px;
  color: #EF4444;
  margin-top: 10px;
  min-height: 18px;
  font-weight: 500;
}
.form-success {
  font-size: 13px;
  color: #16A34A;
  margin-top: 10px;
  min-height: 18px;
  font-weight: 500;
}

/* ── Switch link ──────────────────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--auth-text3);
  margin-top: 22px;
}
.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════════
   ONBOARDING
   ══════════════════════════════════════════════════════════════════════════════ */
.ob-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 4px;
}
.ob-step {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid var(--auth-border2);
  color: var(--auth-text3);
}
.ob-step.done   { border-color: var(--accent); color: var(--accent); }
.ob-step.active { background: var(--grad); border-color: transparent; color: #fff; }
.ob-line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: rgba(37,99,235,.25);
  margin: 0 8px;
}

.ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}
.ob-chip {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--auth-border2);
  background: transparent;
  color: var(--auth-text3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .14s;
  user-select: none;
}
.ob-chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,.04); }
.ob-chip.sel {
  background: rgba(37,99,235,.08);
  border-color: var(--accent);
  color: var(--accent);
}

.ob-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.ob-skip-btn {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--auth-border2);
  background: transparent;
  color: var(--auth-text3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .14s;
  white-space: nowrap;
}
.ob-skip-btn:hover { color: var(--auth-text2); border-color: var(--auth-text3); }
.ob-save-btn {
  flex: 1;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.ob-save-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.ob-save-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Select */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8A9A' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  background-color: #FAFAF8;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-topbar { padding: 0 20px; }
  .auth-card { padding: 30px 22px 26px; border-radius: 16px; }
  .auth-title { font-size: 1.4rem; }
}
