/* bslib fenPortal shell -------------------------------------------------- */

:root {
  --fht-blue: #00839B;
  --fht-lime: #CFDE00;
  --fht-ink: #1f2933;
  --fht-muted: #60717a;
  --fht-border: #d9e3e6;
  --fht-bg: #f4f8f9;
  --fht-card: #ffffff;
}

html, body {
  height: 100%;
  overflow: hidden !important;
  background: var(--fht-bg);
}

body {
  color: var(--fht-ink);
}

.bslib-page-sidebar {
  background: var(--fht-bg);
}

.navbar,
.bslib-page-title {
  background: #ffffff !important;
  border-bottom: 1px solid var(--fht-border);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.04);
}

.fht-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fht-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 280px;
}

.fht-logo {
  height: 42px;
  width: auto;
  display: block;
}

.fht-title {
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--fht-blue);
  font-weight: 700;
}

.fht-subtitle {
  font-size: 0.85rem;
  color: var(--fht-muted);
  line-height: 1.15;
}

.fht-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fht-session-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--fht-muted);
  font-size: 0.88rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--fht-border);
  border-radius: 999px;
  background: #fff;
}

.fht-header-button.btn,
.fht-header-button-secondary.btn {
  border-radius: 999px;
  border: 1px solid var(--fht-blue);
  background: var(--fht-blue);
  color: #ffffff;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
}

.fht-header-button-secondary.btn {
  background: #ffffff;
  color: var(--fht-blue);
}

.fht-header-button.btn:hover,
.fht-header-button.btn:focus {
  background: #006a7d;
  border-color: #006a7d;
  color: #ffffff;
}

.fht-header-button-secondary.btn:hover,
.fht-header-button-secondary.btn:focus {
  background: #eef8fa;
  color: var(--fht-blue);
}

.fht-sidebar {
  background: #ffffff;
  border-right: 1px solid var(--fht-border);
  padding: 0.75rem 0.65rem;
}

.fht-sidebar-section {
  margin-bottom: 1.05rem;
}

.fht-sidebar-section-title {
  margin: 0.7rem 0 0.35rem;
  padding: 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fht-muted);
}

.fht-nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.1rem;
  padding: 0.42rem 0.58rem;
  margin: 0.1rem 0;
  color: var(--fht-ink);
  text-decoration: none;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  font-size: 0.94rem;
}

.fht-nav-link i {
  width: 1.1rem;
  color: var(--fht-blue);
  text-align: center;
}

.fht-nav-link:hover,
.fht-nav-link:focus {
  color: var(--fht-blue);
  background: #edf7f9;
  border-color: #d3edf2;
  text-decoration: none;
}

.fht-nav-link.active {
  background: var(--fht-blue);
  color: #ffffff;
  border-color: var(--fht-blue);
}

.fht-nav-link.active i {
  color: #ffffff;
}

.fht-nav-sublink {
  margin-left: 1.35rem;
  font-size: 0.88rem;
  color: var(--fht-muted);
}

.fht-main {
  height: calc(100vh - 72px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.85rem;
}

.fht-page-card {
  background: var(--fht-card);
  border: 1px solid var(--fht-border);
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
  padding: 1rem;
  min-height: calc(100vh - 105px);
}

/* Keep legacy module layouts usable inside the new bslib shell. */
.content,
.tab-content {
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
}

.row {
  --bs-gutter-x: 0.9rem;
}

.box,
.card,
.well,
.panel {
  border-radius: 0.85rem !important;
}

.box {
  border-top-color: var(--fht-blue) !important;
  box-shadow: none !important;
  border: 1px solid var(--fht-border) !important;
}

.box-header,
.box-title {
  color: var(--fht-blue) !important;
}

.btn-primary,
.btn-default.action-button:not(.fht-header-button):not(.fht-header-button-secondary) {
  border-radius: 0.6rem;
}

.btn-primary {
  background-color: var(--fht-blue);
  border-color: var(--fht-blue);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #006a7d;
  border-color: #006a7d;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.form-control,
.selectize-input {
  border-radius: 0.55rem !important;
  border-color: var(--fht-border) !important;
}

.dataTables_wrapper table.dataTable thead th {
  color: var(--fht-blue);
  border-bottom-color: var(--fht-border) !important;
}

@media (max-width: 900px) {
  .fht-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .fht-account {
    justify-content: flex-start;
  }

  .fht-main {
    height: auto;
    min-height: calc(100vh - 72px);
  }

  html, body {
    overflow: auto !important;
  }
}
