@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');
:root {
  --login-orange: #f47b20;
  --login-orange-dark: #df6511;
  --login-orange-soft: #fff4e9;
  --login-text: #24262d;
  --login-muted: #6f7785;
  --login-border: #e7e4df;
  --login-surface: #ffffff;
  --login-bg: #fbfaf8;
  --login-shadow: 0 18px 44px rgba(58, 48, 40, .08);
  --login-shadow-soft: 0 10px 30px rgba(58, 48, 40, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--login-text);
  background:
    radial-gradient(circle at 96% 44%, rgba(255, 205, 135, .24), transparent 27%),
    radial-gradient(circle at 24% 68%, rgba(255, 224, 211, .24), transparent 26%),
    linear-gradient(rgba(242, 239, 234, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 239, 234, .45) 1px, transparent 1px),
    var(--login-bg);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
a { color: inherit; }

.login-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Subtle campus architecture layer. Kept decorative so login content stays readable. */
.login-page::before {
  content: "";
  position: fixed;
  z-index: -2;

  left: -70px;
  bottom: -20px;

  width: 70vw;
  height: 100vh;

  background: url('../img/login-campus-building.webp')
              left bottom / auto 110%
              no-repeat;

  opacity: .13;
  filter: saturate(.78) contrast(.95);

  pointer-events: none;
}

.login-page::after {
  content: "";
  position: absolute;
  z-index: -3;
  right: -13vw;
  bottom: 5vh;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 177, 86, .13) 0%, rgba(255, 214, 159, .07) 38%, transparent 70%);
  pointer-events: none;
}

.login-container { max-width: 1460px; }

/* Navbar */
.login-navbar {
  padding: 24px 0 14px;
  background: transparent;
}

.login-brand img {
  display: block;
  width: 270px;
  max-width: 62vw;
  height: auto;
}

.login-menu { gap: 8px; }
.login-menu .nav-link {
  position: relative;
  margin: 0;
  padding: 9px 14px !important;
  border-radius: 10px;
  color: #524b47 !important;
  font-size: 15px;
  font-weight: 500;
  transition: color .18s ease, background-color .18s ease;
}

.login-menu .nav-link:hover,
.login-menu .nav-link:focus,
.login-menu .nav-link.active {
  color: var(--login-orange) !important;
  background: rgba(255, 248, 242, .86);
}

.login-menu .nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 1px;
  height: 2px;
  border-radius: 99px;
  background: var(--login-orange);
}

.login-navbar-toggler {
  position: relative;
  width: 48px;
  height: 48px;
  display: none;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--login-orange);
  cursor: pointer;
  box-shadow: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.login-navbar-toggle-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 123, 32, .18);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,247,239,.94));
  box-shadow:
    0 8px 22px rgba(71, 55, 42, .08),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition:
    transform .24s ease,
    background .24s ease,
    border-color .24s ease,
    box-shadow .24s ease;
}

.login-navbar-toggle-line {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2.4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ef7116, #ff9a28);
  transform-origin: center;
  transition:
    top .24s ease,
    transform .24s ease,
    opacity .18s ease,
    background .24s ease;
}

.login-navbar-toggle-line-1 { top: 13px; }
.login-navbar-toggle-line-2 { top: 20px; width: 15px; left: 16px; }
.login-navbar-toggle-line-3 { top: 27px; }

.login-navbar-toggler:hover .login-navbar-toggle-icon,
.login-navbar-toggler:focus-visible .login-navbar-toggle-icon {
  transform: translateY(-1px);
  border-color: rgba(244, 123, 32, .34);
  box-shadow:
    0 10px 26px rgba(98, 61, 31, .12),
    0 0 0 4px rgba(244, 123, 32, .055);
}

