body {
  padding-top: 56px;
}

/*
 * Navbar brand image spacing
 */
.navbar-brand {
  padding: 4px 6px;
}

.navbar-brand > img {
  padding: 0;
  background-color: transparent;
  max-height: 24px;
}

/* Reduce navbar height */
.navbar { min-height: 44px; padding-top: 4px; padding-bottom: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.navbar .nav-link { padding: .35rem .6rem; line-height: 1.2; }

/* Make footer background obvious so full-width is visible */
footer.w-100 { background-color: #e9ecef; }
/* Keep footer content on a single line */
footer.w-100 .container-fluid { display:flex; flex-wrap:nowrap; gap:1rem; }
footer.w-100 .navbar-nav { display:flex; flex-wrap:nowrap; align-items:center; }
footer.w-100 .nav-item { min-width: 0; }
footer.w-100 .nav-link { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0.25rem 0.5rem; }
footer.w-100 .footer { padding:0; }

/*
 * Icons aligned to the right in dropdown menus
 */
.dropdown-menu a {
  white-space: normal;
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu li a {
  padding-right: 30px;
}

.dropdown-menu li i {
  position: absolute;
  padding: 3px;
  right: 3px;
  top: 3px;
  color: #7b8a8b;
}

.caret {
  margin-left: 4px;
  margin-right: 4px;
}

/*
 * Footer items without links
 */
li.footer {
  padding: 15px 0;
}

/*
 * Custom spacing for list-group items in nav
 */
.navbar-nav li.list-group-item {
  padding: 4px 0;
  margin: 10px 4px;
}

/*
 * Remove bullets and shadows from list groups
 */
.list-group {
  list-style-type: none;
  box-shadow: none;
  border-radius: 0;
}

.list-group-item a i {
  position: absolute;
  padding: 3px;
  right: 10px;
}

/*
 * Link hover behavior
 */
a:focus,
a:hover {
  text-decoration: none;
}

/*
 * Card header link styling (replaces panel-heading)
 */
.card-header {
  display: flex;
  align-items: center;
}

/*
 * ScrollResize datatables layout fix
 */
.row {
  margin-left: 0;
  margin-right: 0;
}

.container .row.content,
.container-fluid .row.content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow-y: auto;
}

/*
 * Card header layout (replaces panel-heading)
 */
.card-header {
  display: flex;
  align-items: center;
}

.card-header a:first-of-type {
  margin-left: auto;
}

/* Site-specific layout and hero styles (moved from index.php) */
:root{
  --primary:#0d6efd;
  --muted:#6c757d;
  --bg:#f7f9fb;
  --border: rgba(0,0,0,0.3);
  --card-radius: .5rem;
}

body{background:var(--bg);font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;color:#222}
.hero{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(90deg, rgba(13,110,253,0.06), rgba(255,255,255,0));padding:2rem;border-radius:.6rem;margin-bottom:1.25rem}
.hero .hero-text h2{margin:0 0 .25rem 0}
.hero .hero-text p{margin:0;color:var(--muted)}
.hero .hero-actions{display:flex;gap:.5rem;flex-wrap:wrap}
/* Hero illustration sizing: increase presence but keep responsive
  - Desktop: 160px max height
  - Mobile: 96px max height
  - Use `width:auto` so images keep natural proportions */
.hero-illustration img, .hero img{max-height:160px;object-fit:contain;width:auto;height:auto}
.card-box{border:1px solid var(--border);border-radius:var(--card-radius);padding:0;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,0.04);overflow:hidden}
.card-header.bg-primary{background:var(--primary);color:#fff;padding:.6rem .9rem}

/* Make the inner header radius visually match the outer border radius.
   Subtract 1px (border thickness) so the coloured header sits flush under the outer border. */
.card-box > .card-header,
.card-box .card-header {
  border-top-left-radius: calc(var(--card-radius) - 1px);
  border-top-right-radius: calc(var(--card-radius) - 1px);
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
}
.card-body{padding:1rem}
.list-group-item a{color:inherit;text-decoration:none}
.btn-custom{border-radius:999px;padding:.4rem .9rem}
.links-row{margin-top:.75rem}
@media(max-width:767px){
  .hero{flex-direction:column;align-items:flex-start}
  .hero-illustration img, .hero img{max-height:96px}
}

/* Small utility for the small action buttons row */
.small-actions .btn {padding:.35rem .6rem;font-size:.85rem}

/* Dropdown submenu support moved from _includes/menu.html */
.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu { top: 0; left: 100%; margin-top: -1px; }
.caret.caret-up { border-left: 4px solid black; border-right: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* stronger navbar and footer border */
.navbar, footer.navbar { border-color: var(--border) !important; }

/* list-group items subtle border to match cards */
.list-group-item { border: none; background: transparent; }
.list-group-flush > .list-group-item + .list-group-item { border-top: 1px solid var(--border); }
.card-box .list-group-flush > .list-group-item:first-child { border-top: none; }
.card-box .list-group-flush > .list-group-item:last-child { border-bottom: none; }

/* Ensure rounded corners are visible on flush list groups inside card-box */
.card-box .list-group-flush { border-radius: .5rem; overflow: hidden; }

/* Make sure the last list-group item shows rounded bottom corners consistent with the card-box */
.card-box .list-group-flush > .list-group-item:last-child {
  border-bottom-left-radius: .5rem;
  border-bottom-right-radius: .5rem;
}

/* Prevent any default margins/paddings from exposing background behind the card border */
.card-box .list-group, .card-box .list-group-flush { margin: 0; padding: 0; background: transparent; }

/* Background clipping so child backgrounds don't draw into rounded border area */

.card-box { -webkit-background-clip: padding-box; background-clip: padding-box; }

/* Refined table palette: soft bluish slate for odd/even rows and a clear hover state
   - Uses `color-mix()` when available with sensible rgba fallbacks
   - Applies to DataTables and Bootstrap striped tables with higher specificity */
:root { --table-bg: #ffffff; }

/* tasteful fallbacks (very subtle blue tints) */
:root { --stripe-odd-fallback: rgba(13,110,253,0.03); --stripe-even-fallback: rgba(13,110,253,0.01); --stripe-hover-fallback: rgba(13,110,253,0.09); }

@supports (color: color-mix(in srgb, var(--table-bg) 96%, #0d6efd 4%)) {
  :root {
    --stripe-odd: color-mix(in srgb, var(--table-bg) 96%, #0d6efd 4%);
    --stripe-even: color-mix(in srgb, var(--table-bg) 98%, #0d6efd 2%);
    --stripe-hover: color-mix(in srgb, var(--table-bg) 90%, #0d6efd 10%);
  }
}
@supports not (color: color-mix(in srgb, var(--table-bg) 96%, #0d6efd 4%)) {
  :root {
    --stripe-odd: var(--stripe-odd-fallback);
    --stripe-even: var(--stripe-even-fallback);
    --stripe-hover: var(--stripe-hover-fallback);
  }
}

/* Surface and row colours (stronger selectors to override vendor CSS) */
table, .dataTables_wrapper table.dataTable, .table.table-striped { background: var(--table-bg); }

.dataTables_wrapper table.dataTable.stripe tbody tr:nth-child(odd),
.table.table-striped tbody tr:nth-child(odd),
.table.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--stripe-odd) !important;
}
.dataTables_wrapper table.dataTable.stripe tbody tr:nth-child(even),
.table.table-striped tbody tr:nth-child(even),
.table.table-striped tbody tr:nth-of-type(even) {
  background-color: var(--stripe-even) !important;
}
.dataTables_wrapper table.dataTable.stripe tbody tr:hover,
.table.table-striped tbody tr:hover,
.table.table-striped tbody tr:hover td {
  background-color: var(--stripe-hover) !important;
  transition: background-color 120ms ease-in-out;
}

/* subtle left accent on hover to help scanning (non-invasive) */
.dataTables_wrapper table.dataTable.stripe tbody tr:hover td,
.table.table-striped tbody tr:hover td {
  box-shadow: inset 4px 0 0 rgba(13,110,253,0.06);
}

/* ensure Bootstrap's internal variable picks it up for components that use it */
.table.table-striped { --bs-table-accent-bg: var(--stripe-odd) !important; }
