﻿/* Global dark theme overrides — applied when <html data-theme="dark">. Loaded after every page-specific stylesheet. */

html[data-theme="dark"] {
  background: #0f1620;
  color-scheme: dark;
}

/* Overrides login.html's own inline CSS variables. */
:root[data-theme="dark"] {
  --bg: #0f1620;
  --panel: #161f28;
  --primary: #48b8ad;
  --primary-dark: #2f8a81;
  --text: #d7e0e4;
  --muted: #93a1a9;
  --border: #26323b;
  --success: #34c395;
}

[data-theme="dark"] body,
[data-theme="dark"] main {
  background: #0f1620;
  color: #d7e0e4;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] strong {
  color: #eef3f5;
}

[data-theme="dark"] p,
[data-theme="dark"] small,
[data-theme="dark"] span {
  color: #93a1a9;
}

[data-theme="dark"] .page-heading {
  background: #161f28;
  border-color: #26323b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .app-sidebar,
[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #101922 0%, #141e29 100%);
  border-color: #26323b;
  color: #dfeaf0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .sidebar-brand strong,
[data-theme="dark"] .sidebar-brand small,
[data-theme="dark"] .sidebar-nav p,
[data-theme="dark"] .sidebar-nav a,
[data-theme="dark"] .sidebar-nav span,
[data-theme="dark"] .sidebar-nav b,
[data-theme="dark"] .sidebar-nav i,
[data-theme="dark"] .sidebar-dropdown summary,
[data-theme="dark"] .sidebar-dropdown a {
  color: #dfeaf0;
}

[data-theme="dark"] .sidebar-nav a,
[data-theme="dark"] .sidebar-dropdown summary,
[data-theme="dark"] .sidebar-dropdown a {
  background: transparent;
  border-color: transparent;
}

[data-theme="dark"] .sidebar-nav a:hover,
[data-theme="dark"] .sidebar-dropdown summary:hover,
[data-theme="dark"] .sidebar-dropdown a:hover,
[data-theme="dark"] .sidebar-nav a.active,
[data-theme="dark"] .sidebar-nav a.is-active {
  background: rgba(72, 184, 173, 0.12);
  color: #5fe1d5;
}

[data-theme="dark"] .sidebar-dropdown > div {
  border-right-color: rgba(72, 184, 173, 0.22);
  background: rgba(14, 21, 28, 0.38);
}

[data-theme="dark"] .sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .topbar {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .topbar .page-heading {
  background: transparent;
  border: 0;
  box-shadow: none;
}

[data-theme="dark"] .page-heading h1,
[data-theme="dark"] .page-heading h2,
[data-theme="dark"] .page-heading strong,
[data-theme="dark"] .page-heading p,
[data-theme="dark"] .page-heading span,
[data-theme="dark"] .page-heading small {
  color: #eef3f5;
}

[data-theme="dark"] .heading-date {
  background: linear-gradient(135deg, #17232d 0%, #131e28 100%);
  border-color: #2a3740;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .heading-date span,
[data-theme="dark"] .heading-date strong {
  color: #dfeaf0;
}

[data-theme="dark"] .user-profile:hover,
[data-theme="dark"] .user-profile:focus-visible,
[data-theme="dark"] .notification-button:hover {
  background: #1a232c;
}

[data-theme="dark"] .user-details strong,
[data-theme="dark"] .profile-menu-header strong {
  color: #eef3f5;
}

[data-theme="dark"] .user-details span,
[data-theme="dark"] .profile-menu-header span,
[data-theme="dark"] .topbar-actions .icon-button,
[data-theme="dark"] .topbar-divider {
  color: #93a1a9;
}

[data-theme="dark"] .notification-button {
  background: #1a232c;
  color: #dfeaf0;
  border: 1px solid #2a3740;
}

[data-theme="dark"] .notifications-menu,
[data-theme="dark"] .profile-menu,
[data-theme="dark"] .notification-modal-dialog {
  background: #161f28;
  border-color: #26323b;
  color: #d7e0e4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .notifications-menu-header,
[data-theme="dark"] .notification-modal-heading,
[data-theme="dark"] .profile-menu-divider,
[data-theme="dark"] .notification-detail-row {
  border-color: #26323b;
}

[data-theme="dark"] .notifications-menu-header,
[data-theme="dark"] .notification-modal-heading {
  background: linear-gradient(135deg, #1a232c 0%, #151d25 100%);
}

[data-theme="dark"] .notifications-menu-header button,
[data-theme="dark"] .notification-item,
[data-theme="dark"] .notification-item strong,
[data-theme="dark"] .notification-item span,
[data-theme="dark"] .notification-item small,
[data-theme="dark"] .notification-detail-row small,
[data-theme="dark"] .notification-detail-row strong,
[data-theme="dark"] .notification-modal-heading small,
[data-theme="dark"] .notification-modal-heading h2,
[data-theme="dark"] .profile-menu button {
  color: #dfeaf0;
}

[data-theme="dark"] .notification-item {
  background: transparent;
  border-bottom-color: #26323b;
}

[data-theme="dark"] .notification-item.is-unread {
  background: rgba(72, 184, 173, 0.08);
}

[data-theme="dark"] .notification-item-icon,
[data-theme="dark"] .notification-modal-icon {
  background: rgba(72, 184, 173, 0.14);
  color: #58c9bd;
}

[data-theme="dark"] .notification-modal-details {
  background: rgba(10, 16, 22, 0.45);
}

[data-theme="dark"] .notification-detail-row {
  background: rgba(19, 29, 38, 0.9);
  border-color: #2a3740;
}

[data-theme="dark"] .notification-detail-row small {
  color: #93a5b0;
}

[data-theme="dark"] .notification-modal-close {
  background: transparent;
  color: #b7c4ca;
}

[data-theme="dark"] .notification-modal-close:hover,
[data-theme="dark"] .notification-modal-close:focus-visible {
  background: rgba(88, 201, 189, 0.12);
  color: #7fe5d5;
}

[data-theme="dark"] .notification-action.accept {
  background: #1ca58f;
}

[data-theme="dark"] .notification-action.reject {
  background: #d76e69;
}

[data-theme="dark"] .notification-action.support {
  background: #4f8ad4;
}

[data-theme="dark"] .notification-action.cancel {
  background: #23313c;
  color: #dfeaf0;
}

[data-theme="dark"] .profile-menu button:hover {
  background: #1a232c;
  color: #58c9bd;
}

[data-theme="dark"] .profile-menu .logout-action {
  color: #ff8e7d;
}

[data-theme="dark"] .content-wrap,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .content-card,
[data-theme="dark"] .map-card,
[data-theme="dark"] .performance-card,
[data-theme="dark"] .status-card,
[data-theme="dark"] .activity-card {
  background: #0f1620;
  color: #d7e0e4;
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .map-card,
[data-theme="dark"] .activity-card,
[data-theme="dark"] .performance-card,
[data-theme="dark"] .status-card,
[data-theme="dark"] .dashboard-panel {
  border-color: #26323b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .card-heading h2,
[data-theme="dark"] .card-heading p,
[data-theme="dark"] .stat-card strong,
[data-theme="dark"] .stat-top,
[data-theme="dark"] .map-card-actions,
[data-theme="dark"] .map-status,
[data-theme="dark"] .map-legend,
[data-theme="dark"] .status-list,
[data-theme="dark"] .status-list strong,
[data-theme="dark"] .activity-card .card-heading,
[data-theme="dark"] .activity-card th,
[data-theme="dark"] .activity-card td,
[data-theme="dark"] .activity-card .table-wrap,
[data-theme="dark"] .activity-card tbody,
[data-theme="dark"] .content-card .card-heading h2,
[data-theme="dark"] .content-card .card-heading p {
  color: #dfeaf0;
}

[data-theme="dark"] .card-heading p,
[data-theme="dark"] .stat-top,
[data-theme="dark"] .map-legend,
[data-theme="dark"] .status-list div,
[data-theme="dark"] .activity-card th,
[data-theme="dark"] .activity-card td,
[data-theme="dark"] .chart-y-axis,
[data-theme="dark"] .map-status,
[data-theme="dark"] .map-legend strong,
[data-theme="dark"] .map-legend span,
[data-theme="dark"] .map-legend b,
[data-theme="dark"] .chart-legend,
[data-theme="dark"] .donut span,
[data-theme="dark"] .activity-card .empty-state p {
  color: #93a1a9;
}

[data-theme="dark"] .stat-card {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .stat-card strong {
  color: #eef3f5;
}

[data-theme="dark"] .select-button,
[data-theme="dark"] .map-toggle,
[data-theme="dark"] .more-button,
[data-theme="dark"] .text-button,
[data-theme="dark"] .map-action {
  background: #1a232c;
  border-color: #2a3740;
  color: #dfeaf0;
}

[data-theme="dark"] .map-card {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .map-layout {
  background: transparent;
}

[data-theme="dark"] #delivery-map,
[data-theme="dark"] .leaflet-container {
  background: #101a22;
  border: 1px solid #26323b;
  border-radius: 12px;
}

[data-theme="dark"] .leaflet-tile {
  filter: brightness(0.72) saturate(0.75) contrast(1.18);
}

[data-theme="dark"] .leaflet-control-zoom a,
[data-theme="dark"] .leaflet-control-attribution,
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
  background: rgba(20, 29, 36, 0.92);
  border-color: #2a3740;
  color: #dfeaf0;
}

[data-theme="dark"] .leaflet-control-zoom a,
[data-theme="dark"] .leaflet-control-attribution a,
[data-theme="dark"] .leaflet-popup-content-wrapper a,
[data-theme="dark"] .leaflet-container a.leaflet-popup-close-button {
  color: #dfeaf0;
}

[data-theme="dark"] .leaflet-popup-content-wrapper {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .map-legend {
  background: #121b24;
  border: 1px solid #26323b;
  border-radius: 12px;
  color: #dfeaf0;
}

[data-theme="dark"] .legend-marker,
[data-theme="dark"] .status-dot {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .chart-lines i {
  border-top-color: rgba(147, 161, 169, 0.25);
}

[data-theme="dark"] .bar-light {
  background: rgba(72, 184, 173, 0.28);
}

[data-theme="dark"] .bar-dark {
  background: #48b8ad;
}

[data-theme="dark"] .chart-legend span,
[data-theme="dark"] .chart-y-axis,
[data-theme="dark"] .chart-y-axis span,
[data-theme="dark"] .status-list small,
[data-theme="dark"] .activity-card td,
[data-theme="dark"] .activity-card th {
  color: #93a1a9;
}

[data-theme="dark"] .donut {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .donut::before {
  background: #161f28;
}

[data-theme="dark"] table {
  background: transparent;
}

[data-theme="dark"] th,
[data-theme="dark"] td {
  border-color: #26323b !important;
}

[data-theme="dark"] tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .empty-state,
[data-theme="dark"] .placeholder-panel {
  background: #161f28;
  border-color: #26323b;
  color: #dfeaf0;
}

[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .eyebrow {
  color: #58c9bd;
}

/* Cards, panels, workspaces */
[data-theme="dark"] .finance-workspace,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .contracts-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .filter-card,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .finance-summary article,
[data-theme="dark"] .salary-cards article,
[data-theme="dark"] .advance-summary article,
[data-theme="dark"] .quick-actions,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .finance-table-wrap,
[data-theme="dark"] .employee-details-grid .employee-detail-item,
[data-theme="dark"] .disbursement-item,
[data-theme="dark"] .permission-row,
[data-theme="dark"] .user-row {
  background: #161f28;
  border-color: #26323b;
  color: #d7e0e4;
}

[data-theme="dark"] .disbursement-summary article:not(.tone-warning) {
  background: linear-gradient(155deg, #0b4a45 0%, #0d5951 60%, #127f75 100%);
}

/* Tables */
[data-theme="dark"] table { color: #c3ced3; }
[data-theme="dark"] thead,
[data-theme="dark"] thead tr { background: #1a232c; }
[data-theme="dark"] th { color: #8b98a0; border-color: #26323b !important; }
[data-theme="dark"] td { border-color: #222d36 !important; color: #c3ced3; }
[data-theme="dark"] td:first-child { color: #eef3f5 !important; }
[data-theme="dark"] tr:hover { background: #1a232c; }

/* Shared cards and form surfaces */
[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .section-card,
[data-theme="dark"] .content-panel,
[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .filter-card,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .finance-workspace,
[data-theme="dark"] .vendor-card,
[data-theme="dark"] .employee-card,
[data-theme="dark"] .contract-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .stats-panel,
[data-theme="dark"] .detail-panel,
[data-theme="dark"] .table-shell,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .list-card {
  background: #161f28;
  border-color: #26323b;
  color: #d7e0e4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .section-header,
[data-theme="dark"] .panel-heading,
[data-theme="dark"] .card-header,
[data-theme="dark"] .table-header,
[data-theme="dark"] .summary-header,
[data-theme="dark"] .title-row {
  border-color: #26323b;
  color: #eef3f5;
}

/* Forms */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .field,
[data-theme="dark"] .form-control,
[data-theme="dark"] .input-field,
[data-theme="dark"] .select-box,
[data-theme="dark"] .text-area,
[data-theme="dark"] .filter-box,
[data-theme="dark"] .search-box {
  background: #0f1620 !important;
  color: #e3ecef !important;
  border-color: #2a3740 !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] .field::placeholder,
[data-theme="dark"] .search-box::placeholder { color: #5f6d75; }
[data-theme="dark"] label,
[data-theme="dark"] .field-label,
[data-theme="dark"] .input-label,
[data-theme="dark"] .control-label { color: #93a1a9; }
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] .field:focus,
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .input-field:focus,
[data-theme="dark"] .select-box:focus,
[data-theme="dark"] .text-area:focus,
[data-theme="dark"] .filter-box:focus,
[data-theme="dark"] .search-box:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, .18) !important;
}

[data-theme="dark"] .form-row,
[data-theme="dark"] .field-row,
[data-theme="dark"] .input-group,
[data-theme="dark"] .search-group {
  background: transparent;
  border-color: #26323b;
}

[data-theme="dark"] .employees-card,
[data-theme="dark"] .section-heading,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .employees-card .table-wrap,
[data-theme="dark"] .employees-card table,
[data-theme="dark"] .employees-card tbody,
[data-theme="dark"] .employees-card tr,
[data-theme="dark"] .employees-card td,
[data-theme="dark"] .employees-card th,
[data-theme="dark"] .heading-actions select,
[data-theme="dark"] .heading-actions .search-box,
[data-theme="dark"] .empty-state {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .employees-card {
  background: #161f28;
  border-color: #26323b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .employees-card h2,
[data-theme="dark"] .employees-card p,
[data-theme="dark"] .employees-card th,
[data-theme="dark"] .employees-card td,
[data-theme="dark"] .employees-card .employee-name,
[data-theme="dark"] .employees-card .status,
[data-theme="dark"] .employees-card .row-action,
[data-theme="dark"] .employees-card .search-box input,
[data-theme="dark"] .employees-card select,
[data-theme="dark"] .employees-card .empty-state,
[data-theme="dark"] .employees-card .search-box span {
  color: #dfeaf0;
}

[data-theme="dark"] .employees-card .section-heading p,
[data-theme="dark"] .employees-card th,
[data-theme="dark"] .employees-card td,
[data-theme="dark"] .employees-card .search-box input::placeholder,
[data-theme="dark"] .employees-card select,
[data-theme="dark"] .employees-card .empty-state {
  color: #93a1a9;
}

[data-theme="dark"] .employees-card .heading-actions .search-box,
[data-theme="dark"] .employees-card select,
[data-theme="dark"] .employees-card .search-box input {
  background: #0f1620 !important;
  border-color: #2a3740 !important;
}

[data-theme="dark"] .employees-card .search-box:focus-within,
[data-theme="dark"] .employees-card select:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, .18) !important;
}

[data-theme="dark"] .employees-card th {
  color: #8b98a0;
  border-bottom-color: #26323b;
}

[data-theme="dark"] .employees-card td {
  border-top-color: #26323b;
  color: #dfeaf0;
}

[data-theme="dark"] .employees-card td:first-child {
  color: #eef3f5;
}

[data-theme="dark"] .employees-card .status.active {
  background: rgba(52, 195, 149, 0.14);
  color: #79e6c2;
}

[data-theme="dark"] .employees-card .status.leave {
  background: rgba(255, 186, 96, 0.12);
  color: #ffca7d;
}

[data-theme="dark"] .employees-card .status.offline {
  background: rgba(148, 163, 184, 0.12);
  color: #c3ced3;
}

[data-theme="dark"] .employees-card .row-action {
  background: #1a232c;
  border-color: #2a3740;
  color: #dfeaf0;
}

[data-theme="dark"] .employees-card .row-action.view-action:hover,
[data-theme="dark"] .employees-card .row-action.edit-action:hover,
[data-theme="dark"] .employees-card .row-action.delete-action:hover {
  filter: brightness(1.08);
}

[data-theme="dark"] .employees-card .row-action.edit-action {
  background: rgba(255, 193, 92, 0.12);
  color: #ffd07c;
}

[data-theme="dark"] .employees-card .row-action.delete-action {
  background: rgba(255, 116, 116, 0.12);
  color: #ff9f9f;
}

[data-theme="dark"] .employees-card .avatar {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

[data-theme="dark"] .fleet-card,
[data-theme="dark"] .fleet-card .table-wrap,
[data-theme="dark"] .fleet-card table,
[data-theme="dark"] .fleet-card thead,
[data-theme="dark"] .fleet-card tbody,
[data-theme="dark"] .fleet-card tr,
[data-theme="dark"] .fleet-card td,
[data-theme="dark"] .fleet-card th,
[data-theme="dark"] .fleet-card .search-box,
[data-theme="dark"] .fleet-card select,
[data-theme="dark"] .fleet-card .table-empty,
[data-theme="dark"] .fleet-card .summary-card,
[data-theme="dark"] .fleet-card .status,
[data-theme="dark"] .fleet-card .row-action,
[data-theme="dark"] .fleet-card .outline-button,
[data-theme="dark"] .fleet-card .secondary-button {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .fleet-card {
  background: #161f28;
  border-color: #26323b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .fleet-card h2,
[data-theme="dark"] .fleet-card p,
[data-theme="dark"] .fleet-card th,
[data-theme="dark"] .fleet-card td,
[data-theme="dark"] .fleet-card .status,
[data-theme="dark"] .fleet-card .row-action,
[data-theme="dark"] .fleet-card .search-box input,
[data-theme="dark"] .fleet-card select,
[data-theme="dark"] .fleet-card .table-empty,
[data-theme="dark"] .fleet-card .outline-button,
[data-theme="dark"] .fleet-card .secondary-button {
  color: #dfeaf0;
}

[data-theme="dark"] .fleet-card .section-heading p,
[data-theme="dark"] .fleet-card th,
[data-theme="dark"] .fleet-card .search-box input::placeholder,
[data-theme="dark"] .fleet-card select,
[data-theme="dark"] .fleet-card .table-empty,
[data-theme="dark"] .fleet-card .summary-card > div span {
  color: #93a1a9;
}

[data-theme="dark"] .fleet-card .search-box,
[data-theme="dark"] .fleet-card select,
[data-theme="dark"] .fleet-card input,
[data-theme="dark"] .fleet-card .form-grid input,
[data-theme="dark"] .fleet-card .form-grid select {
  background: #0f1620 !important;
  border-color: #2a3740 !important;
  color: #e3ecef !important;
}

[data-theme="dark"] .fleet-card .search-box:focus-within,
[data-theme="dark"] .fleet-card select:focus,
[data-theme="dark"] .fleet-card input:focus,
[data-theme="dark"] .fleet-card .form-grid input:focus,
[data-theme="dark"] .fleet-card .form-grid select:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, .18) !important;
}

[data-theme="dark"] .fleet-card th {
  color: #8b98a0;
  border-bottom-color: #26323b;
}

[data-theme="dark"] .fleet-card td {
  border-top-color: #26323b;
  color: #dfeaf0;
}

[data-theme="dark"] .fleet-card td:first-child {
  color: #eef3f5;
}

[data-theme="dark"] .fleet-card .status.available {
  background: rgba(52, 195, 149, 0.14);
  color: #79e6c2;
}

[data-theme="dark"] .fleet-card .status.active {
  background: rgba(255, 186, 96, 0.12);
  color: #ffca7d;
}

[data-theme="dark"] .fleet-card .status.maintenance {
  background: rgba(255, 116, 116, 0.12);
  color: #ff9f9f;
}

[data-theme="dark"] .fleet-card .row-action {
  background: #1a232c;
  border-color: #2a3740;
}

[data-theme="dark"] .fleet-card .row-action.delete {
  background: rgba(255, 116, 116, 0.12);
  color: #ff9f9f;
}

[data-theme="dark"] .fleet-card .outline-button,
[data-theme="dark"] .fleet-card .secondary-button {
  background: #1a232c;
  border-color: #2a3740;
}

[data-theme="dark"] .fleet-card .outline-button:hover,
[data-theme="dark"] .fleet-card .secondary-button:hover {
  filter: brightness(1.08);
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(4, 10, 16, 0.62);
}

[data-theme="dark"] .vehicle-modal {
  background: #111d27;
  border: 1px solid #26323b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-header h2,
[data-theme="dark"] .modal-header p,
[data-theme="dark"] .modal-kicker,
[data-theme="dark"] .form-grid label {
  color: #dfeaf0;
}

[data-theme="dark"] .modal-header p,
[data-theme="dark"] .form-grid input::placeholder {
  color: #93a1a9;
}

[data-theme="dark"] .form-grid input,
[data-theme="dark"] .form-grid select {
  background: #0b1720 !important;
  border-color: #2a3740 !important;
  color: #ebf5f8 !important;
}

[data-theme="dark"] .form-grid input:focus,
[data-theme="dark"] .form-grid select:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, 0.18) !important;
}

[data-theme="dark"] .modal-close {
  background: #1a232c;
  color: #dfeaf0;
  border: 1px solid #2a3740;
}

[data-theme="dark"] .modal-close:hover {
  background: #202d38;
  color: #ffffff;
}

[data-theme="dark"] .modal-footer {
  border-top-color: #26323b;
}

[data-theme="dark"] .modal-footer .secondary-button {
  background: #1a232c;
  color: #dfeaf0;
  border-color: #2a3740;
}

[data-theme="dark"] .modal-footer .primary-button {
  background: linear-gradient(135deg, #48b8ad 0%, #2ea8a1 100%);
  color: #062f2d;
  box-shadow: 0 14px 28px rgba(72, 184, 173, 0.26);
}

[data-theme="dark"] .modal-footer .primary-button:hover {
  box-shadow: 0 18px 28px rgba(72, 184, 173, 0.3);
}

[data-theme="dark"] .recruitment-card,
[data-theme="dark"] .recruitment-card .table-wrap,
[data-theme="dark"] .recruitment-card table,
[data-theme="dark"] .recruitment-card tbody,
[data-theme="dark"] .recruitment-card tr,
[data-theme="dark"] .recruitment-card td,
[data-theme="dark"] .recruitment-card th,
[data-theme="dark"] .recruitment-card .search-box,
[data-theme="dark"] .recruitment-card select,
[data-theme="dark"] .recruitment-card .table-empty,
[data-theme="dark"] .recruitment-card .summary-card,
[data-theme="dark"] .recruitment-card .assignment-modal,
[data-theme="dark"] .recruitment-card .modal-header,
[data-theme="dark"] .recruitment-card .form-grid,
[data-theme="dark"] .recruitment-card .assignment-detail,
[data-theme="dark"] .recruitment-card .row-action,
[data-theme="dark"] .recruitment-card .secondary-button {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(4, 10, 16, 0.62);
}

[data-theme="dark"] .assignment-modal {
  background: #111d27;
  border: 1px solid #26323b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .assignment-modal .modal-header,
[data-theme="dark"] .assignment-modal .modal-header h2,
[data-theme="dark"] .assignment-modal .modal-header p,
[data-theme="dark"] .assignment-modal .modal-kicker,
[data-theme="dark"] .assignment-modal .form-grid label {
  color: #dfeaf0;
}

[data-theme="dark"] .assignment-modal .modal-header p,
[data-theme="dark"] .assignment-modal .form-grid input::placeholder,
[data-theme="dark"] .assignment-modal .form-grid select {
  color: #93a1a9;
}

[data-theme="dark"] .assignment-modal .form-grid input,
[data-theme="dark"] .assignment-modal .form-grid select {
  background: #0b1720 !important;
  border-color: #2a3740 !important;
  color: #ebf5f8 !important;
}

[data-theme="dark"] .assignment-modal .form-grid input:focus,
[data-theme="dark"] .assignment-modal .form-grid select:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, 0.18) !important;
}

[data-theme="dark"] .assignment-modal .modal-close,
[data-theme="dark"] .assignment-modal .secondary-button {
  background: #1a232c;
  color: #dfeaf0;
  border: 1px solid #2a3740;
}

[data-theme="dark"] .assignment-modal .modal-close:hover,
[data-theme="dark"] .assignment-modal .secondary-button:hover {
  background: #202d38;
  color: #ffffff;
}

[data-theme="dark"] .assignment-modal .modal-footer {
  border-top-color: #26323b;
}

[data-theme="dark"] .assignment-modal .primary-button {
  background: linear-gradient(135deg, #48b8ad 0%, #2ea8a1 100%);
  color: #062f2d;
  box-shadow: 0 14px 28px rgba(72, 184, 173, 0.26);
}

[data-theme="dark"] .assignment-modal .primary-button:hover {
  box-shadow: 0 18px 28px rgba(72, 184, 173, 0.3);
}

[data-theme="dark"] .recruitment-card {
  background: #161f28;
  border-color: #26323b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .recruitment-card h2,
[data-theme="dark"] .recruitment-card p,
[data-theme="dark"] .recruitment-card th,
[data-theme="dark"] .recruitment-card td,
[data-theme="dark"] .recruitment-card .search-box,
[data-theme="dark"] .recruitment-card select,
[data-theme="dark"] .recruitment-card .table-empty,
[data-theme="dark"] .recruitment-card .assignment-detail span,
[data-theme="dark"] .recruitment-card .assignment-detail strong,
[data-theme="dark"] .recruitment-card .summary-card span,
[data-theme="dark"] .recruitment-card .summary-card strong,
[data-theme="dark"] .recruitment-card .row-action,
[data-theme="dark"] .recruitment-card .secondary-button {
  color: #dfeaf0;
}

[data-theme="dark"] .recruitment-card .section-heading p,
[data-theme="dark"] .recruitment-card th,
[data-theme="dark"] .recruitment-card .search-box input::placeholder,
[data-theme="dark"] .recruitment-card select,
[data-theme="dark"] .recruitment-card .table-empty,
[data-theme="dark"] .recruitment-card .summary-card > div span,
[data-theme="dark"] .recruitment-card .assignment-detail span {
  color: #93a1a9;
}

[data-theme="dark"] .recruitment-card .search-box,
[data-theme="dark"] .recruitment-card select,
[data-theme="dark"] .recruitment-card input,
[data-theme="dark"] .recruitment-card .form-grid input,
[data-theme="dark"] .recruitment-card .form-grid select {
  background: #0f1620 !important;
  border-color: #2a3740 !important;
  color: #e3ecef !important;
}

[data-theme="dark"] .recruitment-card .search-box:focus-within,
[data-theme="dark"] .recruitment-card select:focus,
[data-theme="dark"] .recruitment-card input:focus,
[data-theme="dark"] .recruitment-card .form-grid input:focus,
[data-theme="dark"] .recruitment-card .form-grid select:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, .18) !important;
}

[data-theme="dark"] .recruitment-card th {
  color: #8b98a0;
  border-bottom-color: #26323b;
}

[data-theme="dark"] .recruitment-card td {
  border-top-color: #26323b;
  color: #dfeaf0;
}

[data-theme="dark"] .recruitment-card .status,
[data-theme="dark"] .recruitment-card .pill {
  background: rgba(72,184,173,0.12);
  color: #79e6c2;
}

[data-theme="dark"] .recruitment-card .row-action {
  background: #1a232c;
  border-color: #2a3740;
}

[data-theme="dark"] .recruitment-card .row-action:hover {
  filter: brightness(1.08);
}

[data-theme="dark"] .recruitment-card .row-action.delete-action {
  background: rgba(255, 116, 116, 0.12);
  color: #ff9f9f;
}

[data-theme="dark"] .recruitment-card .summary-card {
  background: #161f28;
}

[data-theme="dark"] .recruitment-card .summary-icon {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

[data-theme="dark"] .finance-page,
[data-theme="dark"] .finance-summary article,
[data-theme="dark"] .quick-actions,
[data-theme="dark"] .finance-workspace,
[data-theme="dark"] .finance-tab,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .panel-tools input,
[data-theme="dark"] .panel-tools select,
[data-theme="dark"] .outline-button,
[data-theme="dark"] .finance-table-wrap,
[data-theme="dark"] .finance-table-wrap table,
[data-theme="dark"] .finance-table-wrap th,
[data-theme="dark"] .finance-table-wrap td,
[data-theme="dark"] .advance-summary article,
[data-theme="dark"] .salary-cards article,
[data-theme="dark"] .salary-monthly-review,
[data-theme="dark"] .finance-modal,
[data-theme="dark"] .finance-form-grid input,
[data-theme="dark"] .finance-form-grid select,
[data-theme="dark"] .finance-form-grid textarea,
[data-theme="dark"] .employee-detail-item,
[data-theme="dark"] .disbursement-item,
[data-theme="dark"] .disbursement-item-actions input,
[data-theme="dark"] .disbursement-item-actions button {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .finance-workspace,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .finance-summary article,
[data-theme="dark"] .quick-actions,
[data-theme="dark"] .advance-summary article,
[data-theme="dark"] .salary-cards article,
[data-theme="dark"] .salary-monthly-review,
[data-theme="dark"] .employee-detail-item,
[data-theme="dark"] .disbursement-item {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .finance-page .page-heading,
[data-theme="dark"] .finance-workspace,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .finance-summary article,
[data-theme="dark"] .quick-actions,
[data-theme="dark"] .advance-summary article,
[data-theme="dark"] .salary-cards article,
[data-theme="dark"] .salary-monthly-review,
[data-theme="dark"] .employee-detail-item,
[data-theme="dark"] .disbursement-item {
  background: #161f28;
}

[data-theme="dark"] .finance-page .page-heading {
  border-color: #26323b;
}

[data-theme="dark"] .finance-page .page-heading h1,
[data-theme="dark"] .finance-page .page-heading p,
[data-theme="dark"] .finance-page .breadcrumb,
[data-theme="dark"] .finance-page .heading-date span,
[data-theme="dark"] .finance-page .heading-date strong,
[data-theme="dark"] .finance-page .finance-summary small,
[data-theme="dark"] .finance-page .finance-summary strong,
[data-theme="dark"] .finance-page .panel-heading h2,
[data-theme="dark"] .finance-page .panel-heading p,
[data-theme="dark"] .finance-page .finance-tab strong,
[data-theme="dark"] .finance-page .finance-tab small,
[data-theme="dark"] .finance-page .finance-table-wrap th,
[data-theme="dark"] .finance-page .finance-table-wrap td,
[data-theme="dark"] .finance-page .advance-summary span,
[data-theme="dark"] .finance-page .advance-summary strong,
[data-theme="dark"] .finance-page .salary-cards article span,
[data-theme="dark"] .finance-page .salary-cards article strong,
[data-theme="dark"] .finance-page .employee-detail-item small,
[data-theme="dark"] .finance-page .employee-detail-item strong,
[data-theme="dark"] .finance-page .disbursement-item-info strong,
[data-theme="dark"] .finance-page .disbursement-item-info span,
[data-theme="dark"] .finance-page .table-empty,
[data-theme="dark"] .finance-page .quick-actions p,
[data-theme="dark"] .finance-page .quick-actions h2,
[data-theme="dark"] .finance-page .panel-tools input,
[data-theme="dark"] .finance-page .panel-tools select,
[data-theme="dark"] .finance-page .outline-button,
[data-theme="dark"] .finance-page .modal-heading h2,
[data-theme="dark"] .finance-page .modal-heading p,
[data-theme="dark"] .finance-page .finance-form-grid label,
[data-theme="dark"] .finance-page .finance-form-grid input,
[data-theme="dark"] .finance-page .finance-form-grid select,
[data-theme="dark"] .finance-page .finance-form-grid textarea {
  color: #dfeaf0;
}

[data-theme="dark"] .finance-page .finance-summary small,
[data-theme="dark"] .finance-page .panel-heading p,
[data-theme="dark"] .finance-page .finance-tab small,
[data-theme="dark"] .finance-page .table-empty,
[data-theme="dark"] .finance-page .advance-summary span,
[data-theme="dark"] .finance-page .salary-cards article small,
[data-theme="dark"] .finance-page .employee-detail-item small,
[data-theme="dark"] .finance-page .disbursement-item-info span,
[data-theme="dark"] .finance-page .quick-actions p,
[data-theme="dark"] .finance-page .modal-heading p,
[data-theme="dark"] .finance-page .finance-form-grid label {
  color: #93a1a9;
}

[data-theme="dark"] .finance-page .finance-tab {
  background: #141d27;
  border-color: #26323b;
}

[data-theme="dark"] .finance-page .finance-tab.active {
  background: #161f28;
  box-shadow: inset 0 -3px #48b8ad;
}

[data-theme="dark"] .finance-page .finance-tab > span {
  background: rgba(72, 184, 173, 0.12);
  color: #58c9bd;
}

[data-theme="dark"] .finance-page .finance-tab strong,
[data-theme="dark"] .finance-page .finance-tab small {
  color: #dfeaf0;
}

[data-theme="dark"] .finance-page .panel-tools input,
[data-theme="dark"] .finance-page .panel-tools select,
[data-theme="dark"] .finance-page .finance-form-grid input,
[data-theme="dark"] .finance-page .finance-form-grid select,
[data-theme="dark"] .finance-page .finance-form-grid textarea,
[data-theme="dark"] .finance-page .disbursement-item-actions input {
  background: #0f1620 !important;
  border-color: #2a3740 !important;
  color: #e3ecef !important;
}

[data-theme="dark"] .finance-page .panel-tools input:focus,
[data-theme="dark"] .finance-page .panel-tools select:focus,
[data-theme="dark"] .finance-page .finance-form-grid input:focus,
[data-theme="dark"] .finance-page .finance-form-grid select:focus,
[data-theme="dark"] .finance-page .finance-form-grid textarea:focus,
[data-theme="dark"] .finance-page .disbursement-item-actions input:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, .18) !important;
}

[data-theme="dark"] .finance-page .outline-button {
  background: #12241f;
  border-color: #1d4844;
  color: #58c9bd;
}

[data-theme="dark"] .finance-page .outline-button:hover {
  background: #163229;
}

[data-theme="dark"] .finance-page .finance-table-wrap th,
[data-theme="dark"] .finance-page .finance-table-wrap td {
  border-color: #26323b;
}

[data-theme="dark"] .finance-page .finance-status {
  background: rgba(52, 195, 149, 0.14);
  color: #79e6c2;
}

[data-theme="dark"] .finance-page .finance-status.pending {
  background: rgba(255, 186, 96, 0.12);
  color: #ffca7d;
}

[data-theme="dark"] .finance-page .finance-status.rejected {
  background: rgba(255, 116, 116, 0.12);
  color: #ff9f9f;
}

[data-theme="dark"] .finance-page .disbursement-item {
  background: #141d27;
}

[data-theme="dark"] .finance-page .disbursement-item-info strong,
[data-theme="dark"] .finance-page .disbursement-item-info span {
  color: #dfeaf0;
}

[data-theme="dark"] .finance-page .disbursement-item-actions button {
  background: #1a7b72;
  color: #eafdf9;
}

[data-theme="dark"] .finance-page .disbursement-item-actions .reject-button {
  background: #b54842;
}

[data-theme="dark"] .finance-page .modal-close {
  background: #1a232c;
  color: #dfeaf0;
}

[data-theme="dark"] .report-card.quick-card,
[data-theme="dark"] .report-card.quick-card .section-heading,
[data-theme="dark"] .report-card.quick-card .quick-report,
[data-theme="dark"] .settings-layout,
[data-theme="dark"] .settings-tabs,
[data-theme="dark"] .settings-tab,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .settings-card .section-heading,
[data-theme="dark"] .settings-card .form-grid,
[data-theme="dark"] .settings-card .appearance-option,
[data-theme="dark"] .settings-card .toggle,
[data-theme="dark"] .settings-card .card-actions,
[data-theme="dark"] .settings-card .users-card,
[data-theme="dark"] .settings-card .user-modal-dialog,
[data-theme="dark"] .settings-card .user-form-grid,
[data-theme="dark"] .settings-card .permission-options,
[data-theme="dark"] .settings-card .user-password-grid {
  background: #161f28;
  border-color: #26323b;
}

[data-theme="dark"] .report-card.quick-card,
[data-theme="dark"] .settings-tabs,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .settings-card .users-card,
[data-theme="dark"] .settings-card .user-modal-dialog {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .report-card.quick-card,
[data-theme="dark"] .report-card.quick-card .section-heading h2,
[data-theme="dark"] .report-card.quick-card .section-heading p,
[data-theme="dark"] .report-card.quick-card .quick-report,
[data-theme="dark"] .settings-tabs,
[data-theme="dark"] .settings-tab,
[data-theme="dark"] .settings-tab strong,
[data-theme="dark"] .settings-tab small,
[data-theme="dark"] .settings-card h2,
[data-theme="dark"] .settings-card p,
[data-theme="dark"] .settings-card label,
[data-theme="dark"] .settings-card .appearance-option strong,
[data-theme="dark"] .settings-card .appearance-option small,
[data-theme="dark"] .settings-card .toggle-title,
[data-theme="dark"] .settings-card .toggle-subtitle,
[data-theme="dark"] .settings-card .user-modal-header h2,
[data-theme="dark"] .settings-card .user-modal-header p,
[data-theme="dark"] .settings-card .user-form-grid label,
[data-theme="dark"] .settings-card .permission-options label,
[data-theme="dark"] .settings-card .user-password-grid label {
  color: #dfeaf0;
}

[data-theme="dark"] .report-card.quick-card .section-heading p,
[data-theme="dark"] .settings-tab small,
[data-theme="dark"] .settings-card p,
[data-theme="dark"] .settings-card .appearance-option small,
[data-theme="dark"] .settings-card .toggle-subtitle,.settings-card .user-modal-header p,
[data-theme="dark"] .settings-card .user-form-grid input::placeholder,
[data-theme="dark"] .settings-card .user-password-grid input::placeholder {
  color: #93a1a9;
}

[data-theme="dark"] .settings-tab {
  background: transparent;
  border-color: transparent;
}

[data-theme="dark"] .settings-tab.active,
[data-theme="dark"] .settings-tab:hover {
  background: rgba(72, 184, 173, 0.12);
  color: #58c9bd;
}

[data-theme="dark"] .settings-tab b {
  background: rgba(72, 184, 173, 0.12);
  color: #58c9bd;
}

[data-theme="dark"] .report-card.quick-card .quick-report {
  background: #1a232c;
  border-color: #2a3740;
}

[data-theme="dark"] .report-card.quick-card .quick-report:hover {
  background: #1d2c37;
}

[data-theme="dark"] .settings-card input,
[data-theme="dark"] .settings-card select,
[data-theme="dark"] .settings-card textarea,
[data-theme="dark"] .user-form-grid input,
[data-theme="dark"] .user-form-grid select,
[data-theme="dark"] .user-password-grid input {
  background: #0f1620 !important;
  color: #e3ecef !important;
  border-color: #2a3740 !important;
}

[data-theme="dark"] .settings-card input:focus,
[data-theme="dark"] .settings-card select:focus,
[data-theme="dark"] .settings-card textarea:focus,
[data-theme="dark"] .user-form-grid input:focus,
[data-theme="dark"] .user-form-grid select:focus,
[data-theme="dark"] .user-password-grid input:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, .18) !important;
}

[data-theme="dark"] .settings-card .toggle-switch,
[data-theme="dark"] .settings-card .switch,
[data-theme="dark"] .settings-card .theme-chip {
  background: #1a232c;
  border-color: #2a3740;
}

[data-theme="dark"] .settings-card .theme-chip.active {
  background: rgba(72, 184, 173, 0.12);
  border-color: #2b6d68;
  color: #58c9bd;
}

[data-theme="dark"] .settings-card .user-action-button,
[data-theme="dark"] .settings-card .modal-close-button,
[data-theme="dark"] .settings-card .save-account-button,
[data-theme="dark"] .settings-card .edit-account-button {
  border-color: #2a3740;
}

[data-theme="dark"] .user-modal {
  background: rgba(4, 10, 16, 0.62);
}

[data-theme="dark"] .user-modal-dialog {
  background: #111d27;
  border-color: #26323b;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .user-modal-header h2,
[data-theme="dark"] .user-modal-header p,
[data-theme="dark"] .user-modal-header .modal-eyebrow,
[data-theme="dark"] .user-form-grid label,
[data-theme="dark"] .user-password-grid label,
[data-theme="dark"] .user-permissions h3,
[data-theme="dark"] .permission-options label {
  color: #dfeaf0;
}

[data-theme="dark"] .user-modal-header p,
[data-theme="dark"] .user-form-grid input::placeholder,
[data-theme="dark"] .user-password-grid input::placeholder {
  color: #93a1a9;
}

[data-theme="dark"] .user-form-grid input,
[data-theme="dark"] .user-form-grid select,
[data-theme="dark"] .user-password-grid input {
  background: #0b1720 !important;
  border-color: #2a3740 !important;
  color: #ebf5f8 !important;
}

[data-theme="dark"] .user-form-grid input:focus,
[data-theme="dark"] .user-form-grid select:focus,
[data-theme="dark"] .user-password-grid input:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, 0.18) !important;
}

[data-theme="dark"] .user-permissions {
  border-top-color: #26323b;
}

[data-theme="dark"] .permission-options label {
  background: rgba(17, 29, 39, 0.9);
  border-color: #2a3740;
}

[data-theme="dark"] .modal-close-button,
[data-theme="dark"] .modal-cancel-button {
  background: #1a232c;
  color: #dfeaf0;
  border: 1px solid #2a3740;
}

[data-theme="dark"] .modal-close-button:hover,
[data-theme="dark"] .modal-cancel-button:hover {
  background: #202d38;
  color: #ffffff;
}

[data-theme="dark"] .user-save-button {
  background: linear-gradient(135deg, #48b8ad 0%, #2ea8a1 100%);
  color: #062f2d;
  box-shadow: 0 14px 28px rgba(72, 184, 173, 0.26);
}

[data-theme="dark"] .user-save-button:hover {
  box-shadow: 0 18px 28px rgba(72, 184, 173, 0.3);
}

/* Final polish: spacing, typography, buttons and icons */
html[data-theme="dark"] .operations-page,
[data-theme="dark"] .operations-page .page-heading,
[data-theme="dark"] .operations-page .operations-toolbar,
[data-theme="dark"] .operations-page .empty-driver,
[data-theme="dark"] .operations-page .driver-summary,
[data-theme="dark"] .operations-page .operations-card,
[data-theme="dark"] .operations-page .metric-card,
[data-theme="dark"] .operations-page .orders-photo-frame {
  background: #161f28;
  border-color: #26323b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .operations-page {
  color: #dfeaf0;
}

[data-theme="dark"] .operations-page .page-heading,
[data-theme="dark"] .operations-page .operations-toolbar,
[data-theme="dark"] .operations-page .empty-driver,
[data-theme="dark"] .operations-page .driver-summary,
[data-theme="dark"] .operations-page .operations-card,
[data-theme="dark"] .operations-page .metric-card,
[data-theme="dark"] .operations-page .orders-photo-frame {
  background: rgba(17, 29, 39, 0.96);
}

[data-theme="dark"] .operations-page .breadcrumb,
[data-theme="dark"] .operations-page .page-heading p:last-child,
[data-theme="dark"] .operations-page .operations-toolbar label,
[data-theme="dark"] .operations-page .overview-count,
[data-theme="dark"] .operations-page th,
[data-theme="dark"] .operations-page td,
[data-theme="dark"] .operations-page .card-heading p,
[data-theme="dark"] .operations-page .driver-identity span,
[data-theme="dark"] .operations-page .driver-identity p,
[data-theme="dark"] .operations-page .metric-card span,
[data-theme="dark"] .operations-page .metric-card small,
[data-theme="dark"] .operations-page .operation-action small,
[data-theme="dark"] .operations-page .timeline small,
[data-theme="dark"] .operations-page .orders-photo-frame p,
[data-theme="dark"] .operations-page .empty-driver p {
  color: #93a1a9;
}

[data-theme="dark"] .operations-page .page-heading h1,
[data-theme="dark"] .operations-page .card-heading h2,
[data-theme="dark"] .operations-page .driver-identity h2,
[data-theme="dark"] .operations-page .empty-driver h2,
[data-theme="dark"] .operations-page .timeline strong,
[data-theme="dark"] .operations-page .metric-card strong,
[data-theme="dark"] .operations-page .overview-driver,
[data-theme="dark"] .operations-page td:first-child {
  color: #eef3f5;
}

[data-theme="dark"] .operations-page .heading-date,
[data-theme="dark"] .operations-page .live-indicator {
  background: linear-gradient(135deg, #17232d 0%, #131e28 100%);
  border-color: #2a3740;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .operations-page .heading-date span,
[data-theme="dark"] .operations-page .heading-date strong,
[data-theme="dark"] .operations-page .live-indicator {
  color: #dfeaf0;
}

[data-theme="dark"] .operations-page .live-indicator {
  background: rgba(52, 195, 149, 0.12);
  color: #79e6c2;
}

[data-theme="dark"] .operations-page .operations-toolbar select,
[data-theme="dark"] .operations-page textarea,
[data-theme="dark"] .operations-page .overview-action,
[data-theme="dark"] .operations-page .operation-action,
[data-theme="dark"] .operations-page .save-report,
[data-theme="dark"] .operations-page .photo-open {
  background: #0f1620;
  border-color: #2a3740;
  color: #e3ecef;
}

[data-theme="dark"] .operations-page .operations-toolbar select:focus,
[data-theme="dark"] .operations-page textarea:focus,
[data-theme="dark"] .operations-page .overview-action:focus,
[data-theme="dark"] .operations-page .operation-action:focus,
[data-theme="dark"] .operations-page .save-report:focus {
  border-color: #48b8ad !important;
  box-shadow: 0 0 0 3px rgba(72, 184, 173, 0.18) !important;
}

[data-theme="dark"] .operations-page .overview-action,
[data-theme="dark"] .operations-page .operation-action,
[data-theme="dark"] .operations-page .save-report,
[data-theme="dark"] .operations-page .photo-open {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

[data-theme="dark"] .operations-page .overview-action,
[data-theme="dark"] .operations-page .operation-action,
[data-theme="dark"] .operations-page .save-report {
  background: linear-gradient(135deg, #1a232c 0%, #1d2b37 100%);
}

[data-theme="dark"] .operations-page .overview-action:hover,
[data-theme="dark"] .operations-page .operation-action:hover,
[data-theme="dark"] .operations-page .save-report:hover,
[data-theme="dark"] .operations-page .photo-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .operations-page .operation-action.start strong,
[data-theme="dark"] .operations-page .operation-action.orders strong,
[data-theme="dark"] .operations-page .operation-action.end strong,
[data-theme="dark"] .operations-page .save-report,
[data-theme="dark"] .operations-page .photo-open {
  color: #58c9bd;
}

[data-theme="dark"] .operations-page .metric-card.teal strong { color: #5fe1d5; }
[data-theme="dark"] .operations-page .metric-card.orange strong { color: #ffc063; }
[data-theme="dark"] .operations-page .metric-card.blue strong { color: #7bb5ff; }
[data-theme="dark"] .operations-page .metric-card.purple strong { color: #b694ff; }

[data-theme="dark"] .operations-page .overview-status.connected {
  background: rgba(52, 195, 149, 0.14);
  color: #79e6c2;
}

[data-theme="dark"] .operations-page .overview-status.disconnected {
  background: rgba(148, 163, 184, 0.12);
  color: #dfeaf0;
}

[data-theme="dark"] .operations-page .driver-state {
  background: rgba(255, 186, 96, 0.12);
  color: #ffca7d;
}

[data-theme="dark"] .operations-page .driver-state.active {
  background: rgba(123, 181, 255, 0.12);
  color: #97c0ff;
}

[data-theme="dark"] .operations-page .driver-state.completed {
  background: rgba(52, 195, 149, 0.14);
  color: #79e6c2;
}

[data-theme="dark"] .operations-page .timeline {
  border-color: #26323b;
}

[data-theme="dark"] .operations-page .timeline i,
[data-theme="dark"] .operations-page .timeline .done,
[data-theme="dark"] .operations-page .timeline #timeline-start-dot,
[data-theme="dark"] .operations-page .timeline #timeline-orders-dot,
[data-theme="dark"] .operations-page .timeline #timeline-end-dot {
  background: #1d2b37;
  border-color: #2a3740;
}

[data-theme="dark"] .operations-page .timeline .done,
[data-theme="dark"] .operations-page .timeline #timeline-start-dot.done,
[data-theme="dark"] .operations-page .timeline #timeline-orders-dot.done,
[data-theme="dark"] .operations-page .timeline #timeline-end-dot.done {
  background: #48b8ad;
  box-shadow: 0 0 0 4px rgba(72, 184, 173, 0.14);
}

[data-theme="dark"] .operations-page table,
[data-theme="dark"] .operations-page th,
[data-theme="dark"] .operations-page td {
  border-color: #26323b;
}

[data-theme="dark"] .operations-page .table-empty {
  color: #93a1a9;
}

[data-theme="dark"] .operations-page .orders-photo-frame {
  background: rgba(14, 21, 28, 0.7);
  border-style: dashed;
  border-color: #2a3740;
}

[data-theme="dark"] .operations-page .empty-driver {
  background: rgba(17, 29, 39, 0.9);
  border-style: dashed;
}

[data-theme="dark"] .page-heading,
html[data-theme="dark"] .card-heading,
html[data-theme="dark"] .section-heading,
html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .summary-header,
html[data-theme="dark"] .title-row {
  gap: 12px;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .page-heading h1,
[data-theme="dark"] .card-heading h2,
[data-theme="dark"] .section-heading h2,
[data-theme="dark"] .panel-heading h2 {
  letter-spacing: -0.02em;
  line-height: 1.3;
}

[data-theme="dark"] .page-heading h1 { font-size: clamp(1.4rem, 1.9vw, 2.2rem); }
[data-theme="dark"] .card-heading h2,
[data-theme="dark"] .section-heading h2,
[data-theme="dark"] .panel-heading h2 { font-size: 1.02rem; }

[data-theme="dark"] .content-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .operations-card,
[data-theme="dark"] .employees-card,
[data-theme="dark"] .fleet-card,
[data-theme="dark"] .recruitment-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(3, 8, 12, 0.18), inset 0 1px 0 rgba(255,255,255,0.03);
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .finance-panel,
[data-theme="dark"] .operations-card,
[data-theme="dark"] .employees-card,
[data-theme="dark"] .fleet-card,
[data-theme="dark"] .recruitment-card,
[data-theme="dark"] .dashboard-panel {
  padding: 20px 22px;
}

[data-theme="dark"] .table-wrap,
[data-theme="dark"] .finance-table-wrap,
[data-theme="dark"] .table-shell {
  border-radius: 12px;
  overflow: hidden;
}

[data-theme="dark"] .primary-button,
[data-theme="dark"] .secondary-button,
[data-theme="dark"] .cancel-button,
[data-theme="dark"] .outline-button,
[data-theme="dark"] .select-button,
[data-theme="dark"] .map-toggle,
[data-theme="dark"] .text-button,
[data-theme="dark"] .notification-action,
[data-theme="dark"] .save-account-button,
[data-theme="dark"] .user-action-button,
[data-theme="dark"] .row-action,
[data-theme="dark"] .modal-close-button,
[data-theme="dark"] .overview-action,
[data-theme="dark"] .operation-action {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

[data-theme="dark"] .primary-button,
[data-theme="dark"] .secondary-button,
[data-theme="dark"] .cancel-button,
[data-theme="dark"] .outline-button,
[data-theme="dark"] .select-button,
[data-theme="dark"] .map-toggle,
[data-theme="dark"] .notification-action {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .primary-button,
[data-theme="dark"] .save-account-button,
[data-theme="dark"] .user-action-button,
[data-theme="dark"] .notification-action.accept,
[data-theme="dark"] .notification-action.support {
  background: linear-gradient(135deg, #1a7b72 0%, #22a096 100%);
  color: #ebfffb;
  border-color: transparent;
}

[data-theme="dark"] .secondary-button,
[data-theme="dark"] .cancel-button,
[data-theme="dark"] .map-toggle,
[data-theme="dark"] .select-button,
[data-theme="dark"] .row-action,
[data-theme="dark"] .overview-action,
[data-theme="dark"] .operation-action {
  background: #1a232c;
  color: #dfeaf0;
  border: 1px solid #2a3740;
}

[data-theme="dark"] .outline-button {
  background: rgba(72, 184, 173, 0.08);
  color: #58c9bd;
  border: 1px solid rgba(72, 184, 173, 0.32);
}

[data-theme="dark"] .primary-button:hover,
[data-theme="dark"] .secondary-button:hover,
[data-theme="dark"] .cancel-button:hover,
[data-theme="dark"] .outline-button:hover,
[data-theme="dark"] .select-button:hover,
[data-theme="dark"] .map-toggle:hover,
[data-theme="dark"] .notification-action:hover,
[data-theme="dark"] .save-account-button:hover,
[data-theme="dark"] .user-action-button:hover,
[data-theme="dark"] .row-action:hover,
[data-theme="dark"] .modal-close-button:hover,
[data-theme="dark"] .overview-action:hover,
[data-theme="dark"] .operation-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .icon-button,
[data-theme="dark"] .notification-button,
[data-theme="dark"] .more-button,
[data-theme="dark"] .modal-close,
[data-theme="dark"] .sidebar-toggle {
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

[data-theme="dark"] .icon-button:hover,
[data-theme="dark"] .notification-button:hover,
[data-theme="dark"] .more-button:hover,
[data-theme="dark"] .modal-close:hover,
[data-theme="dark"] .sidebar-toggle:hover {
  transform: translateY(-1px);
}

[data-theme="dark"] .notification-button,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .sidebar-toggle {
  background: #1a232c;
  border: 1px solid #2a3740;
  color: #dfeaf0;
}

[data-theme="dark"] .notification-button .bell-icon,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .more-button,
[data-theme="dark"] .sidebar-toggle,
[data-theme="dark"] .map-toggle,
[data-theme="dark"] .select-button {
  font-size: 1rem;
}

[data-theme="dark"] .status-dot,
[data-theme="dark"] .mini-avatar,
[data-theme="dark"] .avatar,
[data-theme="dark"] .brand-mark,
[data-theme="dark"] .support-icon {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.04);
}

[data-theme="dark"] .page-heading,
[data-theme="dark"] .topbar,
[data-theme="dark"] .content-wrap,
[data-theme="dark"] .dashboard-grid,
[data-theme="dark"] .stats-grid,
[data-theme="dark"] .map-layout {
  gap: 18px;
}

[data-theme="dark"] .content-wrap {
  padding-top: 30px;
}

/* Modals */
[data-theme="dark"] .finance-modal-backdrop,
[data-theme="dark"] .modal-backdrop,
[data-theme="dark"] .notification-modal,
[data-theme="dark"] .app-notify-backdrop.is-visible {
  background: rgba(3, 8, 12, .72);
}
[data-theme="dark"] .finance-modal,
[data-theme="dark"] .employee-modal,
[data-theme="dark"] .contract-modal,
[data-theme="dark"] .user-modal,
[data-theme="dark"] .app-notify-box {
  background: #161f28;
  color: #d7e0e4;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .5);
}

/* Status badges keep their color but gain a touch more contrast */
[data-theme="dark"] .finance-status,
[data-theme="dark"] .status {
  filter: brightness(1.1) saturate(1.1);
}

/* Empty/table-empty states */
[data-theme="dark"] .table-empty,
[data-theme="dark"] .empty-panel,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .notifications-empty {
  color: #6d7b83;
  border-color: #26323b;
}

/* Scrollbars */
[data-theme="dark"] ::-webkit-scrollbar-track { background: #10171d; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2a3740; border-radius: 8px; }

[data-theme="dark"] .reports-page .toolbar-card,
[data-theme="dark"] .reports-page .metric-card,
[data-theme="dark"] .reports-page .panel,
[data-theme="dark"] .reports-page .chart-wrap,
[data-theme="dark"] .reports-page .mini-list li,
[data-theme="dark"] .reports-page .quick-report {
  background: #161f28;
  border-color: #26323b;
  color: #dfeaf0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="dark"] .reports-page .page-header p,
[data-theme="dark"] .reports-page .filter-title p,
[data-theme="dark"] .reports-page .metric-card p,
[data-theme="dark"] .reports-page .metric-card small,
[data-theme="dark"] .reports-page .panel-summary,
[data-theme="dark"] .reports-page .mini-list small,
[data-theme="dark"] .reports-page .zone-row small,
[data-theme="dark"] .reports-page .date-pill span,
[data-theme="dark"] .reports-page .chart-legend,
[data-theme="dark"] .reports-page .chart-labels {
  color: #93a1a9;
}

[data-theme="dark"] .reports-page .date-pill,
[data-theme="dark"] .reports-page .ghost-button,
[data-theme="dark"] .reports-page .quick-report,
[data-theme="dark"] .reports-page .toolbar-fields select {
  background: #0f1620;
  border-color: #2a3740;
  color: #e3ecef;
}

[data-theme="dark"] .reports-page .quick-report span,
[data-theme="dark"] .reports-page .eyebrow,
[data-theme="dark"] .reports-page .mini-label {
  color: #58c9bd;
}
