:root {
  --red: #e30613;
  --red-dark: #b9000b;
  --red-deep: #75000a;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e5e7eb;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #111827;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius: 26px;
}

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

body {
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(227, 6, 19, 0.1), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(15, 23, 42, 0.1), transparent 30%),
    #fff7f7;
  color: var(--gray-900);
}

/* CONTENEDOR GENERAL */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 48% 52%;
}

/* PANEL IZQUIERDO */
.login-brand-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(117, 0, 10, 0.98), rgba(227, 6, 19, 0.88)),
    url("../img/login-bg.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 70px;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent),
    radial-gradient(
      circle at 25% 20%,
      rgba(255, 255, 255, 0.18),
      transparent 28%
    );
  z-index: 1;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  right: -180px;
  bottom: -180px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.brand-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  color: var(--white);
}

.brand-logo {
  width: 170px;
  max-width: 100%;
  margin-bottom: 52px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.brand-badge {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  margin-bottom: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.brand-badge i {
  font-size: 18px;
}

.brand-content h1 {
  max-width: 620px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -2.2px;
  margin-bottom: 28px;
}

.brand-content p {
  max-width: 590px;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.brand-stats {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 16px;
  max-width: 560px;
}

.stat-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.stat-card strong {
  display: block;
  font-size: 25px;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

/* PANEL DERECHO */
.login-form-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  padding: 36px 34px 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.login-card-logo img {
  width: 160px;
  height: auto;
}

.login-title {
  text-align: center;
  margin-bottom: 28px;
}

.login-title h2 {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.login-title p {
  font-size: 14px;
  color: var(--gray-500);
}

/* ERROR */
.error-box {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 13px;
  font-weight: 600;
}

/* FORM */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-900);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 17px;
}

.input-wrapper input {
  width: 100%;
  height: 52px;
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  background: #f8fafc;
  padding: 0 48px 0 44px;
  color: var(--gray-900);
  font-size: 14px;
  outline: none;
  transition: 0.22s ease;
}

.input-wrapper input:focus {
  border-color: rgba(227, 6, 19, 0.55);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.09);
}

.show-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 10px;
}

.show-password:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.show-password i {
  position: static;
  transform: none;
}

/* OPCIONES */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 6px 0 24px;
  font-size: 13px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  cursor: pointer;
}

.remember input {
  width: 14px;
  height: 14px;
  accent-color: var(--red);
}

.forgot-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 800;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* BOTÓN */
.login-button {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 16px 32px rgba(227, 6, 19, 0.25);
  transition: 0.22s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(227, 6, 19, 0.34);
}

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

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 42% 58%;
  }

  .login-brand-panel {
    padding: 46px;
  }

  .brand-content h1 {
    font-size: 44px;
  }

  .brand-stats {
    grid-template-columns: 1fr;
    max-width: 260px;
  }
}

@media (max-width: 850px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    padding: 28px 18px;
  }

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