.login-navbar-toggler[aria-expanded="true"] .login-navbar-toggle-icon {
  border-color: transparent;
  background: linear-gradient(135deg, #ff9822, #f06c0b);
  box-shadow: 0 10px 26px rgba(224, 104, 11, .22);
}

.login-navbar-toggler[aria-expanded="true"] .login-navbar-toggle-line {
  top: 20px;
  left: 11px;
  width: 20px;
  background: #fff;
}

.login-navbar-toggler[aria-expanded="true"] .login-navbar-toggle-line-1 {
  transform: rotate(45deg);
}

.login-navbar-toggler[aria-expanded="true"] .login-navbar-toggle-line-2 {
  opacity: 0;
  transform: scaleX(.4);
}

.login-navbar-toggler[aria-expanded="true"] .login-navbar-toggle-line-3 {
  transform: rotate(-45deg);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 24px;
  padding: 4px;
  border: 1px solid var(--login-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 6px 18px rgba(58, 48, 40, .04);
}

.language-option {
  min-width: 44px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #6d7079;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

.language-option:hover { color: var(--login-orange); }
.language-option.active {
  color: var(--login-orange);
  background: var(--login-orange-soft);
}

/* System alert */
.system-alert {
  margin: 10px 0 18px;
  border: 1px solid #f4c792;
  border-radius: 14px;
  background: #fffaf4;
  box-shadow: 0 8px 22px rgba(235, 136, 43, .05);
  overflow: hidden;
}

.system-alert summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  color: #5c5148;
  font-size: 13px;
}

.system-alert summary::-webkit-details-marker { display: none; }
.system-alert-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #ff9f2d, #f47b20);
  color: #fff;
}
.system-alert-icon svg { width: 18px; height: 18px; }
.system-alert strong { color: var(--login-orange-dark); white-space: nowrap; }
.system-alert-divider { width: 1px; height: 20px; background: #dcc4ad; }
.system-alert-message { flex: 1; min-width: 0; }
.system-alert-chevron { width: 22px; height: 22px; display: inline-flex; transition: transform .18s ease; }
.system-alert-chevron svg { width: 100%; height: 100%; }
.system-alert[open] .system-alert-chevron { transform: rotate(180deg); }
.system-alert-detail { display: none; padding: 0 16px 14px 62px; color: var(--login-muted); font-size: 13px; line-height: 1.6; }
.system-alert[open] .system-alert-detail { display: block; }

/* Main */
.login-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 14px 0 14px;
}
.login-layout { --bs-gutter-x: 54px; }
.login-intro { max-width: 820px; padding-right: 12px; }

.welcome-badge {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 5px 14px;
  margin-bottom: 14px;
  border: 1px solid #f8d9b8;
  border-radius: 999px;
  background: #fff9f3;
  color: var(--login-orange);
  font-size: 13px;
  font-weight: 600;
}

.login-intro h1 {
  margin: 0 0 10px;
  color: #24262d;
  font-size: clamp(2.35rem, 2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.20;
}
.login-intro h1 span { color: var(--login-orange); }
.login-intro h1 span.sisfo-title { color: #454240; }
.login-intro h2 {
  margin: 0 0 20px;
  color: #46484f;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 500;
  letter-spacing: -.02em;
}
.login-intro-copy {
  max-width: 780px;
  margin: 0;
  color: #545056;
  font-size: 15px;
  line-height: 1.6;
}

/* Service cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.service-card {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 18px 52px;
  border: 1px solid rgba(231, 228, 223, .88);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--login-shadow-soft);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: #f4d3b4;
  box-shadow: 0 14px 34px rgba(58, 48, 40, .08);
}
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--login-orange-soft);
  color: var(--login-orange);
}
.service-icon svg { width: 25px; height: 25px; }
.service-card h3 {
  width: 100%;
  margin: 0 0 6px;
  color: #2e3037;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
}
.service-card p {
  width: 100%;
  max-width: 170px;
  margin: 0 auto;
  color: var(--login-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.service-arrow {
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--login-border);
  border-radius: 50%;
  color: #4a4d55;
  font-size: 16px;
  transform: translateX(-50%);
}

/* Login card */
.login-form-column { display: flex; justify-content: flex-end; }
.login-card {
  width: 100%;
  max-width: 500px;
  padding: 20px 30px 14px;
  border: 1px solid rgba(226, 222, 216, .94);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--login-shadow);
}
.login-security-mark {
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 1px solid #eee8e1;
  border-radius: 50%;
  color: #3d414b;
  background: #fff;
  box-shadow: 0 8px 22px rgba(52, 45, 40, .08);
}
.login-security-mark svg { width: 64px; height: 64px; }
.login-security-mark img { width: 68px; height: 68px; }
.login-card-header { text-align: center; margin-bottom: 22px; }
.login-card-header h2 { margin: 0 0 7px; color: #69574f; font-size: 23px; font-weight: 800; letter-spacing: -.025em; }
.login-card-header p { max-width: 365px; margin: 0 auto; color: var(--login-muted); font-size: 13px; line-height: 1.55; }

.login-error {
  display: none;
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid #f3c3c3;
  border-radius: 10px;
  background: #fff4f4;
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
}
.login-field { margin-bottom: 17px; }
.login-field label { margin: 0 0 7px; color: #484a51; font-size: 13px; font-weight: 600; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.forgot-password-link { margin-bottom: 7px; color: var(--login-orange); font-size: 12px; font-weight: 600; text-decoration: none; }
.forgot-password-link:hover { color: var(--login-orange-dark); text-decoration: underline; }

.login-input-group .input-group-text,
.login-input-group .form-control {
  height: 50px;
  border-color: #dcdfe4;
  background: #fff;
}
.login-input-group .input-group-text {
  min-width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #353942;
}
.login-input-group .form-control {
  padding: 0 14px;
  color: #292c33;
  font-size: 14px;
  box-shadow: none !important;
}
.login-input-group .form-control::placeholder { color: #9aa1ac; opacity: 1; }
.login-input-group .form-control:focus { border-color: #f4ad69; background: #fff; }
.login-input-group:focus-within .input-group-text { border-color: #f4ad69; }
.field-icon { width: 19px; height: 19px; }
.login-password-toggle { cursor: pointer; border-left: 0; }
.login-password-toggle:hover { color: var(--login-orange); }

.btn-login {
  position: relative;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff9a20 0%, #f27513 100%);
  box-shadow: 0 10px 20px rgba(242, 117, 19, .17);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-login:hover,
.btn-login:focus { color: #fff; transform: translateY(-1px); box-shadow: 0 13px 24px rgba(242, 117, 19, .23); }
.login-btn-arrow { position: absolute; right: 16px; width: 20px; height: 20px; }
.btn-login.loading { cursor: wait; opacity: .82; transform: none; }
.btn-login.loading .btn-text,
.btn-login.loading .login-btn-arrow { opacity: 0; }
.btn-login.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .6s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }

.login-divider {
  position: relative;
  margin: 13px 0;
  text-align: center;
  color: #777d87;
  font-size: 12px;
}
.login-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: #ece9e5;
}
.login-divider span { position: relative; padding: 0 14px; background: #fff; }
.google-login-btn {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d9dce1;
  border-radius: 8px;
  background: #fff;
  color: #41454e;
  font-size: 13px;
  font-weight: 600;
}
.google-login-btn:hover { border-color: #cdd1d7; background: #fafafa; color: #2d3036; }
.google-icon { width: 19px; height: 19px; flex: 0 0 19px; }

.helpdesk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  background: #fbfcfd;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.helpdesk-card.helpdesk-highlight { border-color: #f2ae6b; background: #fff9f3; box-shadow: 0 0 0 4px rgba(244, 123, 32, .08); }
.helpdesk-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e7eb;
  border-radius: 50%;
  background: #fff;
  color: #30343c;
}
.helpdesk-icon svg { width: 20px; height: 20px; }
.helpdesk-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.helpdesk-copy span { color: #454952; }
.helpdesk-copy a,
.helpdesk-copy strong { color: var(--login-orange); font-weight: 700; text-decoration: none; }
.helpdesk-copy a:hover { text-decoration: underline; }
.helpdesk-arrow { color: #6b7079; font-size: 22px; line-height: 1; }
/* Login Card Footer: Version & PWA Install Button */
.login-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed rgba(226, 222, 216, .85);
}

.login-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid #e2e6eb;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .02);
  transition: all .2s ease;
}
.login-version-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.version-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .2);
  animation: versionDotPulse 2.4s infinite ease-in-out;
}

@keyframes versionDotPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, .2);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .35);
  }
}

.login-version-pill .login-version,
.login-version {
  margin: 0;
  color: #5d6573;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
}

/* Modern Transparent Glassmorphic PWA Install Button */
.login-pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6.5px;
  height: 28px;
  padding: 3px 11px 3px 4.5px;
  border: 1px solid rgba(242, 117, 19, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #c2410c;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(242, 117, 19, .05), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: all .22s cubic-bezier(.16, 1, .3, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.login-pwa-install-btn[hidden] {
  display: none !important;
}

.login-pwa-install-btn:hover {
  background: rgba(242, 117, 19, .12);
  color: #9a3412;
  border-color: rgba(242, 117, 19, .4);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(242, 117, 19, .12), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.login-pwa-install-btn:active {
  transform: translateY(0);
  background: rgba(242, 117, 19, .18);
  box-shadow: 0 1px 4px rgba(242, 117, 19, .08);
}

.login-pwa-install-btn:focus-visible {
  outline: 2px solid rgba(242, 117, 19, .35);
  outline-offset: 2px;
}

.pwa-install-btn-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(242, 117, 19, .12);
  color: #ea580c;
  transition: all .2s ease;
}

.pwa-install-svg {
  width: 11.5px;
  height: 11.5px;
  transition: transform .2s ease;
}

.login-pwa-install-btn:hover .pwa-install-btn-icon {
  background: rgba(242, 117, 19, .22);
  color: #c2410c;
}

.login-pwa-install-btn:hover .pwa-install-svg {
  transform: translateY(1px);
}

.pwa-install-btn-text {
  line-height: 1;
  letter-spacing: -.01em;
}

.pwa-install-btn-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 1.5px 5px;
  border-radius: 5px;
  background: rgba(242, 117, 19, .12);
  color: #ea580c;
  line-height: 1.1;
  transition: all .2s ease;
}

.login-pwa-install-btn:hover .pwa-install-btn-badge {
  background: rgba(242, 117, 19, .22);
  color: #9a3412;
}

/* When PWA is ready, modern semi-transparent glass effect */
.login-pwa-install-btn.is-ready {
  background: rgba(242, 117, 19, .08);
  border-color: rgba(242, 117, 19, .28);
  color: #c2410c;
  box-shadow: 0 2px 8px rgba(242, 117, 19, .07), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.login-pwa-install-btn.is-ready .pwa-install-btn-icon {
  background: rgba(242, 117, 19, .16);
  color: #ea580c;
}

.login-pwa-install-btn.is-ready .pwa-install-btn-badge {
  background: rgba(242, 117, 19, .18);
  color: #c2410c;
}

.login-pwa-install-btn.is-ready:hover {
  background: rgba(242, 117, 19, .16);
  border-color: rgba(242, 117, 19, .45);
  color: #9a3412;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(242, 117, 19, .15), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.login-pwa-install-btn.is-ready:hover .pwa-install-btn-icon {
  background: rgba(242, 117, 19, .26);
  color: #9a3412;
}

/* Fallback: if install button is hidden, center version pill */
.login-card-footer:has(.login-pwa-install-btn[hidden]) {
  justify-content: center;
}

@media (max-width: 480px) {
  .login-card-footer {
    justify-content: center;
    gap: 10px;
  }
}


/* Footer */
.login-footer {
  border-top: 1px solid rgba(228, 225, 220, .85);
  background: rgba(255, 255, 255, .58);
}
.login-footer-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: #777d87;
  font-size: 11px;
}
.footer-security { display: inline-flex; align-items: center; gap: 8px; justify-self: start; }
.footer-security svg { width: 19px; height: 19px; }
.footer-copyright { justify-self: center; }
.footer-links { display: inline-flex; align-items: center; gap: 18px; justify-self: end; }
.footer-links span { width: 1px; height: 18px; background: #dedbd6; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--login-orange); }

@media (max-width: 1199.98px) {
  .login-layout { --bs-gutter-x: 36px; }
  .login-intro h1 { font-size: 3.2rem; }
  .service-grid { gap: 12px; }
  .service-card { min-height: 170px; padding: 18px 14px 16px; }
  .login-card { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 991.98px) {
  .login-page::before {
    width: min(62vw, 560px);
    height: 52vh;
    bottom: 150px;
    opacity: .075;
  }
  .login-navbar { padding: 15px 0 8px; }
  .login-brand img { width: 225px; }
  .login-navbar > .login-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .login-navbar-toggler {
    display: inline-flex;
    margin-left: auto;
  }
  .login-navbar .navbar-collapse {
    position: absolute;
    top: calc(100% + 5px);
    left: 18px;
    right: 18px;
    z-index: 1050;
    margin-top: 0;
    padding: 10px;
    border: 1px solid rgba(230, 219, 209, .78);
    border-radius: 20px;
    background: rgba(255, 252, 248, .96);
    box-shadow:
      0 22px 50px rgba(60, 48, 38, .12),
      inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .login-navbar { position: relative; z-index: 1100; }
  .login-menu { gap: 4px; }
  .login-menu .nav-item { width: 100%; }
  .login-menu .nav-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 13px !important;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 600;
  }
  .login-menu .nav-link:hover,
  .login-menu .nav-link:focus,
  .login-menu .nav-link.active {
    background: rgba(244, 123, 32, .075);
  }
  .login-menu .nav-link.active {
    padding-left: 17px !important;
    color: var(--login-orange) !important;
  }
  .login-menu .nav-link.active::before {
    content: "";
    width: 4px;
    height: 18px;
    margin-right: 10px;
    border-radius: 99px;
    background: linear-gradient(180deg, #ff9b29, #ef6e12);
    box-shadow: 0 3px 9px rgba(244,123,32,.22);
  }
  .login-menu .nav-link.active::after { display: none; }
  .language-switcher {
    width: 100%;
    margin: 8px 0 0;
    padding: 4px;
    justify-content: stretch;
    border-color: rgba(230, 219, 209, .72);
    background: rgba(255,255,255,.72);
    box-shadow: none;
  }
  .language-option {
    flex: 1 1 50%;
    min-width: 0;
    height: 34px;
  }
  .system-alert { margin-top: 8px; }
  .login-main { padding-top: 18px; }
  .login-layout { display: flex; flex-direction: column; gap: 30px; }
  .login-form-column { order: 1; width: 100%; justify-content: center; }
  .login-intro-column { order: 2; width: 100%; }
  .login-card { max-width: 580px; }
  .login-intro { max-width: 860px; margin: 0 auto; padding-right: 0; text-align: center; }
  .login-intro-copy { margin: 0 auto; }
  .service-grid { max-width: 760px; margin-left: auto; margin-right: auto; text-align: left; }
  .login-footer-inner { grid-template-columns: 1fr; gap: 8px; padding-top: 14px; padding-bottom: 14px; text-align: center; }
  .footer-security, .footer-copyright, .footer-links { justify-self: center; }
}

@media (max-width: 767.98px) {
  .login-container { padding-left: 18px; padding-right: 18px; }
  .system-alert-message { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .system-alert-divider { display: none; }
  .system-alert-detail { padding-left: 16px; }
  .login-intro h1 { font-size: 2.65rem; }
  .login-intro h2 { font-size: 1.35rem; }
  .login-intro-copy { font-size: 14px; line-height: 1.75; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card { min-height: 160px; }
}

@media (max-width: 575.98px) {
  .login-page::before {
    left: -90px;
    bottom: 190px;
    width: 390px;
    height: 500px;
    opacity: .055;
  }
  .login-navbar { padding-top: 10px; padding-bottom: 7px; }
  .login-brand img { width: min(205px, 65vw); }
  .login-navbar-toggler { width: 46px; height: 46px; flex-basis: 46px; }
  .login-navbar-toggle-icon { width: 40px; height: 40px; border-radius: 13px; }
  .login-navbar-toggle-line { left: 10px; width: 20px; }
  .login-navbar-toggle-line-1 { top: 12px; }
  .login-navbar-toggle-line-2 { top: 19px; width: 14px; left: 16px; }
  .login-navbar-toggle-line-3 { top: 26px; }
  .login-navbar-toggler[aria-expanded="true"] .login-navbar-toggle-line { top: 19px; left: 10px; width: 20px; }
  .login-main { padding: 14px 0 24px; }
  .login-card { padding: 24px 18px 20px; border-radius: 18px; }
  .login-security-mark { width: 48px; height: 48px; margin-bottom: 12px; }
  .login-card-header h2 { font-size: 20px; }
  .login-card-header p { font-size: 12px; }
  .login-intro h1 { font-size: 2.25rem; }
  .login-intro h2 { margin-bottom: 14px; font-size: 1.2rem; }
  .welcome-badge { margin-bottom: 10px; }
  .service-grid { gap: 10px; margin-top: 24px; }
  .service-card { min-height: 150px; padding: 16px 12px 48px; border-radius: 16px; }
  .service-icon { width: 42px; height: 42px; margin-bottom: 10px; }
  .service-icon svg { width: 22px; height: 22px; }
  .service-card h3 { font-size: 14px; }
  .service-card p { font-size: 10px; }
  .login-label-row { align-items: flex-end; }
  .forgot-password-link { font-size: 11px; }
  .login-input-group .input-group-text,
  .login-input-group .form-control { height: 48px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 10px; }
}


/* ==========================================================
   MODERN INTERACTION LAYER
   Login card + form interaction refinements
   ========================================================== */

:root {
  --login-card-border: rgba(220, 216, 210, .82);
  --login-card-border-hover: rgba(244, 123, 32, .24);
  --login-card-border-focus: rgba(244, 123, 32, .42);
  --login-card-shadow-rest:
    0 18px 50px rgba(45, 38, 32, .075),
    0 2px 8px rgba(45, 38, 32, .025);
  --login-card-shadow-hover:
    0 28px 68px rgba(45, 38, 32, .115),
    0 8px 22px rgba(45, 38, 32, .055),
    0 0 0 1px rgba(244, 123, 32, .025);
  --login-card-shadow-focus:
    0 30px 74px rgba(45, 38, 32, .125),
    0 10px 24px rgba(244, 123, 32, .07),
    0 0 0 4px rgba(244, 123, 32, .055);
  --login-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Card login dibuat lebih ringan saat idle dan terasa hidup saat pointer masuk. */
.login-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--login-card-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.965) 100%);
  box-shadow: var(--login-card-shadow-rest);
  transform: translate3d(0, 0, 0);
  transition:
    transform .42s var(--login-ease),
    box-shadow .42s var(--login-ease),
    border-color .34s ease,
    background-color .34s ease;
  will-change: transform, box-shadow;
}

/* Highlight tipis di bagian atas card, bukan border tebal. */
.login-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(244, 123, 32, .18),
    rgba(255,255,255,.95),
    rgba(244, 123, 32, .18),
    transparent
  );
  opacity: .5;
  transition: opacity .35s ease;
  pointer-events: none;
}

/* Soft glow dekoratif, sangat samar agar UI tetap enterprise. */
.login-card::after {
  content: "";
  position: absolute;
  z-index: -2;
  top: -130px;
  right: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 164, 67, .105) 0%,
    rgba(255, 190, 113, .045) 42%,
    transparent 72%
  );
  opacity: .5;
  transform: scale(.92);
  transition:
    opacity .45s var(--login-ease),
    transform .55s var(--login-ease);
  pointer-events: none;
}

