/* Set base font size to 12px */
body {
  font-size: 0.8rem; /* 0.75 * 16px = 12px */
  line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #212529;
  background-color: #fff;
}

/* Headings scaled from 12px */
h1 {
  font-size: 1.75rem; /* ~21px */
  margin-bottom: 0.75rem;
}
h2 {
  font-size: 1.5rem; /* ~18px */
  margin-bottom: 0.65rem;
}
h3 {
  font-size: 1.25rem; /* ~15px */
  margin-bottom: 0.6rem;
}
h4 {
  font-size: 1.1rem;  /* ~13px */
}
h5, h6 {
  font-size: 1rem;    /* ~12px */
}

/* Table, form, and UI text */
table,
.form-control,
.btn,
label,
input,
select,
textarea {
  font-size: 0.8rem; /* consistent with body */
}

/* Smaller text utility */
small,
.small,
.text-muted {
  font-size: 0.66rem; /* ~10px */
  color: #6c757d;
}

.badge.fw-medium {
  font-weight: 500;
}


body.login-page {
  background: radial-gradient(circle at center, #002040 0%, #0b38a2 85%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #2d3748;
}

img.login-logo {
  width: 160px;
  margin-bottom: 1rem;
}

.sidebar-wrapper {
  background-color: #002040 !important;
  min-height: 100vh;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  border-right: 1px solid #001830;
}

.nav-link {
  color: #ffffff;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-link img {
  display: block;
  margin: 0 auto;
}

.nav-link div {
  font-size: 0.8rem;
  margin-top: 0.3rem;
  color: #ffffff;
}

.top-bar {
  background-color: #002040;
}

.logo-img {
  width: 160px;
}

.alerts-icon {
  width: 24px;
  height: 24px;
}

.user-initials {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.small-toggle {
  font-size: 0.75rem;
}

.invert-icon {
  filter: invert(1) !important;
}

.toggle-chevron svg {
  transition: transform 0.2s ease;
}
.toggle-chevron.collapsed svg {
  transform: rotate(180deg); /* flips it up */
}

.form-switch .form-check-input {
  width: 3em;
  height: 2em;
}

.clickable-row {
  cursor: pointer;
}

#autocomplete-list li {
    cursor: pointer;
}

.text-navy { color: #002040; }
.text-bg-navy {
    background-color: #002040;
    color: #fff;
}
.text-bg-light2 {
    background-color: #e6e9ef;
    color: #002040;
}

.icon-16 { width: 16px; height: 16px; }


/* Default: when expanded, keep header bottom square */
.card > .card-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* When the collapse is hidden, round the header bottom corners */
.card:has(> .collapse:not(.show)) > .card-header {
  border-bottom-left-radius: var(--bs-card-border-radius);
  border-bottom-right-radius: var(--bs-card-border-radius);
}

/* Helpful to avoid radius/border bleed */
.card {
  overflow: hidden;
}

/* Hide both by default (safety) */
.collapse-toggle [data-icon="plus"],
.collapse-toggle [data-icon="minus"] {
  display: none;
}

/* When collapsed (aria-expanded="false"), show PLUS */
.collapse-toggle[aria-expanded="false"] [data-icon="plus"] {
  display: inline-block;
}

/* When expanded (aria-expanded="true"), show MINUS */
.collapse-toggle[aria-expanded="true"] [data-icon="minus"] {
  display: inline-block;
}

/* patients table hover color */
.patients-table {
  --bs-table-hover-bg: rgba(0, 32, 64, 0.08); /* subtle brand tint */
  --bs-table-hover-color: inherit;            /* keep text color */
  --bs-table-striped-bg: rgba(0, 32, 64, 0.04);
  --bs-table-border-color: #e6e9ef;
}

.pagination-floating {
    margin: 2rem 0;
}

.pagination-floating .page-link {
    border: none;
    padding: 0.8rem 1.2rem;
    margin: 0 10px;
    border-radius: 10px;
    background: #fff;
    color: #002040;
    font-weight: 500;
    border: 1px solid #e6e9ef;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.pagination-floating .page-item.active .page-link {
    background: #002040;
    color: #fff;
    border: 1px solid #002040;
}

.pagination-floating .page-link:hover {
    background: #e6e9ef;
    color: #002040;
    border: 1px solid #e6e9ef;
}

.drag-col a {
  z-index: 2;
  position: relative;
}



/* OFFCANVAS (tablet & mobile shared) */
@media (max-width: 1199.98px) {
  #sidebar {
    background-color: #002040 !important;
  }

  .offcanvas-backdrop.show {
    background-color: rgba(255, 255, 255, 0.8) !important;
  }

  #sidebar .btn-close {
    filter: invert(1);
  }
}

/* MOBILE: Sidebar width = 50% */
@media (max-width: 767.98px) {
  #sidebar {
    width: 50% !important;
  }
}

/* TABLET: Sidebar width = 25% */
@media (min-width: 768px) and (max-width: 1199.98px) {
  #sidebar {
    width: 25% !important;
  }
}

@media (min-width: 768px) {

    .patients-table thead th {
        background-color: #002040;
        color: #fff;
    }
     
    .patients-table th,
    .patients-table td {
      white-space: nowrap;
      border-left: none !important;
      border-right: none !important;
      border-top: 1px solid #dee2e6;    /* or lighter #e6e9ef */
      border-bottom: 1px solid #dee2e6;
    }

    .patients-table th:nth-child(1),
    .patients-table td:nth-child(1) { width: 15%; }
    .patients-table th:nth-child(2),
    .patients-table td:nth-child(2) { width: 15%; }
    .patients-table th:nth-child(3),
    .patients-table td:nth-child(3) { width: 15%; }
    .patients-table th:nth-child(4),
    .patients-table td:nth-child(4) { width: 15%; }
    .patients-table th:nth-child(5),
    .patients-table td:nth-child(5) { width: 15%; }
    .patients-table th:nth-child(6),
    .patients-table td:nth-child(6) { width: 25%; }
  }

  @media (max-width: 767.98px) {
    .patients-table thead {
      display: none;
    }

    .patients-table tr {
      display: block;
      margin-bottom: 1rem;
      border: 1px solid #dee2e6;
      border-radius: 0.25rem;
      padding: 0.5rem;
    }

    .patients-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem;
    }

    .patients-table td::before {
      content: attr(data-label);
      font-weight: 600;
      color: #555;
      flex: 0 0 40%;
    }
  }
