/* =================================================================== */
/*      DARK MODE — SERENITY MAIN LAYOUT STRUCTURE                    */
/*      Sidebar, Main Content Area, Footer, Content Header            */
/* =================================================================== */

/* === SIDEBAR === */
html[data-bs-theme="dark"] .s-sidebar,
html[data-bs-theme="dark"] #s-sidebar {
  background-color: #1a1a1a !important;
  border-color: #333 !important;
}

html[data-bs-theme="dark"] .s-sidebar-pane {
  background-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] .s-sidebar-menu {
  background-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] .s-sidebar-item {
  background-color: transparent !important;
}

html[data-bs-theme="dark"] .s-sidebar-link {
  color: #b0b0b0 !important;
  background-color: transparent !important;
}

  html[data-bs-theme="dark"] .s-sidebar-link:hover {
    background-color: #252525 !important;
    color: #009055 !important;
  }

html[data-bs-theme="dark"] .s-sidebar-item.active > .s-sidebar-link {
  background-color: #252525 !important;
  color: #009055 !important;
  border-right: 3px solid #009055 !important;
}

html[data-bs-theme="dark"] .s-sidebar-icon {
  color: #808080 !important;
}

html[data-bs-theme="dark"] .s-sidebar-item.active .s-sidebar-icon,
html[data-bs-theme="dark"] .s-sidebar-link:hover .s-sidebar-icon {
  color: #009055 !important;
}

html[data-bs-theme="dark"] .s-sidebar-link-text {
  color: inherit !important;
}

html[data-bs-theme="dark"] .s-sidebar-menu-toggle {
  color: #808080 !important;
}

html[data-bs-theme="dark"] .s-sidebar-search {
  background-color: #161616 !important;
}

html[data-bs-theme="dark"] .s-sidebar-search-input {
  background-color: #252525 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

  html[data-bs-theme="dark"] .s-sidebar-search-input::placeholder {
    color: #808080 !important;
  }

  html[data-bs-theme="dark"] .s-sidebar-search-input:focus {
    background-color: #2a2a2a !important;
    border-color: #009055 !important;
  }

html[data-bs-theme="dark"] .s-sidebar-search-icon {
  color: #808080 !important;
}

/* === HEADER === */
html[data-bs-theme="dark"] .s-sidebar-header,
html[data-bs-theme="dark"] header.s-sidebar-header {
  background-color: #161616 !important;
  border-color: #333 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

html[data-bs-theme="dark"] .s-sidebar-toggler {
  color: #e0e0e0 !important;
  background-color: transparent !important;
}

  html[data-bs-theme="dark"] .s-sidebar-toggler:hover {
    color: #009055 !important;
    background-color: #252525 !important;
  }

html[data-bs-theme="dark"] .s-sidebar-header-link {
  color: #b0b0b0 !important;
  background-color: transparent !important;
}

  html[data-bs-theme="dark"] .s-sidebar-header-link:hover {
    color: #009055 !important;
    background-color: #252525 !important;
  }

html[data-bs-theme="dark"] .s-sidebar-header-actions {
  background-color: transparent !important;
}

/* === USER PROFILE === */
html[data-bs-theme="dark"] .s-user-profile-menu {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

html[data-bs-theme="dark"] .s-user-card {
  background-color: #161616 !important;
  border-color: #333 !important;
}

html[data-bs-theme="dark"] .s-user-avatar {
  color: #009055 !important;
}

html[data-bs-theme="dark"] .s-user-info {
  color: #e0e0e0 !important;
}

/* === LANGUAGE DROPDOWN === */
html[data-bs-theme="dark"] .s-language-selection-menu {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .s-language-selection-link {
  color: #b0b0b0 !important;
}

/* === NOTIFICATIONS === */
html[data-bs-theme="dark"] .s-notification-link {
  color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] #sidebarNotificationsMenu {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
}

  html[data-bs-theme="dark"] #sidebarNotificationsMenu .dropdown-item {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
  }

    html[data-bs-theme="dark"] #sidebarNotificationsMenu .dropdown-item:hover {
      background-color: #252525 !important;
      color: #009055 !important;
    }

/* === MAIN CONTENT === */
html[data-bs-theme="dark"] .s-main,
html[data-bs-theme="dark"] main.s-main {
  background-color: #161616 !important;
}

html[data-bs-theme="dark"] .content,
html[data-bs-theme="dark"] section.content {
  background-color: #161616 !important;
}

/* === CONTENT HEADER === */
html[data-bs-theme="dark"] .content-header,
html[data-bs-theme="dark"] .logos-header {
  background-color: #161616 !important;
  border-bottom: 1px solid #333 !important;
}

html[data-bs-theme="dark"] .center-text {
  color: #009055 !important;
}

/* === FOOTER === */
html[data-bs-theme="dark"] .main-footer,
html[data-bs-theme="dark"] footer.main-footer {
  background-color: #1a1a1a !important;
  border-top: 1px solid #333 !important;
  color: #b0b0b0 !important;
}

  html[data-bs-theme="dark"] .main-footer a {
    color: #009055 !important;
  }

html[data-bs-theme="dark"] .footer-time {
  color: #808080 !important;
}

/* === PAGE CONTAINERS === */
html[data-bs-theme="dark"] #page-outer-nonav,
html[data-bs-theme="dark"] #page-container {
  background-color: #161616 !important;
}

