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

:root {
  --brand: #5B6EE8;
  --brand-dark: #3D52D5;
  --brand-light: #EEF0FD;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --error: #EF4444;
  --success: #10B981;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(91,110,232,0.12);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #EEF0FD 0%, #F9FAFB 60%, #F3F0FF 100%);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: var(--text);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-icon { font-size: 40px; margin-bottom: 10px; }
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--brand); }
.auth-logo p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.auth-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .2s;
  -webkit-appearance: none;
}
.form-input:focus { outline: none; border-color: var(--brand); }
.form-input.error { border-color: var(--error); }

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  margin-top: 4px;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); transform: none; cursor: not-allowed; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  line-height: 1.4;
}
.alert.error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FCA5A5; display: block; }
.alert.success { background: #ECFDF5; color: #065F46; border: 1px solid #6EE7B7; display: block; }

.input-wrap { position: relative; }
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  padding: 4px;
}

@media (max-width: 460px) {
  .auth-card { padding: 28px 20px; }
}
