@font-face {
  font-family: 'Nunito Sans';
  src: url('../NunitoSans-VariableFont_YTLC,opsz,wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --primary: #265f5c;
  --primary-dark: #1d4b49;
  --secondary: #2d7471;
  --black: #332f2f;
  --gray: #7a7272;
    --gray-light: #f5f5f5;
  --white: #fff;
    --dark-light: #4a4545;
  --error: #c1504c;
  --font-primary: 'Nunito Sans', sans-serif;

  /* 8K SCALING LOGIC (1920px base) */
  --ui-scaling: 0.8333vw;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* loader */
#topLoader {
  position: fixed;
  top: 0;
  left: 0;
  height: 0.3em;
  width: 0%;
  background: #f6bb26;
  z-index: 999999;
  transition: width 0.4s ease;
}

.skip-login-preloader #preloader {
  display: none !important;
}

.auth-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.95em;
  min-width: 19em;
  width: min(30em, calc(100vw - 2em));
  padding: 2.1em 2.1em 1.55em;
  border: 1px solid rgba(0, 137, 123, 0.24);
  border-radius: 1em;
  background: var(--white);
  box-shadow: 0 1.1em 3em rgba(16, 35, 32, 0.22);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -48%);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.auth-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
  box-shadow: 0 1.1em 3em rgba(16, 35, 32, 0.22), 0 0 0 100vmax rgba(20, 28, 26, 0.54);
}

.auth-toast.show::before {
  content: none;
}

.auth-toast-close {
  position: absolute;
  top: 0.85em;
  right: 0.9em;
  width: 1.85em;
  height: 1.85em;
  border: 0;
  border-radius: 50%;
  background: #f2f7f6;
  color: #667572;
  font-size: 1.2em;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-toast-close:hover {
  background: #e2efed;
  color: #203a36;
}

.auth-toast-icon {
  width: 3.5em;
  height: 3.5em;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0.8em;
  background: #0f7c72;
  color: var(--white);
  font-weight: 800;
  font-size: 0.92em;
  letter-spacing: 0;
}

.auth-toast-title {
  color: #253b37;
  font-weight: 800;
  font-size: 1.18em;
  line-height: 1.25;
  padding-right: 0;
}

.auth-toast-text {
  color: #41524e;
  font-size: 0.98em;
  line-height: 1.45;
  margin-top: 0.35em;
  max-width: 24em;
}

.auth-toast-action {
  margin-top: 1.05em;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: var(--white);
  min-height: 2.85em;
  padding: 0.72em 1.65em;
  font-weight: 800;
  cursor: pointer;
  max-width: 100%;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-toast-action:hover {
  background: #0b625b;
  transform: translateY(-0.05em);
}
/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #265f5c 0%, #332f2f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5em;
}

.loader-text {
  color: var(--white);
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: textFade 1.5s ease-in-out infinite;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.loader-square {
  width: 7.1em;
  height: 7.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.4em solid rgba(255, 255, 255, 0.2);
  border-radius: 1em;
  animation: squareSpin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-square img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  background: transparent;
}

@keyframes textFade {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes squareSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.custom-scale-wrapper {
  font-size: var(--ui-scaling);

  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1000px) {

  .custom-scale-wrapper {
    font-size: 10px;
  }
}

@media (min-width: 7680px) {
  .custom-scale-wrapper {
    font-size: 64px;
  }
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, #008374 0%, #332f2f 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  font-size: var(--base-font-size);
}

/* ================= ANIMATIONS ================= */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(2em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-2em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {

  0%,
  100% {
    opacity: 0.5;
    width: 6em;
  }

  50% {
    opacity: 1;
    width: 10em;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3em);
  }
}

/* ================= BACKGROUND ================= */
.bg-shapes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite ease-in-out;
}

.shape1 {
  width: 18em;
  height: 18em;
  top: 10%;
  left: 10%;
}

.shape2 {
  width: 12em;
  height: 12em;
  bottom: 20%;
  right: 15%;
}

.shape3 {
  width: 9em;
  height: 9em;
  top: 60%;
  left: 5%;
}

/* ================= MAIN CARD ================= */
.app-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em;
  position: relative;
  z-index: 1;
}

.login-container,
.signup-container {
  position: relative;
  width: 100%;
  max-width: 80em;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(135deg, #008D7F 0%, #332f2f 100%);
  border-radius: 1.5em;
  box-shadow: 0 2.5em 5.5em rgba(0, 0, 0, 0.4);
  overflow: hidden;
  /* Card sliding up */
  animation: fade-up 0.8s ease-out forwards;
}

/* LEFT PANEL */
.left-panel {
  color: var(--white);
  padding: 4em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  /* Content sliding down */
}

.left-panel::before {
  content: "";
  position: absolute;
  width: 30em;
  height: 30em;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -10em;
  right: -10em;
  animation: pulse 8s infinite;
  z-index: -1;
}

.logo img {
    width: 14.5em;
    height: auto;
    margin-bottom: 1.6em;
    animation: fade-down 1s ease-out 0.2s backwards;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05);
}
.left-panel .tagline {
  font-size: 2em;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  padding-bottom: .5em;
  margin-bottom: 0;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fade-up 1s ease-out 0.2s backwards;
}

/* Glow Line */
.left-panel .tagline-bar{
  font-size: 1em;
    font-weight: 500;
  line-height: 1.4;
  position: relative;
   background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fade-up 1s ease-out 0.2s backwards;
}
.left-panel .tagline-bar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6em;
  height: 0.25em;
  background: linear-gradient(90deg, transparent, var(--white), transparent);
  animation: glow 2s ease-in-out infinite;
}

