:root {
  --ink: #16333a;
  --teal: #087f82;
  --teal-dark: #075d61;
  --mint: #dff4ef;
  --muted: #667b80;
  --panel: #ffffff;
  --panel-border: #dbe8e6;
  --bg: #f2f7f6;
  --shadow-soft: 0 10px 28px rgba(22, 51, 58, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 88% 0%, #e3f2ef 0, transparent 32rem), var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  min-height: 100vh;
}

a {
  color: #087478;
  text-underline-offset: 4px;
}

.eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
  color: var(--teal);
  margin-bottom: 14px;
}

.login-grid {
  min-height: min(620px, calc(100vh - 8rem));
}

.welcome-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem);
  color: #effffc;
  background: linear-gradient(145deg, #12383d, #087f82);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(18, 56, 61, .18);
}

.welcome-panel .eyebrow {
  color: #a9eee3;
}

.welcome-panel h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.04;
  font-weight: 750;
}

.welcome-panel p {
  max-width: 34rem;
  color: #d2eeea;
  font-size: 1.05rem;
}

.welcome-note {
  max-width: 30rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .24);
  color: #b9dfda;
  font-size: .9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.login-form h2 {
  color: var(--ink);
  font-size: 1.8rem;
}

.surface {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.page-heading {
  margin: 4px 0 24px;
}

.page-heading h1 {
  color: var(--ink);
  font-size: clamp(1.7rem, 2.3vw, 2.35rem);
  font-weight: 750;
  letter-spacing: 0;
  margin: 0;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* Shared module headers keep operational screens easy to scan without
   changing the information density of their forms and tables. */
.app-content .page-heading {
  position: relative;
  padding: 1.35rem 1.5rem;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: linear-gradient(115deg, rgba(255,255,255,.96), rgba(232,247,243,.92));
  box-shadow: var(--shadow-soft);
}

.app-content .page-heading::after {
  position: absolute;
  top: -3.6rem;
  right: -2.5rem;
  width: 10rem;
  height: 10rem;
  border: 1.5rem solid rgba(8, 127, 130, .08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.page-heading > * { position: relative; z-index: 1; }

.page-heading--reports {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h2 {
  font-weight: 700;
  letter-spacing: 0;
}

.app-wrapper {
  background: transparent;
}

.app-header {
  min-height: 4.25rem;
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 3px 16px rgba(22, 51, 58, .05);
}

.app-header .nav-link {
  color: var(--ink);
}

.app-header .nav-link:hover,
.app-header .nav-link:focus-visible {
  color: var(--teal);
}

.app-sidebar {
  --lte-sidebar-width: 17rem;
  background: #12383d !important;
}

.brand-link {
  min-height: 4.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
}

.brand-link .brand-image {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  margin-right: .65rem;
  opacity: 1;
}

.brand-link .brand-text {
  color: #f4fffc;
  font-size: .9rem;
  letter-spacing: .01em;
}

.sidebar-menu .nav-header {
  color: #8eb5b2;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
  padding: 1.25rem 1rem .45rem;
}

.sidebar-menu .nav-link {
  min-height: 2.6rem;
  margin: .15rem .65rem;
  border-radius: 6px;
  color: #d9eeeb;
  font-size: .9rem;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  transform: translateX(2px);
}

.sidebar-menu .nav-link.active {
  color: #073e42;
  background: #b9ebe1;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
  font-weight: 700;
}

.sidebar-menu .nav-icon {
  width: 1.35rem;
  margin-right: .5rem;
  font-size: 1rem;
  text-align: center;
}

.app-content {
  min-height: calc(100vh - 7rem);
}

.app-footer {
  background: rgba(255, 255, 255, .72);
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: .78rem;
}

.btn-primary {
  --bs-btn-bg: var(--teal);
  --bs-btn-border-color: var(--teal);
  --bs-btn-hover-bg: var(--teal-dark);
  --bs-btn-hover-border-color: var(--teal-dark);
  --bs-btn-active-bg: #05585b;
  --bs-btn-active-border-color: #05585b;
}

.btn-outline-primary {
  --bs-btn-color: #087f82;
  --bs-btn-border-color: #087f82;
  --bs-btn-hover-bg: #087f82;
  --bs-btn-hover-border-color: #087f82;
}

.btn {
  font-weight: 600;
  border-radius: 8px;
}

.form-control, .form-select {
  border-color: #cbdcdb;
  padding: .7rem .85rem;
}

.form-control:focus, .form-select:focus {
  border-color: #087f82;
  box-shadow: 0 0 0 .2rem rgba(8, 127, 130, 0.2);
}

.form-label {
  font-size: .9rem;
  font-weight: 600;
}

/* Reports */
.report-filters { border-top: 3px solid var(--teal); }

.report-filters__title,
.report-totals__heading,
.report-context {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.report-filters__title > .bi,
.report-totals__heading > .bi {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--mint);
  font-size: 1.1rem;
}

.report-filters__title p { color: var(--muted); font-size: .88rem; }

.report-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.75rem 0 .4rem;
}

.report-results-heading .eyebrow { margin-bottom: .25rem; }
.report-results-heading h2 { margin: 0; font-size: 1.3rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-export-note { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; }

.report-context {
  margin-bottom: .75rem;
  color: var(--muted);
  font-size: .88rem;
}

.report-context > .bi { color: var(--teal); font-size: 1.1rem; }
.report-context strong { color: var(--ink); margin-right: .45rem; }
.report-note { border: 0; border-left: 3px solid #68a8bd; background: #eff8fb; color: #315c6b; }

.report-totals { border-top: 3px solid #8ccbc2; }
.report-totals__heading { margin-bottom: 1rem; }
.report-totals dl { font-size: .94rem; }
.report-totals dt { color: var(--muted); font-weight: 600; }
.report-totals dd { color: var(--ink); font-weight: 750; text-align: right; }

.report-table-wrap { overflow: hidden; }
.report-table-wrap .table { font-size: .92rem; }
.report-table-wrap .table thead th {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--panel-border);
  color: var(--muted);
  background: #f3faf8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}
.report-table-wrap .table td { padding: .85rem 1rem; vertical-align: middle; border-color: #e9f1f0; }
.report-table-wrap .table tbody tr:hover td { background: #f4fbf9; }

.report-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .88rem;
}
.report-pagination > div { display: flex; gap: .5rem; }

.dashboard-cards .card-metric {
  min-height: 8.5rem;
  padding: 20px;
  border-top: 3px solid var(--teal);
  transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-cards .col-md-3:nth-child(2) .card-metric {
  border-top-color: #d66a5d;
}

.dashboard-cards .col-md-3:nth-child(3) .card-metric {
  border-top-color: #477ca8;
}

.dashboard-cards .col-md-3:nth-child(4) .card-metric {
  border-top-color: #d49a35;
}

.dashboard-cards .card-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(22, 51, 58, .12);
}

.card-metric span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.card-metric strong {
  display: block;
  color: var(--ink);
  font-size: 1.65rem;
  letter-spacing: .01em;
  margin-top: 10px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.quick-actions a {
  display: inline-block;
  padding: 11px 15px;
  border: 1px solid var(--panel-border);
  background: #fff;
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(22, 51, 58, .05);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.quick-actions a:hover,
.quick-actions a:focus-visible {
  color: var(--teal-dark);
  border-color: #8ccbc2;
  transform: translateY(-1px);
}

.dashboard-panel {
  padding: 22px;
  margin-top: 24px;
}

.dashboard-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.dashboard-panel h2 .bi {
  color: var(--teal);
}

.dashboard-panel .table {
  margin-bottom: 0;
}

.dashboard-panel .table thead th {
  color: var(--muted);
  border-bottom-color: var(--panel-border);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-panel .table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-panel .table tbody tr:hover td {
  background: #f2faf8;
}

@media (max-width: 991.98px) {
  .app-content {
    min-height: calc(100vh - 4.25rem);
  }

  .dashboard-cards .card-metric {
    min-height: 7.5rem;
  }
}

@media (max-width: 575.98px) {
  .app-content .page-heading { padding: 1.15rem; }
  .page-heading--reports, .report-results-heading, .report-pagination { align-items: flex-start; flex-direction: column; }
  .report-totals dd { text-align: left; }
  .report-actions { width: 100%; }
  .report-actions .btn { flex: 1; }
}

.dashboard-panel .table th,
.dashboard-panel .table td {
  vertical-align: middle;
}
