/* ═══════════════════════════════════════════════════════════════════════
   KIGANJO HR RECORDS & TALENT MANAGEMENT SYSTEM — LOGIN PAGE
   Professional institutional portal — wide banner redesign
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --navy-900: #0e2a40;
  --navy-800: #12334a;
  --navy-700: #16405f;
  --navy-600: #1a4060;
  --gold-soft: #f0e0b0;
  --gold-mid: #e0b64c;
  --gold-strong: #c9992e;
  --gold-accent: #8a6b1a;
  --ink: #17384f;
  --muted: #52606d;
  --steel: #637383;
  --line: #dfe5eb;
  --bg-page: #F4F7F9;
  --bg-card: #FFFFFF;
  --border-input: #c0cad4;
  --border-card: #d5dce4;
  --control-radius: 6px;
  --card-radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Page Body ─────────────────────────────────────────────────────── */
.lp-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-page);
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   INSTITUTIONAL HEADER — wide banner design
   ═══════════════════════════════════════════════════════════════════════ */
.lp-header {
  flex: 0 0 auto;
  z-index: 10;
}

/* ── Utility bar: language + theme controls ────────────────────────── */
.lp-utility-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.lp-utility-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lp-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Language selector in utility bar */
.lp-controls .lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
}

.lp-controls .lang-switcher .lang-label { display: flex; align-items: center; gap: 0; }
.lp-controls .lang-switcher .lang-sr { display: none; }

.lp-controls .lang-switcher select {
  height: 32px;
  padding: 3px 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--control-radius);
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s;
}

.lp-controls .lang-switcher select:focus-visible {
  outline: 2px solid var(--navy-800);
  outline-offset: 2px;
}

.lp-theme-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-input);
  border-radius: var(--control-radius);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: border-color .15s, background .15s;
}

.lp-theme-btn:hover {
  background: #f0f4f8;
  border-color: var(--navy-700);
}

.lp-theme-btn:focus-visible {
  outline: 2px solid var(--navy-800);
  outline-offset: 2px;
}

/* ── Wide institutional banner ─────────────────────────────────────── */
.lp-banner-bar {
  background: #fff;
  overflow: hidden;
}

.lp-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-banner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 1360px;
}

.lp-banner-logo {
  display: block;
  height: 90px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Proportional widths per logo — larger for readability */
.lp-banner-pp { height: 90px; width: auto; max-width: 380px; }
.lp-banner-unodc { height: 78px; width: auto; max-width: 380px; }
.lp-banner-us { height: 58px; width: auto; max-width: 180px; }
.lp-banner-kenya { height: 82px; width: auto; max-width: 160px; }

/* Subtle vertical separators */
.lp-banner-sep {
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, #D9E1E7 20%, #D9E1E7 80%, transparent);
  margin: 0 32px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   MAIN TWO-COLUMN LAYOUT
   ═══════════════════════════════════════════════════════════════════════ */
.lp-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px 10px;
}

.lp-main-inner {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  align-items: center;
}

/* ── Left: System Identity ─────────────────────────────────────────── */
.lp-identity {
  position: relative;
  padding-left: 0;
}

.lp-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-accent);
  margin-bottom: 12px;
}

.lp-heading {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lp-sub {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--steel);
  letter-spacing: 0.02em;
}

/* Gold accent divider */
.lp-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
}

.lp-divider-gold {
  display: block;
  height: 2px;
  width: 46px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-soft) 0%, var(--gold-accent) 100%);
}

.lp-divider-line {
  display: block;
  height: 1px;
  flex: 1;
  max-width: 200px;
  background: linear-gradient(90deg, rgba(18,51,74,0.15), rgba(18,51,74,0));
}

.lp-desc {
  margin: 0;
  max-width: 470px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Watermark */
.lp-watermark {
  position: absolute;
  top: 50%;
  left: -40px;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  opacity: 0.04;
  color: var(--navy-800);
  pointer-events: none;
  user-select: none;
}

/* ── Right: Login Card ─────────────────────────────────────────────── */
.lp-card-wrap {
  display: flex;
  justify-content: center;
}

.lp-card {
  width: 100%;
  max-width: 430px;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 30px 34px 22px;
  box-shadow: 0 8px 30px rgba(15,35,55,0.08);
  overflow: hidden;
}

/* Gold accent strip */
.lp-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-accent), var(--gold-mid), var(--gold-accent));
}

.lp-card-title {
  margin: 4px 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}

