/* ─────────────────────────────────────────────
   CERRO ALTO INTRANET — Compiled CSS
   Source: scss/main.scss (7-1 Pattern)
   ───────────────────────────────────────────── */

/* ── Google Fonts are loaded in HTML ── */

/* ══════════════════════════════════════════
   BASE / RESET
   ══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: 'Manrope', system-ui, sans-serif; color: #0E2F3F; background: #fff; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════
   COMPONENTS — BUTTON
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; width: 100%; border: none; cursor: pointer; white-space: nowrap;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 8px; transition: background 200ms ease, transform 150ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: 2px solid #FF9F00; outline-offset: 2px; }

.btn--primary {
  background: #410000; color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  padding: 1rem 1.5rem;
}
.btn--primary:hover {
  background: #2d0000;
  box-shadow: 0 10px 15px rgba(0,0,0,0.10), 0 4px 6px rgba(0,0,0,0.05);
}

.btn--ghost {
  background: transparent; color: #0E2F3F;
  border: 1.5px solid #E9ECEF; padding: 0.8125rem 1.5rem;
}
.btn--ghost:hover { border-color: #FF9F00; background: rgba(255,159,0,0.04); }

.btn--lg { padding: 1.125rem 2rem; font-size: 0.8125rem; border-radius: 12px; }

.btn--loading { position: relative; color: transparent !important; pointer-events: none; }
.btn--loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 9999px; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════
   COMPONENTS — FORM
   ══════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field__label {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #0E2F3F;
}

.field__wrap { position: relative; }

.field__icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: #CED4DA; pointer-events: none;
  transition: color 200ms ease; display: flex;
}
.field__icon svg { width: 16px; height: 16px; }

.field__action {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #CED4DA;
  display: flex; align-items: center; padding: 0.25rem; border-radius: 4px;
  transition: color 200ms ease;
}
.field__action:hover { color: #0E2F3F; }
.field__action svg { width: 16px; height: 16px; }

.field__input {
  width: 100%; font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.875rem; color: #0E2F3F; background: #F8F9FA;
  border: 1.5px solid #E9ECEF; border-radius: 8px; outline: none;
  padding: 0.8125rem 1rem 0.8125rem 2.75rem;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.field__input:focus { background: #fff; border-color: #FF9F00; box-shadow: 0 0 0 3px rgba(255,159,0,0.20); }
.field__input::placeholder { color: #CED4DA; }
.field__input:focus + .field__icon { color: #FF9F00; }

.field__hint { font-size: 0.6875rem; color: #ADB5BD; }
.field__error { font-size: 0.6875rem; color: #B91C1C; display: flex; align-items: center; gap: 0.25rem; }

/* checkbox */
.checkbox { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; }
.checkbox__input {
  appearance: none; width: 16px; height: 16px; flex-shrink: 0;
  border: 1.5px solid #CED4DA; border-radius: 4px; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease; position: relative;
}
.checkbox__input:checked { background: #FF9F00; border-color: #FF9F00; }
.checkbox__input:checked::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 2px solid #0E2F3F; border-top: none; border-left: none;
  transform: rotate(45deg);
}
.checkbox__input:focus-visible { outline: 2px solid #FF9F00; outline-offset: 2px; }
.checkbox__label { font-size: 0.8125rem; color: #6C757D; line-height: 1.5; }

/* divider */
.form-divider {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.6875rem; color: #ADB5BD;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: #E9ECEF; }

/* ══════════════════════════════════════════
   COMPONENTS — BADGE
   ══════════════════════════════════════════ */
.badge {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 5px 12px; border-radius: 9999px;
}
.badge--outline-amber { border: 1px solid rgba(255,159,0,0.45); color: #FF9F00; background: rgba(255,159,0,0.06); }
.badge--outline-white { border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.75); }

.trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.6875rem; color: rgba(255,255,255,0.5); }
.trust-item svg { width: 14px; height: 14px; flex-shrink: 0; color: rgba(255,159,0,0.7); }

/* ══════════════════════════════════════════
   LAYOUT — LOGIN PAGE
   ══════════════════════════════════════════ */
.login-root {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  background: #0E2F3F;
}

/* ── Left Brand Panel ── */
.panel-brand {
  position: relative; display: flex; flex-direction: column;
  justify-content: space-between; padding: 3rem 3.5rem;
  background: #0E2F3F; overflow: hidden;
}

.panel-brand__bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.panel-brand__bg::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(65,0,0,0.55) 0%, transparent 55%);
}
.panel-brand__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.panel-brand__pattern {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.06;
}

