/* ==========================================================
   SISTEMA PEDIÁTRICO
   LOGIN
   ========================================================== */

/* ==========================================================
   VARIABLES
   ========================================================== */

:root {
  --primary: #0b607b;
  --primary-dark: #073e52;
  --primary-deep: #052f40;

  --secondary: #38aaa5;
  --secondary-light: #77d1ca;

  --white: #ffffff;

  --background: #e8f2f4;

  --text: #20333e;
  --text-secondary: #667d88;
  --text-light: #8da0aa;

  --border: #d9e6ea;

  --danger: #b4232c;
  --danger-background: #fff1f2;

  --shadow: 0 35px 80px rgba(8, 62, 82, 0.18);
}

/* ==========================================================
   RESET
   ========================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;

  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  color: var(--text);

  background:
    radial-gradient(
      circle at 12% 12%,
      rgba(77, 181, 176, 0.23),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 85%,
      rgba(24, 110, 135, 0.16),
      transparent 35%
    ),
    linear-gradient(135deg, #dcecee 0%, #eef5f6 48%, #d9e9ec 100%);
}

/* ==========================================================
   PÁGINA LOGIN
   ========================================================== */

.login-page {
  position: relative;

  min-height: 100vh;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 45px;

  overflow: hidden;
}

/* ==========================================================
   CONTENEDOR
   ========================================================== */

.login-container {
  position: relative;

  width: 100%;

  max-width: 1160px;

  min-height: 650px;

  display: grid;

  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(420px, 0.9fr);

  background: rgba(255, 255, 255, 0.94);

  border: 1px solid rgba(255, 255, 255, 0.88);

  border-radius: 28px;

  overflow: hidden;

  box-shadow: var(--shadow);
}

/* ==========================================================
   PANEL IZQUIERDO
   ========================================================== */

.login-brand {
  position: relative;

  display: flex;

  align-items: center;

  padding: 65px 58px;

  color: var(--white);

  background:
    radial-gradient(
      circle at 20% 15%,
      rgba(104, 213, 204, 0.22),
      transparent 30%
    ),
    linear-gradient(150deg, #10708b 0%, #09556d 45%, #073d51 100%);

  overflow: hidden;
}

/* ==========================================================
   DECORACIONES
   ========================================================== */

.brand-decoration {
  position: absolute;

  pointer-events: none;

  border-radius: 50%;
}

.brand-decoration-one {
  width: 380px;
  height: 380px;

  right: -160px;
  top: -130px;

  border: 52px solid rgba(255, 255, 255, 0.035);
}

.brand-decoration-two {
  width: 330px;
  height: 330px;

  left: -190px;
  bottom: -180px;

  background: rgba(72, 184, 177, 0.1);
}

/* ==========================================================
   CONTENIDO BRAND
   ========================================================== */

.brand-content {
  position: relative;

  z-index: 2;

  width: 100%;

  max-width: 520px;
}

/* ==========================================================
   LOGO PEDIATRA OSHIRO
   ========================================================== */

.brand-logo {
  width: 190px;
  height: auto;

  display: flex;

  align-items: flex-start;
  justify-content: flex-start;

  margin-bottom: 28px;

  padding: 0;

  border: none;

  border-radius: 0;

  background: transparent;

  box-shadow: none;

  overflow: visible;
}

.brand-logo img {
  width: 190px;
  height: auto;

  display: block;

  object-fit: contain;

  border: none;

  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

/* ==========================================================
   BADGE
   ========================================================== */

.brand-badge {
  width: fit-content;

  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 23px;

  padding: 8px 14px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.1);

  font-size: 11px;

  font-weight: 700;

  letter-spacing: 0.8px;

  text-transform: uppercase;
}

.brand-badge-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--secondary-light);

  box-shadow: 0 0 0 4px rgba(119, 209, 202, 0.1);
}

/* ==========================================================
   TÍTULO
   ========================================================== */

.login-brand h1 {
  max-width: 520px;

  margin-bottom: 21px;

  font-size: clamp(38px, 4vw, 49px);

  line-height: 1.12;

  font-weight: 760;

  letter-spacing: -1.4px;
}

.login-brand h1 span {
  display: block;

  color: #75d1ca;
}

/* ==========================================================
   DESCRIPCIÓN
   ========================================================== */

.brand-description {
  max-width: 500px;

  margin-bottom: 40px;

  color: rgba(255, 255, 255, 0.82);

  font-size: 15px;

  line-height: 1.75;
}

/* ==========================================================
   CARACTERÍSTICAS
   ========================================================== */

