:root {
  --bg-1: #020617;
  --bg-2: #071629;

  --card: rgba(8, 18, 35, 0.74);
  --card-strong: rgba(9, 22, 42, 0.94);

  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.19);

  --text: #f8fbff;
  --muted: #8ea3bd;
  --soft: #c9d8ea;

  --green: #19f5a7;
  --green-2: #72ffd0;
  --cyan: #27d8ff;
  --blue: #3662ff;

  --danger: #ff5577;
  --warning: #fbbf24;
  --success: #19f5a7;

  --shadow: 0 35px 100px rgba(0, 0, 0, 0.55);
}

/* ====================================================== */
/* RESET */
/* ====================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--bg-1);

  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

/* ====================================================== */
/* PÁGINA */
/* ====================================================== */

.login-page {
  position: relative;
  isolation: isolate;

  min-height: 100vh;
  min-height: 100dvh;

  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));

  display: grid;
  place-items: center;
}

/* ====================================================== */
/* FONDO */
/* ====================================================== */

.page-background {
  position: fixed;
  inset: 0;
  z-index: -1;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(25, 245, 167, 0.16),
      transparent 34%
    ),
    radial-gradient(
      circle at 82% 28%,
      rgba(39, 216, 255, 0.16),
      transparent 30%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(54, 98, 255, 0.22),
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #020617 0%,
      #071629 48%,
      #01040c 100%
    );
}

.mesh-grid {
  position: absolute;
  inset: 0;

  opacity: 0.46;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px
    );

  background-size: 58px 58px;

  mask-image:
    radial-gradient(
      circle at center,
      black 0%,
      transparent 72%
    );
}

.orb {
  position: absolute;

  border-radius: 999px;

  filter: blur(80px);
  opacity: 0.6;

  pointer-events: none;
}

.orb-a {
  width: 360px;
  height: 360px;

  top: -80px;
  left: -80px;

  background: rgba(25, 245, 167, 0.28);
}

.orb-b {
  width: 420px;
  height: 420px;

  top: 18%;
  right: -120px;

  background: rgba(54, 98, 255, 0.34);
}

.orb-c {
  width: 320px;
  height: 320px;

  left: 42%;
  bottom: -140px;

  background: rgba(39, 216, 255, 0.22);
}

/* ====================================================== */
/* LAYOUT */
/* ====================================================== */

.login-layout {
  width: min(1180px, 100%);
  min-height: 690px;

  display: grid;
  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(390px, 0.92fr);

  overflow: hidden;

  border:
    1px solid
    var(--line);

  border-radius: 36px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.11),
      rgba(255, 255, 255, 0.025)
    ),
    rgba(255, 255, 255, 0.035);

  box-shadow: var(--shadow);

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

/* ====================================================== */
/* HERO */
/* ====================================================== */

.hero-panel {
  position: relative;

  min-width: 0;
  min-height: 690px;

  padding: 42px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;

  overflow: hidden;

  border-right:
    1px solid
    var(--line);

  background:
    linear-gradient(
      150deg,
      rgba(25, 245, 167, 0.11),
      transparent 42%
    ),
    linear-gradient(
      330deg,
      rgba(54, 98, 255, 0.18),
      transparent 46%
    ),
    rgba(255, 255, 255, 0.035);
}

.hero-panel::before {
  content: "";

  position: absolute;

  width: 520px;
  height: 520px;

  right: -220px;
  bottom: -220px;

  border-radius: 50%;

  border:
    1px solid
    rgba(25, 245, 167, 0.18);

  background:
    radial-gradient(
      circle,
      rgba(25, 245, 167, 0.13),
      transparent 62%
    );

  pointer-events: none;
}

/* ====================================================== */
/* MARCA */
/* ====================================================== */

.hero-top {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  gap: 14px;
}

.product-logo {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;

  padding: 5px;

  display: grid;
  place-items: center;

  overflow: hidden;

  border-radius: 17px;

  background: #ffffff;

  border:
    1px solid
    rgba(255, 255, 255, 0.4);

  box-shadow:
    0 16px 38px
    rgba(20, 184, 166, 0.24);
}

.product-logo img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

.brand-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;
}

