:root {
  --bg: #07111f;
  --panel: #0d1e33;
  --line: rgba(180, 205, 230, .18);
  --text: #f4f8fc;
  --muted: #999a9d;
  --gold: #e0bd68;
  --gold-soft: #b9a36b;
  --danger: #ff9f9f;
  --success: #91ddb2;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #09090a; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(37, 91, 145, .26), transparent 34%),
    radial-gradient(circle at 88% 85%, rgba(224, 189, 104, .12), transparent 30%),
    linear-gradient(145deg, #06101d, #0a1930 52%, #07111f);
}

button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin-top: 0; }

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.subtitle,
.restricted,
.form-intro,
.privacy,
small {
  color: var(--muted);
}

/* PMMG_6BPM_LOGIN_REFERENCIA_RC7 */
.login-page {
  overflow-x: hidden;
  background: #09090a;
}

.login-shell {
  width: 100%;
  height: 100svh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
  background: #09090a;
}

.brand-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(164, 149, 103, .42);
  background:
    radial-gradient(ellipse at 50% 52%, rgba(211, 177, 91, .30) 0, rgba(143, 106, 39, .17) 30%, transparent 61%),
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, .018), transparent 34%),
    linear-gradient(145deg, #090a0a, #0c0c0d 54%, #080809);
}

.brand-glow {
  position: absolute;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 199, 111, .32), rgba(174, 132, 46, .15) 42%, transparent 72%);
  filter: blur(30px);
  opacity: 1;
}

.battalion-shield {
  position: relative;
  z-index: 1;
  width: min(52%, 510px);
  max-height: 72vh;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 0 2px rgba(255, 244, 207, .95))
    drop-shadow(0 0 18px rgba(224, 189, 104, .58))
    drop-shadow(0 0 42px rgba(181, 139, 52, .25))
    drop-shadow(0 24px 40px rgba(0, 0, 0, .58));
}

.form-panel {
  position: relative;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding-top: clamp(228px, 25.4vh, 252px);
  padding-bottom: 54px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 83% 79%, rgba(132, 105, 47, .11), transparent 36%),
    linear-gradient(155deg, #111112, #0b0b0c 68%, #101010);
}

.institutional-header {
  position: absolute;
  inset: 0 0 auto;
  height: 203px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    #a08f63 0 80.3%,
    #474648 80.3% 88.6%,
    #121212 88.6% 100%
  );
}