.lp-card-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--steel);
  line-height: 1.5;
}

/* ── Form Fields ───────────────────────────────────────────────────── */
.lp-field {
  margin-bottom: 18px;
}

.lp-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.lp-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--control-radius);
  background: #F8FAFC;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}

.lp-field input::placeholder {
  color: #94a3b8;
}

.lp-field input:focus {
  outline: none;
  border-color: #174766;
  box-shadow: 0 0 0 3px rgba(23,71,102,0.12);
  background: #fff;
}

/* Password field with toggle */
.lp-pass-wrap {
  position: relative;
}

.lp-pass-wrap input {
  padding-right: 44px;
}

.lp-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel);
  border-radius: 4px;
  transition: color .15s;
}

.lp-pass-toggle:hover {
  color: var(--navy-800);
}

.lp-pass-toggle:focus-visible {
  outline: 2px solid var(--navy-800);
  outline-offset: 1px;
}

/* ── Login Button ──────────────────────────────────────────────────── */
.lp-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--control-radius);
  background: #123F5A;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, box-shadow .15s;
  margin-top: 4px;
}

.lp-btn:hover:not(:disabled) {
  background: #0D334A;
  box-shadow: 0 4px 12px rgba(18,63,90,0.25);
}

.lp-btn:active:not(:disabled) {
  background: #0a2a3d;
  transform: translateY(1px);
}

.lp-btn:focus-visible {
  outline: 2px solid var(--gold-accent);
  outline-offset: 2px;
}

.lp-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.lp-btn-spinner {
  display: inline-flex;
  animation: lp-spin 1s linear infinite;
}

@keyframes lp-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Trust / Security ──────────────────────────────────────────────── */
.lp-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--steel);
}

/* ── Forgot Password ──────────────────────────────────────────────── */
.lp-forgot-wrap {
  margin-top: 8px;
}

.lp-forgot-divider {
  height: 1px;
  background: #e8ecf0;
  margin-bottom: 8px;
}

.lp-forgot {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.lp-forgot strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.lp-footer {
  flex: 0 0 auto;
  padding: 14px 40px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #374151;
  background: #fff;
  border-top: 1px solid var(--line);
}

.lp-foot-sep {
  color: var(--gold-accent);
  margin: 0 8px;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .lp-banner-inner {
    padding: 8px 24px;
  }
  .lp-banner-logo { height: 80px; }
  .lp-banner-pp { height: 80px; max-width: 340px; }
  .lp-banner-unodc { height: 68px; max-width: 340px; }
  .lp-banner-us { height: 52px; max-width: 160px; }
  .lp-banner-kenya { height: 72px; max-width: 140px; }
  .lp-banner-sep { height: 48px; margin: 0 24px; }
  .lp-main {
    padding: 8px 24px 16px;
  }
  .lp-main-inner {
    gap: 50px;
  }
}

/* Small tablet / large phone */
@media (max-width: 860px) {
  .lp-main-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 500px;
  }
  .lp-identity {
    text-align: center;
    padding-left: 0;
  }
  .lp-eyebrow { font-size: 12px; }
  .lp-heading { font-size: 1.6rem; }
  .lp-divider { justify-content: center; }
  .lp-desc { margin: 0 auto; }
  .lp-watermark { display: none; }
  .lp-card-wrap { justify-content: center; }
}