.brand-copy > strong {
  color: #ffffff;

  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.brand-copy > span {
  margin-top: 2px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 650;
}

.brand-copy small {
  margin-top: 6px;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  color: #7e94ad;

  font-size: 10px;
  font-weight: 700;
}

.brand-copy small img {
  width: 18px;
  height: 18px;

  object-fit: contain;
}

/* ====================================================== */
/* TEXTO HERO */
/* ====================================================== */

.hero-content {
  position: relative;
  z-index: 2;

  max-width: 650px;
}

.system-pill {
  width: fit-content;

  margin-bottom: 22px;
  padding: 9px 13px;

  display: inline-flex;
  align-items: center;
  gap: 9px;

  border-radius: 999px;

  color: var(--green-2);

  background:
    rgba(25, 245, 167, 0.08);

  border:
    1px solid
    rgba(25, 245, 167, 0.24);

  font-size: 12px;
  font-weight: 800;
}

.pulse-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 0 6px
    rgba(25, 245, 167, 0.13);
}

.hero-content h1 {
  max-width: 710px;

  font-size:
    clamp(
      42px,
      5vw,
      70px
    );

  line-height: 0.94;
  letter-spacing: -0.068em;

  text-wrap: balance;
}

.hero-content p {
  max-width: 590px;

  margin-top: 22px;

  color: var(--soft);

  font-size: 17px;
  line-height: 1.62;
}

.hero-benefits {
  margin-top: 22px;

  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-benefits span {
  padding: 8px 11px;

  border-radius: 999px;

  color: #b8c9dc;

  background:
    rgba(2, 6, 23, 0.34);

  border:
    1px solid
    rgba(255, 255, 255, 0.09);

  font-size: 11px;
  font-weight: 800;
}

/* ====================================================== */
/* PREVISUALIZACIÓN */
/* ====================================================== */

.dashboard-preview {
  position: relative;
  z-index: 2;

  width: min(570px, 100%);

  padding: 21px;

  border-radius: 26px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.045)
    );

  border:
    1px solid
    rgba(255, 255, 255, 0.14);

  box-shadow:
    0 24px 80px
    rgba(0, 0, 0, 0.35);
}

