html {
  font-size: 14px;
}

/* Truncate long text inside table cells to keep row height consistent */
table.table td.truncate {
  max-width: 280px; /* adjust as needed */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure inner block elements inside td also truncate */
table.table td.truncate > * {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure danger buttons have readable text */
.btn-danger, .btn-outline-danger {
  color: #fff !important;
}

/* Make buttons filled (no outline) and text white */
.btn {
  color: #fff !important;
}

/* Primary filled */
.btn-primary {
  background-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l)) !important;
  border-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l)) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 6%)) !important;
  border-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 6%)) !important;
}

/* Secondary filled (neutral) */
.btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
  background-color: #565e64 !important;
  border-color: #565e64 !important;
}

/* Danger filled */
.btn-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}
.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
  background-color: #c82333 !important;
  border-color: #c82333 !important;
}

/* Convert outline variants to filled appearance to match requested style */
.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger {
  color: #fff !important;
  background-color: transparent;
}
.btn-outline-primary {
  background-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l)) !important;
  border-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l)) !important;
}
.btn-outline-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}
.btn-outline-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  /* Brand color in multiple formats provided by user */
  --primary-color: #052c65; /* hex */
  --primary-rgb: 5,44,101; /* rgb components */
  --primary-h: 216; /* hue */
  --primary-s: 91%; /* saturation */
  --primary-l: 21%; /* lightness */
}

/* Primary button */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  /* slightly darker hover using HSL */
  background-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 5%));
  border-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 5%));
}

/* Navbar brand / links */
.navbar {
  background-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l)) !important;
}
.navbar .nav-link, .navbar .navbar-brand {
  color: #fff !important;
}

/* Navbar brand image sizing */
.navbar-brand img {
  height: 34px;
  width: auto;
  display: block;
}

/* Make navbar links show a subtle boundary and underline on hover/focus */
.navbar .nav-link {
  position: relative;
  padding: 0.45rem 0.65rem;
  border-radius: 0.25rem;
  transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background-color: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
  color: #fff !important;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  background: rgba(255,255,255,0.95);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
  border-radius: 2px;
}
.navbar .nav-link:hover::after,
.navbar .nav-link:focus::after {
  transform: scaleX(1);
}

/* Table header accent */
.table thead th {
  background-color: rgba(var(--primary-rgb), 0.06);
  border-bottom: 2px solid hsl(var(--primary-h), var(--primary-s), var(--primary-l));
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(var(--primary-rgb),0.25);
  border-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}