/* Auth pages — shares variables from ../styles.css */

:root {
  --brand-500: #d100c9;
  --brand-600: #b0019f;
  --brand-700: #880486;
  --accent-500: #6d28d9;
  --brand-gradient: linear-gradient(135deg, #d100c9 0%, #7c3aed 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(209,0,201,0.06) 0%, rgba(124,58,237,0.06) 100%);
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
  --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
  --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b;
  --slate-900: #0f172a;
  --success-600: #059669;
  --error-50: #fef2f2; --error-600: #dc2626;
  --warn-50: #fffbeb; --warn-600: #d97706;
  --bg: #f6f7fb; --surface: #ffffff;
  --border: #e5e7ef;
  --shadow-md: 0 2px 4px rgba(15,23,42,0.05), 0 8px 24px rgba(15,23,42,0.06);
  --shadow-lg: 0 10px 30px rgba(15,23,42,0.08), 0 24px 48px rgba(15,23,42,0.10);
  --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-pill: 999px;
  --font-sans: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family: var(--font-sans);
  color: var(--slate-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
}

.logo-wrap {
  margin-bottom: 28px;
}
.logo-wrap img {
  height: 52px;
  display: block;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.3px;
}
.auth-card .subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--slate-500);
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--slate-800);
  background: var(--surface);
  outline: none;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(209,0,201,0.12);
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: opacity 180ms var(--ease-out), transform 120ms var(--ease-out);
  margin-top: 8px;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--slate-500);
}
.auth-footer a {
  color: var(--brand-500);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

.alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-error {
  background: var(--error-50);
  color: var(--error-600);
  border: 1px solid rgba(220,38,38,0.2);
}
.alert-success {
  background: #ecfdf5;
  color: var(--success-600);
  border: 1px solid rgba(5,150,105,0.2);
}
.alert-icon { flex-shrink: 0; margin-top: 1px; }

/* OTP input */
.otp-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 4px;
}
.otp-digit {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--slate-900);
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: textfield;
}
.otp-digit::-webkit-inner-spin-button,
.otp-digit::-webkit-outer-spin-button { -webkit-appearance: none; }
.otp-digit:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(209,0,201,0.12);
}

.email-hint {
  font-size: 13px;
  color: var(--slate-500);
  text-align: center;
  margin-bottom: 22px;
}
.email-hint strong { color: var(--slate-700); }

.resend-row {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--slate-500);
}
.resend-row a {
  color: var(--brand-500);
  text-decoration: none;
  font-weight: 600;
}
.resend-row a:hover { text-decoration: underline; }

/* Password input with show/hide toggle */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding-right: 44px;
}
.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 150ms var(--ease-out);
  flex-shrink: 0;
}
.pw-toggle:hover { color: var(--slate-600); }