.preview-top {
  margin-bottom: 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.preview-top p,
.preview-metrics p {
  color: var(--muted);

  font-size: 10px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-top strong {
  display: block;

  margin-top: 5px;

  font-size: 17px;
}

.preview-online {
  padding: 7px 10px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  border-radius: 999px;

  color: var(--green);

  background:
    rgba(25, 245, 167, 0.12);

  font-size: 10px;
  font-weight: 950;

  text-transform: uppercase;
}

.preview-online i {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: currentColor;

  box-shadow:
    0 0 12px
    currentColor;
}

.preview-chart {
  height: 145px;

  padding: 13px;

  display: flex;
  align-items: end;
  gap: 11px;

  overflow: hidden;

  border-radius: 20px;

  background:
    rgba(0, 0, 0, 0.2);

  border:
    1px solid
    rgba(255, 255, 255, 0.08);
}

.preview-chart div {
  flex: 1;
  min-width: 12px;

  height:
    var(
      --bar-height,
      50%
    );

  border-radius:
    999px
    999px
    7px
    7px;

  background:
    linear-gradient(
      180deg,
      var(--green),
      rgba(39, 216, 255, 0.36)
    );

  box-shadow:
    0 0 28px
    rgba(25, 245, 167, 0.16);

  transform-origin: bottom;

  animation:
    previewBarIn
    0.75s
    ease
    both;
}

.preview-chart div:nth-child(2) {
  animation-delay: 0.05s;
}

.preview-chart div:nth-child(3) {
  animation-delay: 0.1s;
}

.preview-chart div:nth-child(4) {
  animation-delay: 0.15s;
}

.preview-chart div:nth-child(5) {
  animation-delay: 0.2s;
}

.preview-chart div:nth-child(6) {
  animation-delay: 0.25s;
}

.preview-chart div:nth-child(7) {
  animation-delay: 0.3s;
}

.preview-chart div:nth-child(8) {
  animation-delay: 0.35s;
}

@keyframes previewBarIn {
  from {
    transform: scaleY(0.05);
    opacity: 0.25;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.preview-metrics {
  margin-top: 14px;

  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 11px;
}

.preview-metrics div {
  min-width: 0;

  padding: 13px;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.06);

  border:
    1px solid
    rgba(255, 255, 255, 0.08);
}

.preview-metrics strong {
  display: block;

  margin-top: 7px;

  font-size: 16px;
}

.metric-online {
  color: var(--green);
}

/* ====================================================== */
/* PANEL DE AUTENTICACIÓN */
/* ====================================================== */

.auth-panel {
  min-width: 0;
  min-height: 690px;

  padding: 42px;

  display: grid;
  place-items: center;

  background:
    radial-gradient(
      circle at top right,
      rgba(25, 245, 167, 0.08),
      transparent 32%
    ),
    rgba(1, 7, 18, 0.36);
}

.auth-card {
  width: min(430px, 100%);
}

.auth-header {
  margin-bottom: 28px;
}

.auth-badge {
  margin-bottom: 17px;
  padding: 8px 12px;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  border-radius: 999px;

  color: #9ceeff;

  background:
    rgba(39, 216, 255, 0.08);

  border:
    1px solid
    rgba(39, 216, 255, 0.25);

  font-size: 12px;
  font-weight: 850;
}

.auth-badge span {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--cyan);

  box-shadow:
    0 0 10px
    var(--cyan);
}

.auth-header h2 {
  font-size: 43px;
  line-height: 1;

  letter-spacing: -0.06em;
}

.auth-header p {
  margin-top: 12px;

  color: var(--muted);

  line-height: 1.58;
}

/* ====================================================== */
/* FORMULARIO */
/* ====================================================== */

.login-form {
  display: grid;
  gap: 17px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: #e2ecf7;

  font-size: 13px;
  font-weight: 850;
}

.input-shell {
  position: relative;

  height: 56px;

  display: flex;
  align-items: center;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.055);

  border:
    1px solid
    rgba(255, 255, 255, 0.13);

  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease;
}

.input-shell:hover {
  border-color:
    rgba(255, 255, 255, 0.2);
}

.input-shell:focus-within {
  border-color:
    rgba(25, 245, 167, 0.75);

  background:
    rgba(255, 255, 255, 0.08);

  box-shadow:
    0 0 0 4px
      rgba(25, 245, 167, 0.11),
    0 18px 45px
      rgba(0, 0, 0, 0.24);

  transform:
    translateY(-1px);
}

.input-shell.is-invalid {
  border-color:
    rgba(255, 85, 119, 0.78);

  box-shadow:
    0 0 0 4px
    rgba(255, 85, 119, 0.1);
}

.input-icon {
  width: 50px;
  flex: 0 0 50px;

  display: grid;
  place-items: center;

  color: var(--muted);
}

.input-icon svg {
  width: 19px;
  height: 19px;

  fill: currentColor;
}

.input-shell input {
  width: 100%;
  height: 100%;
  min-width: 0;

  padding-right: 12px;

  border: 0;
  outline: 0;

  color: var(--text);
  background: transparent;

  font-size: 15px;
  font-weight: 650;
}

.input-shell input::placeholder {
  color:
    rgba(142, 163, 189, 0.68);
}

.password-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  margin-right: 7px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  cursor: pointer;

  color: #dffbf2;

  background:
    rgba(255, 255, 255, 0.08);

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.password-button:hover:not(:disabled) {
  color: var(--green);

  background:
    rgba(25, 245, 167, 0.14);
}

.password-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.password-eye-icon {
  width: 20px;
  height: 20px;

  object-fit: contain;
}

/* ====================================================== */
/* RECORDAR CORREO */
/* ====================================================== */

.remember-control {
  width: fit-content;

  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: #9fb1c6;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
  user-select: none;
}

.remember-control input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
  pointer-events: none;
}

.remember-box {
  position: relative;

  width: 17px;
  height: 17px;
  flex: 0 0 17px;

  border-radius: 5px;

  background:
    rgba(255, 255, 255, 0.05);

  border:
    1px solid
    rgba(255, 255, 255, 0.17);
}

.remember-control input:checked +
.remember-box {
  background:
    linear-gradient(
      135deg,
      var(--green),
      var(--cyan)
    );

  border-color:
    transparent;
}

.remember-control input:checked +
.remember-box::after {
  content: "";

  position: absolute;

  left: 5px;
  top: 2px;

  width: 4px;
  height: 8px;

  border:
    solid #03111d;

  border-width:
    0
    2px
    2px
    0;

  transform:
    rotate(45deg);
}

/* ====================================================== */
/* BOTÓN LOGIN */
/* ====================================================== */