.brand-features {
  display: flex;

  flex-direction: column;

  gap: 21px;
}

.brand-feature {
  display: flex;

  align-items: flex-start;

  gap: 14px;
}

.feature-icon {
  width: 29px;
  height: 29px;

  min-width: 29px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: #ffffff;

  background: rgba(65, 184, 177, 0.28);

  border: 1px solid rgba(126, 222, 215, 0.22);
}

.feature-icon svg {
  width: 15px;
  height: 15px;
}

.brand-feature strong {
  display: block;

  margin-bottom: 4px;

  font-size: 14px;

  font-weight: 700;
}

.brand-feature small {
  display: block;

  max-width: 380px;

  color: rgba(255, 255, 255, 0.68);

  font-size: 12px;

  line-height: 1.55;
}

/* ==========================================================
   PANEL DERECHO
   ========================================================== */

.login-panel {
  display: flex;

  align-items: center;
  justify-content: center;

  padding: 60px 56px;

  background: rgba(255, 255, 255, 0.98);
}

.login-form-container {
  width: 100%;

  max-width: 395px;
}

/* ==========================================================
   ENCABEZADO
   ========================================================== */

.login-header {
  margin-bottom: 34px;
}

.login-eyebrow {
  display: block;

  margin-bottom: 9px;

  color: var(--secondary);

  font-size: 12px;

  font-weight: 800;

  letter-spacing: 1.4px;

  text-transform: uppercase;
}

.login-header h2 {
  margin-bottom: 10px;

  color: var(--primary-dark);

  font-size: 31px;

  line-height: 1.2;

  font-weight: 760;

  letter-spacing: -0.7px;
}

.login-header p {
  color: var(--text-secondary);

  font-size: 14px;

  line-height: 1.6;
}

/* ==========================================================
   ALERTA
   ========================================================== */

.login-alert {
  display: flex;

  align-items: center;

  gap: 11px;

  margin-bottom: 22px;

  padding: 13px 15px;

  border: 1px solid rgba(180, 35, 44, 0.13);

  border-radius: 12px;

  color: var(--danger);

  background: var(--danger-background);

  font-size: 13px;

  font-weight: 600;
}

.login-alert-icon {
  width: 23px;
  height: 23px;

  min-width: 23px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: #ffffff;

  background: var(--danger);

  font-size: 12px;

  font-weight: bold;
}

/* ==========================================================
   FORMULARIO
   ========================================================== */

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 21px;
}

.form-group label {
  display: block;

  margin-bottom: 8px;

  color: #29404c;

  font-size: 13px;

  font-weight: 700;
}

/* ==========================================================
   INPUT WRAPPER
   ========================================================== */

.input-wrapper {
  position: relative;
}

/* ==========================================================
   ICONO INPUT
   ========================================================== */

.input-svg {
  position: absolute;

  left: 16px;
  top: 50%;

  width: 19px;
  height: 19px;

  transform: translateY(-50%);

  color: #8fa3ad;

  pointer-events: none;

  transition: color 0.2s ease;
}

/* ==========================================================
   INPUT
   ========================================================== */

.input-wrapper input {
  width: 100%;

  height: 55px;

  padding: 0 50px 0 47px;

  border: 1px solid var(--border);

  border-radius: 14px;

  outline: none;

  color: var(--text);

  background: #f8fbfc;

  font-family: inherit;

  font-size: 14px;

  font-weight: 500;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #a2b1b9;

  font-weight: 400;
}

.input-wrapper:hover input {
  border-color: #bed4da;
}

.input-wrapper:focus-within input {
  border-color: var(--secondary);

  background: #ffffff;

  box-shadow: 0 0 0 4px rgba(56, 170, 165, 0.1);
}

.input-wrapper:focus-within .input-svg {
  color: var(--secondary);
}

/* ==========================================================
   VER CONTRASEÑA
   ========================================================== */

.password-toggle {
  position: absolute;

  top: 50%;
  right: 11px;

  width: 38px;
  height: 38px;

  display: flex;

  align-items: center;
  justify-content: center;

  transform: translateY(-50%);

  padding: 0;

  border: none;

  border-radius: 10px;

  color: #8499a3;

  background: transparent;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary);

  background: rgba(11, 96, 123, 0.07);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================
   OPCIONES
   ========================================================== */

.form-options {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin: -2px 0 24px;
}

/* ==========================================================
   RECORDAR USUARIO
   ========================================================== */

