<style>
  :root {
    --ccm-bg: #f4f6f8;
    --ccm-text: #212121;
    --ccm-primary: #da002d;
    --ccm-primary-hover: #b00024;
    --ccm-header: #2b2f36;
    --ccm-surface: #ffffff;
    --ccm-border: #d9dee3;
    --ccm-muted: #6b7280;
  }

  [data-bs-theme="dark"] {
    --ccm-bg: #15181d;
    --ccm-text: #e5e7eb;
    --ccm-header: #0f1720;
    --ccm-surface: #15181d;
    --ccm-border: #2b3440;
    --ccm-muted: #9aa4b2;
  }

  html { font-size: 16px; }

  body {
    background-color: var(--ccm-bg);
    color: var(--ccm-text);
    font-family: "Segoe UI", Arial, sans-serif;
  }

  h1, h2, h3, h4, h5, h6,
  .card-title,
  .navbar-brand-wordmark strong {
    font-weight: 600;
  }

  .navbar-brand-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 0.92rem;
  }

  .navbar-brand-logo {
    height: 1.85rem;
    width: auto;
    display: block;
  }

  .brand-surface {
    background-color: var(--ccm-header);
    margin-bottom: 0;
    border-bottom: 0;
    box-shadow: none;
  }

  .brand-surface,
  .brand-surface .navbar-brand-wordmark,
  .brand-surface .navbar-brand-wordmark strong,
  .brand-surface .navbar-brand-wordmark span,
  .brand-surface .btn:not(.btn-primary) {
    color: #ffffff;
  }

  .top-actions {
    display: flex;
    align-items: center;
  }

  .top-actions .btn {
    white-space: nowrap;
  }

  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    line-height: 1;
  }

  .nav-surface {
    background-color: var(--ccm-primary);
    margin-top: 0;
    border-top: 0;
    box-shadow: none;
  }

  .nav-surface .btn-white {
    color: var(--ccm-primary);
    border-color: rgba(255, 255, 255, 0.9);
    background: #ffffff;
  }

  .nav-surface .btn-white:hover,
  .nav-surface .btn-white:focus {
    background-color: #e9ecef;
    border-color: #e9ecef;
    color: var(--ccm-primary-hover);
  }

  .nav-surface .btn.active {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--ccm-primary-hover);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  }

  .nav-surface .ti {
    font-size: 1rem;
    vertical-align: -2px;
  }

  .app-footer {
    margin-top: 1rem;
    padding: 0.65rem 1.5rem 0.95rem;
    color: var(--ccm-muted);
    font-size: 0.82rem;
    background: transparent;
  }

  .app-footer-inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
    justify-content: flex-start;
    align-items: center;
  }

  .card {
    --tblr-card-border-radius: 1rem;
    --tblr-card-inner-border-radius: 1rem;
    border: 1px solid var(--ccm-border);
    border-radius: 1rem;
    border-left: 6px solid var(--ccm-primary);
  }

  .app-footer-separator {
    color: #b0b7c3;
    display: none;
  }

  .card-header {
    background-color: #eeeeee;
    padding-left: 1rem;
    font-weight: 600;
  }

  .btn.btn-primary {
    --tblr-btn-bg: var(--ccm-primary);
    --tblr-btn-hover-bg: var(--ccm-primary-hover);
    --tblr-btn-border-color: var(--ccm-primary);
    --tblr-btn-hover-border-color: var(--ccm-primary-hover);
  }

  .form-check-input:checked {
    background-color: var(--ccm-primary);
    border-color: var(--ccm-primary);
  }

  .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(218, 0, 45, 0.25);
  }

  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: #e9ecef !important;
    color: inherit !important;
  }
  .dropdown-item.active,
  .dropdown-item:active {
    background-color: #e9ecef !important;
    color: inherit !important;
  }
  [data-bs-theme="dark"] .dropdown-item:hover,
  [data-bs-theme="dark"] .dropdown-item:focus,
  [data-bs-theme="dark"] .dropdown-item.active,
  [data-bs-theme="dark"] .dropdown-item:active {
    background-color: #3a3f45 !important;
  }

  .dropdown-item.active,
  .dropdown-item:active {
    background-color: var(--ccm-primary);
    color: #ffffff;
  }

  [data-bs-theme="dark"] body {
    background-color: var(--ccm-bg);
    color: var(--ccm-text);
  }

  [data-bs-theme="dark"] .card,
  [data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--ccm-bg);
    color: var(--ccm-text);
    border-color: var(--ccm-border);
  }

  [data-bs-theme="dark"] .card-header {
    background-color: #1a1e24;
    border-color: var(--ccm-border);
  }

  [data-bs-theme="dark"] .form-control,
  [data-bs-theme="dark"] .form-select {
    background-color: #11161d;
    color: var(--ccm-text);
    border-color: var(--ccm-border);
  }

  [data-bs-theme="dark"] .form-control::placeholder {
    color: var(--ccm-muted);
  }

  [data-bs-theme="dark"] .text-muted {
    color: var(--ccm-muted) !important;
  }

  [data-bs-theme="dark"] .list-group-item {
    background-color: var(--ccm-bg);
    color: var(--ccm-text);
    border-color: var(--ccm-border);
  }

  [data-bs-theme="dark"] .table > :not(caption) > * > * {
    border-color: var(--ccm-border);
    color: var(--ccm-text);
  }

  [data-bs-theme="dark"] .page-subtitle {
    color: var(--ccm-muted);
  }

  [data-bs-theme="dark"] .alert-secondary {
    background-color: #1a1e24;
    color: var(--ccm-text);
    border-color: var(--ccm-border);
  }

  [data-bs-theme="dark"] .alert-success {
    background-color: #0d2b1d;
    color: #a3d9b1;
    border-color: #1a4730;
  }

  [data-bs-theme="dark"] .alert-danger {
    background-color: #2d0d0d;
    color: #f0a0a0;
    border-color: #4a1a1a;
  }
</style>
