/* ==========================================================================
   GOVERNMENT AUTH PAGES — SPLIT SCREEN (v2)
   Used only by views/auth/*.php (login, forgot/reset/change password).
   Left: deep-navy identity panel — municipal seal, PH-flag accent, subtle
   dot pattern. No photo, so it never fights the seal for attention.
   Right: clean white form panel — this is the majority of what the user
   sees, so it carries the light, uncluttered feel instead of navy.
   ========================================================================== */

.gov-split-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, #eef2f9 0%, var(--paper-muted) 55%, var(--paper-muted) 100%);
}

.gov-split {
  position: relative;
  width: 100%;
  max-width: 980px;
  min-height: 620px;
  display: flex;
  background: var(--paper);
  border-radius: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 32px 64px -16px rgba(15,23,42,.22);
}

/* Thin PH-flag accent rule along the very top of the card (clipped to its
   rounded corners by the parent's overflow:hidden) */
.gov-split::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(90deg,
    #0038a8 0%, #0038a8 33%,
    #ce1126 33%, #ce1126 66%,
    #fcd116 66%, #fcd116 100%);
}

/* ---- Left: identity panel --------------------------------------------- */
.gov-split-photo {
  position: relative;
  flex: 0 0 38%;
  max-width: 38%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11,23,48,.88) 0%, rgba(11,23,48,.94) 100%),
    radial-gradient(ellipse 90% 60% at 50% 0%, var(--navy-soft) 0%, var(--navy) 60%),
    url('../images/auth-photo.jpg') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.gov-split-pattern {
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 0%, transparent 75%);
}

.gov-split-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .22) 0%, transparent 68%);
  pointer-events: none;
}

.gov-split-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 300px;
}

.gov-split-sealwrap {
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 16px 40px rgba(0, 0, 0, .35);
}

.gov-split-seal-lg {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
}

.gov-split-brand-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #fbbf24;
  margin-bottom: 8px;
}

.gov-split-brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.gov-split-brand-sub {
  font-size: .8125rem;
  color: rgba(255, 255, 255, .55);
  margin-top: 2px;
}

.gov-split-rule-light {
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .2);
  margin: 20px auto;
}

.gov-split-system-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9375rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.gov-split-caption {
  font-size: .8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .58);
}

.gov-split-foot-badge {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
}
.gov-split-foot-badge i,
.gov-split-foot-badge svg { width: 13px; height: 13px; color: #6ee7b7; }

/* Legacy tags kept in case any cached markup still references them */
.gov-split-photo img.gov-split-seal,
.gov-split-photo-overlay,
.gov-split-brand,
.gov-split-brand-name { display: none; }

/* ---- Right: form panel --------------------------------------------------*/
.gov-split-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--paper);
}

.gov-split-form {
  width: 100%;
  max-width: 380px;
}

.gov-split-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: .3rem .65rem;
  border-radius: 999px;
  margin-bottom: 16px;
}
.gov-split-eyebrow i,
.gov-split-eyebrow svg { width: 12px; height: 12px; }

.gov-split-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: .4rem;
  letter-spacing: -0.015em;
}

.gov-split-subtitle {
  font-size: .8125rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.gov-split-subtitle strong { color: var(--ink); }
.gov-auth-trust-row { display:grid;grid-template-columns:repeat(3,1fr);gap:.45rem;margin-top:1.1rem;padding-top:1.1rem;border-top:1px solid var(--line); }
.gov-auth-trust-row span { display:flex;align-items:center;justify-content:center;gap:.3rem;color:#64748b;font-size:.58rem;font-weight:650;text-align:center; }
.gov-auth-trust-row svg { width:11px;height:11px;color:var(--good); }
.gov-auth-step { display:flex;align-items:center;justify-content:center;max-width:210px;margin:0 auto 1.15rem; }
.gov-auth-step > span { width:24px;height:24px;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:50%;background:#fff;color:var(--gray);font-size:.62rem;font-weight:750; }
.gov-auth-step > span.is-active { border-color:var(--brand);background:var(--brand);color:#fff;box-shadow:0 0 0 4px var(--brand-soft); }
.gov-auth-step > span.is-done { border-color:var(--good);background:var(--good);color:#fff; }.gov-auth-step > span svg { width:12px;height:12px; }
.gov-auth-step > i { width:40px;height:1px;background:var(--line-strong); }

/* ---- Fields ---------------------------------------------------------------*/
.gov-split-field { margin-bottom: 1.1rem; }

.gov-split-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .4rem;
}

.gov-split-input {
  display: block;
  width: 100%;
  background: var(--paper-muted);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.4;
  padding: .72rem .95rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.gov-split-input::placeholder { color: #94a3b8; }
.gov-split-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.gov-split-input:disabled { cursor: not-allowed; opacity: .6; }

.gov-split-icon-field { position: relative; }
.gov-split-icon-field i,
.gov-split-icon-field svg {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: #94a3b8; pointer-events: none;
}
.gov-split-icon-field input { padding-left: 2.25rem !important; }

/* Password visibility toggle (eye icon on the right of a password field) */
.gov-split-icon-field.has-toggle input { padding-right: 2.25rem !important; }
.gov-split-eye {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  color: #94a3b8; background: transparent; border: none; padding: 0; cursor: pointer;
  border-radius: .35rem; transition: color 150ms ease, background 150ms ease;
}
.gov-split-eye:hover { color: var(--ink-soft); background: var(--paper-muted); }
.gov-split-eye i,
.gov-split-eye svg { position: static; width: 15px; height: 15px; pointer-events: none; }
.gov-split-eye:focus-visible { outline:2px solid var(--brand);outline-offset:2px; }
.gov-split-eye.is-visible { color:var(--brand);background:var(--brand-soft); }
.gov-split-icon-field.has-toggle input { padding-right:3.7rem !important; }
.gov-split-eye--text { width:auto;min-width:42px;right:.5rem;padding:0 .45rem;color:var(--brand);font-size:.68rem;font-weight:750;letter-spacing:.01em; }

.gov-split-forgot {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: .5rem;
}
.gov-split-forgot:hover { color: var(--brand-hover); }

/* ---- Remember me + divider ------------------------------------------------*/
.gov-split-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -.3rem 0 1.1rem;
}
.gov-split-check {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  cursor: pointer; user-select: none;
}
.gov-split-check input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--brand);
  border-radius: .25rem; cursor: pointer;
}

.gov-split-or {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.4rem 0;
  font-size: 11px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .06em;
}
.gov-split-or::before, .gov-split-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.gov-split-note {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  font-size: 11.5px; color: #94a3b8; text-align: center;
}
.gov-split-note i,
.gov-split-note svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--good); }

/* ==========================================================================
   GOVERNMENT AUTH PAGES — CENTERED CARD (forgot / reset / change password)
   Used for account-recovery style screens: a single focused white card on
   a soft neutral field, with a circular DILG badge + brand lockup on top
   and a colored icon roundel that signals the state of the page (mail,
   shield-lock, success check).
   ========================================================================== */

.gov-card-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, #eef2f9 0%, var(--paper-muted) 55%, var(--paper-muted) 100%);
}

