/* ============================
   SOFTPYME กค LOGIN กค TONOS AZULES
   ============================ */

:root {
  --sp-blue-900: #0b2e59;
  --sp-blue-700: #12468c;
  --sp-blue-600: #1a5fb4;
  --sp-blue-500: #2f80e0;
  --sp-blue-400: #5b9bf0;
  --sp-blue-100: #eaf2fd;
  --sp-gray-500: #7a8aa0;
  --sp-gray-200: #eef1f6;
  --sp-white: #ffffff;
  --sp-radius: 14px;
}

html {
  background: linear-gradient(135deg, var(--sp-blue-900) 0%, var(--sp-blue-600) 55%, var(--sp-blue-400) 100%);
  background-attachment: fixed;
}

body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  min-height: 100vh;
  margin: 0;
  color: var(--sp-blue-900);
}

a {
  color: var(--sp-blue-500);
  display: inline-block;
  text-decoration: none;
  font-weight: 400;
}

/* STRUCTURE */

.wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

#formContent {
  border-radius: var(--sp-radius);
  background: var(--sp-white);
  width: 100%;
  max-width: 400px;
  position: relative;
  padding: 40px 32px 32px;
  box-shadow: 0 25px 50px -12px rgba(11, 46, 89, 0.45);
  text-align: center;
  box-sizing: border-box;
}

/* HEADER / ICON */

.login-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--sp-blue-100);
}

#icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.login-title {
  margin: 0 0 24px;
  font-weight: 600;
  font-size: 20px;
  color: var(--sp-blue-900);
}

.login-title span {
  color: var(--sp-blue-500);
  font-weight: 300;
}

/* FORM FIELDS */

.input-group-login {
  position: relative;
  margin: 0 0 16px;
  text-align: left;
}

.input-group-login i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sp-gray-500);
  font-size: 14px;
  transition: color 0.25s ease-in-out;
  pointer-events: none;
}

.input-group-login input {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--sp-gray-200);
  border: 2px solid var(--sp-gray-200);
  color: var(--sp-blue-900);
  padding: 14px 16px 14px 44px;
  font-size: 15px;
  border-radius: 10px;
  transition: all 0.25s ease-in-out;
}

.input-group-login input::placeholder {
  color: var(--sp-gray-500);
}

.input-group-login input:focus {
  background-color: var(--sp-white);
  border-color: var(--sp-blue-500);
  box-shadow: 0 0 0 4px rgba(47, 128, 224, 0.12);
}

.input-group-login input.field-error {
  border-color: #e05266;
  background-color: #fdf1f3;
}

.input-group-login input.field-error:focus {
  box-shadow: 0 0 0 4px rgba(224, 82, 102, 0.15);
}

.input-group-login:focus-within i {
  color: var(--sp-blue-500);
}

/* BUTTON */

.btn-login {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, var(--sp-blue-600), var(--sp-blue-500));
  border: none;
  color: var(--sp-white);
  padding: 15px 20px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  margin: 8px 0 4px;
  cursor: pointer;
  box-shadow: 0 10px 25px 0 rgba(26, 95, 180, 0.35);
  transition: all 0.2s ease-in-out;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--sp-blue-700), var(--sp-blue-600));
}

.btn-login:active {
  transform: scale(0.97);
}

.btn-login:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-login .btn-spinner {
  display: none;
}

.btn-login.loading .btn-text {
  visibility: hidden;
}

.btn-login.loading .btn-spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ANIMATIONS */

.fadeInDown {
  -webkit-animation-name: fadeInDown;
  animation-name: fadeInDown;
  -webkit-animation-duration: 0.8s;
  animation-duration: 0.8s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@-webkit-keyframes fadeInDown {
  0% { opacity: 0; -webkit-transform: translate3d(0, -40px, 0); transform: translate3d(0, -40px, 0); }
  100% { opacity: 1; -webkit-transform: none; transform: none; }
}

@keyframes fadeInDown {
  0% { opacity: 0; -webkit-transform: translate3d(0, -40px, 0); transform: translate3d(0, -40px, 0); }
  100% { opacity: 1; -webkit-transform: none; transform: none; }
}

@-webkit-keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@-moz-keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.fadeIn {
  opacity: 0;
  -webkit-animation: fadeIn ease-in 1;
  -moz-animation: fadeIn ease-in 1;
  animation: fadeIn ease-in 1;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  -webkit-animation-duration: 0.8s;
  -moz-animation-duration: 0.8s;
  animation-duration: 0.8s;
}

.fadeIn.first  { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
.fadeIn.second { -webkit-animation-delay: 0.35s; animation-delay: 0.35s; }
.fadeIn.third  { -webkit-animation-delay: 0.5s; animation-delay: 0.5s; }
.fadeIn.fourth { -webkit-animation-delay: 0.65s; animation-delay: 0.65s; }

/* OTHERS */

*:focus {
  outline: none;
}

/* RESPONSIVE */

@media (max-width: 480px) {
  #formContent {
    padding: 32px 20px 24px;
    max-width: 100%;
  }

  .login-title {
    font-size: 18px;
  }

  .input-group-login input {
    font-size: 14px;
    padding: 12px 14px 12px 40px;
  }

  .btn-login {
    padding: 13px 16px;
    font-size: 12px;
  }
}

@media (max-width: 340px) {
  .wrapper {
    padding: 12px;
  }

  #formContent {
    padding: 24px 16px 20px;
  }
}