/* ============================================================================
   ADMIN20-DARK.CSS — tmavý režim administrace (indigo)
   ----------------------------------------------------------------------------
   Aktivuje se atributem  data-theme="dark"  na <html> (přepínač v hlavičce,
   ukládá se do localStorage 'adminTheme'). Bez atributu nemá ŽÁDNÝ efekt.

   PORTOVÁNÍ DO DALŠÍCH ESHOP PROJEKTŮ:
   - Drtivá většina je jen přepis design-tokenů z :root (viz admin22.css).
     Pokud cílový projekt používá stejné názvy proměnných (--color-bg,
     --color-surface, --color-text, …), stačí soubor zkopírovat + přidat
     <link> a přepínač do hlavičky (viz ADMIN.php pagehead()).
   - Sekce "STRUKTURÁLNÍ PŘEPISY" řeší prvky se zadrátovanou (ne-tokenovou)
     barvou. Ty si projdi proti konkrétnímu admin CSS daného projektu —
     selektory jsou ale u všech eshopů hodně podobné.

   Laděno na čitelnost a kontrast (text ≥ AA na plochách).
   ============================================================================ */

html[data-theme="dark"] {
	/* Nativní prvky (kalendář input[type=date], scrollbary, checkboxy, <select> popup)
	   vykreslit tmavě — jinak svítí bíle a špatně se čtou. */
	color-scheme: dark;

	/* Primary — indigo zesvětlené pro sytost/kontrast na tmavém podkladu */
	--color-primary: #8b79d6;
	--color-primary-hover: #a99ce4;
	--color-primary-light: #2c2450;

	/* Semantika — zesvětlená, ať je čitelná na tmavém (ne neonová) */
	--color-success: #46a074;
	--color-success-hover: #56a98a;
	--color-danger: #e06b6b;
	--color-danger-hover: #e58484;
	--color-warning: #e2ae5c;

	/* Plochy — invertovaná teplá indigo tmavá */
	--color-bg: #14121c;
	--color-surface: #1e1b2b;
	--color-sidebar-bg: #100d18;
	--color-sidebar-text: #a8a1be;
	--color-sidebar-hover: #2a2440;
	--color-sidebar-active: #8b79d6;
	--color-sidebar-heading: #b7aae8;
	--color-sidebar-heading-glow: rgba(150, 122, 232, 0.55);
	--color-header-bg: #100d18;
	--color-header-border: #2c2840;

	/* Text */
	--color-text: #c8c3d8;
	--color-text-secondary: #a8a1be;
	--color-text-muted: #6b6488;

	/* Okraje */
	--color-border: #2c2840;
	--color-border-light: #221f30;

	/* Doplňky (zebra, hlavičky tabulek) */
	--color-bg-secondary: #1a1826;
	--color-bg-tertiary: #2c2840;
	--color-text-tertiary: #6b6488;
	--color-table-head: #2a2545;
	--color-table-head-text: #e7e3f2;

	/* Inputy */
	--color-input-border: #3b3656;
	--color-input-focus: #8b79d6;
	--color-input-focus-ring: rgba(139, 121, 214, 0.32);
	--color-input-bg: #14121c;

	/* Stíny — na tmavém silnější (jinak nejsou vidět) */
	--shadow-sm: 0 1px 2px rgba(0,0,0,0.45);
	--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.55), 0 2px 4px -2px rgba(0,0,0,0.45);
	--shadow-lg: 0 10px 18px -3px rgba(0,0,0,0.65), 0 4px 8px -4px rgba(0,0,0,0.55);
}

/* ============================================================================
   STRUKTURÁLNÍ PŘEPISY — prvky se zadrátovanou barvou (ne přes token)
   ============================================================================ */

/* Body "simple" (login/jednoduché stránky) */
html[data-theme="dark"] body.simple { background: var(--color-bg); }

/* --- Tmavé "hlavičkové" pruhy ---------------------------------------------
   V projektech, kde tyto prvky používají background: var(--color-text)
   (= v dark světlá → nečitelné), je přebarvíme napřímo. V tomto projektu
   už používají --color-table-head (viz admin22.css), takže je to pojistka. */
