/* ServPro — Typography scale (xs 12, sm 14, base 16, lg 20, xl 25, 2xl 31, 3xl 39, 4xl 48) — overrides Bootstrap 5.3 CDN */
:root {
  --font-xs: 0.75rem;      /* 12px captions, metadata, legal */
  --font-sm: 0.875rem;     /* 14px secondary, labels */
  --font-base: 1rem;       /* 16px body */
  --font-lg: 1.25rem;      /* 20px sub-headings */
  --font-xl: 1.5625rem;    /* 25px h3 */
  --font-2xl: 1.9375rem;   /* 31px h2 */
  --font-3xl: 2.4375rem;   /* 39px h1 */
  --font-4xl: 3rem;        /* 48px display/hero */
}

html { font-size: 16px; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
}

.card { border: 0; }

/* Semantic headings — strict token mapping */
h1, .h1 { font-size: var(--font-3xl); line-height: 1.2; }
h2, .h2 { font-size: var(--font-2xl); line-height: 1.25; }
h3, .h3 { font-size: var(--font-xl); line-height: 1.3; }
h4, .h4, h5, .h5 { font-size: var(--font-lg); line-height: 1.35; }
h6, .h6 { font-size: var(--font-base); line-height: 1.4; }

/* Display / hero — 4xl/3xl/2xl */
.display-1, .display-2, .display-3 { font-size: var(--font-4xl); line-height: 1.15; }
.display-4, .display-5 { font-size: var(--font-3xl); line-height: 1.2; }
.display-6 { font-size: var(--font-2xl); line-height: 1.25; }

/* Body-adjacent tokens */
label, .form-label, .btn-sm, .badge { font-size: var(--font-sm); }
small, .small { font-size: var(--font-sm); }
caption, .legal, .metadata { font-size: var(--font-xs); }

/* Utilities — explicit opt-in for captions/metadata/legal */
.text-xs { font-size: var(--font-xs) !important; }
.text-sm { font-size: var(--font-sm) !important; }
.text-base { font-size: var(--font-base) !important; }
.text-lg { font-size: var(--font-lg) !important; }
.text-xl { font-size: var(--font-xl) !important; }
.text-2xl { font-size: var(--font-2xl) !important; }
.text-3xl { font-size: var(--font-3xl) !important; }
.text-4xl { font-size: var(--font-4xl) !important; }

/* Admin shell — Bootstrap dashboard example (light + primary #0d6efd) — matches reference image */
.admin-shell {
  background: #fff;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 48px 0 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
}

@media (max-width: 767.98px) {
  .sidebar {
    top: 5rem;
  }
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar .nav-link {
  font-weight: 500;
  color: #0d6efd;
  font-size: var(--font-sm);
  padding: 0.5rem 1rem;
}

.sidebar .nav-link:hover {
  color: #0a58ca;
}

.sidebar .nav-link.active {
  color: #2470dc;
  font-weight: 600;
}

.sidebar-heading {
  font-size: var(--font-xs);
  text-transform: uppercase;
}

.navbar-brand {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: var(--font-base);
  background-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
}

.navbar .navbar-toggler {
  top: 0.25rem;
  right: 1rem;
}

.admin-topbar-dark {
  background-color: #212529;
}

/* Clients — no internal scrollbar; table flows naturally, pagination mt-1 only as requested */
main.clients-main { min-height: auto; height: auto; display: block; overflow: visible; padding-bottom: 1.5rem; }
.clients-viewport { display: block; }
.clients-viewport > .d-flex.border-bottom { flex-shrink: 0; }
.clients-viewport .alert { flex-shrink: 0; }
.clients-viewport .table-responsive { overflow: visible; max-height: none; margin-bottom: 0; border: 0; border-radius: 0; }
.clients-viewport nav[aria-label="Clients pagination"] { gap: 0.5rem; margin-top: 0.25rem !important; padding: 0 !important; border-top: 0 !important; background: transparent; }
.clients-viewport .pagination { gap: 0; }
.clients-viewport .pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  font-size: var(--font-sm);
  font-weight: 400;
  line-height: 1.5;
  padding: 0.25rem 0.6rem;
  color: #212529;
  background: #fff;
  border: 1px solid #dee2e6;
  box-shadow: none;
  text-decoration: none;
}
.clients-viewport .pagination .page-item + .page-item .page-link { margin-left: -1px; }
.clients-viewport .pagination .page-item:first-child .page-link { border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; }
.clients-viewport .pagination .page-item:last-child .page-link { border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; }
.clients-viewport .pagination .page-link:hover { background: #f8f9fa; border-color: #dee2e6; color: #212529; }
.clients-viewport .pagination .page-link:focus { box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.15); outline: 0; z-index: 1; }
.clients-viewport .pagination .page-item.disabled .page-link { color: #6c757d; background: #fff; border-color: #dee2e6; opacity: 0.65; }
.clients-viewport .pagination .page-item.active .page-link { background: #0d6efd; border-color: #0d6efd; color: #fff; }

/* Excel-professional — keep striped, add grid + header polish */
.table-excel { --bs-table-bordered-color: #dee2e6; border-color: var(--bs-table-bordered-color); }
.table-excel thead th { background: #fff; font-weight: 600; border-bottom-width: 2px; white-space: nowrap; }
.table-excel td, .table-excel th { border-color: var(--bs-table-bordered-color); }
.table-excel.table-hover tbody tr:hover > * { background-color: #f8f9fa; }
.table-excel .table-danger > *, .table-excel .table-warning > *, .table-excel .table-success > * { border-color: inherit; }

/* Clients uses natural page scroll — never viewport-clip the table */
main.col-md-9:not(.clients-main), main.col-lg-10:not(.clients-main) { display: block; height: auto; min-height: calc(100vh - 48px); overflow: visible; padding-bottom: 1.5rem; }
@media (max-width: 767.98px) {
  main.col-md-9:not(.clients-main), main.col-lg-10:not(.clients-main) { height: auto; overflow: visible; }
  main.clients-main { height: auto; overflow: visible; }
  .clients-viewport { height: auto; overflow: visible; }
  .clients-viewport .table-responsive { flex: none; overflow: visible; max-height: none; }
}
