/* ═══════════════════════════════════════════════════
   auth.css — Login / Sign-up page styles
   Uses design tokens from themes.css (light + dark)
═══════════════════════════════════════════════════ */

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

body.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
  font-family: var(--font-body);
  padding: 16px;
  color: var(--text-primary);
}

/* ─── Card ───────────────────────────────────────── */
.auth-card {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 36px 28px 32px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-md);
}

/* ─── Logo ───────────────────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-logo .logo-icon { color: var(--accent); flex-shrink: 0; }
.auth-logo .logo-text { color: var(--text-primary); }

/* ─── Heading ────────────────────────────────────── */
.auth-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 6px;
}

.auth-subheading {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

/* ─── Error banner ───────────────────────────────── */
.auth-error {
  width: 100%;
  background: rgba(224, 49, 49, 0.1);
  border: 1px solid var(--btn-delete-bg, #E03131);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  color: #E03131;
  margin-bottom: 16px;
  text-align: center;
}

/* ─── Form ───────────────────────────────────────── */
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.auth-forgot-btn {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  font-family: inherit;
}

.auth-forgot-btn:hover { color: var(--text-secondary); }

.auth-input-wrap {
  position: relative;
  width: 100%;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input-wrap .auth-input { padding-right: 44px; }

.auth-input::placeholder { color: var(--text-muted); }

.auth-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
}

.auth-eye-btn:hover { color: var(--text-secondary); }

/* ─── Primary button ─────────────────────────────── */
.auth-btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
  font-family: inherit;
}

.auth-btn-primary:hover { background: var(--accent-hover); }

/* ─── Divider ────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 20px 0 16px;
}

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

.auth-divider-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  margin: 20px 0 12px;
  text-align: center;
}

/* ─── Google button ──────────────────────────────── */
.auth-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.auth-btn-google:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* ─── Sign up text ───────────────────────────────── */
.auth-signup-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-top: 20px;
}

.auth-signup-link {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-signup-link:hover { color: var(--accent); }

/* ─── Sign-up overlay ────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.auth-overlay[hidden] { display: none; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 480px) {
  body.auth-body {
    padding: 12px;
    align-items: flex-start;
    padding-top: 40px;
  }
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 14px;
    box-shadow: none;
  }
}

@media (min-width: 481px) and (max-width: 1023px) {
  .auth-card { max-width: 460px; padding: 40px 36px; }
}

@media (min-width: 1024px) {
  .auth-card { max-width: 480px; padding: 48px 44px; }
}