.gov-card-page::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    #0038a8 0%, #0038a8 33%,
    #ce1126 33%, #ce1126 66%,
    #fcd116 66%, #fcd116 100%);
}

.gov-card-back {
  position: absolute;
  top: 26px; left: 28px;
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.gov-card-back i,
.gov-card-back svg { width: 15px; height: 15px; }
.gov-card-back:hover { color: var(--ink); }

.gov-card-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 24px 48px -12px rgba(15,23,42,.14);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
}

.gov-card-badge {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(140deg, #fcd116, #dc2626 55%, #fcd116);
  display: flex; align-items: center; justify-content: center;
}
.gov-card-badge img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: contain;
  background: #ffffff; border: 2px solid #ffffff;
}

.gov-card-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.gov-card-brand-sub {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 1px;
  margin-bottom: 22px;
}

.gov-card-icon-circle {
  width: 58px; height: 58px;
  margin: 4px auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
}
.gov-card-icon-circle i,
.gov-card-icon-circle svg { width: 27px; height: 27px; color: var(--brand); }
.gov-card-icon-circle.is-good { background: var(--good-soft); }
.gov-card-icon-circle.is-good i,
.gov-card-icon-circle.is-good svg { color: var(--good); }

.gov-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: .5rem;
  letter-spacing: -0.01em;
}

.gov-card-subtitle {
  font-size: .8125rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 1.6rem;
}
.gov-card-subtitle strong { color: var(--ink); }

.gov-card-box form,
.gov-card-box .gov-card-body { text-align: left; }

