
:root {
  --navy: #142D4E;
  --navy-light: #1D416B;
  --blue: #2878C8;
  --blue-hover: #1F65AA;
  --background: #F3F5F8;
  --white: #FFFFFF;
  --text: #243247;
  --text-muted: #788597;
  --border: #DCE3EB;
  --danger: #C0392B;
  --success: #16A36A;
  --shadow: 0 12px 40px rgba(20, 45, 78, 0.10);
  --radius: 14px;
}

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

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(40, 120, 200, 0.08), transparent 35%),
    var(--background);
  color: var(--text);
}

/* Contenedor principal */

.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px 24px;
}

/* Tarjeta de login */

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid rgba(220, 227, 235, 0.8);
  border-radius: var(--radius);
  padding: 42px 40px 34px;
  box-shadow: var(--shadow);
}

/* Marca */

.brand {
  text-align: center;
}

.brand-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  border-radius: 16px;
}

.brand-icon svg {
  width: 30px;
  height: 30px;
}

.brand h1 {
  color: var(--navy);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.brand-subtitle {
  margin-top: 9px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* Separador */

.separator {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

/* Bienvenida */

.welcome {
  margin-bottom: 26px;
}

.welcome h2 {
  color: var(--navy);
  font-size: 21px;
  font-weight: 650;
  margin-bottom: 8px;
}

.welcome p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Formulario */

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

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

.form-group label {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(40, 120, 200, 0.12);
}

.form-group input[readonly] {
  background: #F5F7FA;
  color: #596779;
  cursor: default;
}

.field-hint {
  color: var(--text-muted);
  font-size: 11px;
}

/* Campo de contraseña */

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 76px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.toggle-password:hover {
  color: var(--blue-hover);
}

/* Mensaje de error */

.error-message {
  padding: 12px 14px;
  background: #FDF0EF;
  border: 1px solid #F3D0CC;
  border-radius: 8px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.error-message[hidden] {
  display: none;
}

/* Botón de ingreso */

.login-button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.login-button:hover {
  background: var(--blue-hover);
  box-shadow: 0 5px 14px rgba(40, 120, 200, 0.22);
  transform: translateY(-1px);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:focus-visible,
.toggle-password:focus-visible {
  outline: 3px solid rgba(40, 120, 200, 0.3);
  outline-offset: 3px;
}

.login-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-arrow {
  font-size: 19px;
  line-height: 1;
}

/* Información de seguridad */

.security-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.security-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(22, 163, 106, 0.12);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.security-info p {
  color: var(--text-muted);
  font-size: 11px;
}

/* Footer */

.footer {
  margin-top: 28px;
  text-align: center;
}

.footer p {
  color: #8793A2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.footer span {
  display: block;
  margin-top: 6px;
  color: #A0AAB6;
  font-size: 10px;
}

/* Logo Operación Asistida */

.brand-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F58220;
  color: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(245, 130, 32, 0.22);
}

.brand-icon span {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
}


/* =====================================
   FONDO ANIMADO VAYRO
===================================== */

body {
  position: relative;
  isolation: isolate;
  background-color: #FFF7ED;
}

/* Fondo de burbujas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../assets/fondo-login.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

/* Mantener el contenido por encima */
.sidebar,
.main-content,
.topbar,
.welcome-section,
.stats-container,
.info-panel,
footer {
  position: relative;
}

/* Adaptación a celulares */

@media (max-width: 480px) {
  .login-container {
    padding: 24px 16px;
  }

  .login-card {
    padding: 32px 24px 28px;
  }

  .brand h1 {
    font-size: 21px;
  }

  .welcome h2 {
    font-size: 19px;
  }
}

@media (max-width: 350px) {
  .login-card {
    padding: 28px 18px 24px;
  }

  .brand h1 {
    font-size: 19px;
  }
}
