/* Shared design system for standalone auth pages (login, register, forgot/reset password, verify). */

:root {
  --auth-grad-1: #0ea5e9;
  --auth-grad-2: #2563eb;
  --auth-grad-3: #14b8a6;
  --auth-accent: #38bdf8;
  --auth-text: #f1f5f9;
  --auth-text-muted: #cbd5e1;
  --auth-card-bg: rgba(255, 255, 255, 0.10);
  --auth-card-border: rgba(255, 255, 255, 0.18);
  --auth-input-bg: rgba(255, 255, 255, 0.95);
  --auth-input-text: #0f172a;
  --auth-radius-lg: 1.25rem;
  --auth-radius-md: 0.9rem;
  --auth-radius-pill: 50px;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: "Segoe UI", "Poppins", sans-serif;
  color: var(--auth-text);
  background: linear-gradient(120deg, var(--auth-grad-1), var(--auth-grad-2), var(--auth-grad-3));
  background-size: 300% 300%;
  animation: authGradientShift 12s ease infinite;
}

@keyframes authGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-body { animation: none; }
}

.auth-card {
  width: 100%;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--auth-radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 2.25rem;
  transition: box-shadow 0.3s ease;
}

.auth-card:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.auth-card--sm { max-width: 440px; }
.auth-card--md { max-width: 540px; }

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-header .auth-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.auth-header .auth-icon.auth-icon--success {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #86efac;
}

.auth-header .auth-icon.auth-icon--error {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

.auth-header .auth-icon.auth-icon--warn {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.45);
  color: #facc15;
}

.auth-header h1,
.auth-header h2 {
  font-weight: 650;
  font-size: 1.55rem;
  color: var(--auth-text);
  margin-bottom: 0.35rem;
}

.auth-header p {
  font-size: 0.92rem;
  color: var(--auth-text-muted);
  margin-bottom: 0;
}

.auth-card label {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--auth-text);
  margin-bottom: 0.35rem;
}

.auth-card .form-control,
.auth-card .form-select {
  border-radius: var(--auth-radius-pill);
  border: 1px solid transparent;
  padding: 0.7rem 1.15rem;
  background: var(--auth-input-bg);
  color: var(--auth-input-text);
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4);
}

.auth-card .form-control::placeholder { color: #64748b; }

.auth-card .input-icon-group {
  position: relative;
}

.auth-card .input-icon-group i.field-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.auth-card .input-icon-group .form-control {
  padding-left: 2.6rem;
}

.auth-card .toggle-password {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
}

.auth-card .toggle-password:hover { color: #334155; }

.btn-auth-primary {
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  border: none;
  border-radius: var(--auth-radius-pill);
  font-weight: 600;
  color: #fff;
  padding: 0.7rem 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-auth-primary:hover,
.btn-auth-primary:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

.btn-auth-primary:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.auth-links { text-align: center; margin-top: 1.25rem; }

.auth-links a {
  color: var(--auth-text);
  text-decoration: underline;
  font-size: 0.9rem;
}

.auth-links a:hover { color: var(--auth-accent); }

.auth-links .divider {
  color: var(--auth-text-muted);
  margin: 0 0.4rem;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--auth-text);
  text-decoration: none;
}

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

.auth-alert {
  border-radius: var(--auth-radius-md);
  font-size: 0.88rem;
  border: 1px solid transparent;
}

.auth-alert.alert-success {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #dcfce7;
}

.auth-alert.alert-danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fee2e2;
}

.auth-alert.alert-warning {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.4);
  color: #fef9c3;
}

.password-strength {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin-top: 0.5rem;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.auth-hint {
  font-size: 0.78rem;
  color: var(--auth-text-muted);
  margin-top: 0.35rem;
}

@media (max-width: 576px) {
  .auth-card { padding: 1.5rem; border-radius: 1rem; }
  .auth-header h1,
  .auth-header h2 { font-size: 1.3rem; }
  .auth-header .auth-icon { width: 58px; height: 58px; font-size: 1.4rem; }
}
