/* DocIT Dark Mode — html[data-theme="dark"] aktiválja */

html[data-theme="dark"] {
	--dm-bg:        #1a1d23;
	--dm-surface:   #242830;
	--dm-surface-2: #2d323b;
	--dm-surface-3: #343a45;
	--dm-text:      #d8dce3;
	--dm-text-mute: #8a8f99;
	--dm-border:    #3a3f4a;
	--dm-accent:    #E63946;
	--dm-link:      #5bb3e8;
	--dm-primary:   #004E2B;
	--dm-primary-hover: #006637;
	--dm-success:   #1ab394;
	--dm-warning:   #f8ac59;
	--dm-danger:    #ed5565;
}

/* ---------- Toggle gomb ikon-state (világos és sötét módban is aktív) ---------- */
#theme-toggle-btn .theme-icon-moon { display: none; }
#theme-toggle-btn .theme-icon-sun  { display: inline-block; }
html[data-theme="dark"] #theme-toggle-btn .theme-icon-moon { display: inline-block; }
html[data-theme="dark"] #theme-toggle-btn .theme-icon-sun  { display: none; }
#theme-toggle-btn i { transition: transform .25s ease; }
#theme-toggle-btn:hover i { transform: rotate(20deg); }

/* ---------- Alap háttér & szöveg ---------- */
html[data-theme="dark"] body,
html[data-theme="dark"] #wrapper,
html[data-theme="dark"] #page-wrapper,
html[data-theme="dark"] #page-wrapper.gray-bg,
html[data-theme="dark"] .gray-bg {
	background-color: var(--dm-bg) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .white-bg {
	background-color: var(--dm-surface) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] label,
html[data-theme="dark"] strong {
	color: var(--dm-text);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] small,
html[data-theme="dark"] .small {
	color: var(--dm-text-mute) !important;
}

html[data-theme="dark"] .docai-logo small,
html[data-theme="dark"] .docai-logo-heading small,
html[data-theme="dark"] .navbar-brand small {
	color: inherit !important;
}

html[data-theme="dark"] a {
	color: var(--dm-link);
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus {
	color: #8dcdf0;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-top {
	border-color: var(--dm-border) !important;
}

/* ---------- Navbar (top navigation) ---------- */
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar-default,
html[data-theme="dark"] .navbar-expand-lg,
html[data-theme="dark"] .navbar-static-top,
html[data-theme="dark"] .top-navigation .navbar,
html[data-theme="dark"] .top-navigation .navbar-default,
html[data-theme="dark"] .white-bg .navbar-static-top,
html[data-theme="dark"] .white-bg .navbar-fixed-top {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .top-navigation .nav > li > a,
html[data-theme="dark"] .navbar-default .nav > li > a,
html[data-theme="dark"] .navbar .nav > li > a,
html[data-theme="dark"] .navbar-nav > li > a {
	color: var(--dm-text) !important;
	background-color: transparent !important;
}

html[data-theme="dark"] .top-navigation .nav > li > a:hover,
html[data-theme="dark"] .top-navigation .nav > li > a:focus,
html[data-theme="dark"] .navbar-default .nav > li > a:hover,
html[data-theme="dark"] .navbar-default .nav > li > a:focus,
html[data-theme="dark"] .navbar .nav > li a:hover,
html[data-theme="dark"] .navbar-nav > li > a:hover {
	background-color: var(--dm-surface-2) !important;
	color: #ffffff !important;
	border-color: var(--dm-border) !important;
	border-bottom-color: var(--dm-surface-2) !important;
}

/* Aktív menüpont — Inspinia fehér hátterét felülírjuk */
html[data-theme="dark"] .top-navigation .navbar .nav > li.active,
html[data-theme="dark"] .top-navigation .nav > li.active,
html[data-theme="dark"] .navbar-nav > li.active,
html[data-theme="dark"] li.active {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .top-navigation .nav > li.active > a,
html[data-theme="dark"] .navbar-default .nav > li.active > a,
html[data-theme="dark"] .navbar-nav > li.active > a {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-accent) !important;
}

html[data-theme="dark"] .top-navigation .navbar-nav .dropdown-menu > .active > a,
html[data-theme="dark"] .navbar-nav .dropdown-menu > .active > a {
	background-color: var(--dm-surface-3) !important;
	color: var(--dm-accent) !important;
}

html[data-theme="dark"] .navbar-brand {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .navbar-toggler,
html[data-theme="dark"] .navbar-toggle {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .navbar-toggle .icon-bar {
	background-color: var(--dm-text) !important;
}

html[data-theme="dark"] .navbar-toggler-icon {
	filter: invert(1) brightness(1.5);
}

/* ---------- Footer ---------- */
html[data-theme="dark"] .footer {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text);
	border-top: 1px solid var(--dm-border) !important;
}

html[data-theme="dark"] .footer strong {
	color: var(--dm-text);
}

/* ---------- IBox (Inspinia kártyák) ---------- */
html[data-theme="dark"] .ibox {
	background-color: transparent;
}

html[data-theme="dark"] .ibox-title {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .ibox-title h5 {
	color: var(--dm-text);
}

html[data-theme="dark"] .ibox-content {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .ibox-footer {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text-mute);
}

/* ---------- Panel / Well / Card ---------- */
html[data-theme="dark"] .panel {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .panel-footer {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .well {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .card {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

/* ---------- Modal ---------- */
html[data-theme="dark"] .modal-content {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .modal-title {
	color: var(--dm-text);
}

html[data-theme="dark"] .modal-backdrop.show,
html[data-theme="dark"] .modal-backdrop.in {
	opacity: 0.7;
}

html[data-theme="dark"] .close {
	color: var(--dm-text);
	opacity: 0.8;
}

/* ---------- Táblázat ---------- */
html[data-theme="dark"] .table {
	color: var(--dm-text);
	background-color: transparent;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table > thead > tr > th {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table > tbody > tr > td,
html[data-theme="dark"] .table > tbody > tr > th {
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
	background-color: var(--dm-surface-2) !important;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover,
html[data-theme="dark"] .table-hover tbody tr:hover {
	background-color: var(--dm-surface-3) !important;
}

html[data-theme="dark"] .table-bordered,
html[data-theme="dark"] .table-bordered td,
html[data-theme="dark"] .table-bordered th {
	border-color: var(--dm-border) !important;
}

/* ---------- Form elemek ---------- */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] select,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] select.pagination-limit,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] textarea.form-control {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] select option {
	background-color: var(--dm-surface-2);
	color: var(--dm-text);
}

html[data-theme="dark"] .form-control:focus {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-link) !important;
	color: var(--dm-text);
	box-shadow: 0 0 0 0.2rem rgba(91, 179, 232, 0.15);
}

html[data-theme="dark"] .form-control::placeholder {
	color: var(--dm-text-mute);
	opacity: 0.8;
}

html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text-mute);
}

html[data-theme="dark"] .input-group-addon,
html[data-theme="dark"] .input-group-text {
	background-color: var(--dm-surface-3) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

/* ---------- Dropdown ---------- */
html[data-theme="dark"] .dropdown-menu {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .dropdown-menu > li > a {
	color: var(--dm-text);
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus,
html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff;
}

html[data-theme="dark"] .dropdown-divider,
html[data-theme="dark"] .dropdown-menu .divider {
	background-color: var(--dm-border) !important;
	border-color: var(--dm-border) !important;
}

/* ---------- Gombok (finom tuning — a btn-primary/warning/danger maradnak) ---------- */
html[data-theme="dark"] .btn-white {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .btn-white:hover,
html[data-theme="dark"] .btn-white:focus {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff;
}

html[data-theme="dark"] .btn-default {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-default:focus {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff;
}

/* ---------- Select2 ---------- */
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__rendered {
	color: var(--dm-text);
}

html[data-theme="dark"] .select2-dropdown {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff;
}

html[data-theme="dark"] .select2-search__field {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

/* ---------- Breadcrumb, pagination, nav-tabs ---------- */
html[data-theme="dark"] .breadcrumb {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
	color: var(--dm-text-mute);
}

html[data-theme="dark"] .pagination .page-link,
html[data-theme="dark"] .pagination > li > a,
html[data-theme="dark"] .pagination > li > span {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .pagination .page-item.active .page-link,
html[data-theme="dark"] .pagination > li.active > a,
html[data-theme="dark"] .pagination > li.active > span {
	background-color: var(--dm-accent) !important;
	border-color: var(--dm-accent) !important;
	color: #ffffff;
}

html[data-theme="dark"] .nav-tabs {
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link,
html[data-theme="dark"] .nav-tabs > li > a {
	color: var(--dm-text);
	background-color: transparent;
	border-color: transparent;
}

html[data-theme="dark"] .nav-tabs .nav-link:hover,
html[data-theme="dark"] .nav-tabs > li > a:hover {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link.active,
html[data-theme="dark"] .nav-tabs > li.active > a {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) var(--dm-border) var(--dm-surface) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .tab-content {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

/* ---------- Alert (tompított sötét variáns, az eredeti színek megmaradnak) ---------- */
html[data-theme="dark"] .alert {
	border-color: var(--dm-border) !important;
}

/* ---------- Badge, label ---------- */
html[data-theme="dark"] .label-default,
html[data-theme="dark"] .badge-secondary {
	background-color: var(--dm-surface-3) !important;
	color: var(--dm-text);
}

/* ---------- Datepicker ---------- */
html[data-theme="dark"] .datepicker {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text);
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .datepicker table tr td,
html[data-theme="dark"] .datepicker table tr th {
	color: var(--dm-text);
}

html[data-theme="dark"] .datepicker table tr td.day:hover,
html[data-theme="dark"] .datepicker table tr td.focused {
	background-color: var(--dm-surface-3) !important;
}

html[data-theme="dark"] .datepicker table tr td.active,
html[data-theme="dark"] .datepicker table tr td.active:hover {
	background-color: var(--dm-accent) !important;
	color: #ffffff;
}

/* ---------- Code / pre ---------- */
html[data-theme="dark"] code {
	background-color: var(--dm-surface-3) !important;
	color: #ff8a95;
}

html[data-theme="dark"] pre {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

/* ---------- Navbar brand dark módban: teal háttér (#1ab394) felülírása ---------- */
html[data-theme="dark"] .top-navigation .navbar-brand {
	background: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .top-navigation .navbar-brand:hover,
html[data-theme="dark"] .top-navigation .navbar-brand:focus {
	background: var(--dm-surface-3) !important;
}

html[data-theme="dark"] .top-navigation .navbar-brand.docai-logo {
	border-right: 1px solid var(--dm-border);
}

/* ---------- Toastr notifikációk (sötét mód alap-átlátszósággal) ---------- */
html[data-theme="dark"] #toast-container > .toast {
	opacity: 0.95;
}

/* ---------- Kisebb komponensek ---------- */
html[data-theme="dark"] .list-group-item {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .list-group-item.active {
	background-color: var(--dm-accent) !important;
	border-color: var(--dm-accent) !important;
}

html[data-theme="dark"] .progress {
	background-color: var(--dm-surface-2) !important;
}

html[data-theme="dark"] blockquote {
	border-color: var(--dm-border) !important;
	color: var(--dm-text-mute);
}

html[data-theme="dark"] #small-chat .alert {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text);
}

/* ---------- Badge — Inspinia 2026 soft stílus dark mód alatt ---------- */
html[data-theme="dark"] .badge-gray,
html[data-theme="dark"] .badge-light,
html[data-theme="dark"] .badge.badge-secondary,
html[data-theme="dark"] .badge.badge-inverse {
	background-color: rgba(138, 143, 153, 0.22) !important;
	color: #c4c8d0 !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .badge.badge-success,
html[data-theme="dark"] .badge-soft-success {
	background-color: rgba(26, 179, 148, 0.18) !important;
	color: #4fd1b3 !important;
}

html[data-theme="dark"] .badge.badge-primary,
html[data-theme="dark"] .badge-soft-primary {
	background-color: rgba(28, 132, 198, 0.20) !important;
	color: #5bb3e8 !important;
}

html[data-theme="dark"] .badge.badge-warning,
html[data-theme="dark"] .badge-soft-warning {
	background-color: rgba(248, 172, 89, 0.20) !important;
	color: #f4b96c !important;
}

html[data-theme="dark"] .badge.badge-danger,
html[data-theme="dark"] .badge-soft-danger {
	background-color: rgba(237, 85, 101, 0.20) !important;
	color: #ff8a93 !important;
}

html[data-theme="dark"] .badge.badge-info,
html[data-theme="dark"] .badge-soft-info {
	background-color: rgba(35, 198, 200, 0.20) !important;
	color: #4fd1d3 !important;
}

/* ---------- AjaxTable "Legutóbb feltöltött dokumentumok:" címke (tr.doc_info > td) ---------- */
html[data-theme="dark"] tr.doc_info > td,
html[data-theme="dark"] .AjaxTable thead > tr:first-child > td,
html[data-theme="dark"] table.AjaxTable thead tr.doc_info td {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

/* ---------- panel-body / panel-body.table-responsive ---------- */
html[data-theme="dark"] .panel-body,
html[data-theme="dark"] .panel-body.table-responsive {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text);
	border-color: var(--dm-border) !important;
}

/* ---------- Akció gombok: btn-primary/info/success/warning/danger ikon öröklött link-szín javítása ---------- */
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-info,
html[data-theme="dark"] .btn-success,
html[data-theme="dark"] .btn-warning,
html[data-theme="dark"] .btn-danger {
	color: #ffffff !important;
}

html[data-theme="dark"] .btn-primary i,
html[data-theme="dark"] .btn-primary .fa,
html[data-theme="dark"] .btn-primary .fa-solid,
html[data-theme="dark"] .btn-info i,
html[data-theme="dark"] .btn-info .fa,
html[data-theme="dark"] .btn-info .fa-solid,
html[data-theme="dark"] .btn-success i,
html[data-theme="dark"] .btn-success .fa,
html[data-theme="dark"] .btn-success .fa-solid,
html[data-theme="dark"] .btn-warning i,
html[data-theme="dark"] .btn-warning .fa,
html[data-theme="dark"] .btn-warning .fa-solid,
html[data-theme="dark"] .btn-danger i,
html[data-theme="dark"] .btn-danger .fa,
html[data-theme="dark"] .btn-danger .fa-solid {
	color: #ffffff !important;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-info:hover,
html[data-theme="dark"] .btn-success:hover,
html[data-theme="dark"] .btn-warning:hover,
html[data-theme="dark"] .btn-danger:hover {
	color: #ffffff !important;
}

/* ---------- btn-white / btn-default: ikon és szöveg olvashatóvá tétele ---------- */
html[data-theme="dark"] .btn-white,
html[data-theme="dark"] .btn-default {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .btn-white i,
html[data-theme="dark"] .btn-white .fa,
html[data-theme="dark"] .btn-white .fa-solid,
html[data-theme="dark"] .btn-default i,
html[data-theme="dark"] .btn-default .fa,
html[data-theme="dark"] .btn-default .fa-solid {
	color: var(--dm-text) !important;
}

/* A btn-white-on belüli .text-grey / .text-muted túl sötét volt */
html[data-theme="dark"] .btn-white .text-grey,
html[data-theme="dark"] .btn-white .text-gray,
html[data-theme="dark"] .btn-white .text-muted,
html[data-theme="dark"] .btn-default .text-grey,
html[data-theme="dark"] .btn-default .text-muted {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .btn-white:hover,
html[data-theme="dark"] .btn-default:hover {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] .btn-white:hover i,
html[data-theme="dark"] .btn-default:hover i {
	color: #ffffff !important;
}

/* ---------- Globális "a" link szín felülírása gombokon belül (ha a gomb <a> tag) ---------- */
html[data-theme="dark"] a.btn-primary,
html[data-theme="dark"] a.btn-info,
html[data-theme="dark"] a.btn-success,
html[data-theme="dark"] a.btn-warning,
html[data-theme="dark"] a.btn-danger {
	color: #ffffff !important;
}

html[data-theme="dark"] a.btn-white,
html[data-theme="dark"] a.btn-default {
	color: var(--dm-text) !important;
}

/* ---------- jsTree (mappák fa) ---------- */
html[data-theme="dark"] .jstree-default .jstree-anchor {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .jstree-default .jstree-clicked,
html[data-theme="dark"] .jstree-default .jstree-anchor.jstree-clicked,
html[data-theme="dark"] .jstree-default .jstree-wholerow-clicked {
	background: var(--dm-accent) !important;
	color: #ffffff !important;
	box-shadow: none !important;
	border-radius: 2px;
}

html[data-theme="dark"] .jstree-default .jstree-hovered,
html[data-theme="dark"] .jstree-default .jstree-anchor.jstree-hovered,
html[data-theme="dark"] .jstree-default .jstree-wholerow-hovered {
	background: var(--dm-surface-3) !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

/* ---------- FullCalendar ---------- */
html[data-theme="dark"] .fc {
	background-color: var(--dm-surface);
	color: var(--dm-text);
}

html[data-theme="dark"] .fc-theme-standard td,
html[data-theme="dark"] .fc-theme-standard th,
html[data-theme="dark"] .fc-theme-standard .fc-scrollgrid {
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .fc-col-header-cell,
html[data-theme="dark"] .fc-col-header-cell-cushion {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-daygrid-day-number,
html[data-theme="dark"] .fc-daygrid-day-top a {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-day-other .fc-daygrid-day-number {
	color: var(--dm-text-mute) !important;
}

html[data-theme="dark"] .fc-day-today {
	background-color: rgba(230, 57, 70, 0.15) !important;
}

html[data-theme="dark"] .fc-button,
html[data-theme="dark"] .fc-button-primary {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-button-primary:not(:disabled).fc-button-active,
html[data-theme="dark"] .fc-button-primary:not(:disabled):active {
	background-color: var(--dm-accent) !important;
	border-color: var(--dm-accent) !important;
	color: #ffffff !important;
}

/* ---------- Kanban / Feladat panelek (3 oszlop: Nem megkezdett / Folyamatban / Kész) ---------- */
html[data-theme="dark"] .task-panel,
html[data-theme="dark"] .sortable-list,
html[data-theme="dark"] .kanban-column,
html[data-theme="dark"] .tt_panel,
html[data-theme="dark"] .task-item,
html[data-theme="dark"] .kanban-card {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text);
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .status-header {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .status-content {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .ticket-item,
html[data-theme="dark"] .ticket-item.info-element {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .ticket-description {
	background-color: var(--dm-surface-3) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .ticket-item .ticket-id,
html[data-theme="dark"] .ticket-item .badge {
	color: #ffffff;
}

/* ---------- FullCalendar v3 (fc-state-*) — régi verzió, CRM naptár ---------- */
html[data-theme="dark"] .fc-unthemed td,
html[data-theme="dark"] .fc-unthemed th,
html[data-theme="dark"] .fc-unthemed thead,
html[data-theme="dark"] .fc-unthemed tbody,
html[data-theme="dark"] .fc-unthemed .fc-row,
html[data-theme="dark"] .fc-unthemed .fc-divider,
html[data-theme="dark"] .fc-unthemed .fc-popover {
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .fc-unthemed th,
html[data-theme="dark"] .fc-day-header {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-unthemed .fc-content-skeleton,
html[data-theme="dark"] .fc-unthemed .fc-bg {
	background-color: transparent !important;
}

html[data-theme="dark"] .fc-day,
html[data-theme="dark"] .fc-widget-content {
	background-color: var(--dm-bg) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-other-month,
html[data-theme="dark"] .fc-past {
	background-color: var(--dm-surface) !important;
}

html[data-theme="dark"] .fc-other-month .fc-day-number,
html[data-theme="dark"] .fc-sat .fc-day-number,
html[data-theme="dark"] .fc-sun .fc-day-number {
	color: var(--dm-text-mute) !important;
}

html[data-theme="dark"] .fc-day-number {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-today,
html[data-theme="dark"] .fc-state-highlight {
	background-color: rgba(230, 57, 70, 0.18) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .fc-button.fc-state-default {
	background-color: var(--dm-surface-2) !important;
	background-image: none !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
	text-shadow: none !important;
	box-shadow: none !important;
}

html[data-theme="dark"] .fc-button.fc-state-default:hover {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] .fc-button.fc-state-active,
html[data-theme="dark"] .fc-button.fc-state-down {
	background-color: var(--dm-accent) !important;
	border-color: var(--dm-accent) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] .fc-button.fc-state-disabled {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text-mute) !important;
	opacity: .6;
}

html[data-theme="dark"] .fc-toolbar h2,
html[data-theme="dark"] .fc-toolbar-title {
	color: var(--dm-text) !important;
}

/* ---------- Globális: maradék fehér hátterek felülírása (gyakori inline-bg trick-ek) ---------- */
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text);
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-black {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .text-grey,
html[data-theme="dark"] .text-gray {
	color: var(--dm-text-mute) !important;
}

/* ---------- Worker navbar (dolgozói nav) ---------- */
html[data-theme="dark"] .worker-navbar,
html[data-theme="dark"] #worker-navbar {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
}

/* ---------- Táblázat sorban lévő button-ek csoport spacing-je ne törjön ---------- */
html[data-theme="dark"] table .btn-group,
html[data-theme="dark"] table .btn-group-sm {
	background-color: transparent !important;
}

/* ---------- SweetAlert v1 (régi) — modal popup sötét háttér ---------- */
html[data-theme="dark"] .sweet-alert {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text) !important;
	border: 1px solid var(--dm-border);
}

html[data-theme="dark"] .sweet-alert h2 {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .sweet-alert p,
html[data-theme="dark"] .sweet-alert .lead {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .sweet-alert button.cancel {
	background-color: var(--dm-surface-3) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .sweet-alert button.confirm {
	background-color: var(--dm-accent) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] .sweet-alert input {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

html[data-theme="dark"] .sa-icon {
	border-color: var(--dm-warning) !important;
}

html[data-theme="dark"] .sweet-overlay {
	background-color: rgba(0, 0, 0, 0.7) !important;
}

/* ---------- SweetAlert2 ---------- */
html[data-theme="dark"] .swal2-popup {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .swal2-title,
html[data-theme="dark"] .swal2-html-container {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .swal2-input,
html[data-theme="dark"] .swal2-textarea {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

/* ---------- Table tfoot / "Összesen" sorok (admin.css .table-container tfoot { background:#fff } felülírás) ---------- */
html[data-theme="dark"] .table-container thead,
html[data-theme="dark"] .table-container tfoot,
html[data-theme="dark"] .table > tfoot > tr > th,
html[data-theme="dark"] .table > tfoot > tr > td,
html[data-theme="dark"] tfoot,
html[data-theme="dark"] tfoot tr,
html[data-theme="dark"] tfoot th,
html[data-theme="dark"] tfoot td {
	background-color: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border-color: var(--dm-border) !important;
}

/* ---------- CRM Vertical timeline (Inspinia .dark-timeline .vertical-timeline-content { background:#f5f5f5 }) ---------- */
html[data-theme="dark"] .vertical-timeline-content,
html[data-theme="dark"] .dark-timeline .vertical-timeline-content,
html[data-theme="dark"] .dark-timeline.center-orientation .vertical-timeline-content {
	background: var(--dm-surface-2) !important;
	color: var(--dm-text) !important;
	border: 1px solid var(--dm-border);
}

html[data-theme="dark"] .vertical-timeline-content h2,
html[data-theme="dark"] .vertical-timeline-content p,
html[data-theme="dark"] .vertical-timeline-content .vertical-date {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .dark-timeline .vertical-timeline-content:before,
html[data-theme="dark"] .dark-timeline.center-orientation .vertical-timeline-content:before,
html[data-theme="dark"] .dark-timeline .vertical-timeline-block:nth-child(2n) .vertical-timeline-content:before,
html[data-theme="dark"] .dark-timeline.center-orientation .vertical-timeline-block:nth-child(2n) .vertical-timeline-content:before,
html[data-theme="dark"] .center-orientation .vertical-timeline-content::before,
html[data-theme="dark"] .center-orientation .vertical-timeline-block:nth-child(even) .vertical-timeline-content::before {
	border-color: transparent var(--dm-surface-2) transparent transparent !important;
}

html[data-theme="dark"] .vertical-timeline::before {
	background: var(--dm-border) !important;
}

/* ---------- Summernote editor ---------- */
html[data-theme="dark"] .note-editor.note-frame,
html[data-theme="dark"] .note-editor {
	background-color: var(--dm-surface) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-editor .note-toolbar,
html[data-theme="dark"] .note-toolbar,
html[data-theme="dark"] .note-editor .note-statusbar {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-editor .note-btn,
html[data-theme="dark"] .note-editor .btn-default,
html[data-theme="dark"] .note-toolbar .btn,
html[data-theme="dark"] .note-btn {
	background-color: var(--dm-surface-3) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-editor .note-btn:hover,
html[data-theme="dark"] .note-toolbar .btn:hover,
html[data-theme="dark"] .note-btn:hover {
	background-color: var(--dm-accent) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] .note-editor.note-frame .note-editing-area .note-editable,
html[data-theme="dark"] .note-editable {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-editor .note-dropdown-menu,
html[data-theme="dark"] .note-editor .dropdown-menu {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-editor .note-dropdown-menu a,
html[data-theme="dark"] .note-editor .dropdown-menu a,
html[data-theme="dark"] .note-editor .note-dropdown-item {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-editor .note-dropdown-menu a:hover,
html[data-theme="dark"] .note-editor .dropdown-menu a:hover,
html[data-theme="dark"] .note-editor .note-dropdown-item:hover {
	background-color: var(--dm-surface-3) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] .note-editor .note-modal-content {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .note-placeholder {
	color: var(--dm-text-mute) !important;
}

/* ---------- Alert variants (alert-info, alert-success, alert-warning, alert-danger) dark módban ---------- */
html[data-theme="dark"] .alert-info {
	background-color: rgba(35, 198, 200, 0.12) !important;
	border-color: rgba(35, 198, 200, 0.35) !important;
	color: #4fd1d3 !important;
}

html[data-theme="dark"] .alert-success {
	background-color: rgba(26, 179, 148, 0.12) !important;
	border-color: rgba(26, 179, 148, 0.35) !important;
	color: #4fd1b3 !important;
}

html[data-theme="dark"] .alert-warning {
	background-color: rgba(248, 172, 89, 0.14) !important;
	border-color: rgba(248, 172, 89, 0.35) !important;
	color: #f4b96c !important;
}

html[data-theme="dark"] .alert-danger {
	background-color: rgba(237, 85, 101, 0.14) !important;
	border-color: rgba(237, 85, 101, 0.35) !important;
	color: #ff8a93 !important;
}

html[data-theme="dark"] .alert-primary {
	background-color: rgba(28, 132, 198, 0.14) !important;
	border-color: rgba(28, 132, 198, 0.35) !important;
	color: #5bb3e8 !important;
}

html[data-theme="dark"] .alert-secondary,
html[data-theme="dark"] .alert-light,
html[data-theme="dark"] .alert-default {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .alert strong {
	color: inherit;
}

/* ---------- Feladat jegy történet (history-item, history-details, changes-detail) ---------- */
html[data-theme="dark"] .history-list,
html[data-theme="dark"] .history-scrollable {
	background-color: transparent;
}

html[data-theme="dark"] .history-item {
	background-color: var(--dm-surface-2) !important;
	border: 1px solid var(--dm-border) !important;
	color: var(--dm-text) !important;
	border-radius: 4px;
}

html[data-theme="dark"] .history-item strong,
html[data-theme="dark"] .history-item .field-name {
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .history-item .text-muted,
html[data-theme="dark"] .history-item small {
	color: var(--dm-text-mute) !important;
}

html[data-theme="dark"] .history-details,
html[data-theme="dark"] .history-item .details {
	background-color: var(--dm-surface-3) !important;
	color: var(--dm-text) !important;
	border-radius: 3px;
}

html[data-theme="dark"] .history-item ins {
	background-color: rgba(26, 179, 148, 0.25);
	color: #4fd1b3 !important;
	text-decoration: none;
	padding: 0 2px;
	border-radius: 2px;
}

html[data-theme="dark"] .history-item del {
	background-color: rgba(237, 85, 101, 0.20);
	color: #ff8a93 !important;
	text-decoration: line-through;
	padding: 0 2px;
	border-radius: 2px;
}

/* ---------- Dokumentum megjegyzés lista (feed-element) ---------- */
html[data-theme="dark"] .feed-activity-list .feed-element,
html[data-theme="dark"] .feed-element {
	border-bottom-color: var(--dm-border) !important;
}

html[data-theme="dark"] .feed-element .well {
	background-color: var(--dm-surface-2) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .feed-element .text-info {
	color: var(--dm-link) !important;
}

/* ---------- Modal body + inmodal body (style.css: .inmodal .modal-body { background:#f8fafb }) ---------- */
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .inmodal .modal-body {
	background-color: var(--dm-surface) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .inmodal .modal-title {
	color: var(--dm-text) !important;
}

/* E-mail importálás iframe (mail_body) — legalább egy sötét keret */
html[data-theme="dark"] iframe.mail_body {
	background-color: var(--dm-surface-2) !important;
	border: 1px solid var(--dm-border) !important;
}

/* ---------- Select2 multi-select choice tag (kiválasztott elemek) ---------- */
html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
	background-color: var(--dm-surface-3) !important;
	border-color: var(--dm-border) !important;
	color: var(--dm-text) !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	color: var(--dm-text-mute) !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
	color: var(--dm-accent) !important;
}

/* label-inputs-container exclude (piros bg) dark variánsa */
html[data-theme="dark"] #labels-inputs-container .exclude li.select2-selection__choice {
	background-color: rgba(237, 85, 101, 0.25) !important;
	color: #ff8a93 !important;
}

/* ---------- Hírlevél statisztika: linkBadge (.badge .linkBadge) ---------- */
html[data-theme="dark"] .badge.linkBadge,
html[data-theme="dark"] a.badge.linkBadge {
	background-color: var(--dm-surface-3) !important;
	color: var(--dm-link) !important;
	border: 1px solid var(--dm-border);
}

html[data-theme="dark"] .badge.linkBadge:hover,
html[data-theme="dark"] a.badge.linkBadge:hover {
	background-color: var(--dm-accent) !important;
	color: #ffffff !important;
}

/* ---------- label-warning mi-suggestions / inline label-primary fehér címkék ---------- */
html[data-theme="dark"] .label-primary,
html[data-theme="dark"] label.label-primary {
	background-color: rgba(28, 132, 198, 0.22) !important;
	color: #5bb3e8 !important;
}

html[data-theme="dark"] .label-warning,
html[data-theme="dark"] label.label-warning {
	background-color: rgba(248, 172, 89, 0.22) !important;
	color: #f4b96c !important;
}

html[data-theme="dark"] .label-info {
	background-color: rgba(35, 198, 200, 0.22) !important;
	color: #4fd1d3 !important;
}

html[data-theme="dark"] .label-success {
	background-color: rgba(26, 179, 148, 0.22) !important;
	color: #4fd1b3 !important;
}

html[data-theme="dark"] .label-danger {
	background-color: rgba(237, 85, 101, 0.22) !important;
	color: #ff8a93 !important;
}

/* ---------- Login / DocAI heading (docai-accent) ---------- */
html[data-theme="dark"] .docai-logo-heading {
	color: var(--dm-text);
}

html[data-theme="dark"] .docai-logo-heading .docai-accent {
	color: var(--dm-accent);
}

/* ---------- Login footer (auth/login inline footer) ---------- */
html[data-theme="dark"] body .footer {
	background: var(--dm-surface) !important;
	border-top: 1px solid var(--dm-border) !important;
	color: var(--dm-text);
}

/* ---------- Primary szín felülírás (#004E2B) ---------- */
html[data-theme="dark"] .btn-primary {
	background-color: var(--dm-primary) !important;
	border-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus,
html[data-theme="dark"] .btn-primary.focus {
	background-color: var(--dm-primary-hover) !important;
	border-color: var(--dm-primary-hover) !important;
}

html[data-theme="dark"] .btn-primary.disabled,
html[data-theme="dark"] .btn-primary:disabled {
	background-color: var(--dm-primary) !important;
	border-color: var(--dm-primary) !important;
	opacity: 0.65;
}

html[data-theme="dark"] .btn-primary:not(:disabled):not(.disabled):active,
html[data-theme="dark"] .btn-primary:not(:disabled):not(.disabled).active,
html[data-theme="dark"] .show > .btn-primary.dropdown-toggle {
	background-color: var(--dm-primary-hover) !important;
	border-color: var(--dm-primary-hover) !important;
}

html[data-theme="dark"] .btn-primary.btn-outline {
	background-color: transparent !important;
	color: var(--dm-primary) !important;
	border-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .btn-primary.btn-outline:hover {
	background-color: var(--dm-primary) !important;
	color: #ffffff !important;
}

html[data-theme="dark"] a.btn-primary {
	background-color: var(--dm-primary) !important;
	border-color: var(--dm-primary) !important;
}

html[data-theme="dark"] a.btn-primary:hover {
	background-color: var(--dm-primary-hover) !important;
	border-color: var(--dm-primary-hover) !important;
}

html[data-theme="dark"] .nav-header {
	background-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .navbar-default .special_link a {
	background: var(--dm-primary) !important;
}

html[data-theme="dark"] .navbar-default .special_link a:hover {
	background: var(--dm-primary-hover) !important;
}

html[data-theme="dark"] .dropdown-menu > .active > a,
html[data-theme="dark"] .dropdown-menu > .active > a:focus,
html[data-theme="dark"] .dropdown-menu > .active > a:hover {
	background-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .label-primary {
	background-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .bg-primary {
	background-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .text-primary {
	color: var(--dm-primary) !important;
}

html[data-theme="dark"] .progress-bar-primary {
	background-color: var(--dm-primary) !important;
}

html[data-theme="dark"] .pagination .page-item.active .page-link,
html[data-theme="dark"] .pagination > li.active > a,
html[data-theme="dark"] .pagination > li.active > span {
	background-color: var(--dm-primary) !important;
	border-color: var(--dm-primary) !important;
}
