html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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 var(--brand-2);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

/* App shell layout */
.app-shell { min-height: 100vh; }
/* Keep static width on >= md, offcanvas width is set inline for < md */
.sidebar { width: 260px; }
.sidebar .nav-link { border-radius: 0 !important; }
.sidebar .nav-link:hover { background-color: rgba(255,255,255,0.08); }
.sidebar .nav-link.active { background-color: rgba(255,255,255,0.15); }
.sidebar .collapse.show + .caret, .sidebar .nav-link[aria-expanded="true"] .caret { transform: rotate(90deg); }
.content { background-color: #f8f9fa; }

/* On small screens, content should span full width; offcanvas overlays */
@media (max-width: 767.98px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .content { width: 100%; }
}

/* Force sidebar to be static and visible on >= md when using .sidebar-static-md */
@media (min-width: 768px) {
  .sidebar-static-md {
    position: static !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    display: block !important;
  flex: 0 0 260px; /* reserve width in flex layout */
  width: 260px;    /* ensure fixed sidebar width */
  }
  .sidebar-static-md.offcanvas-start { border-right: 1px solid rgba(0,0,0,.1); }
}

/* Brand palette */
:root {
  /* Professional blue palette */
  --brand-1: #0b2e5b; /* darkest/navy */
  --brand-2: #1976d2; /* primary accent */
  --brand-3: #64b5f6; /* light accent */
  --brand-4: #e3f2fd; /* ultra light */
  --brand-5: #bbdefb; /* light */

  /* Map Bootstrap theme tokens */
  --bs-primary: var(--brand-2);
  --bs-secondary: var(--brand-1);
  --bs-link-color: var(--brand-2);
  --bs-link-hover-color: var(--brand-1);
  --bs-font-sans-serif: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

/* Convenience helpers */
.bg-brand-1 { background-color: var(--brand-1) !important; }
.bg-brand-2 { background-color: var(--brand-2) !important; }
.bg-brand-3 { background-color: var(--brand-3) !important; }
.bg-brand-4 { background-color: var(--brand-4) !important; }
.bg-brand-5 { background-color: var(--brand-5) !important; }

.text-brand-1 { color: var(--brand-1) !important; }
.text-brand-2 { color: var(--brand-2) !important; }
.text-brand-3 { color: var(--brand-3) !important; }
.text-brand-4 { color: var(--brand-4) !important; }
.text-brand-5 { color: var(--brand-5) !important; }

/* Improve focus ring to harmonize with palette */
.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 var(--brand-2);
}

/* Flat, sharp-edged buttons */
.btn {
  border-radius: 0 !important;
  box-shadow: none !important;
}
.btn:hover, .btn:active {
  box-shadow: none !important;
}
/* Remove borders on solid variant buttons for a flat look */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-dark,
.btn-light {
  border: 0;
}

/* Preserve circular buttons (e.g., FAB) */
.btn.rounded-circle {
  border-radius: 50% !important;
}

/* (removed) Title bar progress styles */