:root {
  --lg-navy: #0b2545;
  --lg-navy-2: #13315c;
  --lg-accent: #e8a317;
  --lg-accent-dark: #c98a0b;
  --lg-text: #1f2937;
  --lg-muted: #6b7280;
  --lg-border: #d9dee7;
  --lg-bg: #f4f6fa;
  --lg-danger: #b91c1c;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--lg-text);
  background: var(--lg-bg);
  -webkit-font-smoothing: antialiased;
}

.lg-shell { display: flex; min-height: 100vh; }

/* ── Panel de marca ─────────────────────────────── */
.lg-brand {
  position: relative;
  flex: 1 1 52%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11, 37, 69, .94) 0%, rgba(19, 49, 92, .86) 55%, rgba(11, 37, 69, .92) 100%),
    var(--lg-bg-image) center / cover no-repeat;
  overflow: hidden;
}
.lg-brand::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 60px solid rgba(232, 163, 23, .12);
  pointer-events: none;
}
.lg-brand-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.lg-brand-top img { height: 56px; width: auto; background: #fff; border-radius: 10px; padding: 6px 10px; }
.lg-brand-top span { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; line-height: 1.4; }
.lg-brand-body { position: relative; z-index: 1; max-width: 520px; }
.lg-brand-body h1 { font-size: 2.3rem; font-weight: 700; line-height: 1.2; margin: 0 0 16px; }
.lg-brand-body h1 em { font-style: normal; color: var(--lg-accent); }
.lg-brand-body p { font-size: 1rem; line-height: 1.7; opacity: .85; margin: 0; }
.lg-features { list-style: none; padding: 0; margin: 28px 0 0; }
.lg-features li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: .92rem; opacity: .95; }
.lg-features i {
  width: 32px; height: 32px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(255, 255, 255, .12); color: var(--lg-accent);
}
.lg-brand-foot { position: relative; z-index: 1; font-size: .78rem; opacity: .65; }

/* ── Panel del formulario ───────────────────────── */
.lg-panel {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: #fff;
}
.lg-card { width: 100%; max-width: 410px; }
.lg-card .lg-mobile-logo { display: none; height: 52px; margin-bottom: 24px; }
.lg-card h2 { font-size: 1.65rem; font-weight: 700; margin: 0 0 6px; color: var(--lg-navy); }
.lg-card .lg-sub { color: var(--lg-muted); font-size: .92rem; margin: 0 0 26px; }

.lg-alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 18px;
  border-radius: 10px; font-size: .88rem; line-height: 1.45;
  border: 1px solid;
}
.lg-alert i { margin-top: 2px; }
.lg-alert.error { background: #fef2f2; border-color: #fecaca; color: var(--lg-danger); }
.lg-alert.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.lg-alert.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.lg-alert.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.lg-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 40px; border-radius: 8px;
  font-weight: 600; font-size: .875rem; cursor: pointer;
  border: 1px solid transparent; text-decoration: none !important;
  transition: background .15s, box-shadow .15s, transform .05s, border-color .15s;
}
.lg-btn:active { transform: translateY(1px); }
.lg-btn:focus-visible, .lg-input:focus-visible { outline: 3px solid rgba(19, 49, 92, .35); outline-offset: 2px; }
.lg-btn-sso { background: var(--lg-navy); color: #fff !important; }
.lg-btn-sso:hover { background: var(--lg-navy-2); box-shadow: 0 6px 16px rgba(11, 37, 69, .25); }
.lg-btn-primary { background: var(--lg-accent); color: #1b1300; }
.lg-btn-primary:hover { background: var(--lg-accent-dark); box-shadow: 0 6px 16px rgba(201, 138, 11, .3); }
.lg-btn[disabled] { opacity: .7; cursor: wait; }

.lg-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0; color: var(--lg-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
}
.lg-divider::before, .lg-divider::after { content: ""; flex: 1; height: 1px; background: var(--lg-border); }

.lg-field { margin-bottom: 16px; }
.lg-field > label { display: block; font-size: .82rem; font-weight: 600; color: var(--lg-text); margin-bottom: 6px; }
.lg-control { position: relative; }
.lg-control > .lg-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #9aa3b2; pointer-events: none; font-size: .82rem;
}
.lg-control .form-control {
  height: 40px; padding: 0 40px 0 38px;
  border: 1px solid var(--lg-border); border-radius: 8px;
  font-size: .875rem; background: #fbfcfe; box-shadow: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-control .form-control:focus { border-color: var(--lg-navy-2); background: #fff; box-shadow: 0 0 0 3px rgba(19, 49, 92, .12); }
.lg-field.has-error .form-control { border-color: var(--lg-danger); }
.lg-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: transparent; color: #9aa3b2; border-radius: 8px; cursor: pointer;
}
.lg-toggle:hover { color: var(--lg-navy); background: #eef1f6; }
.lg-error { display: block; margin-top: 6px; font-size: .8rem; color: var(--lg-danger); }

.lg-captcha .row { margin: 0; align-items: center; }
.lg-captcha .col-md-5, .lg-captcha .col-md-7 { padding: 0; }
.lg-captcha .col-md-5 { flex: 0 0 auto; max-width: none; width: auto; margin-right: 10px; }
.lg-captcha .col-md-7 { flex: 1; max-width: none; }
.lg-captcha img.captcha { height: 40px; width: auto; border-radius: 8px; border: 1px solid var(--lg-border); display: block; }
.lg-captcha input[type=text] {
  height: 40px; width: 100%; padding: 0 14px;
  border: 1px solid var(--lg-border); border-radius: 8px; background: #fbfcfe;
}
.lg-captcha input[type=text]:focus { border-color: var(--lg-navy-2); outline: 0; box-shadow: 0 0 0 3px rgba(19, 49, 92, .12); background: #fff; }
.lg-captcha .col-md-7 > * { margin: 0; }
.lg-captcha input[type=hidden] + input[type=text] { margin: 0; }

.lg-links { text-align: right; margin: -4px 0 20px; }
.lg-links a { font-size: .85rem; color: var(--lg-navy-2); font-weight: 600; }
.lg-links a:hover { color: var(--lg-accent-dark); text-decoration: none; }

.lg-secure { margin-top: 26px; text-align: center; color: var(--lg-muted); font-size: .78rem; }
.lg-secure i { color: #16a34a; margin-right: 5px; }

@media (max-width: 991px) {
  .lg-brand { display: none; }
  .lg-panel { background: linear-gradient(180deg, #fff 0%, var(--lg-bg) 100%); }
  .lg-card .lg-mobile-logo { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── Recuperar contraseña ───────────────────────── */
.lg-badge {
  width: 56px; height: 56px; margin-bottom: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; font-size: 1.4rem;
  background: rgba(232, 163, 23, .15); color: var(--lg-accent-dark);
}
.lg-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 22px; font-size: .85rem; font-weight: 600; color: var(--lg-muted);
}
.lg-back:hover { color: var(--lg-navy); text-decoration: none; }
.lg-footer-link { margin-top: 20px; text-align: center; font-size: .88rem; }
.lg-footer-link a { color: var(--lg-navy-2); font-weight: 600; }
.lg-footer-link a:hover { color: var(--lg-accent-dark); text-decoration: none; }
