/* ==========================================================================
   Safforix Portal Authentication Stylesheet (Navy & Cyan Theme)
   ========================================================================== */

:root {
  --page: #f4f9fd;
  --panel: #ffffff;
  --card: #ffffff;
  --hair: #e2effa;
  --ink: #072b5f;
  --muted: #5e6d82;
  --faint: #8ca0b8;
  --saff-navy: #072b5f;
  --saff-navy-deep: #051a3a;
  --saff-navy-hover: #0a3a7d;
  --saff-cyan: #03a1d0;
  --saff-cyan-hover: #0288b2;
  --saff-sky: #e0f2fe;
  --g-950: #051a3a;
  --g-800: #072b5f;
  --g-700: #0a3a7d;
  --g-600: #03a1d0;
  --g-400: #38bdf8;
  --g-100: #e0f2fe;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}

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

.auth-page-root {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  background-color: var(--page);
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Concentric radial background circles with Safforix Cyan & Navy */
.auth-page-root::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 800px;
  background: 
    radial-gradient(circle at 50% 0%, rgba(3, 161, 208, 0.16) 0%, transparent 60%),
    repeating-radial-gradient(circle at 50% 0%, transparent 0 24px, rgba(7, 43, 95, 0.035) 25px 26px);
  pointer-events: none;
  z-index: 0;
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 490px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 0 auto;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-brand:hover {
  transform: translateY(-2px);
}

.auth-brand-badge {
  background: #ffffff;
  border: 1px solid rgba(226, 239, 250, 0.95);
  padding: 8px 24px;
  border-radius: 999px;
  box-shadow: 
    0 2px 8px rgba(7, 43, 95, 0.04),
    0 8px 24px -4px rgba(3, 161, 208, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.auth-brand:hover .auth-brand-badge {
  box-shadow: 
    0 4px 14px rgba(7, 43, 95, 0.07),
    0 12px 30px -4px rgba(3, 161, 208, 0.28);
  border-color: rgba(3, 161, 208, 0.4);
}

.auth-brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 22px;
  padding: 28px 36px;
  box-shadow: 
    0 1px 3px rgba(7, 43, 95, 0.04),
    0 20px 48px -12px rgba(7, 43, 95, 0.09);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: authFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-header {
  text-align: center;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

.auth-demo-pill {
  background: #e0f2fe;
  border: 1px dashed #38bdf8;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #072b5f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.auth-demo-pill:hover {
  background: #dff1fa;
  border-color: #03a1d0;
  transform: translateY(-1px);
}

.auth-demo-pill b {
  font-weight: 600;
}

.auth-demo-pill span.badge-fill {
  background: #072b5f;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label a {
  font-size: 12px;
  font-weight: 500;
  color: #072b5f;
  text-decoration: none;
  transition: color 0.15s;
}

.form-label a:hover {
  color: #03a1d0;
  text-decoration: underline;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--faint);
  pointer-events: none;
}

.form-input {
  width: 100%;
  height: 41px;
  padding: 0 14px 0 38px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.form-input.no-icon {
  padding-left: 14px;
}

.form-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #03a1d0;
  box-shadow: 0 0 0 3.5px rgba(3, 161, 208, 0.18);
}

.form-input::placeholder {
  color: #9ba39e;
}

.pwd-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.pwd-toggle:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.pwd-toggle svg {
  width: 18px;
  height: 18px;
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.form-checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--faint);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.15s;
}

.form-checkbox-row input[type="checkbox"]:checked {
  background: #072b5f;
  border-color: #072b5f;
}

.form-checkbox-row input[type="checkbox"]:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.btn-auth {
  width: 100%;
  height: 48px;
  background: #072b5f;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(7, 43, 95, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth:hover {
  background: #0a3a7d;
  box-shadow: 0 6px 20px rgba(7, 43, 95, 0.3);
  transform: translateY(-1px);
}

.btn-auth:active {
  background: #051a3a;
  transform: translateY(0);
}

.btn-auth:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-footer-text {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.auth-footer-text a {
  color: #072b5f;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-footer-text a:hover {
  color: #03a1d0;
  text-decoration: underline;
}

/* Success Card for Password Reset / Feedback */
.auth-feedback-box {
  background: #e0f2fe;
  border: 1px solid #38bdf8;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #051a3a;
  font-size: 13.5px;
  line-height: 1.45;
}

.auth-feedback-box svg {
  width: 22px;
  height: 22px;
  color: #072b5f;
  flex-shrink: 0;
}

/* Toast alert */
.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #072b5f;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(7, 43, 95, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.auth-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Password Strength Indicator */
.strength-bar {
  display: flex;
  gap: 4px;
  height: 4px;
  margin-top: 6px;
}

.strength-step {
  flex: 1;
  background: var(--hair);
  border-radius: 2px;
  transition: background 0.2s;
}

.strength-step.active-weak {
  background: #d95757;
}

.strength-step.active-medium {
  background: #d99a26;
}

.strength-step.active-strong {
  background: #03a1d0;
}

/* Spinner inside button */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-height: 520px) {
  html, body {
    height: auto !important;
    overflow-y: auto !important;
  }
}

/* Hide top progress bar completely */
#nprogress,
.nprogress-busy,
#nprogress .bar,
#nprogress .peg,
#nprogress .spinner {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
}

@media (max-width: 480px) {
  .auth-wrapper {
    max-width: 100%;
    padding: 0 4px;
    gap: 12px;
  }
  .auth-card {
    padding: 24px 20px;
    border-radius: 20px;
  }
  .auth-title {
    font-size: 19px;
  }
  .form-input {
    height: 44px;
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  .form-input {
    height: 48px;
    font-size: 16px;
  }

  .pwd-toggle {
    right: 2px;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .form-checkbox-row {
    min-height: 44px;
  }
}