.login-card:hover {
  transform: translate3d(0, -4px, 0);
  border-color: var(--login-card-border-hover);
  box-shadow: var(--login-card-shadow-hover);
}

.login-card:hover::before {
  opacity: .95;
}

.login-card:hover::after {
  opacity: .85;
  transform: scale(1);
}

/* Saat user mulai berinteraksi dengan field, card mendapat feedback yang lebih jelas. */
.login-card:focus-within {
  transform: translate3d(0, -5px, 0);
  border-color: var(--login-card-border-focus);
  box-shadow: var(--login-card-shadow-focus);
}

/* Logo/mark ikut bergerak sangat halus agar terasa responsif, tidak berlebihan. */
.login-security-mark {
  transition:
    transform .38s var(--login-ease),
    box-shadow .38s var(--login-ease),
    border-color .3s ease;
}

.login-card:hover .login-security-mark,
.login-card:focus-within .login-security-mark {
  transform: translateY(-2px);
  border-color: rgba(244, 123, 32, .18);
  box-shadow:
    0 12px 28px rgba(52, 45, 40, .10),
    0 0 0 4px rgba(244, 123, 32, .035);
}

/* Field wrapper diberi radius dan transisi agar fokus tidak terasa kaku. */
.login-input-group {
  border-radius: 12px;
  transition:
    box-shadow .28s var(--login-ease),
    transform .28s var(--login-ease);
}