/* RIGHT PANEL (FORM) */
.info-pannel {
  background: var(--white);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.75em 3em;
  /* Form sliding up */
}

.form-header h2 {
    font-size: 2.325em;
    color: var(--black);
    margin-bottom: 0.3em;
    font-weight: 600;
}

.form-header small ,
.resend-otp{
  color: var(--gray);
  font-size: 1.18em;
  margin-bottom: 2.1em;
  display: block;
}
.otp-btn{
  border: none;
  padding: none;
  background-color: transparent;
  color: var(--primary);
  font-size: 1.1em;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}
.form-header small span{
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}
.auth-form_group {
  margin-bottom: 1.1em;
}

.auth-form_group label {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.3em;
  display: block;
  color: var(--black);
}

.auth-form_group input ,
.otp-input{
  width: 100%;
  padding: 0.85em 1em;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75em;
  font-size: 1.1em;
  outline: none;
}
.otp-inputs{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.1em;
  margin-bottom: 2em;
}
.resend-otp{
  text-align: center;

}
.otp-inputs input {
    width: 2.2em;
    height: 2.8em;
    text-align: center;
    font-size: 2em;
    font-weight: 500;
    padding: 0;
    border-radius: 0.5em;
}
.auth-form_group input:focus {
  border-color: var(--primary);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 3.2em;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.85em;
  z-index: 5;
  width: 2.4em;
  height: 2.4em;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #475569 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--primary) !important;
  background: #f1f5f9 !important;
  outline: none;
}

.password-eye-text {
  display: block;
  font-family: "Segoe UI Symbol", "Apple Color Emoji", Arial, sans-serif;
  font-size: 1.2em;
  line-height: 1;
}

