*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand: #0284c7;
  /* Sky Blue */
  --brand-hover: #0369a1;
  --brand-dark: #0369a1;
  --brand-light: #38bdf8;
  --brand-glow: rgba(2, 132, 199, 0.15);
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-color: #e2e8f0;
  --error: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --font: 'Inter', sans-serif;
}

body,
html {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text);
}

a {
  text-decoration: none;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- Common Auth Body Reset --- */
.auth-body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ---- Abstract Background ---- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle 800px at 100% -100px, #e0f2fe 0%, transparent 80%),
    radial-gradient(circle 800px at -200px 100%, #f0fdf4 0%, transparent 80%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #e2e8f0 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.6;
}

/* ---- Unified Clean Card Canvas ---- */
.login-card,
.reset-card,
.change-card,
.success-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 10;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Logo & Typography ---- */
.logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.logo-img {
  height: 34px;
  object-fit: contain;
  margin-bottom: 8px;
}

.logo-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ---- Hint Instruction Box ---- */
.hint-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 24px;
  font-size: 0.78rem;
  color: #0369a1;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.hint-box i {
  margin-top: 2px;
}

.hint-box strong {
  font-weight: 700;
}

/* ---- Form Fields ---- */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.input-wrap i.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 14px 11px 38px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font);
  transition: all 0.2s;
  outline: none;
}

input:focus {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

input::placeholder {
  color: #cbd5e1;
}

.eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eye-btn:hover {
  color: var(--brand);
}

/* ---- Layout Rows ---- */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.forgot-link {
  font-size: 0.78rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover {
  color: var(--brand-hover);
  text-decoration: none;
  scale: 1.01;
}

.forgot-link:active {
  scale: 0.99;
}

/* ---- Primary Buttons ---- */
.btn-login,
.btn-submit-theme {
  width: 100%;
  padding: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--brand-glow);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-login:hover,
.btn-submit-theme:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.3);
}

.btn-login .btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Toast Notifications ---- */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Errors & Footers ---- */
.error-msg {
  display: none;
  margin-top: 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--error);
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.login-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.login-footer a:hover {
  color: var(--brand-dark);
  text-decoration: none;
  scale: 1.01;
}

.login-footer a:active {
  scale: 0.99;
}

/* ---- Success Alerts ---- */
.success-alert {
  display: none;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 20px;
  color: #166534;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ---- Navigation Links ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px auto 0 auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
}

.back-link i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.back-link:hover {
  color: var(--brand);
  text-decoration: none;
}

.back-link:hover i {
  transform: translateX(-4px);
}

/* ---- Submit Buttons ---- */
.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--brand-glow);
  transition: all 0.2s;
  display: block;
  text-align: center;
  text-decoration: none;
}

.btn-submit:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.3);
}

/* ---- Success Animations & Rings ---- */
.success-icon-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 1;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.success-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #ecfdf5;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

/* Responsive Login Footer */

.login-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-footer .footer-divider {
  display: none;
}