.panel-brand__header,
.panel-brand__body,
.panel-brand__footer { position: relative; z-index: 1; }

.panel-brand__logo { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.panel-brand__logo-img { height: 50px; width: auto; display: block; }

.panel-brand__brand-text { display: flex; flex-direction: column; gap: 2px; }
.panel-brand__brand-name {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 900;
  font-size: 1.125rem; color: #fff; letter-spacing: 0.06em;
}
.panel-brand__brand-sub {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,159,0,0.85);
}

.panel-brand__headline {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 900;
  font-size: clamp(2rem, 3vw, 3.25rem); line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: #fff; margin-bottom: 1.25rem;
}
.panel-brand__headline em { font-style: normal; color: #FF9F00; }

.panel-brand__description {
  font-size: 0.8125rem; color: rgba(255,255,255,0.6);
  line-height: 1.75; max-width: 360px; margin-bottom: 2rem;
}

.panel-brand__pillars { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.panel-brand__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  padding: 1.5rem; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
  backdrop-filter: blur(8px); margin-bottom: 2rem;
}

.panel-brand__stat {
  display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid rgba(255,255,255,0.1); padding-right: 1rem;
}
.panel-brand__stat:last-child { border-right: none; padding-right: 0; }

.panel-brand__stat-value {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 900;
  font-size: 1.5rem; color: #FF9F00; line-height: 1;
}
.panel-brand__stat-label { font-size: 0.6875rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

.panel-brand__trust {
  display: flex; align-items: center; gap: 1.5rem;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}
.panel-brand__copyright { margin-left: auto; font-size: 0.6875rem; color: rgba(255,255,255,0.25); }

/* ── Right Form Panel ── */
.panel-form {
  display: flex; align-items: center; justify-content: center;
  background: #F8F9FA; padding: 3rem 4rem;
}

/* ── Login Card ── */
.login-card {
  width: 100%; max-width: 440px; background: #fff;
  border-radius: 24px; padding: 2.5rem;
  box-shadow: 0 24px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08);
  border: 1px solid #E9ECEF;
}

.login-card__header { margin-bottom: 2rem; }

.login-card__eyebrow {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #FF9F00; margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.login-card__eyebrow::before {
  content: ''; display: inline-block; width: 20px; height: 3px;
  background: #FF9F00; border-radius: 9999px;
}

.login-card__title {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 900;
  font-size: 1.875rem; color: #0E2F3F; text-transform: uppercase;
  letter-spacing: 0.02em; line-height: 1.1; margin-bottom: 0.5rem;
}

.login-card__subtitle { font-size: 0.8125rem; color: #ADB5BD; }

.login-card__form { display: flex; flex-direction: column; gap: 1.25rem; }

.login-card__row-opts {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.login-card__forgot {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #410000; transition: opacity 200ms ease;
}
.login-card__forgot:hover { opacity: 0.7; }

.login-card__submit-wrap { padding-top: 0.5rem; }

.login-card__footer {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #E9ECEF;
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; flex-wrap: wrap;
}
.login-card__footer-link {
  font-size: 0.6875rem; color: #ADB5BD; transition: color 200ms ease;
}
.login-card__footer-link:hover { color: #0E2F3F; }
.login-card__footer-sep { width: 3px; height: 3px; background: #E9ECEF; border-radius: 9999px; }

.login-card__security {
  margin-top: 1.5rem; padding: 0.75rem 1rem;
  background: #F8F9FA; border: 1px solid #E9ECEF; border-radius: 12px;
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.6875rem; color: #ADB5BD;
}
.login-card__security svg { width: 16px; height: 16px; flex-shrink: 0; color: #1B7A4A; }

/* session alert */
.session-alert {
  padding: 0.75rem 1rem; border-radius: 8px;
  border-left: 3px solid #B45309; background: rgba(180,83,9,0.06);
  font-size: 0.6875rem; color: #B45309;
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.session-alert svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .login-root { grid-template-columns: 1fr; }
  .panel-brand { display: none; }
}
@media (max-width: 767px) {
  .panel-form { padding: 2rem 1.5rem; }
}
@media (max-width: 575px) {
  .login-card { padding: 2rem 1.5rem; border-radius: 16px; }
}
