/* IFM-style form + safu ya kushoto kama srms.ac.tz/st_login.php */

.st-login-react-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #ffffff;
  color: #64748b;
}

#st-login-root {
  width: 100%;
  min-height: 100vh;
}

.ems-main {
  width: 100%;
  min-height: 100vh;
  color: #64748b;
}

/* Safu mbili: maelezo (kushoto / juu kwenye simu) + fomu */
.ems-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 960px) {
  .ems-layout {
    flex-direction: row;
    align-items: stretch;
  }
}

.ems-sidebar {
  flex: 0 0 auto;
  padding: 1.5rem 1.25rem 1.75rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
}

@media (min-width: 960px) {
  .ems-sidebar {
    flex: 1 1 42%;
    max-width: 32rem;
    min-width: min(100%, 18rem);
    border-bottom: 0;
    border-right: 1px solid #e2e8f0;
    padding: 2.25rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.ems-sidebar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.ems-lang-btn {
  margin: 0;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: #175883;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ems-lang-btn:hover {
  background: rgba(23, 88, 131, 0.08);
}

.ems-lang-btn.is-active {
  background: rgba(23, 88, 131, 0.12);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ems-toolbar-sep {
  color: #cbd5e1;
  user-select: none;
  margin: 0 0.15rem;
}

.ems-theme-btn {
  margin: 0;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #175883;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ems-theme-btn:hover {
  background: rgba(23, 88, 131, 0.08);
}

.ems-sidebar-title {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ems-sidebar-intro {
  margin: 0 0 1.35rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #475569;
}

.ems-auth {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 1rem 2rem;
  box-sizing: border-box;
  min-width: 0;
}

@media (min-width: 640px) {
  .ems-auth {
    justify-content: center;
    padding-top: 1rem;
  }
}

.ems-auth-inner {
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ems-top {
  text-align: center;
  z-index: 10;
}

.ems-logo-img {
  display: block;
  width: auto;
  max-height: 9rem;
  max-width: min(100%, 14rem);
  margin: 0 auto;
  padding: 1.5rem 0;
  object-fit: contain;
}

/* Matches IFM’s hidden institution block (logo only visible) */
.ems-institution--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ems-institution-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .ems-institution-title {
    font-size: 1.25rem;
  }
}

.ems-institution-slogan {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-style: italic;
}

/* Double-frame card (IFM) */
.ems-card-outer {
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 0.375rem;
  margin-top: 0.75rem;
  background: rgba(226, 232, 240, 0.3);
  width: 100%;
  max-width: 28rem;
  box-sizing: border-box;
}

.ems-card-inner {
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 28rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 1rem;
  box-sizing: border-box;
}

.ems-welcome {
  margin-bottom: 0.75rem;
  width: 100%;
}

.ems-welcome-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
}

.ems-welcome-sub {
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.5;
  color: #64748b;
}

.ems-form-wrap {
  color: #64748b;
}

.ems-form {
  margin: 0;
}

.ems-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.ems-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25;
  color: #64748b;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ems-input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.ems-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(191, 219, 254, 0.5);
}

.ems-pass-row {
  position: relative;
  margin-top: 0.25rem;
}

.ems-input--pass {
  margin-top: 0;
  padding-right: 2.75rem;
}

.ems-toggle-pw {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.ems-toggle-pw:hover {
  color: #175883;
  background: rgba(23, 88, 131, 0.08);
}

.ems-toggle-pw:focus {
  outline: none;
  color: #175883;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.55);
}

.ems-field-gap {
  margin-top: 1rem;
}

.ems-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.ems-remember-block {
  flex: 1 1 auto;
  min-width: 0;
}

.ems-remember-label {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1;
  cursor: pointer;
  margin: 0;
}

.ems-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  accent-color: #175883;
}

.ems-remember-text {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: #64748b;
}

.ems-forgot {
  font-size: 0.875rem;
  text-decoration: underline;
  color: inherit;
  white-space: nowrap;
}

.ems-forgot:hover {
  color: #175883;
}

/* “Forgot password” — haiongozi ukurasa mwingine */
.ems-forgot-static {
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: inherit;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.ems-forgot-box {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(23, 88, 131, 0.06);
  border: 1px solid rgba(23, 88, 131, 0.15);
  text-align: left;
}

.ems-forgot-title {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #175883;
}

.ems-forgot-help {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
  font-weight: 500;
}

.ems-forgot-mail {
  color: #0d9488;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ems-forgot-mail:hover {
  color: #0f766e;
}

.ems-submit {
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: #175883;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.ems-submit:hover {
  background-color: #12486a;
}

.ems-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 88, 131, 0.35);
}

.ems-submit:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.ems-alert {
  margin-bottom: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
}

.ems-quick-links {
  z-index: 10;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.ems-quick-links-inner {
  margin: 0;
  text-align: center;
}

.ems-link {
  margin: 0 0.25rem;
  text-decoration: none;
  color: #3b82f6;
  font-weight: 500;
}

.ems-link:hover {
  text-decoration: underline;
}

/* Maandishi yanayofanana na viungo lakini hayana urambazaji */
.ems-link-static {
  margin: 0 0.25rem;
  color: #3b82f6;
  font-weight: 500;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.ems-link-sep {
  color: #94a3b8;
  margin: 0 0.25rem;
  user-select: none;
}

.ems-copyright {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.45;
}

.ems-copyright--sub {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

/* ——— Hali ya giza (Dark mode) ——— */
.st-login-react-body--dark {
  background: #0f172a;
  color: #94a3b8;
}

.st-login-react-body--dark .ems-main {
  color: #94a3b8;
}

.st-login-react-body--dark .ems-sidebar {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom-color: #334155;
  border-right-color: #334155;
}

.st-login-react-body--dark .ems-sidebar-title,
.st-login-react-body--dark .ems-welcome-title {
  color: #f1f5f9;
}

.st-login-react-body--dark .ems-sidebar-intro,
.st-login-react-body--dark .ems-welcome-sub {
  color: #94a3b8;
}

.st-login-react-body--dark .ems-lang-btn,
.st-login-react-body--dark .ems-theme-btn {
  color: #7dd3fc;
}

.st-login-react-body--dark .ems-lang-btn:hover,
.st-login-react-body--dark .ems-theme-btn:hover {
  background: rgba(125, 211, 252, 0.12);
}

.st-login-react-body--dark .ems-lang-btn.is-active {
  background: rgba(125, 211, 252, 0.18);
}

.st-login-react-body--dark .ems-toolbar-sep {
  color: #475569;
}

.st-login-react-body--dark .ems-auth {
  background: transparent;
}

.st-login-react-body--dark .ems-card-outer {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.5);
}

.st-login-react-body--dark .ems-card-inner {
  border-color: #334155;
  background: #1e293b;
}

.st-login-react-body--dark .ems-form-wrap,
.st-login-react-body--dark .ems-label,
.st-login-react-body--dark .ems-remember-label,
.st-login-react-body--dark .ems-remember-text {
  color: #94a3b8;
}

.st-login-react-body--dark .ems-input {
  color: #e2e8f0;
  background: #0f172a;
  border-color: #475569;
}

.st-login-react-body--dark .ems-input::placeholder {
  color: #64748b;
}

.st-login-react-body--dark .ems-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.st-login-react-body--dark .ems-toggle-pw {
  color: #94a3b8;
}

.st-login-react-body--dark .ems-toggle-pw:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.15);
}

.st-login-react-body--dark .ems-forgot-static {
  color: #94a3b8;
}

.st-login-react-body--dark .ems-forgot-box {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}

.st-login-react-body--dark .ems-forgot-title {
  color: #7dd3fc;
}

.st-login-react-body--dark .ems-forgot-help {
  color: #cbd5e1;
}

.st-login-react-body--dark .ems-forgot-mail {
  color: #2dd4bf;
}

.st-login-react-body--dark .ems-quick-links {
  color: #64748b;
}

.st-login-react-body--dark .ems-link-static {
  color: #7dd3fc;
}

.st-login-react-body--dark .ems-link-sep {
  color: #475569;
}

.st-login-react-body--dark .ems-copyright {
  color: #64748b;
}

.st-login-react-body--dark .ems-alert {
  background: rgba(127, 29, 29, 0.35);
  border-color: #991b1b;
  color: #fecaca;
}

/* ——— Skrini ya kupakia (React / mtindo wa portal kama ESS) ——— */
.st-boot {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  background: #ffffff;
  overflow: hidden;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.55s step-end;
}

.st-boot--exit {
  opacity: 0;
  transform: scale(0.98) translateY(6px);
  visibility: hidden;
  pointer-events: none;
}

.st-boot__aurora {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 200deg at 50% 50%, rgba(56, 189, 248, 0.14), transparent 42%, rgba(23, 88, 131, 0.1), transparent 78%);
  animation: st-boot-aurora 14s linear infinite;
  pointer-events: none;
}