.login-button {
  height: 58px;

  margin-top: 4px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-radius: 17px;

  cursor: pointer;

  color: #03111d;

  background:
    linear-gradient(
      135deg,
      var(--green),
      var(--cyan)
    );

  box-shadow:
    0 20px 50px
      rgba(25, 245, 167, 0.28),
    inset 0 1px 0
      rgba(255, 255, 255, 0.7);

  font-weight: 950;
  letter-spacing: -0.01em;

  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.login-button svg {
  width: 22px;
  height: 22px;

  fill: currentColor;
}

.login-button:hover:not(:disabled) {
  transform:
    translateY(-2px);

  filter:
    brightness(1.06);

  box-shadow:
    0 26px 65px
      rgba(25, 245, 167, 0.34),
    inset 0 1px 0
      rgba(255, 255, 255, 0.7);
}

.login-button:disabled {
  cursor: wait;

  opacity: 0.65;

  transform: none;
}

.login-spinner {
  width: 18px;
  height: 18px;

  border-radius: 50%;

  border:
    2px solid
    rgba(3, 17, 29, 0.28);

  border-top-color:
    #03111d;

  animation:
    loginSpin
    0.75s
    linear
    infinite;
}

@keyframes loginSpin {
  to {
    transform:
      rotate(360deg);
  }
}

/* ====================================================== */
/* MENSAJES */
/* ====================================================== */

.login-message {
  min-height: 22px;

  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.login-message.success {
  color: var(--success);
}

.login-message.error {
  color: var(--danger);
}

.login-message.warning {
  color: var(--warning);
}

.login-message.info {
  color: #9ceeff;
}

/* ====================================================== */
/* TARJETA DEMO */
/* ====================================================== */

.demo-card {
  margin-top: 24px;
  padding: 15px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;

  border-radius: 20px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.045)
    );

  border:
    1px solid
    rgba(255, 255, 255, 0.12);
}

.demo-card > div {
  min-width: 0;
}

.demo-card span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 850;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-card strong {
  display: block;

  color: #dce7f4;

  font-size: 12px;
  line-height: 1.35;
}

.demo-card button {
  flex: 0 0 auto;

  padding: 10px 13px;

  border-radius: 13px;

  cursor: pointer;

  color: var(--green);

  background:
    rgba(25, 245, 167, 0.1);

  border:
    1px solid
    rgba(25, 245, 167, 0.24);

  font-size: 12px;
  font-weight: 900;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.demo-card button:hover:not(:disabled) {
  background:
    rgba(25, 245, 167, 0.16);

  transform:
    translateY(-1px);
}

.demo-card button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.security-note {
  margin-top: 17px;

  color: #7288a2;

  font-size: 11px;
  line-height: 1.55;

  text-align: center;
}

/* ====================================================== */
/* TABLET */
/* ====================================================== */

@media (max-width: 980px) {
  .login-page {
    align-items: start;
  }

  .login-layout {
    min-height: auto;

    grid-template-columns:
      minmax(0, 1fr);

    border-radius: 28px;
  }

  .auth-panel {
    order: 1;

    min-height: auto;

    padding: 42px 28px;

    border-bottom:
      1px solid
      var(--line);
  }

  .hero-panel {
    order: 2;

    min-height: auto;

    padding: 32px;

    border-right: 0;
  }

  .hero-content h1 {
    max-width: 820px;

    font-size:
      clamp(
        40px,
        8vw,
        62px
      );
  }

  .dashboard-preview {
    margin-top: 4px;
  }
}

/* ====================================================== */
/* TELÉFONO */
/* ====================================================== */

@media (max-width: 640px) {
  .login-page {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .login-layout {
    border-radius: 22px;
  }

  .auth-panel {
    padding: 28px 20px;
  }

  .auth-header {
    margin-bottom: 24px;
  }

  .auth-header h2 {
    font-size: 36px;
  }

  .auth-header p {
    font-size: 14px;
  }

  .hero-panel {
    padding: 24px 20px;
    gap: 28px;
  }

  .product-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand-copy > strong {
    font-size: 17px;
  }

  .hero-content h1 {
    font-size: 39px;
    line-height: 0.98;
  }

  .hero-content p {
    margin-top: 18px;

    font-size: 15px;
    line-height: 1.55;
  }

  .dashboard-preview {
    padding: 16px;
    border-radius: 20px;
  }

  .preview-chart {
    height: 115px;
    gap: 8px;
  }

  .preview-metrics {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );

    gap: 7px;
  }

  .preview-metrics div {
    padding: 10px 8px;
  }

  .preview-metrics p {
    font-size: 8px;
  }

  .preview-metrics strong {
    font-size: 13px;
  }

  .demo-card {
    align-items: stretch;
    flex-direction: column;
  }

  .demo-card button {
    width: 100%;
  }
}

/* ====================================================== */
/* TELÉFONO PEQUEÑO */
/* ====================================================== */

@media (max-width: 390px) {
  .auth-panel,
  .hero-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .input-shell {
    height: 54px;
  }

  .auth-header h2 {
    font-size: 34px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .preview-metrics {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .preview-metrics div {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .preview-metrics strong {
    margin-top: 0;
  }
}

/* ====================================================== */
/* ACCESIBILIDAD */
/* ====================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}