/* ---- Password strength meter ---------------------------------------------*/
.gov-pw-strength {
  display: flex; align-items: center; justify-content: space-between;
  margin: -.6rem 0 1.1rem;
  font-size: 11px; color: var(--ink-soft);
}
.gov-pw-strength-label { font-weight: 700; }
.gov-pw-strength-label[data-level="weak"] { color: var(--signal); }
.gov-pw-strength-label[data-level="fair"] { color: #d97706; }
.gov-pw-strength-label[data-level="good"] { color: #2563eb; }
.gov-pw-strength-label[data-level="strong"] { color: var(--good); }

.gov-pw-strength-track {
  height: 5px; border-radius: 999px; background: var(--line);
  overflow: hidden; margin: -.7rem 0 1.1rem;
}
.gov-pw-strength-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: var(--signal);
  transition: width 200ms ease, background 200ms ease;
}

.gov-pw-checklist {
  list-style: none; margin: -.4rem 0 1.3rem; padding: .85rem .95rem;
  background: var(--paper-muted); border: 1px solid var(--line); border-radius: .6rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .6rem;
}
.gov-pw-checklist-title {
  grid-column: 1 / -1;
  font-size: 11px; font-weight: 700; color: var(--ink);
  margin-bottom: .1rem;
}
.gov-pw-check-item {
  display: flex; align-items: center; gap: .4rem;
  font-size: 11.5px; color: #94a3b8; transition: color 150ms ease;
}
.gov-pw-check-item i,
.gov-pw-check-item svg { width: 13px; height: 13px; flex-shrink: 0; color: #cbd5e1; transition: color 150ms ease; }
.gov-pw-check-item.is-met { color: var(--good); }
.gov-pw-check-item.is-met i,
.gov-pw-check-item.is-met svg { color: var(--good); }

/* ---- Success state ---------------------------------------------------------*/
.gov-card-success-icon {
  width: 76px; height: 76px;
  margin: 4px auto 20px;
  border-radius: 50%;
  background: var(--good-soft);
  display: flex; align-items: center; justify-content: center;
  animation: gov-pop 420ms cubic-bezier(.22,.61,.36,1) both;
}
.gov-card-success-icon i,
.gov-card-success-icon svg { width: 36px; height: 36px; color: var(--good); }
@keyframes gov-pop {
  0% { opacity: 0; transform: scale(.6); }
  70% { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

.gov-card-footer {
  margin-top: 1.75rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  font-size: 11px; color: #94a3b8;
}
.gov-card-footer i,
.gov-card-footer svg { width: 12px; height: 12px; color: var(--good); flex-shrink: 0; }

@media (max-width: 480px) {
  .gov-card-box { padding: 1.9rem 1.4rem 1.7rem; }
  .gov-card-back { position: static; margin-bottom: 18px; display: inline-flex; }
  .gov-card-page { padding: 28px 16px; align-items: flex-start; }
}

/* ---- Button ----------------------------------------------------------------*/
.gov-split-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: var(--brand);
  color: #ffffff !important;
  font-size: .875rem;
  font-weight: 700;
  padding: .78rem 1.15rem;
  border-radius: .6rem;
  border: 1px solid var(--brand);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  margin-top: .3rem;
}
.gov-split-btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); box-shadow: 0 12px 26px rgba(37, 99, 235, .3); }
.gov-split-btn:active { transform: translateY(1px); }
.gov-split-btn i,
.gov-split-btn svg { width: 15px; height: 15px; }
.gov-split-btn .button-idle,.gov-split-btn .button-loading { display:flex;align-items:center;justify-content:center;gap:.5rem; }
.gov-split-btn .button-loading { display:none; }
.gov-split-btn.is-loading .button-idle { display:none; }
.gov-split-btn.is-loading .button-loading { display:flex; }
.gov-split-btn:disabled { cursor:wait;opacity:.9;transform:none; }
.is-processing { pointer-events:none; }
.rms-spinner { width:15px;height:15px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:rms-spin .7s linear infinite; }
@keyframes rms-spin { to { transform:rotate(360deg); } }

/* ---- Alerts ------------------------------------------------------------------*/
.gov-split-alert {
  display: flex; gap: .6rem;
  font-size: .8125rem;
  padding: .7rem .9rem;
  border-radius: .5rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.gov-split-alert i,
.gov-split-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.gov-split-alert.is-error { background: var(--signal-soft); color: #b91c1c; border-left: 2px solid var(--signal); }
.gov-split-alert.is-good  { background: var(--good-soft);   color: #047857; border-left: 2px solid var(--good); }

/* ---- Links / misc ------------------------------------------------------------*/
.gov-split-link { color: var(--brand); font-weight: 600; }
.gov-split-link:hover { color: var(--brand-hover); }

.gov-split-back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8125rem; font-weight: 600; color: var(--ink-soft);
}
.gov-split-back:hover { color: var(--ink); }

.gov-split-rule {
  height: 1px;
  background: var(--line);
  margin: 1.75rem 0;
}

.gov-split-footer {
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.65;
  margin-top: 2rem;
}
.gov-split-footer strong { color: var(--ink-soft); }
.gov-split-footer .row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 2px; }
.gov-split-footer i,
.gov-split-footer svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--good); }

/* ---- Mobile: compact top identity strip instead of hiding the brand ------ */
@media (max-width: 900px) {
  .gov-split-page { padding: 0; }
  .gov-split { flex-direction: column; max-width: 100%; min-height: 100vh; border-radius: 0; border: none; }
  .gov-split-photo {
    flex: none;
    max-width: 100%;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    padding: 22px 24px;
  }
  .gov-split-content { display: flex; align-items: center; gap: 14px; max-width: none; text-align: left; }
  .gov-split-sealwrap { width: 44px; height: 44px; margin: 0; flex-shrink: 0; }
  .gov-split-seal-lg { width: 36px; height: 36px; }
  .gov-split-rule-light { display: none; }
  .gov-split-system-name,
  .gov-split-caption { display: none; }
  .gov-split-brand-eyebrow { margin-bottom: 2px; }
  .gov-split-brand-title { font-size: 1.05rem; }
  .gov-split-brand-sub { font-size: .75rem; }
  .gov-split-foot-badge { display: none; }
  .gov-split-panel { padding: 36px 22px 44px; }
}
@media (max-width:480px){.gov-auth-trust-row{grid-template-columns:1fr}.gov-auth-trust-row span{justify-content:flex-start}}

/* ---- Entrance animation (kept from v1) ------------------------------------ */
.enter {
  animation: gov-enter 480ms cubic-bezier(.22, .61, .36, 1) both;
  animation-delay: var(--delay, 0ms);
}
@keyframes gov-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