html[data-theme="dark"] #content h3,
html[data-theme="dark"] table.ordershelper tr.header th,
html[data-theme="dark"] table.full tr.header th,
html[data-theme="dark"] table.sumace tr.header:first-child th,
html[data-theme="dark"] .dodavatele table.dod-table thead th {
	background: var(--color-table-head);
	color: var(--color-table-head-text);
}
html[data-theme="dark"] #content h3 a,
html[data-theme="dark"] table.full tr.header th a { color: var(--color-table-head-text); }

/* Suggestions box (autocomplete) */
html[data-theme="dark"] .suggestionsBox {
	background-color: var(--color-surface);
	border-color: var(--color-border);
	color: var(--color-text);
}

/* Accordion h3 hover */
html[data-theme="dark"] #accordion h3:hover,
html[data-theme="dark"] .accordion h3:hover { background: #322a52; }

/* --- Zebra / hover / stavové řádky tabulek -------------------------------- */
html[data-theme="dark"] table.list tr:hover td { background: #241f3d !important; }
/* Plain <table> řádky (přehled „sekce/eshopy") mají hover přes JS focusRow(),
   který nastavuje inline background-color:whitesmoke → v dark by byl světlý na světlém. */
html[data-theme="dark"] td[style*="whitesmoke"],
html[data-theme="dark"] th[style*="whitesmoke"] { background-color: #2a2440 !important; color: #f3f1f9 !important; }
html[data-theme="dark"] table.full tr.pink td { background: #2e1a2a !important; }
/* Interní poznámka u objednávky (světle růžová → tmavě vínová s čitelným textem) */
html[data-theme="dark"] tr.f-interni-poznamka td { background-color: #2e1a2a !important; color: #f0d8e0 !important; }
html[data-theme="dark"] table.full tr.poptavka td { background: #2a1726 !important; }
html[data-theme="dark"] table.full tr.clicked td { background: #16291f; }
html[data-theme="dark"] table.full tr.clicked:hover td { background: #241f3d !important; }
html[data-theme="dark"] table.full input:focus { background: #231f3a; color: var(--color-text); }
html[data-theme="dark"] table.full input[disabled=disabled] { background: #1c1a28; color: var(--color-text-muted); }

/* Barevné řádky col1..col5 → tmavé tinty (čitelné) */
html[data-theme="dark"] tr.col1 > td, html[data-theme="dark"] td.col1 { background: #2a2613; }
html[data-theme="dark"] tr.col2 > td, html[data-theme="dark"] td.col2 { background: #2a1a26; }
html[data-theme="dark"] tr.col4 > td, html[data-theme="dark"] td.col4 { background: #2a2014; }
html[data-theme="dark"] tr.col5 > td, html[data-theme="dark"] td.col5 { background: #102a2d; }

/* --- Sumace ---------------------------------------------------------------- */
html[data-theme="dark"] table.sumace tr.today td { background: #2a2613; }
html[data-theme="dark"] table.sumace tr.today .sumace-date { color: var(--color-primary); }
html[data-theme="dark"] table.sumace tr:not(.header):hover td { background: #241f3d !important; }
html[data-theme="dark"] table.sumace tr.header th { background: #221f37; color: var(--color-text); }
html[data-theme="dark"] table.sumace tr.header:last-child th { background: #1c1a2e; border-top-color: var(--color-primary); }

/* Dashboard highlight box */
html[data-theme="dark"] .dashboard-box.highlight { background: #2a2613; border-color: #4a4022; }
html[data-theme="dark"] .dashboard-box-estimate .dashboard-box-pct { background: rgba(255,255,255,0.08); }

/* --- Inputy se speciální barvou ------------------------------------------- */
html[data-theme="dark"] input.ui-autocomplete-input { background: #1c1a28; }
html[data-theme="dark"] input.ui-autocomplete-input:focus { background: #231f3a; }
html[data-theme="dark"] input[readonly=readonly],
html[data-theme="dark"] select[readonly=readonly],
html[data-theme="dark"] a[readonly=readonly] { background: #1c1a28; color: var(--color-text-secondary); }
html[data-theme="dark"] input.main { background: #1c2a1a; color: var(--color-text); }
html[data-theme="dark"] input.position { background: #2a2613; color: var(--color-text); }
html[data-theme="dark"] #content table.ordershelper th form div input.orderinput {
	background: #14121c; border-color: #3b3656; color: var(--color-text);
}

/* Stavový select (pill) — barva pillu se nastavuje inline (světlá, semantika),
   text MUSÍ zůstat tmavý i v dark režimu. Pojistka: světlé fallback pozadí BEZ
   !important → platná inline barva ho přebije, ale stav s vadnou/prázdnou
   fstavbarvou (jinak spadne na tmavé pozadí motivu) zůstane čitelný. */
html[data-theme="dark"] select.cstavid { background-color: #ece8f7; color: #1a1a1a !important; }
html[data-theme="dark"] select.cstavid option { background: #1e1b2b; color: #f3f1f9; }

/* Prodejky / mikro tabulky */
html[data-theme="dark"] small.fll.prodejks,
html[data-theme="dark"] td small.prodejks { background: #1c1a28; color: #a8a1be; }
html[data-theme="dark"] small.fll.prodejks a { color: #a8a1be; }
html[data-theme="dark"] table.microshow td { border-bottom-color: #322d4d !important; }

/* Recenze */
html[data-theme="dark"] .review { border-bottom-color: var(--color-border); }
html[data-theme="dark"] .review .content { background: #1e1b2b; color: var(--color-text); }
html[data-theme="dark"] .review .minicontent { color: var(--color-text); }
html[data-theme="dark"] .review .content.add { background: #1c1a28; }

/* Drobnosti */
html[data-theme="dark"] span.showcontent { color: var(--color-text); }
html[data-theme="dark"] table.varianty { border-color: var(--color-border); }
html[data-theme="dark"] .ajaxing .left { border-color: var(--color-surface); }
html[data-theme="dark"] .buttonbar a:link, html[data-theme="dark"] .buttonbar a:visited { color: var(--color-text); }
html[data-theme="dark"] .buttonbar a.selected:link, html[data-theme="dark"] .buttonbar a.selected:visited { color: #f0a0a0; background: #2c1717; }
html[data-theme="dark"] .filter-toggle.active { background: #2c2450; color: var(--color-primary); }

/* Barevné textové třídy (na světlém byly tmavé) → zesvětlit */
html[data-theme="dark"] span.l { color: #9b8cff !important; }
html[data-theme="dark"] span.g { color: #8ec964 !important; }
html[data-theme="dark"] span.r, html[data-theme="dark"] strong.red { color: #f08a8a !important; }

/* Číselníky — překladové skupiny (světlé pastely → tmavé tinty) */
html[data-theme="dark"] table.full tr.cistrans-grp-0 > th, html[data-theme="dark"] table.full tr.cistrans-grp-0 > td { background: #1a1830; }
html[data-theme="dark"] table.full tr.cistrans-grp-1 > th, html[data-theme="dark"] table.full tr.cistrans-grp-1 > td { background: #15251a; }
html[data-theme="dark"] table.full tr.cistrans-grp-2 > th, html[data-theme="dark"] table.full tr.cistrans-grp-2 > td { background: #2a1f12; }
html[data-theme="dark"] table.full tr.cistrans-grp-3 > th, html[data-theme="dark"] table.full tr.cistrans-grp-3 > td { background: #221330; }

/* --- Hlavička: stavové texty se zadrátovaným inline color (SQL/API) --------
   Inline style="color:black|red" → CSS s !important přebije (inline nemá !important). */
html[data-theme="dark"] #changemoney, html[data-theme="dark"] #apiversion { color: #cbd5e1 !important; }
html[data-theme="dark"] #changemoney[style*="red"], html[data-theme="dark"] #apiversion[style*="red"] { color: #f08a8a !important; }
/* Mobilní sidebar-login: SQL/API badge měly bílé pozadí (#fff) → na tmavém zářily */
html[data-theme="dark"] #sidebar .sidebar-login #changemoney,
html[data-theme="dark"] #sidebar .sidebar-login #apiversion { background-color: #2a2440 !important; color: #cbd5e1 !important; }
/* Odkaz „Manuál" v hlavičce (jen prazdroj) je tmavě zelený (#264c2f) → na tmavé hlavičce neviditelný */
html[data-theme="dark"] #login li a.admin-link-manual { color: #6fcf97 !important; }

/* ============================================================================
   SVG / IKONY — přebarvení na tmavém
   ----------------------------------------------------------------------------
   - Ikony jsou převážně font (Lucide): dědí color → přebarví se samy s textem.
   - Inline <svg> s currentColor (vč. přepínače motivu): dědí color → OK.
   - Pojistka: ikony se zadrátovanou ČERNOU (fill/stroke) by na tmavém zmizely
     → přemapujeme na barvu textu. Cílíme jen na černou, barevné SVG (vlajky,
     loga, stavové ikony) zůstávají nedotčené.
   ============================================================================ */
html[data-theme="dark"] #content svg[fill="#000"],
html[data-theme="dark"] #content svg[fill="#000000"],
html[data-theme="dark"] #content svg[fill="black"],
html[data-theme="dark"] #content svg [fill="#000"],
html[data-theme="dark"] #content svg [fill="#000000"],
html[data-theme="dark"] #content svg [fill="black"],
html[data-theme="dark"] #sidebar svg[fill="black"],
html[data-theme="dark"] #header svg[fill="black"] { fill: var(--color-text); }
html[data-theme="dark"] #content svg[stroke="#000"],
html[data-theme="dark"] #content svg[stroke="black"],
html[data-theme="dark"] #content svg [stroke="#000"],
html[data-theme="dark"] #content svg [stroke="black"] { stroke: var(--color-text); }

/* Bitmapové/monochromatické ikonky (jQuery UI datepicker spouštěč apod.) — invert */
html[data-theme="dark"] img.ui-datepicker-trigger { filter: invert(0.88) hue-rotate(180deg); }

/* ============================================================================
   COLORBOX (modální okna / framed editace)
   Vnitřek iframe je samostatná admin stránka → načte tento soubor a téma
   z localStorage, takže ztmavne sám. Tady jen ztmavíme rám colorboxu.
   ============================================================================ */
/* Horní lišta + zavírací ✕ + okraj jsou v admin22.css (indigo pro light i dark).
   Tady jen ztmavíme plochy, ať při otevírání neproblikne bílé okno. */
html[data-theme="dark"] #cboxWrapper,
html[data-theme="dark"] #cboxContent { background: var(--color-surface) !important; }
html[data-theme="dark"] #cboxCurrent { color: var(--color-text-secondary) !important; }
html[data-theme="dark"] #cboxLoadedContent { background: var(--color-bg) !important; }
html[data-theme="dark"] #colorbox iframe,
html[data-theme="dark"] #cboxLoadedContent iframe,
html[data-theme="dark"] .cboxIframe { background: var(--color-bg) !important; }
html[data-theme="dark"] .leftbox { border-right-color: var(--color-border); }
html[data-theme="dark"] .rightbox { border-left-color: var(--color-border); }

/* ============================================================================
   TinyMCE 8 — tmavý režim UI (toolbar / menu / dialogy / statusbar).
   Vychází z reference tinymce-imagemanager (html.tox-dark): vyšší specificita
   + !important přebíjí custom.css (světlý overlay). Lucide ikony jedou přes
   currentColor → stačí obrátit barvu textu a ikony se přebarví samy.
   Plocha obsahu (iframe) zůstává dle content_css = věrný náhled (světlého) webu.
   ============================================================================ */
html[data-theme="dark"] .tox.tox-tinymce { border-color: var(--color-border) !important; box-shadow: 0 1px 2px rgba(0,0,0,.4) !important; }
html[data-theme="dark"] .tox .tox-editor-header,
html[data-theme="dark"] .tox .tox-toolbar,
html[data-theme="dark"] .tox .tox-toolbar__primary,
html[data-theme="dark"] .tox .tox-toolbar-overlord { background: #1e1b2b !important; border-bottom-color: var(--color-border) !important; }
html[data-theme="dark"] .tox .tox-toolbar__group { border-right-color: #28243c !important; }
html[data-theme="dark"] .tox .tox-tbtn { color: #e2deec !important; }
html[data-theme="dark"] .tox .tox-tbtn:hover { background: #2a2440 !important; color: #fff !important; }
html[data-theme="dark"] .tox .tox-tbtn--enabled,
html[data-theme="dark"] .tox .tox-tbtn--enabled:hover { background: #2c2450 !important; color: #b7aae8 !important; }
html[data-theme="dark"] .tox .tox-tbtn__select-label,
html[data-theme="dark"] .tox .tox-listbox__select-label,
html[data-theme="dark"] .tox .tox-tbtn__select-chevron svg { color: #e2deec !important; }
html[data-theme="dark"] .tox .tox-split-button:hover { background: #2a2440 !important; }
html[data-theme="dark"] .tox .tox-statusbar { background: #1e1b2b !important; border-top-color: var(--color-border) !important; color: #a8a1be !important; }
html[data-theme="dark"] .tox .tox-statusbar a,
html[data-theme="dark"] .tox .tox-statusbar__path-item { color: #c6c0da !important; }
html[data-theme="dark"] .tox .tox-menu,
html[data-theme="dark"] .tox .tox-collection--list,
html[data-theme="dark"] .tox .tox-dialog,
html[data-theme="dark"] .tox .tox-dialog__header,
html[data-theme="dark"] .tox .tox-dialog__footer,
html[data-theme="dark"] .tox .tox-toolbar__overflow,
html[data-theme="dark"] .tox .tox-pop__dialog { background: #1e1b2b !important; border-color: var(--color-border) !important; color: #e2deec !important; }
html[data-theme="dark"] #tox-dialog-wrap__backdrop,
html[data-theme="dark"] .tox-dialog__backdrop,
html[data-theme="dark"] .tox .tox-dialog-wrap__backdrop { background: rgba(0, 0, 0, 0.72) !important; }
html[data-theme="dark"] .tox .tox-collection__item { color: #e2deec !important; }
html[data-theme="dark"] .tox .tox-collection__item--active:not(.tox-collection__item--state-disabled) { background: #2a2440 !important; color: #fff !important; }
html[data-theme="dark"] .tox .tox-collection__item--enabled { color: #b7aae8 !important; }
html[data-theme="dark"] .tox .tox-collection__group { border-bottom-color: #28243c !important; }
html[data-theme="dark"] .tox .tox-textfield,
html[data-theme="dark"] .tox .tox-textarea,
html[data-theme="dark"] .tox .tox-listbox,
html[data-theme="dark"] .tox .tox-toolbar-textfield { background: #14121c !important; border-color: var(--color-border) !important; color: #e2deec !important; }
html[data-theme="dark"] .tox .tox-label,
html[data-theme="dark"] .tox .tox-toolbar-label,
html[data-theme="dark"] .tox .tox-dialog__title { color: #c6c0da !important; }
/* Dialogové záložky (Obecné/Pokročilé) — tmavě modrá byla na tmavém nečitelná */
html[data-theme="dark"] .tox .tox-dialog__body-nav-item,
html[data-theme="dark"] .tox .tox-tab { color: var(--color-text-secondary) !important; }
html[data-theme="dark"] .tox .tox-dialog__body-nav-item--active,
html[data-theme="dark"] .tox .tox-tab--active,
html[data-theme="dark"] .tox .tox-dialog__body-nav-item:focus { color: #b7aae8 !important; border-bottom-color: #b7aae8 !important; }
html[data-theme="dark"] .tox .tox-button--naked.tox-button--icon,
html[data-theme="dark"] .tox .tox-browse-url { color: #e2deec !important; }
html[data-theme="dark"] .tox .tox-button--naked.tox-button--icon:hover,
html[data-theme="dark"] .tox .tox-browse-url:hover { background: #2a2440 !important; color: #fff !important; }
/* Ikony se zadrátovaným fill (custom.css je nutí na black) → světlé */
html[data-theme="dark"] .tox .tox-button--icon .tox-icon svg,
html[data-theme="dark"] .tox .tox-button.tox-button--icon .tox-icon svg,
html[data-theme="dark"] .tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg { fill: #e2deec !important; }
/* Tlačítka v dialozích — primární indigo, sekundární tmavé */
html[data-theme="dark"] .tox .tox-button:not(.tox-button--secondary):not(.tox-button--naked) { background: var(--color-primary) !important; border-color: var(--color-primary) !important; color: #fff !important; }
html[data-theme="dark"] .tox .tox-button--secondary { background-color: #2a2440 !important; color: #e2deec !important; }
/* Notifikace / okraj edit-area */
html[data-theme="dark"] .tox .tox-notification { background: #2a2440 !important; color: #e2deec !important; border-color: var(--color-border) !important; }

/* ============================================================================
   BUILDER polí (menu builder / widget designer / notify) — tmavé tinty.
   Barevné kódování typů (Section/Group/Category/Brand/URL) zůstává, jen tmavé
   + světlý text (na světlém pastelu by byl světlý text adminu nečitelný).
   ============================================================================ */
/* Sjednocená paleta builderu — jasně odlišené tmavé tinty + barevný levý proužek.
   Platí jak pro .bldsel-* třídy (Menu::selector), tak pro inline style="background:lightX"
   (widget designer, notify, landing*, polozky, tags, marketing-edit, NP_eShop…),
   i pro položky menu (table.micro). !important kvůli ui-autocomplete-input / inline. */
html[data-theme="dark"] .bldsel-section,
html[data-theme="dark"] [style*="background:lightyellow"],
html[data-theme="dark"] [style*="background: lightyellow"],
html[data-theme="dark"] [style*="background:#FFFFE0"],
html[data-theme="dark"] [style*="background-color:#FFFFE0"],
html[data-theme="dark"] [style*="background-color: #FFFFE0"],
html[data-theme="dark"] [style*="background-color:#dede00"],
html[data-theme="dark"] [style*="background-color: #dede00"],
html[data-theme="dark"] input.ctitle { background: #332a12 !important; color: #f0e9d8 !important; border-left: 3px solid #e3b264 !important; }
html[data-theme="dark"] .bldsel-group,
html[data-theme="dark"] [style*="background:lightgreen"],
html[data-theme="dark"] [style*="background: lightgreen"] { background: #15301d !important; color: #dff0e4 !important; border-left: 3px solid #5cc090 !important; }
html[data-theme="dark"] .bldsel-category,
html[data-theme="dark"] [style*="background:lightcoral"],
html[data-theme="dark"] [style*="background: lightcoral"] { background: #331a1a !important; color: #f5dada !important; border-left: 3px solid #e98a8a !important; }
html[data-theme="dark"] .bldsel-brand,
html[data-theme="dark"] [style*="background:lightblue"],
html[data-theme="dark"] [style*="background: lightblue"],
html[data-theme="dark"] #content table.micro input[type=text][value^="#"] { background: #18294a !important; color: #dbe4ff !important; border-left: 3px solid #7aa2f0 !important; }
html[data-theme="dark"] [style*="background:lightpink"],
html[data-theme="dark"] [style*="background: lightpink"] { background: #331a28 !important; color: #f5dbe9 !important; border-left: 3px solid #e294ba !important; }
html[data-theme="dark"] [style*="background:lightbrown"],
html[data-theme="dark"] [style*="background: lightbrown"] { background: #2e2616 !important; color: #ecdcc0 !important; border-left: 3px solid #c9a36a !important; }
html[data-theme="dark"] .bldsel-url,
html[data-theme="dark"] [style*="background:#eee"],
html[data-theme="dark"] [style*="background: #eee"],
html[data-theme="dark"] [style*="background-color:#eee"],
html[data-theme="dark"] [style*="background-color: #eee"],
html[data-theme="dark"] [style*="background:lightgray"],
html[data-theme="dark"] [style*="background: lightgray"],
html[data-theme="dark"] [style*="background:lightgrey"],
html[data-theme="dark"] [style*="background: lightgrey"],
html[data-theme="dark"] #content table.micro input[type=text][value^="|"],
html[data-theme="dark"] #content table.micro input[type=text][name^="url"] { background: #242230 !important; color: #e7e3f2 !important; border-left: 3px solid #6b6488 !important; }
/* Tečkovaný fieldset v builderu (border #aaa) */
html[data-theme="dark"] #content fieldset[style*="dotted"] { border-color: var(--color-border) !important; }

/* --- jQuery UI: našeptávač (autocomplete) + menu + datepicker ------------------
   jquery-ui.css se načítá PO admin20*.css a má .ui-widget-content{background:#fff}.
   Přebijeme vyšší specificitou (html[data-theme=dark] …) na tmavé plochy. */
html[data-theme="dark"] .ui-widget-content,
html[data-theme="dark"] .ui-menu,
html[data-theme="dark"] .ui-autocomplete,
html[data-theme="dark"] .ui-widget.ui-widget-content { background: var(--color-surface) !important; color: var(--color-text) !important; border-color: var(--color-border) !important; }
html[data-theme="dark"] .ui-menu .ui-menu-item,
html[data-theme="dark"] .ui-autocomplete .ui-menu-item { border-bottom-color: var(--color-border-light) !important; }
html[data-theme="dark"] .ui-menu .ui-menu-item-wrapper,
html[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper { color: var(--color-text) !important; }
html[data-theme="dark"] .ui-menu .ui-menu-item-wrapper.ui-state-active,
html[data-theme="dark"] .ui-menu .ui-state-focus,
html[data-theme="dark"] .ui-state-hover,
html[data-theme="dark"] .ui-state-focus,
html[data-theme="dark"] .ui-state-active { background: var(--color-primary-light) !important; color: var(--color-text) !important; border-color: var(--color-primary) !important; }
html[data-theme="dark"] .ui-widget-header { background: var(--color-primary) !important; border-color: var(--color-primary) !important; color: #fff !important; }

/* Tooltip „Uložit aktuální filtr" (span.filter.save::after) — používá var(--color-text)
   jako pozadí (v light tmavé, v dark světlé → nečitelné). Přebít na tmavé. */
html[data-theme="dark"] span.filter.save:hover::after { background: var(--color-table-head) !important; color: var(--color-table-head-text) !important; }

/* Produktové náhledy ve výpise (eshoplist) — bílé „kartičky" oddělit od tmavého
   UI jemným okrajem (velikost/podklad řeší admin22.css, viz .eshoplistimage). */
html[data-theme="dark"] .eshoplistimage {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	filter: brightness(.78);              /* ztlumit glare bílých produktovek */
	transition: filter var(--transition-fast);
}
/* Při najetí plný jas, ať je vidět detail */
html[data-theme="dark"] .eshoplistimage:hover,
html[data-theme="dark"] a.colorbox:hover .eshoplistimage { filter: brightness(1.05); }

/* ============================================================================
   DOLADĚNÍ (audit) — zbývající INLINE světlé barvy mimo standardní sadu.
   ============================================================================ */
/* Zvýrazněný řádek tabulky (dodavatele/precenit) — inline background:#fff3cd */
html[data-theme="dark"] [style*="#fff3cd"] { background: #3a3115 !important; }
html[data-theme="dark"] tr[style*="#fff3cd"] > td,
html[data-theme="dark"] tr[style*="#fff3cd"] > th { background: #3a3115 !important; color: #f0e9d8 !important; }
/* Flash / úspěšná hláška — inline background:#e7f6e7 + border #9c9 */
html[data-theme="dark"] [style*="#e7f6e7"] { background: #16291c !important; color: #dff0e4 !important; border-color: #2c5a38 !important; }
/* Koncept-filtr <details> panel (ciselnik1.lib.php) — světlé pastely + zelená šipka */
html[data-theme="dark"] [style*="background:#e8f0fe"] { background: #1a2740 !important; border-color: #2c456e !important; }
html[data-theme="dark"] [style*="background:#f7f7f8"] { background: #1c1a28 !important; border-color: var(--color-border) !important; }
html[data-theme="dark"] [style*="color:#1b5e20"],
html[data-theme="dark"] [style*="color: #1b5e20"] { color: #7ec98f !important; }
/* VIP klub — badge „No discount" (#f5f5f5/#555) vybledlý na tmavém */
html[data-theme="dark"] .vipgid-1 { background: #2c2840 !important; color: #cbd5e1 !important; }