/* === BODY === */
html[data-bs-theme="dark"] body {
  background-color: #121212 !important;
  color: #e0e0e0 !important;
}

/* === SERENITY GRID === */
html[data-bs-theme="dark"] .s-DataGrid,
html[data-bs-theme="dark"] .slick-viewport {
  background-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] .slick-header {
  background-color: #222222 !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .slick-header-column {
  background-color: #222222 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .slick-row {
  background-color: #1a1a1a !important;
}

  html[data-bs-theme="dark"] .slick-row:hover {
    background-color: #2a2a2a !important;
  }

  html[data-bs-theme="dark"] .slick-row.odd {
    background-color: #1e1e1e !important;
  }

html[data-bs-theme="dark"] .slick-cell {
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

/* === DIALOG / PANEL === */
html[data-bs-theme="dark"] .s-Panel,
html[data-bs-theme="dark"] .s-Dialog {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
}

  html[data-bs-theme="dark"] .s-Panel .panel-titlebar,
  html[data-bs-theme="dark"] .s-Dialog .s-DialogTitle {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
  }

/* === TOOLBAR === */
html[data-bs-theme="dark"] .s-Toolbar,
html[data-bs-theme="dark"] .tool-button {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

  html[data-bs-theme="dark"] .tool-button:hover {
    background-color: #252525 !important;
    color: #009055 !important;
  }

/* === QUICK SEARCH === */
html[data-bs-theme="dark"] .quick-search-input {
  background-color: #252525 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

/* === BREADCRUMB === */
html[data-bs-theme="dark"] .breadcrumb {
  background-color: transparent !important;
}

html[data-bs-theme="dark"] .breadcrumb-item a {
  color: #009055 !important;
}

html[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #e0e0e0 !important;
}

/* === DROPDOWN MENUS === */
html[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

html[data-bs-theme="dark"] .dropdown-item {
  color: #e0e0e0 !important;
}

  html[data-bs-theme="dark"] .dropdown-item:hover,
  html[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #252525 !important;
    color: #009055 !important;
  }

html[data-bs-theme="dark"] .dropdown-divider {
  border-color: #333 !important;
}

/* === MODAL === */
html[data-bs-theme="dark"] .modal-content {
  background-color: #1a1a1a !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .modal-header {
  background-color: #252525 !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .modal-body {
  background-color: #1a1a1a !important;
  color: #e0e0e0 !important;
}

html[data-bs-theme="dark"] .modal-footer {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .modal-title {
  color: #e0e0e0 !important;
}

/* === ALERTS === */
html[data-bs-theme="dark"] .alert {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

html[data-bs-theme="dark"] .alert-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

html[data-bs-theme="dark"] .alert-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

html[data-bs-theme="dark"] .alert-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

html[data-bs-theme="dark"] .alert-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
}

/* === CARDS === */
html[data-bs-theme="dark"] .card {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

html[data-bs-theme="dark"] .card-header {
  background-color: #252525 !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

html[data-bs-theme="dark"] .card-body {
  background-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] .card-footer {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
}

/* === FORMS === */
html[data-bs-theme="dark"] .form-control {
  background-color: #252525 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

  html[data-bs-theme="dark"] .form-control:focus {
    background-color: #2a2a2a !important;
    border-color: #009055 !important;
    box-shadow: 0 0 0 2px rgba(0, 144, 85, 0.2) !important;
    color: #e0e0e0 !important;
  }

  html[data-bs-theme="dark"] .form-control::placeholder {
    color: #808080 !important;
  }

html[data-bs-theme="dark"] .form-select {
  background-color: #252525 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .form-label {
  color: #e0e0e0 !important;
}

html[data-bs-theme="dark"] .input-group-text {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
  color: #b0b0b0 !important;
}

/* === BUTTONS === */
html[data-bs-theme="dark"] .btn-outline-secondary {
  color: #b0b0b0 !important;
  border-color: #444 !important;
}

  html[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
  }

html[data-bs-theme="dark"] .btn-light {
  background-color: #252525 !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

/* === TABLES === */
html[data-bs-theme="dark"] .table {
  color: #e0e0e0 !important;
}

  html[data-bs-theme="dark"] .table > :not(caption) > * > * {
    background-color: #1a1a1a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
  }

  html[data-bs-theme="dark"] .table > thead th {
    background-color: #222222 !important;
    color: #009055 !important;
    border-color: #444 !important;
  }

html[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
  background-color: #252525 !important;
}

html[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #1e1e1e !important;
}

/* === NAVBAR === */
html[data-bs-theme="dark"] .navbar {
  background-color: #161616 !important;
  border-color: #333 !important;
}

html[data-bs-theme="dark"] .nav-link {
  color: #b0b0b0 !important;
}

  html[data-bs-theme="dark"] .nav-link:hover {
    color: #009055 !important;
  }

/* === PAGINATION === */
html[data-bs-theme="dark"] .page-link {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
  color: #b0b0b0 !important;
}

  html[data-bs-theme="dark"] .page-link:hover {
    background-color: #252525 !important;
    color: #009055 !important;
  }

html[data-bs-theme="dark"] .page-item.active .page-link {
  background-color: #009055 !important;
  border-color: #009055 !important;
  color: #fff !important;
}

/* === LIST GROUP === */
html[data-bs-theme="dark"] .list-group-item {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

  html[data-bs-theme="dark"] .list-group-item:hover {
    background-color: #252525 !important;
  }

/* === ACCORDION === */
html[data-bs-theme="dark"] .accordion-item {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
}

html[data-bs-theme="dark"] .accordion-button {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
}

  html[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #252525 !important;
    color: #009055 !important;
  }

html[data-bs-theme="dark"] .accordion-body {
  background-color: #1a1a1a !important;
}

/* === BORDERS === */
html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-top {
  border-color: #444 !important;
}

/* === TEXT === */
html[data-bs-theme="dark"] .text-muted {
  color: #808080 !important;
}

html[data-bs-theme="dark"] .text-secondary {
  color: #b0b0b0 !important;
}

html[data-bs-theme="dark"] .text-dark {
  color: #e0e0e0 !important;
}

/* === BACKGROUNDS === */
html[data-bs-theme="dark"] .bg-light {
  background-color: #1e1e1e !important;
}

html[data-bs-theme="dark"] .bg-white {
  background-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] .bg-body {
  background-color: #161616 !important;
}
