:root {
  --swes-primary: #1bb099;
  --swes-navbar-height: 56px;
  --swes-sidebar-width: 250px;
  --swes-sidebar-collapsed-width: 4.25rem;
  --swes-page-bg: #f0f2f5;
  --swes-form-placeholder: #c5cad1;
}

/* Light-weight placeholder text for form fields */
.swes-app .form-control::placeholder,
.swes-app .form-select::placeholder,
.form-control::placeholder,
.form-select::placeholder {
  color: var(--swes-form-placeholder);
  opacity: 1;
}

.swes-app .form-control::-webkit-input-placeholder,
.form-control::-webkit-input-placeholder {
  color: var(--swes-form-placeholder);
  opacity: 1;
}

.swes-app .form-control::-moz-placeholder,
.form-control::-moz-placeholder {
  color: var(--swes-form-placeholder);
  opacity: 1;
}

.swes-app .form-control:-ms-input-placeholder,
.form-control:-ms-input-placeholder {
  color: var(--swes-form-placeholder);
  opacity: 1;
}

body.swes-app {
  padding-top: var(--swes-navbar-height);
  background-color: var(--swes-page-bg);
}

.swes-navbar {
  background-color: #fff !important;
  height: var(--swes-navbar-height);
  min-height: var(--swes-navbar-height);
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: visible;
}

.swes-navbar .container-fluid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  height: 100%;
  overflow: visible;
}

.swes-navbar .navbar-nav {
  flex-direction: row;
  align-items: center;
}

.swes-navbar .nav-item.dropdown {
  position: relative;
}

.swes-navbar .navbar-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 0.25rem;
}

.swes-navbar .navbar-brand {
  padding: 0;
  margin-right: 0.75rem;
}

.swes-navbar .navbar-brand img {
  max-height: 29px;
  width: auto;
}

.swes-hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--swes-primary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.swes-hamburger-btn:hover,
.swes-hamburger-btn:focus {
  color: #159a84;
  background: rgba(27, 176, 153, 0.1);
  outline: none;
}

.swes-hamburger-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
  height: 18px;
}

.swes-hamburger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: currentColor;
  border-radius: 1px;
}

.swes-user-menu {
  color: var(--swes-primary) !important;
  font-weight: 500;
  white-space: nowrap;
}

.swes-user-menu:hover,
.swes-user-menu:focus {
  color: var(--swes-primary) !important;
}

#wrapper {
  display: flex;
  min-height: calc(100vh - var(--swes-navbar-height));
}

#sidebar-wrapper {
  position: fixed;
  top: var(--swes-navbar-height);
  left: 0;
  bottom: 0;
  z-index: 1030;
  width: var(--swes-sidebar-width);
  flex-shrink: 0;
  background: rgb(21, 31, 43);
  transition: margin-left 0.25s ease, transform 0.25s ease, width 0.25s ease;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.swes-sidebar-collapsed #sidebar-wrapper {
  margin-left: calc(-1 * var(--swes-sidebar-width));
}

#sidebar-wrapper .sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sidebar-wrapper .sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: #ecf0f1;
  text-decoration: none;
  border-left: 4px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#sidebar-wrapper .sidebar-nav li a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

#sidebar-wrapper .sidebar-nav li.active a {
  background: var(--swes-primary);
  border-left-color: #0d8a74;
  color: #fff;
}

#sidebar-wrapper .sidebar-nav li a img {
  flex-shrink: 0;
}

#sidebar-wrapper .sidebar-nav .swes-sidebar-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 32px;
  flex-shrink: 0;
  font-size: 1.25rem;
  color: #ecf0f1;
}

#sidebar-wrapper .sidebar-nav .swes-sidebar-logout a:hover .swes-sidebar-logout-icon {
  color: #fff;
}

#page-content-wrapper {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: var(--swes-page-bg);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--swes-navbar-height));
}

.swes-credits-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  background: var(--swes-primary);
  color: #fff;
  padding: 0.65rem 1.5rem;
  margin: 0;
  border-radius: 0;
}

.swes-credits-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1bb099;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 0.25rem;
  line-height: 1.2;
  white-space: nowrap;
}

.swes-credits-bar__badge .bi {
  font-size: 1rem;
  line-height: 1;
}

.swes-credits-bar__text {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  text-align: center;
  width: 100%;
}

.swes-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 0;
}

.swes-subheader .page-header {
  flex: 1 1 auto;
  min-width: 8rem;
}

.swes-subheader .swes-breadcrumb {
  flex: 1 1 auto;
  min-width: 8rem;
}

.page-header {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #343a40;
  line-height: 1.4;
}

.swes-breadcrumb {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #6c757d;
  text-align: right;
  line-height: 1.4;
}

.swes-breadcrumb a {
  color: var(--swes-primary);
  text-decoration: none;
  font-weight: 500;
}

.swes-package-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid #e3e8ef;
  border-left: 4px solid #2e7d32;
  border-radius: 0.4rem;
  background: #f4faf5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.swes-package-banner__status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swes-package-banner__dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.swes-package-banner__dot--ok {
  background: #2e7d32;
}