.remember-user {
  position: relative;

  display: flex !important;

  align-items: center;

  gap: 9px;

  margin: 0 !important;

  color: #697e88 !important;

  font-size: 12px !important;

  font-weight: 500 !important;

  cursor: pointer;
}

.remember-user input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.custom-checkbox {
  position: relative;

  width: 18px;
  height: 18px;

  min-width: 18px;

  border: 1.5px solid #c8d8de;

  border-radius: 5px;

  background: #ffffff;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.remember-user:hover .custom-checkbox {
  border-color: var(--secondary);
}

.remember-user input:checked + .custom-checkbox {
  border-color: var(--secondary);

  background: var(--secondary);

  box-shadow: 0 0 0 3px rgba(56, 170, 165, 0.1);
}

.remember-user input:checked + .custom-checkbox::after {
  content: "";

  position: absolute;

  left: 5px;
  top: 2px;

  width: 4px;
  height: 8px;

  border: solid #ffffff;

  border-width: 0 2px 2px 0;

  transform: rotate(45deg);
}

/* ==========================================================
   SESIÓN SEGURA
   ========================================================== */

.secure-session {
  display: flex;

  align-items: center;

  gap: 6px;

  color: #8a9ca5;

  font-size: 11px;
}

.secure-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--secondary);

  box-shadow: 0 0 0 3px rgba(56, 170, 165, 0.1);
}

/* ==========================================================
   BOTÓN LOGIN
   ========================================================== */

.btn-login {
  width: 100%;

  height: 56px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 0 19px;

  border: none;

  border-radius: 14px;

  color: #ffffff;

  background: linear-gradient(135deg, var(--primary), var(--primary-dark));

  font-family: inherit;

  font-size: 14px;

  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 13px 28px rgba(11, 96, 123, 0.22);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn-login:hover {
  transform: translateY(-2px);

  box-shadow: 0 17px 32px rgba(11, 96, 123, 0.27);

  filter: brightness(1.04);
}

.btn-login:active {
  transform: translateY(0);
}

.button-icon {
  width: 20px;
  height: 20px;

  transition: transform 0.2s ease;
}

.btn-login:hover .button-icon {
  transform: translateX(4px);
}

/* ==========================================================
   SEGURIDAD INFERIOR
   ========================================================== */

.login-security {
  display: flex;

  justify-content: center;
  align-items: center;

  gap: 8px;

  margin-top: 27px;

  padding-top: 22px;

  border-top: 1px solid #edf2f4;

  color: #899ca5;

  font-size: 11px;
}

.login-security svg {
  width: 15px;
  height: 15px;

  color: var(--secondary);
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 980px) {
  .login-page {
    padding: 25px;
  }

  .login-container {
    max-width: 680px;

    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 45px 42px;
  }

  .brand-description {
    margin-bottom: 25px;
  }

  .brand-features {
    display: none;
  }

  .login-panel {
    padding: 48px 42px;
  }
}

/* ==========================================================
   CELULAR
   ========================================================== */

@media (max-width: 600px) {
  .login-page {
    padding: 0;

    align-items: stretch;
  }

  .login-container {
    min-height: 100vh;

    border-radius: 0;

    box-shadow: none;
  }

  .login-brand {
    padding: 30px 25px;
  }

  .brand-logo {
    width: 92px;
    height: 92px;

    margin-bottom: 17px;

    padding: 9px;

    border-radius: 20px;
  }

  .brand-logo img {
    border-radius: 11px;
  }

  .brand-badge {
    margin-bottom: 15px;

    font-size: 9px;
  }

  .login-brand h1 {
    margin-bottom: 13px;

    font-size: 28px;

    letter-spacing: -0.8px;
  }

  .brand-description {
    margin-bottom: 0;

    font-size: 13px;

    line-height: 1.65;
  }

  .login-panel {
    padding: 37px 24px 42px;
  }

  .login-header {
    margin-bottom: 28px;
  }

  .login-header h2 {
    font-size: 27px;
  }

  .form-options {
    align-items: flex-start;

    flex-direction: column;

    gap: 12px;
  }

  .btn-login {
    height: 54px;
  }
}

/* ==========================================================
   BOTÓN EN PROCESO
========================================================== */

.btn-login:disabled {
  cursor: not-allowed;

  opacity: 0.88;
}

.btn-login.is-loading {
  transform: none;

  cursor: wait;
}

.btn-login.is-loading:hover {
  transform: none;

  filter: none;
}

.btn-login.is-loading .button-icon {
  opacity: 1;

  animation: loginSpinner 0.8s linear infinite;
}

@keyframes loginSpinner {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
