/* ─── LOGIN PAGE STYLES ─────────────────────────────────────── */

body.login-page {
  min-height: 100vh;
  background: var(--bg-alt);
  overflow-x: hidden;
}

/* ─── MINIMAL HEADER ─────────────────────────────────────────── */
.login-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 110px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.login-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.login-back svg { width: 16px; height: 16px; }
.login-back:hover { color: var(--blue); }

/* ─── MAIN LAYOUT ────────────────────────────────────────────── */
.login-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 110px;
}

/* ─── BRAND PANEL (left) ─────────────────────────────────────── */
.login-brand {
  position: sticky;
  top: 110px;
  height: calc(100vh - 110px);
  overflow: hidden;
}
.login-brand__bg {
  position: absolute;
  inset: 0;
}
.login-brand__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.login-brand__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,28,64,.88) 0%,
    rgba(26,111,191,.72) 100%
  );
}
.login-brand__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 52px;
  color: #fff;
}
.login-brand__quote {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.5;
  font-style: italic;
  color: rgba(255,255,255,.92);
  border-left: 4px solid var(--accent);
  padding-left: 20px;
  margin-bottom: 48px;
}
.login-brand__features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}
.login-feat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.login-feat__icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.login-feat__icon svg { width: 18px; height: 18px; color: rgba(255,255,255,.9); }
.login-feat strong { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.login-feat p { font-size: .82rem; color: rgba(255,255,255,.65); margin: 0; line-height: 1.4; }

.login-brand__logos img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .8;
}

/* ─── FORM PANEL (right) ─────────────────────────────────────── */
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg);
}
.login-form-wrap {
  width: 100%;
  max-width: 420px;
}


/* ─── LOGIN PANE ─────────────────────────────────────────────── */
.login-pane { display: none; }
.login-pane.active { display: block; }
.login-pane__header { margin-bottom: 32px; }
.login-pane__header h1 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.login-pane__header p { color: var(--text-muted); font-size: .95rem; }

/* ─── DEMO HINT ──────────────────────────────────────────────── */
.demo-hint {
  background: var(--blue-light);
  border: 1px dashed var(--blue);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .82rem;
  color: var(--blue-dark);
  margin-bottom: 24px;
}
.demo-hint code {
  background: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  color: var(--blue);
}

/* ─── FORM ELEMENTS ─────────────────────────────────────────── */
.login-form .form-group {
  margin-bottom: 20px;
}
.login-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.forgot-link {
  font-weight: 500;
  color: var(--blue);
  font-size: .8rem;
  transition: var(--transition);
}
.forgot-link:hover { text-decoration: underline; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  color: #b0bac8;
  pointer-events: none;
}
.input-icon svg { width: 16px; height: 16px; }

.input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: .93rem;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
}
.input-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,111,191,.12); }
.input-wrap input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.input-wrap input::placeholder { color: #b0bac8; }

.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #b0bac8;
  padding: 4px;
  display: flex;
  transition: var(--transition);
}
.toggle-pass:hover { color: var(--blue); }
.toggle-pass svg { width: 16px; height: 16px; }

.form-error {
  display: block;
  font-size: .75rem;
  color: #ef4444;
  margin-top: 5px;
  min-height: 16px;
}

.form-group--row { margin-bottom: 24px; }
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 400;
  color: var(--text-muted);
  justify-content: flex-start !important;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  background: #fff;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--blue);
  border-color: var(--blue);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

/* ─── SUBMIT BUTTON ─────────────────────────────────────────── */
.login-submit {
  font-size: 1rem;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 0;
  position: relative;
}
.btn-spinner { display: flex; align-items: center; justify-content: center; gap: 8px; }
.spin { animation: spin 1s linear infinite; width: 18px; height: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── AVISO: ACCESO VÍA EJECUTIVO ────────────────────────────── */
.login-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--blue-light);
  border: 1px solid rgba(26, 111, 191, .18);
  border-radius: 12px;
  font-size: .85rem;
  color: var(--text);
  line-height: 1.55;
}
.login-notice svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--blue);
}
.login-notice p { margin: 0; }

/* ─── SUPPORT LINK ────────────────────────────────────────────── */
.login-support {
  margin-top: 28px;
  text-align: center;
  font-size: .83rem;
  color: var(--text-muted);
}
.login-support a { color: var(--blue); font-weight: 600; }
.login-support a:hover { text-decoration: underline; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  transform: translateY(20px);
  transition: transform .3s ease;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.modal__close:hover { background: #fee2e2; color: #ef4444; }
.modal__close svg { width: 16px; height: 16px; }

.modal__icon {
  width: 56px; height: 56px;
  background: var(--blue-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.modal__icon svg { width: 26px; height: 26px; color: var(--blue); }

.modal h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.modal > p { color: var(--text-muted); font-size: .93rem; margin-bottom: 28px; }
.modal .form-group { margin-bottom: 20px; }
.modal label { font-size: .83rem; font-weight: 600; display: block; margin-bottom: 8px; }

.modal__success {
  text-align: center;
  padding: 16px 0 8px;
}
.modal__success-icon {
  width: 56px; height: 56px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #16a34a;
  margin: 0 auto 16px;
}
.modal__success p { color: var(--text-muted); font-size: .93rem; line-height: 1.6; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .login-main { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-panel { min-height: calc(100vh - 64px); padding: 40px 20px; }
}
@media (max-width: 480px) {
  .login-form-wrap { max-width: 100%; }
  .modal { padding: 32px 24px; }
}