.password-toggle.is-visible .password-eye-text {
  opacity: 0.55;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.7em 0 1.6em;
  font-size: 0.875em;
}
.form-options label{
  font-size: 1.2em;
}
/* BUTTONS */
.btn-login,
.btn-register,
.btn-cancel {
  width: 100%;
  padding: 1em 1em;
  border: none;
  border-radius: 3em;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.forgot{
  color: var(--primary);
  cursor: pointer;
  font-size: 1.2em;
  font-weight: 700;
}
.btn-login,
.btn-register {
  background: linear-gradient(135deg, #265f5c 0%, #2d7471 100%);
  color: var(--white);
  box-shadow: 0 0.25em 1em rgba(38, 95, 92, 0.3);
}

.btn-cancel {
  background: #313131;
  color: var(--white);
}

.btn-login:hover,
.btn-register:hover {
  transform: translateY(-0.2em);
  opacity: 0.9;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875em;
  margin-top: 2em;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.remember-me input{
  height: 1.3em;
    width: 1.3em;
    accent-color: var(--primary);
}

.input-wrapper input.error {
    border-color: var(--error);
}

.error-message {
    color: var(--error);
    font-size: 1em;
    margin-top: clamp(4px, 0.5vh, 10px);
    display: none;
}

.error-message.show {
    display: block;
}
.password-requirements{
      background: var(--gray-light);
    padding: 1em;
    border-radius: 0.5em;
    margin-top: 1em;
    font-size: 1.8em;
    color: var(--dark-light);
    text-align: left;
}
.password-requirements ul{
  padding-left: 0.8em;
  margin-top: 0.5em;
}
.password-requirements li{
  font-size: 0.7em;
}
.step-indicator{
  text-align: center;
  font-size: 1.2em;
  color: var(--gray);
  margin-bottom: 1.2em;
  font-weight: 500;
}
.forgot-pannel .form-panel.active{
    display: block;
}
.forgot-pannel .form-panel{
    display: none;
    animation: fadeInSection 0.5s ease-in-out;
}
.login-pannel #otpSection {
  display: none;
}

.login-pannel #loginSection {
  display: block;
}

.form-panel {
  animation: fadeInSection 0.5s ease-in-out;
}
.dark{
  color: var(--black);
}
@keyframes fadeInSection {
  from {
    opacity: 0;
    transform: translateY(2em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.3s ease-in-out;
  padding: 2em;
}

.modal.show {
  display: flex;
}


@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
    background: var(--white);
    border-radius: 4em;
    padding: 4em 3em;
    max-width: 38em;
    height: auto;
    width: 90%;
    text-align: center;
    box-shadow: 0 clamp(10px, 2vw, 40px) clamp(40px, 5vw, 100px) rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.4s ease-out;
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(7em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-icon {
  width: 11em;
  height: 11em;
  margin: 0 auto 2em;
  background: linear-gradient(135deg, #265f5c 0%, #2d7471 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleInIcon 0.5s ease-out 0.2s both;
}

@keyframes scaleInIcon {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.modal-icon svg {
  width: 60%;
  height: 60%;
  stroke: var(--white);
  stroke-width: 0.2em;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.modal-content h2 {
  font-size: 3em;
  color: var(--dark);
  margin-bottom: 1em;
  font-weight: 600;
  line-height: 1.2;
}

.modal-content p {
  font-size: 1.2em;
  color: var(--gray);
  margin-bottom: 3em;
  line-height: 1.6;
}

.modal-button {
    width: 100%;
    padding: 1em;
    background: linear-gradient(135deg, #265f5c 0%, #2d7471 100%);
    color: var(--white);
    border: none;
    border-radius: 3em;
    font-size: 1.5em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 clamp(2px, 0.3vw, 8px) clamp(8px, 1vw, 24px) rgba(38, 95, 92, 0.3);
    line-height: 1.4;
}

.modal-button:hover {
  transform: translateY(-0.2em);
  box-shadow: 0 clamp(3px, 0.4vw, 10px) clamp(10px, 1.5vw, 32px) rgba(38, 95, 92, 0.4);
}

/* Error Animation */
.error-shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-1em);
  }

  75% {
    transform: translateX(-1em);
  }
}
/* MOBILE RESPONSIVE */
@media (max-width: 1000px) {

  .login-container,
  .signup-container {
    grid-template-columns: 1fr;
    width: 90%;
    max-width: 45em;
  }
  .info-pannel {
    padding: 3em 2em;
}
.form-header small {
    margin-bottom: 1.6em;
}
}
@media (max-width: 767px) {
.left-panel .tagline {
    font-size: 1.4em;
}
.left-panel {
    padding: 3em 3em 2em 3em;
}
}
@media (max-width:1024px) {
    .login-container {
        width: 94%;
        height: auto;
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        padding: 40px;
        text-align: center;
        font-size: 1.02em;
    }



    .info-pannel {
        width: 100%;
        padding: 40px;
        min-height: max-content;
    }

    .form-panel {
        position: relative;
        inset: auto;
    }
}

@media (max-width:767px) {

.login-container, .signup-container {
    grid-template-columns: 1fr;
    margin-top: 3em;
}.app-container {
    padding: .5em;
    align-items: baseline;
}
  .signup-container,
  .forgot-pannel{
    margin-top: 3em;
  } 
    .info-pannel {
        width: 100%;
        padding: 0px;
        min-height: auto;
    }

.form-panel {
    padding: 40px 15px;
    font-size: 1.02em;
}

    .logo img {
        width: 135px;
        height: auto;
    }

    .tagline {
        padding-top: 0;
    }

    .form-panel small {
        margin-bottom: 0;
    }
    .modal-content {
    max-width: 100%;   width: 100%;
}
.modal-content h2 {
    font-size: 2.5em;
}
.modal-icon svg {
    width: 45%;
    height: 45%;
}
.modal-icon {
    width: 8em;
    height: 8em;
}
.otp-inputs {
    gap: 0.7em;
}
.otp-inputs input {
    width: 1.8em;
    height: 2.2em;
    font-size: 1.9em;
    margin-top: 0.5em;
}
    .app-container {
        padding: .5em;
    }
}
@media (max-width:300px) {
    .app-container {
        padding: .5em;
    }
    .form-panel {
    padding: 30px 10px;
}
    .otp-inputs input {
        width: 1.6em;
        height: 1.9em;
        font-size: 1.9em;
        margin-top: 0.5em;
    }
}
