/* ==========================================================================
   DC Theme Layer — Зелёный милитари-пиксель
   Подключается последним, перекрывает view-CSS.
   Только косметика: цвета, фоны, бордеры, прозрачность.
   ========================================================================== */

/* --- Фон: камуфляж на весь экран без отступов и тёмных полос --- */
/* Фон на корневом html проецируется на весь холст (canvas) браузера,
   поэтому даже при схлопывании margin сверху не остаётся тёмной полосы. */
html[data-theme="military"] {
  min-height: 100%;
  background-color: var(--bg-page-solid, #12160c);
}

[data-theme="military"] body {
  margin: 0;
  min-height: 100vh;
  background-color: transparent !important;
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg-page-solid, #12160c);
  background-image: url("../images/blur-camo-green.webp");
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
  opacity: 0.2;
}


[data-theme="military"] .container,
[data-theme="military"] .container-fluid,
[data-theme="military"] .main-content,
[data-theme="military"] .container > .d-flex,
[data-theme="military"] .container-fluid > .d-flex,
[data-theme="military"] .main-content > .d-flex {
  background: transparent !important;
  background-color: transparent !important;
}

/* content-header with d-flex must keep panel fill (wins over .main-content > .d-flex) */
[data-theme="military"] .main-content > .content-header {
  background: var(--bg-panel-flat, rgba(23, 28, 16, 0.90)) !important;
  background-color: var(--bg-panel-flat, rgba(23, 28, 16, 0.90)) !important;
}

/* --- Chrome: сайдбар / навбар полупрозрачные поверх камуфляжа --- */
[data-theme="military"] .sidebar {
  background: var(--bg-chrome, rgba(14, 18, 10, 0.78));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-right: 1px solid var(--cam-line, rgba(160, 192, 96, 0.16));
  box-shadow: none;
}

[data-theme="military"] .navbar {
  background-color: var(--bg-chrome, rgba(14, 18, 10, 0.78));
  border-bottom-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* --- Панели / карточки: полупрозрачные, камуфляж просвечивает --- */
[data-theme="military"] .card,
[data-theme="military"] .modal-content,
[data-theme="military"] .dropdown-menu,
[data-theme="military"] .list-group-item,
[data-theme="military"] .table,
[data-theme="military"] .content-header,
[data-theme="military"] .panel,
[data-theme="military"] .workspace,
[data-theme="military"] .submenu {
  background: var(--bg-panel, rgba(28, 34, 19, 0.88));
  background-color: var(--bg-panel, rgba(28, 34, 19, 0.88));
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

[data-theme="military"] .content-header,
[data-theme="military"] .modal-content.modal-content--dark-gray {
  background: var(--bg-panel-flat, rgba(23, 28, 16, 0.90));
  background-color: var(--bg-panel-flat, rgba(23, 28, 16, 0.90));
}

/* Filters card / page header — visible border so panels do not blend into camo */
[data-theme="military"] .filters-card,
[data-theme="military"] .filters-section > .filters-card,
[data-theme="military"] .content-header {
  border: 1px solid var(--border, #3c4531);
}

/* Dropdowns / filter menus — stronger blur for readability over camo */
[data-theme="military"] .dropdown-menu {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background-color: rgba(14, 18, 10, 0.90);
  border-color: var(--border, #3c4531);
}

[data-theme="military"] .settings-modal {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background-color: rgba(14, 18, 10, 0.90);
  border-color: var(--border, #3c4531);
}

/* Modal: opaque surface + backdrop (Bootstrap uses --bs-modal-bg / body-bg) */
[data-theme="military"] .modal {
  --bs-modal-bg: var(--bg-surface-solid, #1c2213);
  --bs-modal-color: var(--text-primary, #ffffff);
  --bs-modal-border-color: var(--border, #3c4531);
  --bs-modal-header-border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  --bs-modal-footer-border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

[data-theme="military"] .modal-content {
  background: var(--bg-surface-solid, #1c2213);
  background-color: var(--bg-surface-solid, #1c2213);
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .modal-backdrop {
  --bs-backdrop-bg: var(--bg-deep-solid, #0e120a);
  --bs-backdrop-opacity: 0.72;
  background-color: var(--bg-deep-solid, #0e120a);
}

[data-theme="military"] .modal-backdrop.show {
  opacity: 0.72;
}

[data-theme="military"] .modal-right .modal-content {
  background: var(--bg-surface-solid, #1c2213);
  background-color: var(--bg-surface-solid, #1c2213);
}

[data-theme="military"] .modal .btn-close {
  --bs-btn-close-color: #ffffff;
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.85;
}

[data-theme="military"] .modal .btn-close:hover {
  opacity: 1;
}

[data-theme="military"] .table th,
[data-theme="military"] .table td,
[data-theme="military"] .table-dark th {
  border-color: var(--border, #3c4531);
}

[data-theme="military"] .table,
[data-theme="military"] .table-dark,
[data-theme="military"] .table-striped,
[data-theme="military"] .table-hover {
  --bs-table-hover-bg: #232a1a;
  --bs-table-hover-color: #ffffff;
  --bs-table-active-bg: #2f3a1e;
  --bs-table-active-color: #ffffff;
  --bs-table-striped-bg: #212a15;
  --bs-table-striped-color: #ffffff;
}

[data-theme="military"] .table td:not(.group-a):not(.group-b):not(.group-c),
[data-theme="military"] .table tbody td:not(.group-a):not(.group-b):not(.group-c) {
  background-color: var(--bg-surface-solid, #1c2213);
  color: var(--text-primary, #ffffff);
}

/* Единое правило: любое число столбцов, ABC-подсветка сохраняется.
   !important нужен, чтобы перебить hover-токены DataTables при равной специфичности. */
[data-theme="military"] .table-hover tbody tr:hover > td:not(.group-a):not(.group-b):not(.group-c),
[data-theme="military"] .delivery-row:hover > td:not(.group-a):not(.group-b):not(.group-c) {
  background-color: #232a1a !important;
}

[data-theme="military"] .table-dark th {
  background-color: var(--bg-deep-solid, #0e120a);
}

/* Table links → military accent (overrides text-white / hardcoded blues) */
[data-theme="military"] .table a,
[data-theme="military"] .table td a,
[data-theme="military"] .card-body table a,
[data-theme="military"] .table a.text-white {
  color: var(--accent, #aacd6b) !important;
}

[data-theme="military"] .table a:hover,
[data-theme="military"] .table td a:hover,
[data-theme="military"] .card-body table a:hover,
[data-theme="military"] .table a.text-white:hover {
  color: var(--accent-hover, #c6e390) !important;
}

/* Matrix / summary rows: military tint instead of default gray */
[data-theme="military"] .matrix-total,
[data-theme="military"] .matrix-total td {
  background-color: rgba(120, 160, 60, 0.10);
}

[data-theme="military"] .sortable:hover {
  background-color: var(--border, #3c4531);
}

/* Data cells with ABC/group tint or matrix values: keep text and links
   white for readability on the green fills (headers / first-column name
   links are intentionally left as accent). */
[data-theme="military"] .table td.group-a,
[data-theme="military"] .table td.group-b,
[data-theme="military"] .table td.group-c,
[data-theme="military"] .table td.group-a a,
[data-theme="military"] .table td.group-b a,
[data-theme="military"] .table td.group-c a,
[data-theme="military"] .matrix-cell,
[data-theme="military"] .matrix-cell a,
[data-theme="military"] .matrix-table tbody td a,
[data-theme="military"] .matrix-table tfoot td a,
[data-theme="military"] #applicationDeliveryStatsTable tbody td a,
[data-theme="military"] #applicationDeliveryStatsTable tfoot td a,
[data-theme="military"] #matrixTableEfficiency tbody td a,
[data-theme="military"] #matrixTableEfficiency tbody td,
[data-theme="military"] #crossTabTable td.total-column,
[data-theme="military"] #crossTabTable td.total-column a {
  color: #ffffff !important;
}

/* Sticky / crosstab / DataTables fixed columns — solid fill so scrolled cells do not bleed */
[data-theme="military"] .table-scrollable th.sticky-column,
[data-theme="military"] .table-scrollable td.sticky-column,
[data-theme="military"] .table-scrollable th.sticky-column-1,
[data-theme="military"] .table-scrollable td.sticky-column-1,
[data-theme="military"] .table-scrollable th.sticky-column-2,
[data-theme="military"] .table-scrollable td.sticky-column-2,
[data-theme="military"] .table-scrollable th.sticky-column-3,
[data-theme="military"] .table-scrollable td.sticky-column-3,
[data-theme="military"] #crossTabTable .sticky-column,
[data-theme="military"] #crossTabTable .sticky-column-1,
[data-theme="military"] #crossTabTable .sticky-column-2,
[data-theme="military"] #crossTabTable .sticky-column-3,
[data-theme="military"] table.dataTable th.dtfc-fixed-left,
[data-theme="military"] table.dataTable td.dtfc-fixed-left,
[data-theme="military"] .table-scrollable th:first-child,
[data-theme="military"] .table-scrollable td:first-child {
  background-color: var(--bg-surface-solid, #1c2213);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* efficiency task rows use !important grey hover — override to military */
[data-theme="military"] .task-subcategory:hover td {
  background-color: #232a1a !important;
}

[data-theme="military"] .heatmap-quick-filters input[type="radio"]:hover:not(:disabled) {
  border-color: rgba(170, 205, 107, 0.55) !important;
}

[data-theme="military"] .heatmap-quick-filters input[type="radio"]:checked {
  border-color: rgba(170, 205, 107, 0.88) !important;
  background-color: rgba(14, 18, 10, 0.98) !important;
  background-image: radial-gradient(
    circle at 50% 50%,
    #c6e390 0%,
    #aacd6b 38%,
    transparent 39%
  ) !important;
  box-shadow:
    0 0 0 1px rgba(95, 139, 46, 0.35) inset,
    0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="military"] .heatmap-quick-filters input[type="radio"]:focus-visible {
  outline: 2px solid rgba(170, 205, 107, 0.5) !important;
}

[data-theme="military"] .heatmap-quick-filters input[type="radio"]:disabled:checked {
  background-image: radial-gradient(
    circle at 50% 50%,
    rgba(170, 205, 107, 0.45) 0%,
    rgba(170, 205, 107, 0.35) 34%,
    transparent 35%
  ) !important;
}

[data-theme="military"] .heatmap-map-wrap:has(#osmHeatmap.heatmap-map--light-basemap) .heatmap-quick-filters input[type="radio"]:hover:not(:disabled) {
  border-color: rgba(95, 139, 46, 0.55) !important;
}

[data-theme="military"] .heatmap-map-wrap:has(#osmHeatmap.heatmap-map--light-basemap) .heatmap-quick-filters input[type="radio"]:checked {
  border-color: rgba(95, 139, 46, 0.75) !important;
  background-color: #f5f7f1 !important;
  background-image: radial-gradient(
    circle at 50% 50%,
    #5f8b2e 0%,
    #537a27 36%,
    transparent 37%
  ) !important;
  box-shadow:
    0 0 0 1px rgba(95, 139, 46, 0.2) inset,
    0 1px 2px rgba(0, 0, 0, 0.07) !important;
}

[data-theme="military"] .heatmap-map-wrap:has(#osmHeatmap.heatmap-map--light-basemap) .heatmap-quick-filters input[type="radio"]:focus-visible {
  outline-color: rgba(95, 139, 46, 0.45) !important;
}

[data-theme="military"] .heatmap-map-wrap:has(#osmHeatmap.heatmap-map--light-basemap) .heatmap-quick-filters input[type="radio"]:disabled:checked {
  background-image: radial-gradient(
    circle at 50% 50%,
    rgba(95, 139, 46, 0.5) 0%,
    rgba(95, 139, 46, 0.35) 34%,
    transparent 35%
  ) !important;
}

/* Pagination */
[data-theme="military"] .page-link {
  background-color: var(--bg-panel, rgba(28, 34, 19, 0.88));
  border-color: var(--border, #3c4531);
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .page-link:hover {
  background-color: var(--border, #3c4531);
  border-color: var(--border, #3c4531);
  color: #ffffff;
}

[data-theme="military"] .page-item.active .page-link {
  background-color: var(--accent, #aacd6b);
  border-color: var(--accent, #aacd6b);
  color: #0e120a;
}

[data-theme="military"] .page-item.disabled .page-link {
  background-color: var(--bg-deep, rgba(14, 18, 10, 0.92));
  border-color: var(--border, #3c4531);
  color: var(--text-muted, #808080);
}

/* Forms */
[data-theme="military"] .form-control,
[data-theme="military"] .form-select,
[data-theme="military"] .input-group-text {
  background-color: var(--bg-input, rgba(28, 34, 19, 0.88));
  border-color: var(--border-soft, #38402d);
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .form-control:focus,
[data-theme="military"] .form-select:focus {
  border-color: var(--primary, #5f8b2e);
  box-shadow: 0 0 0 0.25rem rgba(95, 139, 46, 0.40);
  background-color: var(--bg-input, rgba(28, 34, 19, 0.88));
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .form-check-input:focus,
[data-theme="military"] .form-check-input:focus-visible {
  border-color: var(--primary, #5f8b2e);
  box-shadow: 0 0 0 0.25rem rgba(95, 139, 46, 0.40);
}

[data-theme="military"] .form-check-input:checked {
  background-color: var(--primary, #5f8b2e);
  border-color: var(--primary, #5f8b2e);
}

[data-theme="military"] .form-switch .form-check-input:focus:not(:checked) {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}

/* Buttons / links */
[data-theme="military"] .btn-primary {
  background-color: var(--primary, #5f8b2e);
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  color: #eef6df;
}

[data-theme="military"] .btn-primary:hover,
[data-theme="military"] .btn-primary:focus {
  background-color: var(--primary-hover, #537a27);
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  color: #eef6df;
}

[data-theme="military"] .btn-primary:active,
[data-theme="military"] .btn-primary.active {
  background-color: var(--primary-active, #47691f);
}

[data-theme="military"] .btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(95, 139, 46, 0.40);
}

[data-theme="military"] .btn-secondary {
  background-color: var(--bg-input, rgba(28, 34, 19, 0.88));
  border-color: var(--border, #3c4531);
}

/* Accent only for bare content links. :where() keeps specificity at (0,0,1)
   so .btn / .nav-link / .submenu-item keep their own colors. */
:where([data-theme="military"]) a {
  color: var(--accent, #aacd6b);
}

:where([data-theme="military"]) a:hover {
  color: var(--accent-hover, #c6e390);
}

/* Sidebar section toggles (Аналитика / Аудит / …) — muted hover so text stays readable */
[data-theme="military"] .sidebar .nav-link {
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .sidebar .nav-link:hover,
[data-theme="military"] .sidebar .nav-link.active,
[data-theme="military"] .sidebar .nav-link[aria-expanded="true"] {
  background: var(--bg-panel, rgba(28, 34, 19, 0.88));
  color: var(--text-primary, #ffffff);
}

/* Ghost action buttons on dark cards — white text */
[data-theme="military"] .btn-download,
[data-theme="military"] .btn-preview,
[data-theme="military"] .btn-settings,
[data-theme="military"] .btn-export {
  color: var(--text-primary, #ffffff);
}

/* Sidebar accents */
[data-theme="military"] .submenu-item.active {
  color: var(--accent, #aacd6b);
  background: var(--bg-page-solid, #12160c);
}

[data-theme="military"] .menu-item:hover,
[data-theme="military"] .menu-item.active,
[data-theme="military"] .profile-item:hover,
[data-theme="military"] .workspace {
  background: var(--bg-panel, rgba(28, 34, 19, 0.88));
}

[data-theme="military"] .submenu-item:hover {
  background: var(--bg-page-solid, #12160c);
}

[data-theme="military"] .sidebar-footer {
  border-top-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

/* Dropdown */
[data-theme="military"] .dropdown-item:hover,
[data-theme="military"] .dropdown-item:focus {
  background-color: var(--bg-deep, rgba(14, 18, 10, 0.92));
  color: var(--text-primary, #ffffff);
}

/* Modal borders */
[data-theme="military"] .modal-header,
[data-theme="military"] .modal-footer {
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

/* Notifications — blue accents → green */
[data-theme="military"] .notification-item-badge--blue {
  color: var(--accent, #aacd6b);
  border-color: rgba(120, 160, 60, 0.25);
}

[data-theme="military"] .notification-circle,
[data-theme="military"] .notification-badge-counter,
[data-theme="military"] .nav-link--notification.active .notification-tab-counter {
  background-color: var(--accent, #aacd6b);
}

[data-theme="military"] .notification-item {
  border-bottom-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

[data-theme="military"] .notification-item:hover {
  background-color: rgba(120, 160, 60, 0.14);
}

[data-theme="military"] .notification-item--new {
  background-color: rgba(28, 34, 19, 0.70);
}

[data-theme="military"] .notification-tab-counter {
  border-color: var(--border, #3c4531);
}

[data-theme="military"] .btn-wide {
  background-color: rgba(28, 34, 19, 0.88);
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

[data-theme="military"] .btn-wide:hover {
  background-color: rgba(120, 160, 60, 0.18);
}

/* Topbar borders — soften to camo line where neutral gray was used */
[data-theme="military"] #topbar-reports-badge {
  border-color: var(--border, #3c4531);
}

[data-theme="military"] .topbar-badge-icon {
  background-color: rgba(28, 34, 19, 0.88);
}

[data-theme="military"] .verifi-badge {
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  background: var(--bg-chrome, rgba(14, 18, 10, 0.78));
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

[data-theme="military"] .topbar-badge,
[data-theme="military"] #topbar-reports-badge {
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  background: var(--bg-chrome, rgba(14, 18, 10, 0.78));
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* Selection / scrollbar */
[data-theme="military"] ::selection {
  background: rgba(95, 139, 46, 0.55);
  color: #ffffff;
}

[data-theme="military"],
[data-theme="military"] body,
[data-theme="military"] .main-content,
[data-theme="military"] .table,
[data-theme="military"] table {
  scrollbar-color: #aacd6b transparent;
}

/* DataTables / common stats panels — translucent military surfaces */
[data-theme="military"] table.dataTable,
[data-theme="military"] div.dt-container,
[data-theme="military"] .dt-scroll-head,
[data-theme="military"] .dt-scroll-body,
[data-theme="military"] .dataTables_wrapper,
[data-theme="military"] .stats-card,
[data-theme="military"] .stat-card,
[data-theme="military"] .filter-card,
[data-theme="military"] .filters-container,
[data-theme="military"] .chart-container,
[data-theme="military"] .delivery-stats-card,
[data-theme="military"] .rating-card,
[data-theme="military"] .upload-card,
[data-theme="military"] .news-card,
[data-theme="military"] .document-card,
[data-theme="military"] .audit-card,
[data-theme="military"] .twofa-card,
[data-theme="military"] .panel-card {
  background: var(--bg-panel, rgba(28, 34, 19, 0.88));
  background-color: var(--bg-panel, rgba(28, 34, 19, 0.88));
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

[data-theme="military"] table.dataTable thead th,
[data-theme="military"] table.dataTable.table-dark thead th {
  background-color: var(--bg-deep-solid, #0e120a);
  border-color: var(--border, #3c4531);
}

/* Select2 — !important wins over page-inline base greys (e.g. activator_bc_stats) */
[data-theme="military"] .select2-container--default .select2-selection--single,
[data-theme="military"] .select2-container--default .select2-selection--multiple,
[data-theme="military"] .select2-dropdown {
  background-color: var(--bg-input, rgba(28, 34, 19, 0.88)) !important;
  border-color: var(--border, #3c4531) !important;
  color: #ffffff;
}

[data-theme="military"] .select2-dropdown {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background-color: rgba(14, 18, 10, 0.90) !important;
}

[data-theme="military"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: var(--bg-deep-solid, #0e120a) !important;
  border-color: var(--border, #3c4531) !important;
  color: #ffffff;
}

[data-theme="military"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--border, #3c4531) !important;
  border-color: var(--border-soft, #38402d) !important;
  color: #ffffff;
}

[data-theme="military"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary, #5f8b2e);
}

[data-theme="military"] .select2-container--default .select2-results__option[aria-selected=true] {
  background-color: rgba(120, 160, 60, 0.22);
}

/* Chart legends — military dark tint (overrides JS-injected rgba(25,25,25,.7)) */
[data-theme="military"] .legend {
  background-color: rgba(14, 18, 10, 0.70);
}

/* Notifications button (btn-dark) — military surface instead of Bootstrap grey */
[data-theme="military"] .btn-dark {
  background-color: var(--bg-surface, rgba(28, 34, 19, 0.88));
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .btn-dark:hover,
[data-theme="military"] .btn-dark:focus {
  background-color: rgba(120, 160, 60, 0.18);
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
  color: var(--text-primary, #ffffff);
}

[data-theme="military"] .notification-btn {
  background: var(--bg-chrome, rgba(14, 18, 10, 0.78));
  border-color: var(--cam-line, rgba(160, 192, 96, 0.16));
}

/* Upload manager — video pick buttons: blue border → military green */
[data-theme="military"] .um-header-dropzone-btn,
[data-theme="military"] .um-drop-area-btn {
  border-color: rgba(95, 139, 46, 0.35);
  color: var(--accent, #aacd6b);
}

[data-theme="military"] .um-header-dropzone-btn:hover,
[data-theme="military"] .um-drop-area-btn:hover {
  background: rgba(95, 139, 46, 0.10);
}

/* Outline buttons — align to military palette */
[data-theme="military"] .btn-outline-primary {
  color: var(--accent, #aacd6b);
  border-color: var(--primary, #5f8b2e);
  background-color: transparent;
}

[data-theme="military"] .btn-outline-primary:hover,
[data-theme="military"] .btn-outline-primary:focus {
  background-color: var(--primary, #5f8b2e);
  border-color: var(--primary, #5f8b2e);
  color: #eef6df;
}

[data-theme="military"] .btn-outline-primary:active,
[data-theme="military"] .btn-outline-primary.active {
  background-color: var(--primary-active, #47691f);
  border-color: var(--primary-active, #47691f);
  color: #eef6df;
}

[data-theme="military"] .btn-outline-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(95, 139, 46, 0.40);
}

[data-theme="military"] .btn-outline-secondary {
  color: var(--text-muted, #808080);
  border-color: var(--border, #3c4531);
  background-color: transparent;
}

[data-theme="military"] .btn-outline-secondary:hover,
[data-theme="military"] .btn-outline-secondary:focus {
  background-color: var(--border, #3c4531);
  border-color: var(--border, #3c4531);
  color: #ffffff;
}

/* Sort / filter dropdown toggles — readable over camo */
[data-theme="military"] .btn-outline-secondary.dropdown-toggle {
  background-color: var(--bg-input, rgba(28, 34, 19, 0.88));
  border-color: var(--border, #3c4531);
  color: var(--text-primary, #ffffff);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

[data-theme="military"] .btn-outline-secondary.dropdown-toggle:hover,
[data-theme="military"] .btn-outline-secondary.dropdown-toggle:focus,
[data-theme="military"] .btn-outline-secondary.dropdown-toggle.show {
  background-color: var(--border, #3c4531);
  color: #ffffff;
}

/* ==========================================================================
   DataTables military overrides
   Перекрывают остаточные синие вендорные акценты datatables.css.
   Слой theme-military.css подключается последним → выигрывает при равной
   специфичности. Вендорный datatables.css руками не правим.
   ========================================================================== */

/* Cell focus outline (KeyTable) */
[data-theme="military"] table.dataTable tbody th.focus,
[data-theme="military"] table.dataTable tbody td.focus {
  outline-color: var(--primary, #5f8b2e);
}

[data-theme="military"] table.dataTable tbody tr.selected th.focus,
[data-theme="military"] table.dataTable tbody tr.selected td.focus {
  outline-color: var(--primary-active, #47691f);
}

/* DateTime picker — selected date */
[data-theme="military"] div.dt-datetime table td.selectable.selected button {
  background: var(--primary, #5f8b2e);
  color: #ffffff;
}

/* AutoFill — handle / drag selection */
[data-theme="military"] div.dt-autofill-handle {
  background: var(--primary, #5f8b2e);
}

[data-theme="military"] div.dt-autofill-select {
  background-color: var(--primary, #5f8b2e);
}

/* RowReorder — floating row outline */
[data-theme="military"] div.dt-rowReorder-float-parent {
  outline-color: var(--primary, #5f8b2e);
}

html[data-theme="military"] {
  --dt-row-selected: 95, 139, 46;
  --dt-row-selected-link: 238, 246, 223;
}

[data-theme="military"] table.dataTable tbody tr td.dtcr-moving-first {
  border-left-color: var(--primary, #5f8b2e);
}
[data-theme="military"] table.dataTable tbody tr td.dtcr-moving-last {
  border-right-color: var(--primary, #5f8b2e);
}

[data-theme="military"] div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value,
[data-theme="military"] div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value {
  border-color: var(--primary, #5f8b2e);
}

@media print {
  [data-theme="military"] body {
    background: #12160c !important;
    background-image: none !important;
  }

  [data-theme="military"] .sidebar,
  [data-theme="military"] .sidebar-expand {
    display: none !important;
  }
}