.swes-package-banner__dot--warn {
  background: #d97706;
}

.swes-package-banner__dot--expired {
  background: #c82333;
}

.swes-package-banner__body {
  min-width: 0;
  flex: 1;
}

.swes-package-banner__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c3d5a;
  line-height: 1.3;
}

.swes-package-banner__message {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: #5c6770;
  line-height: 1.4;
}

.swes-package-banner__meta {
  flex-shrink: 0;
  text-align: right;
  padding-left: 0.5rem;
}

.swes-package-banner__meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}

.swes-package-banner__meta-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1c3d5a;
  white-space: nowrap;
}

.swes-package-banner--success {
  border-left-color: #2e7d32;
  background: #f3faf4;
}

.swes-package-banner--warning {
  border-left-color: #d97706;
  background: #fff9f2;
}

.swes-package-banner--danger {
  border-left-color: #c82333;
  background: #fdf5f5;
}

.swes-package-banner__upgrade {
  margin-left: 0.35rem;
  font-weight: 700;
  color: #c82333;
  text-decoration: underline;
  white-space: nowrap;
}

.swes-package-banner__message .swes-package-banner__upgrade:first-child {
  margin-left: 0;
}

.swes-package-banner__upgrade:hover {
  color: #9b1c29;
}

.swes-breadcrumb a:hover {
  color: #159a84;
  text-decoration: underline;
}

.swes-breadcrumb__current {
  color: #6c757d;
  font-weight: 400;
}

.swes-page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.5rem 0;
}

.swes-footer {
  margin-top: auto;
  padding: 0.75rem 0 0.5rem;
  border-top: 1px solid #dee2e6;
  background: transparent;
  color: #4a4a4a;
  font-size: 0.8125rem;
}

.swes-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  text-align: center;
}

.swes-footer__copyright {
  padding-top: 0;
}

.swes-footer__powered {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.swes-footer__brand-logo {
  display: block;
  height: 22px;
  width: auto;
}

.swes-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: var(--swes-navbar-height) 0 0 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1025;
}

body.login_body {
  background: #e8e8e8 center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
}

.login_wrap {
  padding-top: 0;
}

.form-signin {
  background-color: rgba(211, 211, 211, 0.85);
  color: #333;
  max-width: none;
  margin: 0;
  padding: 2rem 2.25rem 2.25rem;
  border-radius: 0;
}

h2.form-signin-heading {
  color: var(--swes-primary);
  font-size: 1.375rem;
  font-weight: 400;
}

.login-error,
.error-msg1 {
  color: #9d0000;
  background: #f8d7da;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.625rem;
  border-radius: 0.25rem;
}

@media (max-width: 767.98px) {
  .swes-subheader {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1rem;
  }

  .swes-breadcrumb {
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .swes-footer__inner {
    flex-direction: column;
  }

  .swes-package-banner {
    flex-wrap: wrap;
  }

  .swes-package-banner__meta {
    width: 100%;
    text-align: left;
    padding-left: 0;
  }
}

@media (max-width: 991.98px) {
  #sidebar-wrapper {
    position: fixed;
    top: var(--swes-navbar-height);
    left: 0;
    bottom: 0;
    z-index: 1030;
    margin-left: calc(-1 * var(--swes-sidebar-width));
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  }

  body.swes-sidebar-open #sidebar-wrapper {
    margin-left: 0;
  }

  body.swes-sidebar-collapsed #sidebar-wrapper {
    margin-left: calc(-1 * var(--swes-sidebar-width));
  }

  body.swes-sidebar-open .swes-sidebar-backdrop {
    display: block;
  }

  #page-content-wrapper {
    width: 100%;
  }
}

@media (min-width: 992px) {
  #page-content-wrapper {
    margin-left: var(--swes-sidebar-width);
    transition: margin-left 0.25s ease;
  }

  body.swes-sidebar-collapsed #sidebar-wrapper {
    margin-left: 0;
    width: var(--swes-sidebar-collapsed-width);
  }

  body.swes-sidebar-collapsed #sidebar-wrapper .sidebar-nav li a {
    justify-content: center;
    gap: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  body.swes-sidebar-collapsed #sidebar-wrapper .sidebar-nav li a > span {
    display: none;
  }

  body.swes-sidebar-collapsed #page-content-wrapper {
    margin-left: var(--swes-sidebar-collapsed-width);
  }

  body.swes-sidebar-collapsed .swes-hamburger-btn {
    color: var(--swes-primary);
  }
}

/* Session expiry warning: above exam pause (1500), nav loader (2000), etc. */
#swes-session-timeout-modal {
  z-index: 2100;
}

body:has(#swes-session-timeout-modal.show) .modal-backdrop:last-of-type {
  z-index: 2090;
}

.swes-session-timeout__countdown {
  color: #b45309;
  font-variant-numeric: tabular-nums;
}
