/* ============================================================
   Savinget 2.0 — Auth Pages
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body.auth-body {
  font-family: 'Inter', 'DM Sans', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e1b4b 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body.auth-body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 30% 20%, rgba(99,102,241,.18) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 80% 70%, rgba(168,85,247,.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  margin: auto;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-wrap {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.1);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 28px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.auth-site-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.6px;
}

.auth-tagline {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

/* Card */
.auth-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 36px;
  box-shadow:
    0 20px 60px rgba(0,0,0,.3),
    0 4px 16px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.auth-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 24px;
  text-align: center;
}

/* Form */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 13px;
  color: #94a3b8;
  pointer-events: none;
  display: flex; align-items: center;
  width: 18px;
}

.form-input {
  width: 100%;
  padding: 11px 13px 11px 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  transition: all .15s;
  outline: none;
}
.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: #fff;
}

.input-toggle-pw {
  position: absolute;
  right: 12px;
  background: none; border: none;
  cursor: pointer;
  color: #94a3b8;
  display: flex; align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s;
}
.input-toggle-pw:hover { color: #64748b; }

/* Password strength */
.pw-strength { margin-top: 8px; }
.pw-strength-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 5px;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .3s, background .3s;
  width: 0%;
}
.pw-strength-text { font-size: 11px; color: #94a3b8; }
.pw-checks { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.pw-check { font-size: 11px; color: #94a3b8; display: flex; align-items: center; gap: 5px; transition: color .2s; }
.pw-check.ok { color: #16a34a; }
.pw-check svg { width: 12px; height: 12px; }

/* Buttons */
.btn-auth {
  width: 100%;
  padding: 13px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
}
.btn-auth:hover { background: #4f46e5; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-google {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0,0,0,.12); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: #94a3b8;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-links {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #64748b;
}
.auth-link {
  color: #6366f1;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.auth-link:hover { color: #4f46e5; }

/* Alert */
.auth-alert {
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.5;
}
.auth-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-alert-info    { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.hidden { display: none !important; }

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255,255,255,.35);
}

/* 2FA code input */
.code-input {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 12px;
  padding-left: 20px !important;
}

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