.login-input-group .input-group-text,
.login-input-group .form-control {
  border-color: #dde1e6;
  background: rgba(255, 255, 255, .94);
  transition:
    border-color .24s ease,
    background-color .24s ease,
    color .24s ease,
    box-shadow .24s ease;
}

.login-input-group .input-group-text {
  color: #525760;
}

.login-input-group:hover .input-group-text,
.login-input-group:hover .form-control {
  border-color: #cfd4db;
  background: #fff;
}

.login-input-group:focus-within {
  transform: translateY(-1px);
  box-shadow:
    0 7px 18px rgba(50, 45, 40, .055),
    0 0 0 3px rgba(244, 123, 32, .065);
}

.login-input-group:focus-within .input-group-text,
.login-input-group:focus-within .form-control {
  border-color: rgba(244, 123, 32, .52);
  background: #fff;
}

.login-input-group:focus-within .input-group-text,
.login-input-group:focus-within .field-icon {
  color: var(--login-orange);
}

/* Button utama: sedikit lebih premium, tanpa efek berlebihan. */
.btn-login {
  overflow: hidden;
  border-radius: 10px;
  box-shadow:
    0 3px 6px rgba(242, 117, 19, .18),
    inset 0 1px 0 rgba(255,255,255,.18);
  transition:
    transform .26s var(--login-ease),
    box-shadow .26s var(--login-ease),
    filter .26s ease;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -38%;
  width: 30%;
  transform: skewX(-18deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.16),
    transparent
  );
  opacity: 0;
  pointer-events: none;
}