.institutional-header img {
  width: 630px;
  height: 203px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.form-card {
  width: min(540px, calc(100% - 112px));
  margin: 0 auto;
}

.form-heading {
  margin-bottom: 50px;
}

.form-heading h1 {
  margin-bottom: 10px;
  color: #f7f7f7;
  font-size: clamp(2.35rem, 3.35vw, 3.55rem);
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: -.035em;
}

.form-heading p {
  margin: 0;
  color: #9a9a9d;
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  line-height: 1.5;
}

.login-page form {
  display: grid;
}

.login-page label {
  margin: 0 0 10px;
  color: #f1f1f2;
  font-size: 1.18rem;
  font-weight: 700;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  z-index: 1;
  left: 21px;
  width: 27px;
  height: 27px;
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.login-page input {
  width: 100%;
  min-height: 66px;
  padding: 0 58px 0 69px;
  color: var(--text);
  background: rgba(14, 14, 15, .72);
  border: 1px solid rgba(194, 178, 132, .60);
  border-radius: 11px;
  outline: none;
  font-size: 1.24rem;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-page input::placeholder { color: #77777a; opacity: 1; }

.login-page input:focus {
  border-color: var(--gold);
  background: rgba(18, 18, 19, .96);
  box-shadow: 0 0 0 4px rgba(224, 189, 104, .10);
}

.login-page small {
  margin: 8px 0 30px;
  color: #929295;
  font-size: .98rem;
}

.password-box input { padding-right: 102px; }

.password-box button {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 17px;
  transform: translateY(-50%);
  border: 0;
  padding: 9px 5px;
  color: var(--gold);
  background: transparent;
  font-weight: 750;
}

.message {
  min-height: 28px;
  margin: 10px 0 4px;
  color: var(--danger);
}

.message.success { color: var(--success); }

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 10px;
  font-weight: 820;
}

.login-page .primary-button {
  width: 100%;
  min-height: 66px;
  border: 1px solid #f0d47f;
  border-radius: 999px;
  color: #0c0c0d;
  background: linear-gradient(120deg, #f1d273, #e1b958 52%, #f0cf72);
  box-shadow: 0 14px 34px rgba(177, 134, 37, .12);
  font-size: 1.28rem;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.login-page .primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 38px rgba(177, 134, 37, .20);
}

.primary-button:disabled { opacity: .65; cursor: wait; }

.access-notice {
  margin-top: 52px;
  padding-top: 31px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid rgba(177, 177, 180, .24);
  color: #8e8e91;
}

.access-notice svg {
  width: 31px;
  height: 35px;
  flex: 0 0 auto;
  fill: none;
  stroke: #d0a72f;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-notice p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.4;
}

/* Área autenticada preservada */
.brand { display: flex; align-items: center; gap: 18px; }

.shield {
  width: 78px;
  aspect-ratio: .84;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  clip-path: polygon(50% 0, 94% 17%, 86% 72%, 50% 100%, 14% 72%, 6% 17%);
  background: linear-gradient(145deg, #f0cf7b, #9c7430);
  color: #07111f;
  font-size: 2rem;
  font-weight: 900;
}

.app-header,
.dashboard {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.app-header {
  margin-top: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 15, 27, .84);
}

.compact .shield { width: 46px; font-size: 1.2rem; }
.compact strong, .compact small { display: block; }

.secondary-button {
  padding: 11px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
}

.dashboard { margin-top: 26px; padding-bottom: 60px; }

.welcome,
.module {
  border: 1px solid var(--line);
  background: rgba(13, 30, 51, .9);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .26);
}

.welcome { padding: clamp(28px, 5vw, 50px); border-radius: 26px; }
.welcome h1 { margin-bottom: 22px; font-size: clamp(2rem, 5vw, 4rem); }
.welcome p:not(.eyebrow) { color: var(--muted); }
.welcome strong { color: var(--text); }

.modules {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.module {
  min-height: 245px;
  padding: 28px;
  border-radius: 16px;
}

.module.active { border-color: rgba(224, 189, 104, .46); }
.module span, .module b { color: var(--gold); }
.module h2 { margin-top: 38px; }
.module p { min-height: 78px; color: var(--muted); line-height: 1.55; }
.module b { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

@media (max-width: 1180px) {
  .form-card { width: min(500px, calc(100% - 64px)); }
  .form-heading h1 { font-size: clamp(2.2rem, 3.3vw, 3rem); }
}

@media (max-width: 900px) {
  .login-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .brand-panel {
    min-height: 52vh;
    border-right: 0;
    border-bottom: 1px solid rgba(164, 149, 103, .42);
  }

  .brand-glow { width: min(88vw, 540px); }

  .battalion-shield {
    width: min(48vw, 320px);
    max-height: 43vh;
  }

  .form-panel {
    min-height: 760px;
    padding-top: 218px;
  }

  .form-card { width: min(540px, calc(100% - 64px)); }
  .modules { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-height: 700px) {
  .institutional-header {
    height: 132px;
  }

  .institutional-header img {
    width: 410px;
    height: 132px;
  }

  .brand-glow {
    width: min(64vw, 650px);
  }

  .battalion-shield {
    width: min(48%, 390px);
    height: auto;
    max-width: none;
    max-height: 68vh;
  }

  .form-panel {
    padding-top: 160px;
    padding-bottom: 7px;
  }

  .form-card {
    width: min(440px, calc(100% - 80px));
  }

  .form-heading {
    margin-bottom: 24px;
  }

  .form-heading h1 {
    margin-bottom: 7px;
    font-size: 2.35rem;
  }

  .form-heading p,
  .login-page label {
    font-size: 1rem;
  }

  .login-page label {
    margin-bottom: 7px;
  }

  .login-page input {
    min-height: 52px;
    padding-left: 55px;
    font-size: 1.05rem;
  }

  .field-icon {
    left: 17px;
    width: 23px;
    height: 23px;
  }

  .login-page small {
    margin: 6px 0 14px;
    font-size: .82rem;
  }

  .message {
    min-height: 18px;
    margin: 5px 0 3px;
    font-size: .86rem;
  }

  .login-page .primary-button {
    min-height: 52px;
    font-size: 1.08rem;
  }

  .access-notice {
    margin-top: 16px;
    padding-top: 13px;
    gap: 11px;
  }

  .access-notice svg {
    width: 23px;
    height: 27px;
  }

  .access-notice p {
    font-size: .76rem;
  }
}

@media (max-width: 520px) {
  .brand-panel { min-height: 42vh; }

  .battalion-shield {
    width: min(62vw, 250px);
    max-height: 34vh;
  }

  .institutional-header { height: 122px; }

  .institutional-header img {
    width: 382px;
    max-width: none;
    height: 122px;
  }

  .form-panel {
    min-height: 700px;
    padding-top: 166px;
    padding-bottom: 40px;
  }

  .form-card { width: calc(100% - 40px); }
  .form-heading { margin-bottom: 38px; }
  .form-heading h1 { font-size: clamp(2rem, 10vw, 2.55rem); }
  .form-heading p { font-size: .98rem; }
  .login-page label { font-size: 1rem; }
  .login-page input { min-height: 58px; font-size: 1.08rem; }
  .field-icon { left: 17px; width: 24px; height: 24px; }
  .login-page input { padding-left: 56px; }
  .login-page .primary-button { min-height: 58px; }
  .access-notice { margin-top: 40px; padding-top: 25px; }

  .brand { align-items: flex-start; }
  .shield { width: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