@keyframes st-boot-aurora {
  to {
    transform: rotate(360deg);
  }
}

.st-boot__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
}

.st-boot__orb--1 {
  width: min(52vw, 22rem);
  height: min(52vw, 22rem);
  top: -8%;
  right: -12%;
  background: rgba(56, 189, 248, 0.35);
  animation: st-boot-float-a 9s ease-in-out infinite;
}

.st-boot__orb--2 {
  width: min(48vw, 18rem);
  height: min(48vw, 18rem);
  bottom: -10%;
  left: -8%;
  background: rgba(23, 88, 131, 0.22);
  animation: st-boot-float-b 11s ease-in-out infinite;
}

.st-boot__orb--3 {
  width: min(36vw, 12rem);
  height: min(36vw, 12rem);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 165, 233, 0.12);
  animation: st-boot-pulse 5s ease-in-out infinite;
}

@keyframes st-boot-float-a {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 18px);
  }
}

@keyframes st-boot-float-b {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(14px, -10px);
  }
}

@keyframes st-boot-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.st-boot__card {
  position: relative;
  width: 100%;
  max-width: 20.5rem;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 7px rgba(15, 23, 42, 0.04), 0 22px 48px -12px rgba(23, 88, 131, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  animation: st-boot-card-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes st-boot-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.st-boot__spinner-wrap {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.35rem;
}

.st-boot__track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #175883;
  border-right-color: rgba(23, 88, 131, 0.2);
  animation: st-boot-spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.st-boot__track--delay {
  inset: 0.65rem;
  border-top-color: #0ea5e9;
  border-right-color: transparent;
  border-bottom-color: rgba(14, 165, 233, 0.35);
  animation-duration: 1.65s;
  animation-direction: reverse;
}

@keyframes st-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

.st-boot__hub {
  position: absolute;
  inset: 1.35rem;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-boot__logo {
  width: 3.35rem;
  height: 3.35rem;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(23, 88, 131, 0.2));
  animation: st-boot-logo 2.8s ease-in-out infinite;
}

@keyframes st-boot-logo {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.st-boot__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #0f172a;
}

.st-boot__slogan {
  margin: 0 0 1.1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #175883;
  line-height: 1.45;
}

.st-boot__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(23, 88, 131, 0.1);
  overflow: hidden;
  margin-bottom: 1rem;
}

.st-boot__bar-fill {
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #175883, #38bdf8, #175883);
  background-size: 200% 100%;
  animation: st-boot-bar 1.85s ease-in-out infinite;
}

@keyframes st-boot-bar {
  0% {
    transform: translateX(-100%);
    background-position: 0% 50%;
  }
  100% {
    transform: translateX(280%);
    background-position: 100% 50%;
  }
}

.st-boot__loading {
  margin: 0 0 0.3rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.st-boot__dots {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.st-boot__dots i {
  display: block;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #175883;
  animation: st-boot-dot 0.95s ease-in-out infinite;
}

.st-boot__dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.st-boot__dots i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes st-boot-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.st-boot__portal {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* Hali ya giza */
.st-boot.st-boot--dark {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0c1222 100%);
}

.st-boot.st-boot--dark .st-boot__card {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.2), 0 24px 56px -12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.st-boot.st-boot--dark .st-boot__hub {
  background: transparent;
  box-shadow: none;
}

.st-boot.st-boot--dark .st-boot__title {
  color: #f1f5f9;
}

.st-boot.st-boot--dark .st-boot__slogan {
  color: #7dd3fc;
}

.st-boot.st-boot--dark .st-boot__loading {
  color: #cbd5e1;
}

.st-boot.st-boot--dark .st-boot__dots i {
  background: #38bdf8;
}

.st-boot.st-boot--dark .st-boot__portal {
  color: #94a3b8;
}

.st-boot.st-boot--dark .st-boot__track {
  border-top-color: #38bdf8;
  border-right-color: rgba(56, 189, 248, 0.2);
}

.st-boot.st-boot--dark .st-boot__track--delay {
  border-top-color: #7dd3fc;
  border-bottom-color: rgba(125, 211, 252, 0.35);
}

.st-boot.st-boot--dark .st-boot__bar {
  background: rgba(148, 163, 184, 0.15);
}

.st-boot.st-boot--dark .st-boot__bar-fill {
  background: linear-gradient(90deg, #0369a1, #38bdf8, #0369a1);
}

/* ═══════════════════════════════════════════════════════════════
   GLASSMORPHISM (dark theme = kioo) — aurora ya UCA
   Inapatana na homepage: navy angavu + teal + machungwa
   ═══════════════════════════════════════════════════════════════ */

.st-login-react-body--dark {
  background:
    radial-gradient(ellipse 85% 65% at 12% -5%, rgba(64, 199, 240, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 100% 5%, rgba(255, 166, 77, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 80% 60% at 50% 112%, rgba(62, 184, 219, 0.55) 0%, transparent 62%),
    radial-gradient(ellipse 55% 45% at 18% 80%, rgba(147, 118, 255, 0.3) 0%, transparent 55%),
    linear-gradient(160deg, #16295c 0%, #1d3f85 40%, #14608f 70%, #183067 100%);
  background-attachment: fixed;
}

/* texture ya nukta laini */
.st-login-react-body--dark .ems-main {
  position: relative;
}

.st-login-react-body--dark .ems-main::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.st-login-react-body--dark .ems-layout {
  position: relative;
  z-index: 1;
}

/* sidebar ya kioo — navy tint ili maandishi meupe yasomeke */
.st-login-react-body--dark .ems-sidebar {
  background: linear-gradient(150deg, rgba(10, 24, 52, 0.5) 0%, rgba(12, 30, 64, 0.32) 100%);
  border-bottom-color: rgba(255, 255, 255, 0.18);
  border-right-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.st-login-react-body--dark .ems-sidebar-title {
  color: #fff;
  text-shadow: 0 3px 18px rgba(4, 12, 30, 0.45);
}

.st-login-react-body--dark .ems-sidebar-intro {
  color: rgba(226, 236, 252, 0.82);
}

.st-login-react-body--dark .ems-lang-btn,
.st-login-react-body--dark .ems-theme-btn {
  color: #9be7ff;
}

/* kadi ya login ya kioo (fremu mbili) */
.st-login-react-body--dark .ems-card-outer {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.07) 100%);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    0 24px 60px rgba(4, 12, 30, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.st-login-react-body--dark .ems-card-inner {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(8, 22, 48, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.st-login-react-body--dark .ems-welcome-title {
  color: #fff;
}

/* inputs za kioo */
.st-login-react-body--dark .ems-input {
  color: #f0f7ff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.st-login-react-body--dark .ems-input::placeholder {
  color: rgba(226, 236, 252, 0.5);
}

.st-login-react-body--dark .ems-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.25), 0 0 24px rgba(62, 184, 219, 0.2);
}

/* kitufe cha kuingia chenye glow */
.st-login-react-body--dark .ems-submit {
  background: linear-gradient(135deg, #148eb7 0%, #3eb8db 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 12px 30px rgba(20, 142, 183, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.st-login-react-body--dark .ems-submit:hover {
  background: linear-gradient(135deg, #1699c4 0%, #55c8e8 100%);
  transform: translateY(-1px);
  box-shadow:
    0 16px 38px rgba(20, 142, 183, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.st-login-react-body--dark .ems-submit:focus {
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.4), 0 12px 30px rgba(20, 142, 183, 0.45);
}

/* forgot-box ya kioo */
.st-login-react-body--dark .ems-forgot-box {
  background: rgba(62, 184, 219, 0.12);
  border-color: rgba(125, 211, 252, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* alert ya kioo */
.st-login-react-body--dark .ems-alert {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* logo inayong'aa kidogo */
.st-login-react-body--dark .ems-logo-img {
  filter: drop-shadow(0 8px 22px rgba(4, 12, 30, 0.5));
}

/* maandishi ya chini yasomeke juu ya kioo */
.st-login-react-body--dark .ems-copyright,
.st-login-react-body--dark .ems-quick-links {
  color: rgba(203, 220, 245, 0.7);
}

.st-login-react-body--dark .ems-link-static {
  color: #9be7ff;
}

/* fallback bila backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .st-login-react-body--dark .ems-sidebar { background: rgba(16, 32, 64, 0.92); }
  .st-login-react-body--dark .ems-card-outer { background: rgba(16, 32, 64, 0.88); }
  .st-login-react-body--dark .ems-card-inner { background: rgba(10, 24, 50, 0.95); }
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM UI v3 — brand-first glass, Sora + Jakarta, motion
   ═══════════════════════════════════════════════════════════════ */

:root {
  --st-navy: #192f59;
  --st-teal: #148eb7;
  --st-teal-bright: #3eb8db;
  --st-amber: #fe9638;
  --st-font-display: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
  --st-font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.st-login-react-body {
  font-family: var(--st-font-body);
}

.st-login-react-body--dark {
  color: rgba(226, 236, 252, 0.78);
}

/* Floating orbs behind layout */
.ems-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ems-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.7;
  will-change: transform;
  animation: ems-orb-float 18s ease-in-out infinite;
}

.ems-orb--1 {
  width: min(48vw, 380px);
  height: min(48vw, 380px);
  background: radial-gradient(circle, rgba(62, 184, 219, 0.75) 0%, transparent 70%);
  top: -10%;
  right: -6%;
}

.ems-orb--2 {
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  background: radial-gradient(circle, rgba(254, 150, 56, 0.55) 0%, transparent 70%);
  bottom: -12%;
  left: -8%;
  animation-delay: -6s;
}

.ems-orb--3 {
  width: min(28vw, 220px);
  height: min(28vw, 220px);
  background: radial-gradient(circle, rgba(20, 142, 183, 0.45) 0%, transparent 70%);
  top: 48%;
  left: 42%;
  opacity: 0.35;
  animation-delay: -11s;
}

@keyframes ems-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(18px, -22px) scale(1.06); }
  66% { transform: translate(-14px, 10px) scale(0.95); }
}

.ems-layout {
  position: relative;
  z-index: 1;
}

/* Sidebar — brand-led */
.ems-sidebar {
  animation: ems-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ems-sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-family: var(--st-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-navy);
  background: linear-gradient(135deg, rgba(20, 142, 183, 0.12), rgba(254, 150, 56, 0.1));
  border: 1px solid rgba(25, 47, 89, 0.1);
}

.st-login-react-body--dark .ems-sidebar-brand {
  color: #e8f6ff;
  background: linear-gradient(135deg, rgba(20, 142, 183, 0.28), rgba(254, 150, 56, 0.16));
  border-color: rgba(255, 255, 255, 0.18);
}

.ems-sidebar-brand i {
  color: var(--st-amber);
  font-size: 0.85rem;
}

.ems-sidebar-title {
  font-family: var(--st-font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.st-login-react-body--dark .ems-sidebar-title {
  background: linear-gradient(135deg, #fff 0%, #a5d8f0 55%, #fcd9b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.ems-sidebar-intro {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 28rem;
}

.ems-sidebar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ems-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e2e8f0;
  color: #475569;
}

.st-login-react-body--dark .ems-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(226, 236, 252, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ems-chip i {
  color: var(--st-teal);
  font-size: 0.8rem;
}

.st-login-react-body--dark .ems-chip i {
  color: #7dd3fc;
}

/* Toolbar pills */
.ems-sidebar-toolbar {
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.ems-lang-btn,
.ems-theme-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  border: 1px solid transparent;
}

.st-login-react-body--dark .ems-lang-btn,
.st-login-react-body--dark .ems-theme-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #c8e9f8;
}

.st-login-react-body--dark .ems-lang-btn.is-active {
  background: rgba(62, 184, 219, 0.28);
  border-color: rgba(125, 211, 252, 0.45);
  color: #fff;
  text-decoration: none;
}

.st-login-react-body--dark .ems-lang-btn:hover,
.st-login-react-body--dark .ems-theme-btn:hover {
  background: rgba(125, 211, 252, 0.16);
  border-color: rgba(125, 211, 252, 0.35);
}

/* Auth column */
.ems-auth {
  animation: ems-fade-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.ems-auth-inner {
  max-width: 26rem;
}

.ems-logo-img {
  max-height: 5.5rem;
  max-width: min(100%, 11rem);
  padding: 0.5rem 0 1rem;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ems-logo-img:hover {
  transform: scale(1.04) translateY(-2px);
}

.ems-institution:not(.ems-institution--sr-only) {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 0.85rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
  text-align: center;
}

.ems-institution-title {
  font-family: var(--st-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--st-navy);
}

.st-login-react-body--dark .ems-institution-title {
  color: #fff;
}

.ems-institution-slogan {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 500;
  color: #64748b;
}

.st-login-react-body--dark .ems-institution-slogan {
  color: rgba(203, 220, 245, 0.7);
}

/* Card */
.ems-card-outer {
  position: relative;
  border-radius: 1.35rem;
  padding: 0.4rem;
  margin-top: 0.35rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ems-card-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(20, 142, 183, 0.55), rgba(254, 150, 56, 0.35), rgba(62, 184, 219, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.st-login-react-body--dark .ems-card-outer {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 28px 64px rgba(4, 12, 30, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ems-card-inner {
  position: relative;
  z-index: 1;
  border-radius: 1.05rem;
  padding: 1.65rem 1.45rem 1.5rem;
}

.ems-welcome-title {
  font-family: var(--st-font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ems-welcome-sub {
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Inputs */
.ems-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  color: #64748b;
}

.st-login-react-body--dark .ems-label {
  color: rgba(203, 220, 245, 0.65);
}

.ems-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ems-input-wrap > i.ems-input-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--st-teal);
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.9;
}

.st-login-react-body--dark .ems-input-wrap > i.ems-input-icon {
  color: #7dd3fc;
}

.ems-input {
  padding: 0.85rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 0.8rem;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}

.ems-input-wrap .ems-input {
  padding-left: 2.55rem;
}

.ems-input:hover {
  border-color: rgba(20, 142, 183, 0.45);
}

.ems-input:focus {
  border-color: var(--st-teal);
  box-shadow: 0 0 0 3px rgba(20, 142, 183, 0.2);
}

.st-login-react-body--dark .ems-input {
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.95rem;
}

.st-login-react-body--dark .ems-input-wrap .ems-input {
  padding-left: 2.55rem;
}

.ems-input--pass {
  padding-right: 2.85rem;
}

.ems-pass-row .ems-toggle-pw {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.55rem;
}

/* Submit */
.ems-submit {
  margin-top: 1.15rem;
  padding: 0.95rem 1.25rem;
  border-radius: 0.85rem;
  font-family: var(--st-font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--st-navy) 0%, var(--st-teal) 55%, #0e7490 100%);
  box-shadow: 0 10px 28px rgba(25, 47, 89, 0.28);
}

.ems-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.2) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: ems-submit-shimmer 3.5s ease-in-out infinite;
}

.ems-submit > * {
  position: relative;
  z-index: 1;
}

.ems-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(20, 142, 183, 0.4);
  background: linear-gradient(135deg, #1a3566 0%, #1699c4 55%, #0e7490 100%);
}

.ems-submit:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none !important;
}

.ems-submit-icon {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.ems-submit:hover .ems-submit-icon {
  transform: translateX(4px);
}

@keyframes ems-submit-shimmer {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
}

.st-login-react-body--dark .ems-submit {
  background: linear-gradient(135deg, #148eb7 0%, #3eb8db 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 14px 34px rgba(20, 142, 183, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.st-login-react-body--dark .ems-submit:hover {
  background: linear-gradient(135deg, #1699c4 0%, #55c8e8 100%);
}

/* Portal shortcuts */
.ems-portal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 1.1rem;
  width: 100%;
  max-width: 26rem;
}

.ems-portal-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ems-portal-pill--staff {
  background: linear-gradient(135deg, #ecfeff, #f0fdfa);
  color: #0e7490;
  border-color: #99f6e4;
}

.ems-portal-pill--home {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  color: #c2410c;
  border-color: #fed7aa;
}

.st-login-react-body--dark .ems-portal-pill--staff {
  background: linear-gradient(135deg, rgba(20, 142, 183, 0.18), rgba(20, 142, 183, 0.06));
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.28);
}

.st-login-react-body--dark .ems-portal-pill--home {
  background: linear-gradient(135deg, rgba(254, 150, 56, 0.16), rgba(254, 150, 56, 0.05));
  color: #fcd34d;
  border-color: rgba(252, 211, 77, 0.28);
}

.ems-portal-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.ems-quick-links {
  margin-top: 0.85rem;
}

.ems-copyright {
  margin-top: 0.85rem;
}

/* Light mode polish */
.st-login-react-body:not(.st-login-react-body--dark) .ems-sidebar {
  background: linear-gradient(165deg, #ffffff 0%, #f4f9fc 55%, #eef6fb 100%);
  border-right-color: #e2e8f0;
}

.st-login-react-body:not(.st-login-react-body--dark) .ems-auth {
  background:
    radial-gradient(circle at 88% 8%, rgba(20, 142, 183, 0.1) 0%, transparent 42%),
    radial-gradient(circle at 12% 90%, rgba(254, 150, 56, 0.08) 0%, transparent 40%),
    linear-gradient(165deg, #f8fafc 0%, #eef6fb 100%);
}

.st-login-react-body:not(.st-login-react-body--dark) .ems-card-outer {
  background: rgba(255, 255, 255, 0.65);
  border-color: #e2e8f0;
  box-shadow: 0 20px 48px -16px rgba(25, 47, 89, 0.16);
}

.st-login-react-body:not(.st-login-react-body--dark) .ems-card-inner {
  background: #fff;
  border-color: #f1f5f9;
}

.st-login-react-body:not(.st-login-react-body--dark) .ems-bg {
  display: none;
}

@keyframes ems-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 959px) {
  .ems-sidebar {
    text-align: center;
  }
  .ems-sidebar-intro {
    margin-left: auto;
    margin-right: auto;
  }
  .ems-sidebar-chips {
    justify-content: center;
  }
  .ems-sidebar-toolbar {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ems-orb,
  .ems-sidebar,
  .ems-auth,
  .ems-submit::before,
  .ems-logo-img {
    animation: none !important;
    transition: none !important;
  }
  .ems-sidebar,
  .ems-auth {
    opacity: 1;
    transform: none;
  }
}
