/* Login UI matching KokanMonitoring reference.
   Authentication, roles, API calls and navigation are unchanged. */
.login-screen {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.16fr) minmax(430px, 0.84fr);
  background: #f7faff;
  font-family: 'DM Sans', 'Noto Sans Devanagari', -apple-system, 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ---------------- left branding panel ---------------- */
.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
  padding: 22px 48px 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 5% 8%, rgba(245, 166, 92, .12), transparent 30%),
    radial-gradient(circle at 88% 86%, rgba(78, 139, 198, .09), transparent 38%),
    linear-gradient(145deg, #ffffff 0%, #fbfdff 54%, #edf5fc 100%);
  border-right: 1px solid #e2ebf4;
}

.login-visual::before,
.login-visual::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(31, 100, 167, .055);
  border-radius: 50%;
  pointer-events: none;
}
.login-visual::before { width: 560px; height: 560px; right: -280px; bottom: -250px; }
.login-visual::after { width: 470px; height: 470px; left: -260px; top: -230px; }

.lv-topline,
.lv-body,
.lv-bottom { position: relative; z-index: 1; }

.lv-gov-lockup { display: flex; align-items: center; gap: 16px; }
.lv-emblem-wrap,
.login-brand-emblem {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #e0e9f3;
  box-shadow: 0 8px 20px rgba(26, 71, 112, .08);
}
.lv-emblem-wrap { width: 70px; height: 70px; border-radius: 17px; }
.lv-emblem { width: 56px; height: 56px; object-fit: contain; }
.lv-gov { font-size: 18px; font-weight: 800; color: #0e3b77; letter-spacing: -.01em; }

.lv-body {
  margin-top: clamp(24px, 4vh, 40px);
  max-width: 820px;
}
.lv-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  color: #1c5a9b;
}
.lv-body h1 {
  max-width: 790px;
  margin: 0;
  color: #103c7c;
  font-family: 'Noto Sans Devanagari', 'Manrope', 'DM Sans', sans-serif;
  font-size: clamp(32px, 2.75vw, 46px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.035em;
}
.lv-subtitle {
  margin: 9px 0 0;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.45;
  font-weight: 700;
  color: #405d7a;
}
.lv-rule {
  width: 88px;
  height: 4px;
  margin: 18px 0 0;
  border-radius: 99px;
  background: #f29a43;
}

.lv-districts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.lv-districts li {
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid #dce8f4;
  font-size: 12px;
  font-weight: 800;
  color: #365472;
  box-shadow: 0 5px 14px rgba(26, 71, 112, .055);
}

.lv-map-wrap {
  display: flex;
  justify-content: center;
  min-height: 156px;
  pointer-events: none;
}
.lv-map {
  display: block;
  width: min(320px, 54vw);
  max-height: 156px;
  object-fit: contain;
  opacity: .98;
  filter: drop-shadow(0 9px 16px rgba(60, 88, 112, .12));
}

.lv-bottom {
  margin-top: 14px;
  padding-top: 0;
}
.lv-office {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin: 0;
  padding: 14px 0 12px;
  font-style: normal;
  border-top: 1px solid #dfe8f2;
  color: #637b95;
  font-size: 12px;
  line-height: 1.45;
}
.lv-office-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eaf3ff;
  color: #245eaa;
}
.lv-office strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: .15em;
  font-weight: 900;
  color: #144a89;
}
.lv-office span:not(.lv-office-icon) { display: block; }

.lv-developer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid rgba(220, 230, 240, .78);
  color: #7890a9;
  font-size: 10.5px;
}
.lv-developer > svg { color: #245eaa; }
.lv-developer a { color: #16549a; font-weight: 800; text-decoration: none; }
.lv-developer a:hover { text-decoration: underline; }
.lv-footer-separator { color: #c2cfdd; margin: 0 3px; }
.lv-site-link { display: inline-flex; align-items: center; gap: 4px; }

/* ---------------- right sign-in panel ---------------- */
.login-form-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
  padding: 18px 28px 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #dcecf8 0%, #cfe2f2 100%);
}
.login-form-panel::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  top: -230px;
  right: -220px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: none;
  pointer-events: none;
}

.login-form-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  padding: 26px 34px 22px;
  background: rgba(255, 255, 255, .985);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 20px;
  box-shadow: 0 22px 50px rgba(27, 67, 105, .18);
  box-sizing: border-box;
}