/* Mobile */
@media (max-width: 768px) {
  .lp-utility-inner {
    height: 36px;
    padding: 0 16px;
  }
  .lp-banner-inner {
    padding: 6px 12px;
  }
  .lp-banner-logos { flex-wrap: wrap; gap: 8px; }
  .lp-banner-logo { height: 45px; }
  .lp-banner-pp { height: 45px; max-width: 180px; }
  .lp-banner-unodc { height: 38px; max-width: 180px; }
  .lp-banner-us { height: 30px; max-width: 90px; }
  .lp-banner-kenya { height: 40px; max-width: 80px; }
  .lp-banner-sep { display: none; }
  .lp-main { padding: 12px 16px 16px; }
  .lp-main-inner { gap: 24px; }
  .lp-heading { font-size: 1.35rem; }
  .lp-card { padding: 26px 24px 22px; }
  .lp-card-title { font-size: 24px; }
  .lp-footer { padding: 12px 16px; font-size: 12px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .lp-banner-inner {
    padding: 4px 8px;
  }
  .lp-banner-logo { height: 36px; }
  .lp-banner-pp { height: 36px; max-width: 140px; }
  .lp-banner-unodc { height: 30px; max-width: 140px; }
  .lp-banner-us { height: 24px; max-width: 70px; }
  .lp-banner-kenya { height: 32px; max-width: 60px; }
  .lp-banner-sep { display: none; }
  .lp-heading { font-size: 1.15rem; }
  .lp-sub { font-size: .9rem; }
  .lp-desc { font-size: .85rem; }
  .lp-card { padding: 22px 18px 20px; }
  .lp-card-title { font-size: 22px; }
  .lp-footer span { display: block; }
  .lp-foot-sep { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════════════════ */

html[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --border-input: #475569;
  --border-card: #334155;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --steel: #94a3b8;
  --line: #334155;
}

html[data-theme="dark"] .lp-body { background: #0b1120; }

/* Dark header */
html[data-theme="dark"] .lp-utility-bar { background: #0f172a; border-bottom-color: #1e293b; }
html[data-theme="dark"] .lp-banner-bar { background: #151e2e; box-shadow: 0 2px 16px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
html[data-theme="dark"] .lp-banner-sep { background: rgba(255,255,255,.08); }
/* Login banner logos: single continuous strip, no individual boxes */
html[data-theme="dark"] .lp-banner-pp,
html[data-theme="dark"] .lp-banner-unodc,
html[data-theme="dark"] .lp-banner-us,
html[data-theme="dark"] .lp-banner-kenya {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
/* Logo brightness boost so they read clearly on dark strip */
html[data-theme="dark"] .lp-banner-pp img,
html[data-theme="dark"] .lp-banner-unodc img,
html[data-theme="dark"] .lp-banner-us img,
html[data-theme="dark"] .lp-banner-kenya img {
  filter: brightness(1.35) saturate(1.15);
}
html[data-theme="dark"] .lp-controls .lang-switcher select { background: #0f172a; border-color: #475569; color: #e5e7eb; }
html[data-theme="dark"] .lp-theme-btn { background: #0f172a; border-color: #475569; color: #94b8d0; }
html[data-theme="dark"] .lp-theme-btn:hover { background: #1e293b; border-color: #3b82f6; }

/* Dark content */
html[data-theme="dark"] .lp-heading { color: #f0e0b0; }
html[data-theme="dark"] .lp-sub { color: #94a3b8; }
html[data-theme="dark"] .lp-eyebrow { color: var(--gold-mid); }

/* Dark card */
html[data-theme="dark"] .lp-card { background: #1e293b; border-color: #334155; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
html[data-theme="dark"] .lp-card-title { color: #f0e0b0; }
html[data-theme="dark"] .lp-card-sub { color: #94a3b8; }
html[data-theme="dark"] .lp-field input { background: #0f172a; border-color: #475569; color: #e5e7eb; }
html[data-theme="dark"] .lp-field input::placeholder { color: #6b7280; }
html[data-theme="dark"] .lp-field input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
html[data-theme="dark"] .lp-pass-toggle { color: #94a3b8; }
html[data-theme="dark"] .lp-pass-toggle:hover { color: #e5e7eb; }
html[data-theme="dark"] .lp-btn { background: #2563eb; }
html[data-theme="dark"] .lp-btn:hover:not(:disabled) { background: #1d4ed8; }
html[data-theme="dark"] .lp-trust { color: #94a3b8; }
html[data-theme="dark"] .lp-forgot-divider { background: #334155; }
html[data-theme="dark"] .lp-forgot { color: #94a3b8; }
html[data-theme="dark"] .lp-forgot strong { color: #e5e7eb; }
html[data-theme="dark"] .lp-footer { background: #0f172a; border-top-color: #1e293b; color: #6b7280; }
html[data-theme="dark"] .lp-watermark { color: #94a3b8; opacity: 0.02; }
html[data-theme="dark"] .alert.danger { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
html[data-theme="dark"] .alert.warning { background: #451a03; color: #fcd34d; border-color: #78350f; }
html[data-theme="dark"] .alert.success { background: #052e16; color: #6ee7b7; border-color: #064e3b; }

@media (prefers-reduced-motion: reduce) {
  .lp-btn-spinner { animation: none; }
}

/* Alert boxes */
.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert.danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert.warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert.success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert.info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* ═══════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
  .lp-utility-bar, .lp-banner-bar, .lp-controls, .lp-watermark { display: none; }
  .lp-main { padding: 0; }
  .lp-card { box-shadow: none; border: 1px solid #ccc; }
}