.btn-login:hover,
.btn-login:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 5px 8px rgba(242, 117, 19, .24),
    inset 0 1px 0 rgba(255,255,255,.22);
  filter: saturate(1.03);
}

.btn-login:hover::before {
  opacity: 1;
  animation: login-button-shine .85s var(--login-ease);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 7px 16px rgba(242, 117, 19, .18);
}

@keyframes login-button-shine {
  from { left: -38%; }
  to   { left: 112%; }
}

/* Google dan Helpdesk dibuat konsisten dengan bahasa visual card utama. */
.google-login-btn,
.helpdesk-card {
  transition:
    transform .28s var(--login-ease),
    border-color .28s ease,
    box-shadow .28s var(--login-ease),
    background-color .28s ease;
}

.google-login-btn:hover,
.google-login-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(244, 123, 32, .22);
  background: #fff;
  box-shadow: 0 8px 20px rgba(45, 38, 32, .055);
}

.helpdesk-card:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 123, 32, .20);
  background: #fffdfa;
  box-shadow: 0 8px 20px rgba(45, 38, 32, .045);
}

/* Service card diselaraskan agar tidak lebih agresif dari card login. */
.service-card {
  box-shadow:
    0 10px 28px rgba(58, 48, 40, .05),
    0 1px 4px rgba(58, 48, 40, .02);
  transition:
    transform .34s var(--login-ease),
    box-shadow .34s var(--login-ease),
    border-color .3s ease,
    background-color .3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 123, 32, .20);
  background: rgba(255, 255, 255, .98);
  box-shadow:
    0 18px 42px rgba(58, 48, 40, .075),
    0 4px 10px rgba(58, 48, 40, .025);
}