.login-lang-row { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f7faff;
  border: 1px solid #dce7f1;
  font-size: 12px;
  color: #7b8fa5;
}
.lang-pill svg { color: #7b8fa5; }
.lang-pill a.lang-opt {
  color: #7b8fa5;
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.lang-pill a.lang-opt:hover {
  color: #144b8d;
}
.lang-pill a.lang-opt.on {
  color: #144b8d;
  font-weight: 800;
}
.lang-pill .sep { color: #d0dbe5; }

.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-brand-emblem {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(26,71,112,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e0e9f3;
}
.login-brand-emblem img { width: 44px; height: 44px; object-fit: contain; }
.login-brand-title { font-size: 17px; font-weight: 900; color: #0e3d7a; letter-spacing: -.015em; line-height: 1.2; }
.login-brand-subtitle { margin-top: 2px; font-size: 12px; color: #6f8399; }

.login-form-card h2 {
  margin: 0 0 7px;
  font-size: clamp(22px, 1.8vw, 26px);
  color: #102f51;
  letter-spacing: -.025em;
  font-family: 'Manrope', 'DM Sans', sans-serif;
  font-weight: 700;
}
.login-lead {
  margin: 0 0 18px;
  max-width: 450px;
  font-size: 13px;
  line-height: 1.45;
  color: #71869b;
}
.login-form { display: flex; flex-direction: column; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; font-weight: 800; color: #536b83; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 13px;
  border: 1px solid #d9e4ef;
  border-radius: 11px;
  background: #fbfdff;
  color: #8197ad;
  transition: border-color .18s, box-shadow .18s, background .18s;
  box-sizing: border-box;
}
.input-wrap:focus-within {
  border-color: #4387c4;
  background: #fff;
  box-shadow: 0 0 0 3px #e7f1fb;
}
.input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #16212e;
}
.input-wrap input::placeholder { color: #9dadbe; font-weight: 400; }

.eye-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8197ad;
  cursor: pointer;
  transition: color .18s;
  flex: none;
}
.eye-toggle-btn:hover {
  color: #144a89;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid #f5c6c6;
  border-radius: 9px;
  background: #fdecec;
  color: #cf2d2d;
  font-size: 12.5px;
  line-height: 1.45;
}
.login-btn {
  min-height: 46px;
  margin-top: 2px;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #176db4 0%, #155994 100%);
  box-shadow: 0 9px 20px rgba(26, 88, 143, .22);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: filter .18s, transform .12s, box-shadow .18s;
  cursor: pointer;
  width: 100%;
}
.login-btn:hover:not(:disabled) { filter: brightness(1.04); box-shadow: 0 11px 24px rgba(26, 88, 143, .27); }
.login-btn:active:not(:disabled) { transform: translateY(1px); }
.login-btn:disabled { opacity: .62; cursor: not-allowed; }

.login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #edf2f6;
  font-size: 11px;
  font-weight: 700;
  color: #7e94aa;
}
.login-footer { margin: 6px 0 0; text-align: center; font-size: 11px; color: #9aaabd; }

@media (max-width: 1200px) {
  .login-screen { grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr); }
  .login-visual { padding-left: 36px; padding-right: 36px; }
  .login-form-panel { padding-left: 24px; padding-right: 24px; }
  .lv-body { margin-top: clamp(32px, 5vh, 50px); }
}
@media (max-width: 980px) {
  .login-screen { grid-template-columns: 1fr; height: auto; min-height: 100vh; max-height: none; overflow: auto; }
  .login-visual { min-height: 650px; padding: 34px 32px 24px; }
  .lv-body { margin-top: 54px; }
  .login-form-panel { min-height: 620px; padding: 42px 28px; }
}
@media (max-width: 560px) {
  .login-visual { min-height: 600px; padding: 24px 20px 20px; }
  .lv-emblem-wrap { width: 58px; height: 58px; border-radius: 14px; }
  .lv-emblem { width: 46px; height: 46px; }
  .lv-gov { font-size: 16px; }
  .lv-body { margin-top: 44px; }
  .lv-body h1 { font-size: 34px; }
  .lv-districts { margin-top: 24px; gap: 7px; }
  .lv-districts li { padding: 7px 12px; }
  .lv-map-card { width: 100%; margin-top: 12px; padding: 7px 9px 9px; }
  .lv-map-wrap { min-height: 184px; }
  .lv-map { width: min(260px, 78vw); max-height: 184px; }
  .lv-map-card figcaption { align-items: flex-start; flex-direction: column; gap: 3px; }
  .lv-developer { font-size: 9.5px; }
  .login-form-panel { min-height: auto; height: auto; padding: 28px 16px 36px; align-items: center; }
  .login-form-card { padding: 28px 22px 24px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}

/* Desktop viewport fit */
@media (min-width: 981px) {
  .login-screen {
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    align-items: stretch;
  }

  .login-visual,
  .login-form-panel {
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    box-sizing: border-box;
  }

  .login-visual {
    padding: 16px 40px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .lv-emblem-wrap { width: 58px; height: 58px; border-radius: 14px; }
  .lv-emblem { width: 46px; height: 46px; }
  .lv-gov-lockup { gap: 13px; }
  .lv-gov { font-size: 16px; }

  .lv-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: clamp(12px, 2.2vh, 22px);
    max-width: 760px;
  }

  .lv-kicker { margin-bottom: 5px; font-size: 10px; }
  .lv-body h1 { font-size: clamp(28px, 2.45vw, 40px); line-height: 1.08; }
  .lv-subtitle { margin-top: 6px; font-size: clamp(13px, 1vw, 16px); }
  .lv-rule { width: 70px; height: 3px; margin-top: 11px; }

  .lv-districts { display: none; }
  .lv-map-card {
    flex: 1 1 auto;
    min-height: 0;
    width: min(100%, 600px);
    margin: 12px 0 8px;
    padding: 10px 14px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .lv-map-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .lv-map {
    width: min(430px, 48vw);
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
  }

  .lv-bottom {
    flex: 0 0 auto;
    margin-top: auto;
  }
  .lv-office {
    max-width: 680px;
    padding: 9px 0 7px;
    gap: 9px;
    font-size: 10.5px;
    line-height: 1.3;
  }
  .lv-office-icon { width: 28px; height: 28px; }
  .lv-office strong { margin-bottom: 2px; font-size: 8.5px; }
  .lv-developer { padding-top: 7px; gap: 5px; font-size: 9px; }

  .login-form-panel {
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    overflow: hidden;
  }

  .login-form-card {
    max-width: 440px;
    padding: 34px 30px 31px;
    border-radius: 18px;
  }
  .login-lang-row { margin-bottom: 14px; }
  .lang-pill { padding: 6px 12px; font-size: 11px; }
  .login-brand { gap: 11px; margin-bottom: 16px; }
  .login-brand-emblem { width: 50px; height: 50px; border-radius: 13px; }
  .login-brand-emblem img { width: 38px; height: 38px; }
  .login-brand-title { font-size: 16px; }
  .login-brand-subtitle { font-size: 11px; }
  .login-form-card h2 { margin-bottom: 7px; font-size: clamp(20px, 1.55vw, 24px); }
  .login-lead { margin-bottom: 16px; font-size: 12px; line-height: 1.35; }
  .login-form { gap: 12px; }
  .field { gap: 6px; font-size: 11.5px; }
  .input-wrap { min-height: 42px; padding: 7px 11px; border-radius: 10px; }
  .input-wrap input { font-size: 13px; }
  .login-btn { min-height: 42px; padding: 10px; border-radius: 10px; font-size: 13px; }
  .login-secure { margin-top: 12px; padding-top: 11px; font-size: 10px; }
  .login-footer { margin-top: 5px; font-size: 9.5px; }
}

/* Satyamev Jayate emblem */
@media (min-width: 981px) {
  .lv-topline {
    position: relative;
    min-height: 58px;
  }
  .lv-satyamev {
    position: absolute;
    top: -2px;
    right: 28px;
    width: 74px;
    height: 74px;
    object-fit: contain;
    filter: grayscale(1) brightness(0);
    opacity: .92;
  }
}
@media (max-width: 980px) {
  .lv-topline { position: relative; }
  .lv-satyamev {
    position: absolute;
    top: 0;
    right: 8px;
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: grayscale(1) brightness(0);
    opacity: .92;
  }
}
