  /* Custom primary color */
  .bg-custom-primary {
    background-color: #cf4817 !important;
  }
  /* Sticky footer */
  html {
    position: relative;
    min-height: 100%;
    scrollbar-gutter: stable;
  }
  body {
    margin-bottom: 60px; /* Height of the footer */
  }
  body.public-directory-active {
    height: 100vh;
    margin-bottom: 0;
    overflow: hidden;
  }
  body.public-directory-active footer {
    display: none;
  }
  body.org-chart-active {
    height: 100vh;
    margin-bottom: 0;
    overflow: hidden;
  }
  body.org-chart-active footer {
    display: none;
  }
  footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px; /* Height of the footer */
    background-color: #6a7431;
    color: white;
    text-align: center;
    line-height: 60px; /* Align text vertically */
  }
  .bg-custom-header {
    background-color: #ffffff !important;
    border-bottom: 4px solid #6a7431;
  }
  .bg-custom-header .container {
    min-height: 58px;
  }
  .bg-custom-header img {
    height: auto;
    max-width: min(250px, 70vw);
  }
  .bg-custom-card-header {
    background-color: #cf4817 !important;
  }
  .employee-card-label {
    color: #ffffff;
    font-weight: bold;
  }
  .sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  .directory-tabs {
    background: #ffffff;
  }
  .directory-tabs[hidden] {
    display: none !important;
  }
  .directory-tabs .container {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 45px;
  }
  .directory-tab {
    align-items: center;
    appearance: none;
    background-color: #6a7431;
    border: 1px solid #6a7431;
    border-radius: 0 0 6px 6px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 700;
    line-height: 1.1;
    min-height: 45px;
    padding: 0.7rem 1rem;
    text-decoration: none !important;
    white-space: nowrap;
  }
  .directory-tab:link,
  .directory-tab:visited {
    color: #ffffff;
    text-decoration: none !important;
  }
  .directory-tab:hover,
  .directory-tab:focus,
  .directory-tab.active {
    background-color: #cf4817;
    border-color: #cf4817;
    color: #ffffff;
    text-decoration: none !important;
  }
  .directory-tab:focus-visible {
    outline: 3px solid rgba(207, 72, 23, 0.35);
    outline-offset: 2px;
  }
  .directory-view {
    display: none;
  }
  .directory-view.active {
    display: block;
  }
  .org-chart-shell {
    padding: 1.5rem;
  }
  .org-chart-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
  }
  .org-chart-toolbar h1 {
    font-size: 1.75rem;
    margin: 0;
  }
  .org-chart-toolbar label {
    color: #231F20;
    font-weight: 700;
    margin-left: auto;
  }
  .org-chart-toolbar select {
    max-width: 360px;
  }
  .org-chart-summary {
    color: #6a7431;
    flex-basis: 100%;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: right;
  }
  .org-chart-canvas {
    border: 2px solid #d8ddcf;
    height: calc(100vh - 245px);
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .org-chart-flow {
    height: 100%;
    width: 100%;
  }
  .org-chart-status {
    align-items: center;
    color: #6a7431;
    display: flex;
    font-weight: 700;
    height: 100%;
    justify-content: center;
    min-height: 220px;
    text-align: center;
  }
  .org-chart-search-panel {
    left: -2px;
    max-width: calc(100% - 1rem);
    position: absolute;
    top: -2px;
    transform: none;
    width: min(420px, calc(100% - 1rem));
    z-index: 10;
  }
  .org-chart-search-toggle {
    align-items: center;
    appearance: none;
    background: #cf4817;
    border: 2px solid #cf4817;
    border-radius: 0 0 10px 0;
    box-shadow: none;
    color: #ffffff;
    display: flex;
    gap: 0.5rem;
    font-weight: 800;
    height: 2.35rem;
    justify-content: center;
    letter-spacing: 0.01em;
    margin: 0;
    min-width: 8.5rem;
    padding: 0.35rem 0.95rem;
    position: relative;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    white-space: nowrap;
    width: max-content;
  }
  .org-chart-search-toggle::before {
    background: #cf4817;
    content: "";
    height: 2px;
    left: -2px;
    position: absolute;
    right: -2px;
    top: -2px;
  }
  .org-chart-search-panel.open .org-chart-search-toggle {
    border-bottom-color: #6a7431;
    border-radius: 0;
    box-shadow: none;
    justify-content: space-between;
    width: 100%;
  }
  .org-chart-search-toggle:hover,
  .org-chart-search-toggle:focus-visible {
    background: #6a7431;
    border-color: #6a7431;
    outline: none;
  }
  .org-chart-search-toggle:hover::before,
  .org-chart-search-toggle:focus-visible::before,
  .org-chart-search-panel.open .org-chart-search-toggle::before {
    background: #6a7431;
  }
  .org-chart-search-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1rem;
    justify-content: center;
    width: 1rem;
  }
  .org-chart-search-icon svg {
    display: block;
    fill: currentColor;
    height: 1rem;
    width: 1rem;
  }
  .org-chart-search-tab-text {
    line-height: 1;
  }
  .org-chart-search-caret {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1rem;
    justify-content: center;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.16s ease;
    width: 1rem;
  }
  .org-chart-search-caret svg {
    display: block;
    height: 1rem;
    width: 1rem;
  }
  .org-chart-search-toggle.open .org-chart-search-caret {
    transform: rotate(180deg);
  }
  .org-chart-search-controls {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #6a7431;
    border-radius: 0 0 10px 0;
    border-top: 0;
    box-shadow: 0 9px 18px rgba(35, 31, 32, 0.16);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 0.65rem;
    transform: translateY(-0.25rem);
    transition: max-height 0.22s ease, opacity 0.16s ease, padding 0.22s ease, transform 0.22s ease;
    width: 100%;
  }
  .org-chart-search-controls.open {
    max-height: 8rem;
    opacity: 1;
    padding: 0.65rem;
    transform: translateY(0);
  }
  .org-chart-search {
    display: flex;
  }
  .org-chart-search .form-control {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
  }
  .org-chart-search .btn {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    white-space: nowrap;
  }
  .org-chart-search-nav {
    align-items: center;
    display: none;
    gap: 0.4rem;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  .org-chart-search-nav .btn {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  .org-chart-search-status {
    color: #6a7431;
    font-size: 0.86rem;
    font-weight: 800;
    min-width: 4.5rem;
    text-align: center;
  }
  .org-contact-card {
    background: #ffffff;
    border: 2px solid #6a7431;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(35, 31, 32, 0.12);
    color: #231F20;
    cursor: pointer;
    display: grid;
    grid-template-columns: 25% 75%;
    height: 76px;
    overflow: hidden;
    position: relative;
    width: 220px;
  }
  .react-flow__node-default {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 220px;
  }
  .react-flow__handle {
    background: #6a7431;
    border: 2px solid #ffffff;
    height: 10px;
    pointer-events: none;
    width: 10px;
  }
  .org-contact-card .org-card-initials {
    align-items: center;
    background: #cf4817;
    color: #ffffff;
    display: flex;
    font-size: 1.15rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0;
    min-width: 0;
  }
  .org-contact-card .org-card-body {
    align-content: center;
    background: #dce9f3;
    display: grid;
    gap: 0.16rem;
    min-width: 0;
    padding: 0.45rem 0.6rem;
  }
  .org-contact-card .org-card-name {
    color: #231F20;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .org-contact-card .org-card-title {
    color: #231F20;
    display: -webkit-box;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.15;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .org-contact-card .org-card-detail {
    font-size: 0.78rem;
    line-height: 1.25;
  }
  .org-person-modal-backdrop {
    align-items: center;
    background: rgba(35, 31, 32, 0.42);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: absolute;
    z-index: 20;
  }
  .org-person-modal {
    max-width: 760px;
    width: min(760px, 100%);
  }
  .org-person-detail-card {
    width: 100%;
  }
  .org-person-modal-close {
    appearance: none;
    background: #ffffff;
    border: 0;
    border-radius: 4px;
    color: #231F20;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.25rem 0.45rem;
  }
  .org-person-modal-close:hover {
    background: #6a7431;
    color: #ffffff;
  }
  .org-leaf-group-card {
    display: grid;
    width: 220px;
  }
  .org-leaf-stack-item .org-contact-card {
    border-radius: 0;
    box-shadow: none;
  }
  .org-leaf-stack-item:first-child .org-contact-card {
    border-radius: 4px 4px 0 0;
  }
  .org-leaf-stack-item:last-child .org-contact-card {
    border-radius: 0 0 4px 4px;
  }
  .org-leaf-stack-item + .org-leaf-stack-item .org-contact-card {
    border-top: 0;
  }
  .org-leaf-stack-node .org-contact-card {
    border-radius: 0;
    box-shadow: none;
  }
  .org-leaf-name {
    color: #231F20;
    font-weight: 800;
  }
  .org-node-highlight .org-contact-card {
    animation: org-node-glow 0.75s ease-in-out 0s 6 alternate;
  }
  @keyframes org-node-glow {
    0% {
      border-color: #cf4817;
      box-shadow: 0 0 0 4px rgba(207, 72, 23, 0.36), 0 0 22px rgba(207, 72, 23, 0.9);
    }
    100% {
      border-color: #6a7431;
      box-shadow: 0 0 0 4px rgba(106, 116, 49, 0.26), 0 0 16px rgba(106, 116, 49, 0.75);
    }
  }
  .react-flow__attribution {
    display: none;
  }
  .react-flow__edge {
    pointer-events: none;
  }
  .react-flow__edge-path {
    stroke: #6a7431 !important;
    stroke-width: 2.5 !important;
  }
  /* Centered search bar */
  .search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  .search-container .input-group {
    max-width: 400px;
    width: 100%;
  }
  .search-container .form-control {
    border-radius: 25px;
  }
  /* Snazzy search bar */
  .input-group input:focus {
    outline: none;
    box-shadow: none;
  }

  .input-group input::placeholder {
    font-style: italic;
    font-weight: bold;
  }

  .input-group button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0.375rem 0.75rem;
  }

  /* Custom primary color */
  .btn-custom-primary {
      background-color: #cf4817 !important;
      border-color: #cf4817 !important;
      color: white !important; /* Add this line to make text white */
      font-weight: bold !important; /* Add this line to make text bold */
  }

  .btn-custom-primary:hover {
      background-color: #6a7431 !important;
      border-color: #6a7431 !important;
      color: white !important; /* Add this line to make text white */
  }
  /* Custom pagination button color */
  .pagination .page-link {
    color: #6a7431 !important;
    background-color: transparent;
    border: 1px solid #6a7431;
  }

  .pagination .page-link:hover {
    color: #fff !important;
    background-color: #6a7431;
    border-color: #6a7431;
  }

  .pagination .page-item.active .page-link {
    color: #fff !important;
    background-color: #6a7431;
    border-color: #6a7431;
  }


  .btn-custom-primary {
    background-color: #cf4817;
    border-color: #cf4817;
    color: #ffffff;
  }
  .btn-custom-primary:hover,
  .btn-custom-primary:focus {
    background-color: #a93b13;
    border-color: #a93b13;
    color: #ffffff;
  }
  .directory-auth-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    min-height: 42px;
  }
  .directory-user-chip {
    background: #f4f5ef;
    border: 1px solid #d8ddcf;
    border-radius: 999px;
    color: #231F20;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    padding: 0.45rem 0.85rem;
    text-align: right;
  }
  .directory-user-name {
    font-weight: 700;
  }
  .directory-user-roles {
    color: #6a7431;
    font-size: 0.78rem;
    text-transform: uppercase;
  }
  .public-directory-hero {
    background: linear-gradient(135deg, #f7f5ef 0%, #ffffff 58%, #edf0e3 100%);
    border: 1px solid #d8ddcf;
    border-radius: 16px;
    flex: 0 0 auto;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
  }
  .public-directory-kicker {
    color: #6a7431;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
  }
  .public-directory-hero h1 {
    color: #231F20;
    font-size: clamp(1.35rem, 2.3vw, 1.9rem);
    font-weight: 800;
    margin-bottom: 0.2rem;
  }
  .public-directory-hero .lead {
    font-size: 0.95rem;
  }
  body.public-directory-active #public-directory.directory-view.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--directory-chrome-height, 125px));
    min-height: 0;
    overflow: hidden;
  }
  .public-directory-section {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 1rem;
    padding-top: 1rem;
  }
  .public-directory-scroll {
    border-radius: 18px;
  }
  .department-results-scroll {
    flex: 1 1 auto;
    min-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.25rem 0.5rem 1rem;
    scrollbar-gutter: stable;
  }
  .public-directory-scroll.department-results-scroll {
    padding-top: 0.5rem;
  }
  .directory-status {
    color: #6a7431;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    text-align: center;
  }
  .directory-status.compact {
    margin: 0;
    text-align: left;
  }
  .directory-status-error {
    color: #b00020 !important;
  }
  .department-card {
    background: #ffffff;
    border: 1px solid #d8ddcf;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(35, 31, 32, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .department-card-image {
    background: #f4f5ef;
    display: block;
    height: 170px;
    object-fit: cover;
    object-position: center center;
    width: 100%;
  }
  .department-card-image-placeholder {
    align-items: center;
    color: #6a7431;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    justify-content: center;
    text-align: center;
  }
  .department-mapme-image-preview {
    overflow: hidden;
    padding: 0;
    position: relative;
  }
  .department-mapme-image-preview iframe {
    border: 0;
    height: 100%;
    left: 0;
    min-height: 100%;
    min-width: 100%;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: scale(1.08);
    transform-origin: center center;
    width: 100%;
  }
  .department-card-image-link-placeholder {
    padding: 1rem;
  }
  .department-image-link {
    color: #4f5f1d;
    font-size: 0.85rem;
    font-weight: 800;
  }
  .department-card-image-placeholder svg {
    fill: currentColor;
    height: 82px;
    opacity: 0.5;
    width: 82px;
  }
  .department-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem;
  }
  .department-card h2 {
    color: #231F20;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
  }
  .department-contact-list {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
  }
  .department-contact-list div {
    border-left: 4px solid #d8ddcf;
    padding-left: 0.75rem;
  }
  .department-contact-list dt {
    color: #6a7431;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .department-contact-list dd {
    margin-bottom: 0;
    word-break: break-word;
  }
  .department-card-actions {
    margin-top: auto;
  }
  .department-map-frame {
    border: 0;
    height: min(75vh, 720px);
    width: 100%;
  }
  .admin-only-action[hidden] {
    display: none !important;
  }
  .protected-directory-view:not(.active) {
    display: none;
  }
  @media (max-width: 767px) {
    footer {
      height: auto;
      line-height: 1.4;
      padding: 1rem 0;
      position: static;
    }
    body {
      margin-bottom: 0;
    }
    .directory-user-chip {
      text-align: left;
    }
  }
  .admin-card {
    background: #ffffff;
    border: 1px solid #d8ddcf;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(35, 31, 32, 0.08);
    padding: 1.5rem;
  }

  .department-phone-list {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .department-phone-list li {
    display: grid;
    gap: 0.15rem;
  }
  .department-phone-type {
    color: #6a7431;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .department-phone-admin-block {
    background: #f7f5ef;
    border: 1px solid #d8ddcf;
    border-radius: 12px;
    padding: 0.9rem;
  }
  .department-phone-admin-list {
    display: grid;
    gap: 0.65rem;
  }
  .department-phone-admin-row {
    align-items: start;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(155px, 0.85fr) minmax(180px, 1fr) auto;
  }
  .department-audit-summary {
    background: #f7f5ef;
    border-left: 4px solid #6a7431;
    color: #231F20;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
  }
  @media (max-width: 575.98px) {
    .department-phone-admin-row {
      grid-template-columns: 1fr;
    }
    .department-phone-admin-row .btn {
      justify-self: start;
    }
  }