.service-arrow {
  transition:
    transform .3s var(--login-ease),
    border-color .25s ease,
    background-color .25s ease,
    color .25s ease;
}

.service-card:hover .service-arrow {
  transform: translateX(-50%) translateY(-2px);
  border-color: rgba(244, 123, 32, .28);
  background: var(--login-orange-soft);
  color: var(--login-orange);
}

/* Keyboard focus yang jelas namun tetap halus. */
.login-card a:focus-visible,
.login-card button:focus-visible,
.login-card input:focus-visible {
  outline: none;
}

.forgot-password-link,
.helpdesk-copy a,
.footer-links a,
.login-menu .nav-link {
  transition:
    color .22s ease,
    background-color .22s ease,
    opacity .22s ease;
}

/* Mobile tidak memakai lift besar agar card tetap stabil saat keyboard muncul. */
@media (max-width: 575.98px) {
  .login-card:hover,
  .login-card:focus-within {
    transform: translate3d(0, -2px, 0);
  }

  .login-card {
    box-shadow:
      0 14px 38px rgba(45, 38, 32, .075),
      0 2px 6px rgba(45, 38, 32, .02);
  }

  .login-card:focus-within {
    box-shadow:
      0 18px 44px rgba(45, 38, 32, .095),
      0 0 0 3px rgba(244, 123, 32, .045);
  }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Language switch is AJAX-based: subtle busy feedback without page reload. */
.language-switcher.is-switching .language-option {
  pointer-events: none;
}
.language-switcher.is-switching {
  opacity: .78;
}
.service-card-link {
  text-decoration: none;
  color: inherit;
}

.service-card-link:hover,
.service-card-link:focus-visible {
  color: inherit;
  text-decoration: none;
}

.service-card-link[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.login-status-message {
  margin-bottom: 14px;
  border: 1px solid #bfe4cc;
  border-radius: 10px;
  background: #edf9f1;
  color: #2f6a45;
  font-size: 12px;
}


/* =========================================================
   Public portal summaries below login hero
   ========================================================= */
.portal-summary-section { padding: 16px 0 30px; }
.portal-summary-grid { display:grid; grid-template-columns:1.05fr .95fr 1.15fr; gap:16px; align-items:stretch; }
.portal-summary-card { min-width:0; padding:17px; border:1px solid rgba(226,222,216,.92); border-radius:18px; background:rgba(255,255,255,.78); box-shadow:0 12px 32px rgba(55,46,38,.045); backdrop-filter:blur(8px); }
.portal-summary-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.portal-summary-title { display:flex; align-items:center; gap:9px; min-width:0; }
.portal-summary-title h3 { margin:0; color:#343b45; font-size:14px; font-weight:800; }
.portal-summary-icon { width:29px; height:29px; flex:0 0 29px; display:grid; place-items:center; border-radius:9px; background:var(--login-orange-soft); color:var(--login-orange); }
.portal-summary-icon svg { width:17px; height:17px; }
.portal-summary-header>a { flex:0 0 auto; color:var(--login-orange); font-size:10.5px; font-weight:700; text-decoration:none; }
.portal-summary-header>a:hover { color:var(--login-orange-dark); }
.portal-announcement-list,.portal-faq-list { display:grid; gap:7px; }
.portal-announcement-item { display:block; padding:9px 10px; border:1px solid #eeeae5; border-radius:11px; background:rgba(255,255,255,.72); color:inherit; text-decoration:none; transition:border-color .2s ease, transform .2s ease, background .2s ease; }
.portal-announcement-item:hover { transform:translateY(-1px); border-color:#f3caa3; background:#fff; color:inherit; }
.portal-announcement-topline { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; }
.portal-chip { max-width:55%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:3px 7px; border-radius:999px; background:#fff2e5; color:#ee720d; font-size:8.5px; font-weight:700; }
.portal-announcement-topline time { color:#8a9098; font-size:8.5px; font-weight:600; }
.portal-announcement-item strong { display:block; overflow:hidden; color:#3d434c; font-size:10.5px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.portal-announcement-item p { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:1; margin:4px 0 0; color:#747b85; font-size:9.5px; line-height:1.4; }
.portal-faq-item { overflow:hidden; border:1px solid #eeeae5; border-radius:11px; background:rgba(255,255,255,.72); }
.portal-faq-item summary { position:relative; padding:11px 34px 11px 11px; cursor:pointer; list-style:none; color:#414750; font-size:10.5px; font-weight:700; }
.portal-faq-item summary::-webkit-details-marker { display:none; }
.portal-faq-item summary::after { content:'⌄'; position:absolute; top:8px; right:12px; color:#6e7580; font-size:16px; transition:transform .18s ease; }
.portal-faq-item[open] summary::after { transform:rotate(180deg); }
.portal-faq-item>div { padding:0 11px 11px; color:#717983; font-size:9.5px; line-height:1.5; }
.portal-service-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.portal-service-item { min-width:0; display:flex; align-items:center; gap:9px; min-height:67px; padding:10px; border:1px solid #eeeae5; border-radius:12px; background:rgba(255,255,255,.72); color:inherit; text-decoration:none; transition:border-color .2s ease, transform .2s ease, background .2s ease; }
.portal-service-item:hover { transform:translateY(-1px); border-color:#f3caa3; background:#fff; color:inherit; }
.portal-service-item[aria-disabled='true'] { opacity:.55; pointer-events:none; }
.portal-service-mini-icon { width:31px; height:31px; flex:0 0 31px; display:grid; place-items:center; border-radius:50%; background:#fff2e5; color:var(--login-orange); }
.portal-service-mini-icon svg { width:17px; height:17px; }
.portal-service-item>span:last-child { min-width:0; display:flex; flex-direction:column; }
.portal-service-item strong { color:#40464f; font-size:10.5px; font-weight:750; }
.portal-service-item small { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; margin-top:3px; color:#7a818a; font-size:8.5px; line-height:1.35; }
.portal-summary-empty { min-height:76px; display:grid; place-items:center; padding:15px; border:1px dashed #ded8d0; border-radius:12px; color:#858c95; font-size:10.5px; text-align:center; }
@media(max-width:991.98px){ .portal-summary-grid{grid-template-columns:1fr 1fr}.portal-summary-services{grid-column:1/-1} }
@media(max-width:767.98px){ .portal-summary-section{padding-top:8px}.portal-summary-grid{grid-template-columns:1fr}.portal-summary-services{grid-column:auto}.portal-summary-card{padding:15px}.portal-service-list{grid-template-columns:1fr 1fr} }
@media(max-width:430px){ .portal-service-list{grid-template-columns:1fr}.portal-summary-header{align-items:flex-start}.portal-summary-header>a{margin-top:3px} }

/* ==========================================================================
   Modern Dark / Light Mode Support for SISFO Login & Public Pages
   ========================================================================== */

.login-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
}
.login-nav-actions .language-switcher {
  margin-left: 0;
}

.theme-toggle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--login-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: #5c554e;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(58, 48, 40, .05);
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-btn:hover {
  color: var(--login-orange);
  border-color: rgba(244, 123, 32, .35);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(244, 123, 32, .15);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--login-orange);
  outline-offset: 2px;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s ease;
}

/* Light mode icon visibility */
:not(.dark-theme) .theme-toggle-sun,
html:not([data-theme="dark"]) .theme-toggle-sun {
  display: none !important;
}
:not(.dark-theme) .theme-toggle-moon,
html:not([data-theme="dark"]) .theme-toggle-moon {
  display: inline-flex !important;
}

/* Dark mode icon visibility */
.dark-theme .theme-toggle-sun,
html[data-theme="dark"] .theme-toggle-sun {
  display: inline-flex !important;
}
.dark-theme .theme-toggle-moon,
html[data-theme="dark"] .theme-toggle-moon {
  display: none !important;
}

/* Dark theme variables and overrides */
html[data-theme="dark"],
html.dark-theme,
body.dark-theme {
  --login-orange: #ff9d3b;
  --login-orange-dark: #f47b20;
  --login-orange-soft: rgba(244, 123, 32, 0.16);
  --login-text: #f1f5f9;
  --login-muted: #94a3b8;
  --login-border: rgba(255, 255, 255, 0.11);
  --login-surface: #141c2e;
  --login-bg: #0b0f19;
  --login-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  --login-shadow-soft: 0 10px 30px rgba(0, 0, 0, .4);
}

html[data-theme="dark"] body,
body.dark-theme {
  background:
    radial-gradient(circle at 96% 44%, rgba(244, 123, 32, .12), transparent 28%),
    radial-gradient(circle at 24% 68%, rgba(59, 130, 246, .08), transparent 26%),
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    var(--login-bg);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  color: var(--login-text);
}

html[data-theme="dark"] .login-page::before,
body.dark-theme .login-page::before {
  opacity: .07;
  filter: invert(1) brightness(.8) contrast(1.2);
}

/* Dark mode menu links */
html[data-theme="dark"] .login-menu .nav-link,
body.dark-theme .login-menu .nav-link {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .login-menu .nav-link:hover,
html[data-theme="dark"] .login-menu .nav-link:focus,
html[data-theme="dark"] .login-menu .nav-link.active,
body.dark-theme .login-menu .nav-link:hover,
body.dark-theme .login-menu .nav-link:focus,
body.dark-theme .login-menu .nav-link.active {
  color: var(--login-orange) !important;
  background: rgba(244, 123, 32, .14);
}

/* Dark mode language switcher and theme button */
html[data-theme="dark"] .language-switcher,
body.dark-theme .language-switcher {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(20, 28, 46, .85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .language-option,
body.dark-theme .language-option {
  color: #94a3b8;
}

html[data-theme="dark"] .language-option.active,
body.dark-theme .language-option.active {
  color: var(--login-orange);
  background: rgba(244, 123, 32, .18);
}

html[data-theme="dark"] .theme-toggle-btn,
body.dark-theme .theme-toggle-btn {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(20, 28, 46, .85);
  color: #e2e8f0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .theme-toggle-btn:hover,
body.dark-theme .theme-toggle-btn:hover {
  color: #ffb156;
  border-color: rgba(255, 177, 86, .4);
}

/* System alert */
html[data-theme="dark"] .system-alert,
body.dark-theme .system-alert {
  border-color: rgba(244, 123, 32, .32);
  background: rgba(20, 28, 46, .9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .system-alert summary,
body.dark-theme .system-alert summary {
  color: #e2e8f0;
}

html[data-theme="dark"] .system-alert-divider,
body.dark-theme .system-alert-divider {
  background: #334155;
}

/* Welcome badge & texts */
html[data-theme="dark"] .welcome-badge,
body.dark-theme .welcome-badge {
  border-color: rgba(244, 123, 32, .3);
  background: rgba(244, 123, 32, .12);
  color: var(--login-orange);
}

html[data-theme="dark"] .hero-title-copy,
body.dark-theme .hero-title-copy {
  color: #f8fafc;
}

html[data-theme="dark"] .login-intro h2,
body.dark-theme .login-intro h2 {
  color: #94a3b8;
}

html[data-theme="dark"] .login-intro-copy,
body.dark-theme .login-intro-copy {
  color: #94a3b8;
}

/* Service cards */
html[data-theme="dark"] .service-card,
body.dark-theme .service-card {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(20, 28, 46, .82);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .service-card:hover,
body.dark-theme .service-card:hover {
  border-color: rgba(244, 123, 32, .38);
  background: rgba(26, 36, 58, .92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .service-card h3,
body.dark-theme .service-card h3 {
  color: #f1f5f9;
}

html[data-theme="dark"] .service-card p,
body.dark-theme .service-card p {
  color: #94a3b8;
}

html[data-theme="dark"] .service-arrow,
body.dark-theme .service-arrow {
  border-color: rgba(255, 255, 255, .1);
  color: #cbd5e1;
  background: rgba(30, 41, 59, .7);
}

/* Login Card in Dark Mode */
html[data-theme="dark"] .login-card,
body.dark-theme .login-card {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(20, 28, 46, .92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="dark"] .login-security-mark,
body.dark-theme .login-security-mark {
  border-color: rgba(255, 255, 255, .09);
  background: #182338;
  color: #e2e8f0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .login-card-header h2,
body.dark-theme .login-card-header h2 {
  color: #f8fafc;
}

html[data-theme="dark"] .login-card-header p,
body.dark-theme .login-card-header p {
  color: #94a3b8;
}

html[data-theme="dark"] .login-field label,
body.dark-theme .login-field label {
  color: #cbd5e1;
}

/* Inputs in Dark Mode */
html[data-theme="dark"] .login-input-group .input-group-text,
html[data-theme="dark"] .login-input-group .form-control,
body.dark-theme .login-input-group .input-group-text,
body.dark-theme .login-input-group .form-control {
  border-color: #2b364d;
  background: #0d1424;
  color: #f1f5f9;
}

html[data-theme="dark"] .login-input-group .input-group-text,
body.dark-theme .login-input-group .input-group-text {
  color: #94a3b8;
}

html[data-theme="dark"] .login-input-group .form-control::placeholder,
body.dark-theme .login-input-group .form-control::placeholder {
  color: #64748b;
}

html[data-theme="dark"] .login-input-group .form-control:focus,
body.dark-theme .login-input-group .form-control:focus {
  border-color: var(--login-orange);
  background: #111a2e;
}

html[data-theme="dark"] .login-input-group:focus-within .input-group-text,
body.dark-theme .login-input-group:focus-within .input-group-text {
  border-color: var(--login-orange);
  color: var(--login-orange);
}

/* Version badge / info in footer */
html[data-theme="dark"] .login-version-badge,
body.dark-theme .login-version-badge {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .login-version,
body.dark-theme .login-version {
  color: #94a3b8;
}

/* PWA install button */
html[data-theme="dark"] .login-pwa-install-btn,
body.dark-theme .login-pwa-install-btn {
  background: rgba(244, 123, 32, .14);
  border-color: rgba(244, 123, 32, .28);
  color: #ffad5a;
}

/* Portal summary cards / announcements / faqs */
html[data-theme="dark"] .portal-summary-card,
body.dark-theme .portal-summary-card {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(20, 28, 46, .85);
  color: #e2e8f0;
}

html[data-theme="dark"] .portal-summary-header h3,
body.dark-theme .portal-summary-header h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .portal-announcement-item,
html[data-theme="dark"] .portal-faq-item,
html[data-theme="dark"] .portal-service-item,
body.dark-theme .portal-announcement-item,
body.dark-theme .portal-faq-item,
body.dark-theme .portal-service-item {
  border-color: rgba(255, 255, 255, .07);
  background: rgba(13, 20, 36, .7);
  color: #cbd5e1;
}

html[data-theme="dark"] .portal-announcement-item:hover,
html[data-theme="dark"] .portal-service-item:hover,
body.dark-theme .portal-announcement-item:hover,
body.dark-theme .portal-service-item:hover {
  background: rgba(22, 31, 52, .9);
  border-color: rgba(244, 123, 32, .3);
}

html[data-theme="dark"] .portal-service-item strong,
body.dark-theme .portal-service-item strong {
  color: #f1f5f9;
}

html[data-theme="dark"] .portal-faq-item summary,
body.dark-theme .portal-faq-item summary {
  color: #e2e8f0;
}

html[data-theme="dark"] .portal-faq-item>div,
body.dark-theme .portal-faq-item>div {
  color: #94a3b8;
}

/* Mobile Navbar in Dark Mode */
@media (max-width: 991.98px) {
  .login-nav-actions {
    width: 100%;
    margin: 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .login-nav-actions .language-switcher {
    flex: 1;
    margin: 0;
  }
  .login-nav-actions .theme-toggle-btn {
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
  }
  html[data-theme="dark"] .login-navbar .navbar-collapse,
  body.dark-theme .login-navbar .navbar-collapse {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(18, 25, 42, .97);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .5);
  }
  html[data-theme="dark"] .login-navbar-toggle-icon,
  body.dark-theme .login-navbar-toggle-icon {
    border-color: rgba(255, 255, 255, .12);
    background: linear-gradient(145deg, #1e293b, #151d30);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  }
}

/* Footer */
html[data-theme="dark"] .login-footer,
body.dark-theme .login-footer {
  border-top-color: rgba(255, 255, 255, .06);
  color: #64748b;
}

html[data-theme="dark"] .login-footer a,
body.dark-theme .login-footer a {
  color: #94a3b8;
}

html[data-theme="dark"] .login-footer a:hover,
body.dark-theme .login-footer a:hover {
  color: var(--login-orange);
}
