/* ============================================================================
   Fleetingo admin — dark mode, the legacy half
   ----------------------------------------------------------------------------
   tokens.css already redefines every token for dark mode, so any screen that
   speaks tokens is done. This file is for the two stylesheets that came with the
   template and still write raw hex -- modern.css and the older parts of
   custom.css. Nothing in here changes light mode: every rule is behind
   [data-theme="dark"], so the worst a mistake can do is look wrong in dark.

   As a screen gets swept onto tokens, its rule here can go away.
   ========================================================================== */

[data-theme="dark"] body {
	background: var(--c-canvas);
	color: var(--c-ink);
}

[data-theme="dark"] .page-content { background: var(--c-canvas); }
[data-theme="dark"] .page-inner { background: var(--c-canvas); }

[data-theme="dark"] .page-content .page-inner .page-title,
[data-theme="dark"] .page-content .page-inner .bottom-container {
	background-color: var(--c-white);
	border-color: var(--c-line);
	box-shadow: 0 3px 3px -1px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .page-content .page-inner .bottom-container {
	box-shadow: 0 -3px 3px -1px rgba(0, 0, 0, 0.45);
}

/* ---- the sidebar --------------------------------------------------------- *
 * It is navy in light mode, which is contrast enough against a white page. On a
 * dark page the same trick stops working: two dark surfaces side by side read as
 * one slab. So the rail goes deeper than the page and takes an edge, and the
 * labels stop shouting -- white on near-black at this size glares, and with no
 * current-item marker in the menu there is nothing for it to be brighter than.
 * ------------------------------------------------------------------------- */

[data-theme="dark"] .page-content .page-sidebar,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .menu.accordion-menu {
	background: #0a0e13;
}
[data-theme="dark"] .page-content .page-sidebar { border-right: 1px solid #1f2731; }

[data-theme="dark"] .page-content .page-sidebar .accordion-menu a,
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li > a {
	color: #b2bdc9;
	transition: color 120ms, background-color 120ms;
}
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li > a .menu-icon { color: #8d99a7; }

[data-theme="dark"] .menu.accordion-menu > li > a:hover,
[data-theme="dark"] .menu.accordion-menu > li.active > a,
[data-theme="dark"] .menu.accordion-menu > li.active.open > a,
[data-theme="dark"] .menu.accordion-menu li.open > a,
[data-theme="dark"] .hover-menu .accordion-menu > li.droplink:hover > a {
	background: #151c25;
}
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li > a:hover,
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li.active > a,
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li.open > a { color: #ffffff; }
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li > a:hover .menu-icon,
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li.open > a .menu-icon { color: #ffffff; }

/* the group separator is drawn with --c-muted, which is a legible grey in dark --
   far too legible for a hairline nobody is meant to look at */
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li.divider { background-color: #212a35; }

/* the section panel opens over the page, so it has to lift off the rail it came from */
[data-theme="dark"] .page-content .page-sidebar .accordion-menu > li > .menu-panel {
	background: #1a212b;
	border-color: #2c3644;
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65);
}
[data-theme="dark"][data-menu="classic"] .menu-group > .menu-group-items {
	background: #222b37;
	border-color: #313c4b;
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65);
}
[data-theme="dark"] .menu-group-title { color: #7f8c9a; border-bottom-color: #2c3644; }
[data-theme="dark"][data-menu="classic"] .menu-group > .menu-group-title { color: #c2cbd6; }
[data-theme="dark"][data-menu="classic"] .menu-group:hover > .menu-group-title { background-color: #262f3c; color: #ffffff; }
/* the group the open screen sits in -- same specificity as the rule above, so it has to be said here */
[data-theme="dark"][data-menu="classic"] .menu-group.is-current-group > .menu-group-title { background-color: #2b3644; color: #ffffff; }
[data-theme="dark"][data-menu="mega"] .menu-group.is-current-group > .menu-group-title {
	color: var(--c-nav-mark);
	border-bottom-color: var(--c-nav-mark);
}
[data-theme="dark"] .page-content .page-sidebar .accordion-menu .menu-link { color: #c2cbd6; }
[data-theme="dark"] .page-content .page-sidebar .accordion-menu .menu-link:hover,
[data-theme="dark"] .page-content .page-sidebar .accordion-menu .menu-link:focus { background-color: #262f3c; color: #ffffff; }
[data-theme="dark"] .page-content .page-sidebar .accordion-menu .menu-link.is-current { background-color: #2b3644; color: #ffffff; }


/* ---- panels, cards, tabs ------------------------------------------------ */

[data-theme="dark"] .panel,
[data-theme="dark"] .panel-white,
[data-theme="dark"] .panel-default,
[data-theme="dark"] .panel .panel-body,
[data-theme="dark"] .tab-content,
[data-theme="dark"] .well {
	background: var(--c-white);
	color: var(--c-ink);
}
[data-theme="dark"] .panel { box-shadow: var(--shadow-card); }
[data-theme="dark"] .panel-default > .panel-heading,
[data-theme="dark"] .panel > .panel-heading {
	background: var(--c-head);
	border-color: var(--c-line-panel);
	color: var(--c-label);
}

[data-theme="dark"] .nav-tabs { border-bottom-color: var(--c-line); }
[data-theme="dark"] .nav-tabs > li > a { color: var(--c-soft); border-bottom-color: var(--c-line); }
[data-theme="dark"] .nav-tabs > li > a:hover { background: var(--c-head); border-color: var(--c-line); }
[data-theme="dark"] .nav-tabs > li.active > a,
[data-theme="dark"] .nav-tabs > li.active > a:hover,
[data-theme="dark"] .nav-tabs > li.active > a:focus {
	background-color: var(--c-white);
	border-color: var(--c-line);
	border-bottom-color: var(--c-white);
	color: var(--c-ink-strong);
}
[data-theme="dark"] .nav-pills > li > a { color: var(--c-soft); }
[data-theme="dark"] .translatable-container .nav-tabs li.active { background-color: var(--c-white); }


/* ---- tables -------------------------------------------------------------- */

[data-theme="dark"] .table { color: var(--c-ink); background-color: transparent; }
[data-theme="dark"] .table > thead > tr > th,
[data-theme="dark"] .table > tbody > tr > td,
[data-theme="dark"] .table > tbody > tr > th,
[data-theme="dark"] .table > tfoot > tr > td {
	border-color: var(--c-line-soft);
}
[data-theme="dark"] .table > thead > tr > th { background-color: var(--c-table-head); border-bottom-color: var(--c-line); color: var(--c-table-head-ink); }
[data-theme="dark"] .table > tbody > tr > td { background-color: var(--c-white); }
[data-theme="dark"] .table.table-white > tbody > tr > td { background-color: var(--c-white); }
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td { background-color: var(--c-ground); }
[data-theme="dark"] .table-hover > tbody > tr:hover > td { background-color: var(--c-row-hover); }
/* Bootstrap's contextual rows: a <th> in them kept its light wash under the light dark-theme ink
   (VAT reconciliation "Rozdíl" unreadable) -- the dark washes for the cells of both kinds */
[data-theme="dark"] .table > tbody > tr.warning > td, [data-theme="dark"] .table > tbody > tr.warning > th { background-color: var(--c-warn-wash); }
[data-theme="dark"] .table > tbody > tr.danger > td, [data-theme="dark"] .table > tbody > tr.danger > th { background-color: var(--c-bad-wash); }
[data-theme="dark"] .table > tbody > tr.success > td, [data-theme="dark"] .table > tbody > tr.success > th { background-color: var(--c-ok-wash); }
[data-theme="dark"] .table > tbody > tr.info > td, [data-theme="dark"] .table > tbody > tr.info > th { background-color: var(--c-info-wash); }
/* here every cell carries the hover itself, the sticky ones included; the light theme's opaque
   sticky hover (custom.css) would make them lighter than the rest */
[data-theme="dark"] .ff-table-sticky > .table.table-hover > tbody > tr:hover > td.ff-col-check,
[data-theme="dark"] .ff-table-sticky > .table.table-hover > tbody > tr:hover > td.ff-col-actions,
[data-theme="dark"] .ff-table-sticky > .table.table-hover > tbody > tr:hover > td.ff-col-key { background-color: var(--c-row-hover); background-image: none; }
[data-theme="dark"] .table > thead > tr.filters > th,
[data-theme="dark"] .table > thead > tr.filters .btn {
	background-color: var(--c-filter);
	border-color: var(--c-line-input-sm);
	color: var(--c-soft);
}


/* ---- forms --------------------------------------------------------------- */

[data-theme="dark"] .form-control,
[data-theme="dark"] textarea.form-control,
[data-theme="dark"] select.form-control {
	background-color: var(--c-white);
	border-color: var(--c-line-input);
	color: var(--c-ink-field);
}
[data-theme="dark"] .form-control:focus { background-color: var(--c-white); border-color: var(--c-info-ink); }
[data-theme="dark"] .form-control::placeholder { color: var(--c-quiet); }
[data-theme="dark"] input[disabled],
[data-theme="dark"] .form-control[disabled],
[data-theme="dark"] .form-control[readonly] {
	background-color: var(--c-sunk);
	border-color: var(--c-line-input-sm);
	color: var(--c-muted);
}
[data-theme="dark"] .input-group-addon {
	background-color: var(--c-head);
	border-color: var(--c-line-input);
	color: var(--c-soft);
}
[data-theme="dark"] label,
[data-theme="dark"] .control-label { color: var(--c-soft); }
[data-theme="dark"] .form-part,
[data-theme="dark"] .form-part.form-part-white,
[data-theme="dark"] .form-part-toggle {
	background-color: var(--c-white);
	border-color: var(--c-line);
}

/* uniform replaces checkboxes and radios with a sprite that is drawn for a white
   ground; inverting it is cheaper than reskinning the plugin */
[data-theme="dark"] .checker span,
[data-theme="dark"] .radio span { filter: invert(0.88) hue-rotate(180deg); }


/* ---- buttons, dropdowns, badges ------------------------------------------ */

/* In light mode a secondary button is white with a thin edge -- the panel surface
   with an outline, not a filled chip. Dark keeps that relationship: the surface
   token, an outline, and a lift on hover rather than a different colour.        */
[data-theme="dark"] .btn-default {
	background-color: var(--c-white);
	border-color: var(--c-line-input);
	color: var(--c-ink);
}
[data-theme="dark"] .btn-default:hover,
[data-theme="dark"] .btn-default:focus,
[data-theme="dark"] .btn-default:active,
[data-theme="dark"] .btn-group.open .btn-default.dropdown-toggle,
[data-theme="dark"] .btn.btn-default.active {
	background-color: var(--c-head);
	border-color: var(--c-line-chip);
	color: var(--c-ink-strong);
}

/* A fill mixed for a white page glares on a dark one: same hue, pulled back a
   step, and hover brightens instead of darkening -- on dark, "more" is lighter. */
[data-theme="dark"] .btn-success { background-color: #15806f; color: #ffffff; }
[data-theme="dark"] .btn-success:hover,
[data-theme="dark"] .btn-success:focus,
[data-theme="dark"] .btn-success:active,
[data-theme="dark"] .btn-group.open .btn-success.dropdown-toggle,
[data-theme="dark"] .btn.btn-success.active { background-color: #1b9c87; color: #ffffff; }

/* a link drawn as a button ("Zpět na přehled sestav") kept Bootstrap's #337ab7, 3.67:1 on the dark panel (DS5-04) */
[data-theme="dark"] .btn-link,
[data-theme="dark"] .btn-link:hover,
[data-theme="dark"] .btn-link:focus { color: var(--c-link); }
/* .btn-info sat in the link rule above: link-blue words on the cyan button ("Odeslat e-mailem", 1.2:1) */
[data-theme="dark"] .btn-info,
[data-theme="dark"] .btn-primary { background-color: #0f7f93; color: #ffffff; }  /* white 4.7:1; #1394ab was 3.59 (DS5-04) */
[data-theme="dark"] .btn-info:hover,
[data-theme="dark"] .btn-info:focus,
[data-theme="dark"] .btn-info:active,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary:active,
[data-theme="dark"] .btn-group.open .btn-info.dropdown-toggle,
[data-theme="dark"] .btn-group.open .btn-primary.dropdown-toggle,
[data-theme="dark"] .btn.btn-info.active,
[data-theme="dark"] .btn.btn-primary.active { background-color: #0d7386; color: #ffffff; }  /* white 5.5:1; #1cadc7 was 2.9 */

[data-theme="dark"] .btn-danger { background-color: #d45253; color: #ffffff; }
[data-theme="dark"] .btn-danger:hover,
[data-theme="dark"] .btn-danger:focus,
[data-theme="dark"] .btn-danger:active,
[data-theme="dark"] .btn-group.open .btn-danger.dropdown-toggle,
[data-theme="dark"] .btn.btn-danger.active { background-color: #ef6a6b; color: #ffffff; }

/* DS15-01: dark text on the amber, white was 2.7 : 1 -- #1f242a on #c99520 5.8 : 1, on #e0a827 7.2 : 1 */
[data-theme="dark"] .btn-warning { background-color: #c99520; color: #1f242a; }
[data-theme="dark"] .btn-warning:hover,
[data-theme="dark"] .btn-warning:focus,
[data-theme="dark"] .btn-warning:active,
[data-theme="dark"] .btn-group.open .btn-warning.dropdown-toggle,
[data-theme="dark"] .btn.btn-warning.active { background-color: #e0a827; color: #1f242a; }

/* on a coloured fill the icon half wants a darker slice, not the theme's veil */
/* the icon sits inline with the label now, without a box of its own (custom.css, buttons) */
[data-theme="dark"] .btn-addon i,
[data-theme="dark"] .btn-default.btn-addon i { background-color: transparent; }

/* disabled: the dark fill of its own kind, held back -- not the light one custom.css gives it */
[data-theme="dark"] .btn-default.disabled, [data-theme="dark"] .btn-default[disabled] { background-color: var(--c-white); border-color: var(--c-line-input); color: var(--c-ink); }
[data-theme="dark"] .btn-success.disabled, [data-theme="dark"] .btn-success[disabled] { background-color: #15806f; color: #ffffff; }
[data-theme="dark"] .btn-info.disabled, [data-theme="dark"] .btn-info[disabled],
[data-theme="dark"] .btn-primary.disabled, [data-theme="dark"] .btn-primary[disabled] { background-color: #0f7f93; color: #ffffff; }
[data-theme="dark"] .btn-danger.disabled, [data-theme="dark"] .btn-danger[disabled] { background-color: #d45253; color: #ffffff; }
[data-theme="dark"] .btn-warning.disabled, [data-theme="dark"] .btn-warning[disabled] { background-color: #c99520; color: #1f242a; }

[data-theme="dark"] .btn[disabled],
[data-theme="dark"] .btn.disabled {
	opacity: 0.45;
}

/* a button reached by keyboard has to say so; the theme removes the outline */
[data-theme="dark"] .btn:focus-visible,
[data-theme="dark"] .form-control:focus-visible,
[data-theme="dark"] .theme-toggle:focus-visible {
	outline: 2px solid var(--c-info);
	outline-offset: 1px;
}
[data-theme="dark"] .dropdown-menu {
	background-color: var(--c-white);
	border-color: var(--c-line);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .dropdown-menu li a { color: var(--c-ink); }
[data-theme="dark"] .dropdown-menu li a:hover { background-color: var(--c-head); color: var(--c-ink-strong); }
[data-theme="dark"] .dropdown-menu:before { border-bottom-color: var(--c-line); }
[data-theme="dark"] .dropdown-menu:after { border-bottom-color: var(--c-white); }


/* ---- modals -------------------------------------------------------------- */

[data-theme="dark"] .modal-content {
	background-color: var(--c-white);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .modal-header { background-color: var(--c-table-head); color: var(--c-ink-strong); }
[data-theme="dark"] .modal-header .close { color: var(--c-muted); opacity: 1; text-shadow: none; }
[data-theme="dark"] .modal-footer { background-color: var(--c-white); border-top-color: var(--c-line-panel); }
[data-theme="dark"] .modal-backdrop.in { opacity: 0.7; }


/* ---- the header search, and the theme switch next to it ------------------ */

[data-theme="dark"] .global-search-trigger { background-color: var(--c-ground); border-color: var(--c-line-input-sm); color: var(--c-muted); }
[data-theme="dark"] .global-search-trigger:hover,
[data-theme="dark"] .global-search-trigger:focus { background-color: var(--c-head); border-color: var(--c-line-input); color: var(--c-soft); }
[data-theme="dark"] .global-search-trigger-key { background-color: var(--c-white); border-color: var(--c-line); color: var(--c-muted); }
[data-theme="dark"] .search-palette { background-color: rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .search-palette-dialog { background-color: var(--c-white); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65); }
[data-theme="dark"] .search-palette-hint kbd { background-color: var(--c-head); border-color: var(--c-line); color: var(--c-soft); }
[data-theme="dark"] .search-palette-field { border-bottom-color: var(--c-line); }
[data-theme="dark"] .search-palette-field .global-search-input { color: var(--c-ink-strong); }
[data-theme="dark"] .search-palette-field .global-search-input::placeholder { color: var(--c-quiet); }
[data-theme="dark"] .global-search-hit { border-bottom-color: var(--c-line-soft); color: var(--c-ink); }
[data-theme="dark"] .global-search-hit:hover,
[data-theme="dark"] .global-search-hit:focus { background-color: var(--c-head); }
[data-theme="dark"] .search-palette-close { background-color: var(--c-head); border-color: var(--c-line); color: var(--c-soft); }
[data-theme="dark"] .search-palette-close:hover { background-color: var(--c-filter); color: var(--c-ink); }


/* ---- plugins that ship their own white ----------------------------------- */

[data-theme="dark"] .select2-container--default .select2-selection--single,
[data-theme="dark"] .select2-container--default .select2-selection--multiple {
	background-color: var(--c-white);
	border-color: var(--c-line-input);
}
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--c-ink-field); }
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--c-quiet); }
[data-theme="dark"] .select2-dropdown {
	background-color: var(--c-white);
	border-color: var(--c-line);
}
[data-theme="dark"] .select2-container--default .select2-results__option { color: var(--c-ink); }
[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--c-info); color: #ffffff; }
[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] { background-color: var(--c-head); }
[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
	background-color: var(--c-sunk);
	border-color: var(--c-line-input);
	color: var(--c-ink);
}
/* the chip itself speaks the neutral pill's tokens in modern.css, which follow the mode (DS5-02) */

/* The date pickers ship their own dark theme (.xdsoft_dark); custom.js puts that class on them
   instead of this file reinventing it. What is left is pulling its near-black onto the app's own
   surfaces -- a pure #000 box next to a #191e26 form reads as a hole, not as a panel. */
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark {
	background: var(--c-white);
	border-color: var(--c-line);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label,
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select,
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select .xdsoft_option:hover {
	background: var(--c-white);
	color: var(--c-ink);
}
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td { background: var(--c-white); border-color: var(--c-line-soft); color: var(--c-ink); }
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th { background: var(--c-head); border-color: var(--c-line-soft); color: var(--c-soft); }
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_other_month,
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_disabled { color: var(--c-quiet); }
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
	background: var(--c-head)!important;
	color: var(--c-ink-strong)!important;
}
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box { border-color: var(--c-line); }
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box > div > div { background: var(--c-white); border-color: var(--c-line-soft); color: var(--c-ink); }
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
	background: var(--c-ok)!important;
	box-shadow: none!important;
	color: #ffffff!important;
}
[data-theme="dark"] .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today { color: var(--c-ok); }

[data-theme="dark"] .transport-point {
	background-color: var(--c-white);
	border-color: var(--c-line);
}


/* ---- Dropzone ------------------------------------------------------------ */

[data-theme="dark"] .dz-container .dz-clickable,
[data-theme="dark"] .dropzone {
	background-color: var(--c-white);
	border-color: var(--c-line);
	color: var(--c-soft);
}
[data-theme="dark"] .dropzone.dz-drag-hover { border-color: var(--c-info); background-color: var(--c-info-wash); }
[data-theme="dark"] .dropzone .dz-message { color: var(--c-soft); }
[data-theme="dark"] .dropzone .dz-preview .dz-image { background: var(--c-sunk); }
[data-theme="dark"] .dropzone .dz-preview .dz-details {
	background: rgba(0, 0, 0, 0.6);
	color: var(--c-ink-strong);
}
[data-theme="dark"] .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span,
[data-theme="dark"] .dropzone .dz-preview .dz-details .dz-filename:hover span {
	background-color: transparent;
	border-color: transparent;
}
[data-theme="dark"] .dropzone .dz-preview:not(.dz-processing) .dz-progress { background: var(--c-sunk); }


/* ---- CKEditor ------------------------------------------------------------
 *
 * The editing surface stays white on purpose: it is a preview of an e-mail that will
 * be read on white, and darkening it would misreport what is being written. Only the
 * chrome around it follows the theme -- and the icon sprite is drawn in dark grey, so
 * on a dark toolbar it has to be inverted or it disappears.
 * ------------------------------------------------------------------------- */

/* The moono skin is injected into <head> by the editor at runtime, so it lands after this
   file and wins every tie -- including the white gradients it paints as background-image.
   Hence the !important: it is the skin being overridden, not a specificity accident. */
[data-theme="dark"] .cke.cke_chrome { border-color: var(--c-line-input); box-shadow: none; }
[data-theme="dark"] .cke_inner { background: var(--c-white); }
[data-theme="dark"] .cke_top,
[data-theme="dark"] .cke_bottom {
	background-color: var(--c-head)!important;
	background-image: none!important;
	border-color: var(--c-line-input)!important;
	box-shadow: none!important;
}
/* a toolbar group is a frame around buttons, not a well sunk into the bar */
[data-theme="dark"] .cke_toolgroup,
[data-theme="dark"] .cke_combo_button {
	background-color: transparent!important;
	background-image: none!important;
	border-color: var(--c-line-input)!important;
	box-shadow: none!important;
}
[data-theme="dark"] .cke_button_label,
[data-theme="dark"] .cke_combo_text,
[data-theme="dark"] .cke_path_item,
[data-theme="dark"] .cke_path_empty,
[data-theme="dark"] a.cke_button,
[data-theme="dark"] .cke a { color: var(--c-ink)!important; }
[data-theme="dark"] .cke_button:hover,
[data-theme="dark"] .cke_button:focus,
[data-theme="dark"] .cke_button__source.cke_button_on,
[data-theme="dark"] .cke_combo:hover .cke_combo_button {
	background-color: var(--c-filter)!important;
	background-image: none!important;
	border-color: var(--c-line-chip)!important;
}
/* the icons are one sprite of dark glyphs; a partial invert only greys them out */
[data-theme="dark"] .cke_button_icon,
[data-theme="dark"] .cke_combo_arrow { filter: invert(1) hue-rotate(180deg); }
[data-theme="dark"] .cke_toolbar_separator { background-color: var(--c-line-input); }
[data-theme="dark"] .cke_button_disabled .cke_button_icon { opacity: 0.35; }
/* the document being written is the one thing that stays on paper */
[data-theme="dark"] .cke_contents { background: #ffffff!important; }
[data-theme="dark"] .cke_resizer { border-color: transparent var(--c-quiet) transparent transparent; }

/* the link and image dialogs are real DOM, unlike the format dropdown, which is an iframe */
[data-theme="dark"] .cke_dialog_body {
	background: var(--c-white);
	border-color: var(--c-line);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .cke_dialog_title,
[data-theme="dark"] .cke_dialog_footer { background: var(--c-head); color: var(--c-ink-strong); border-color: var(--c-line); }
[data-theme="dark"] .cke_dialog_contents { background: var(--c-white); border-color: var(--c-line); }
[data-theme="dark"] .cke_dialog_ui_labeled_label,
[data-theme="dark"] .cke_dialog_tab { color: var(--c-soft); }
[data-theme="dark"] .cke_dialog_ui_input_text,
[data-theme="dark"] .cke_dialog_ui_input_textarea,
[data-theme="dark"] .cke_dialog_ui_input_select {
	background: var(--c-sunk);
	border-color: var(--c-line-input);
	color: var(--c-ink);
}


/* ---- vis-timeline (dispatch board and plan) ------------------------------ */

[data-theme="dark"] .vis-timeline { border-color: var(--c-line); }
[data-theme="dark"] .vis-panel .vis-shadow { box-shadow: none; }
[data-theme="dark"] .vis-panel.vis-bottom,
[data-theme="dark"] .vis-panel.vis-center,
[data-theme="dark"] .vis-panel.vis-left,
[data-theme="dark"] .vis-panel.vis-right,
[data-theme="dark"] .vis-panel.vis-top { border-color: var(--c-line); }
[data-theme="dark"] .vis-time-axis .vis-text { color: var(--c-soft); }
[data-theme="dark"] .vis-time-axis .vis-grid.vis-minor { border-color: var(--c-line-soft); }
[data-theme="dark"] .vis-time-axis .vis-grid.vis-major { border-color: var(--c-line); }
[data-theme="dark"] .vis-time-axis .vis-grid.vis-saturday,
[data-theme="dark"] .vis-time-axis .vis-grid.vis-sunday { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .vis-labelset .vis-label,
[data-theme="dark"] .vis-foreground .vis-group { border-color: var(--c-line-soft); }
/* vis writes its label text as #4d4d4d, which on this ground is barely a shape */
[data-theme="dark"] .vis-labelset .vis-label { color: var(--c-ink); }
[data-theme="dark"] .vis-labelset .vis-label .vis-inner { color: inherit; }
[data-theme="dark"] .vis-item {
	background-color: var(--c-head);
	border-color: var(--c-line-input);
	color: var(--c-ink);
}
[data-theme="dark"] .vis-item.vis-selected { background-color: var(--c-warn-wash); border-color: var(--c-warn); }
[data-theme="dark"] .vis-item.vis-background { background-color: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .vis-tooltip {
	background: var(--c-white)!important;
	border-color: var(--c-line)!important;
	color: var(--c-ink)!important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6)!important;
}


/* ---- alertify (the delete confirmations) --------------------------------- */

[data-theme="dark"] .alertify {
	background: var(--c-white);
	border-color: var(--c-line);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .alertify-message { color: var(--c-ink); }
[data-theme="dark"] .alertify-text {
	background: var(--c-sunk);
	border-color: var(--c-line-input);
	color: var(--c-ink);
}
[data-theme="dark"] .alertify-cover { background: rgba(0, 0, 0, 0.55); }


/* ---- pickers that hang off an input -------------------------------------- */

[data-theme="dark"] .colorpicker,
[data-theme="dark"] .iconpicker-popover.popover {
	background-color: var(--c-white);
	border-color: var(--c-line);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
	color: var(--c-ink);
}
[data-theme="dark"] .popover-title { background-color: var(--c-head); border-bottom-color: var(--c-line); color: var(--c-ink-strong); }
[data-theme="dark"] .popover.bottom > .arrow:after { border-bottom-color: var(--c-head); }
[data-theme="dark"] .popover.top > .arrow:after { border-top-color: var(--c-white); }
[data-theme="dark"] .iconpicker-item { color: var(--c-ink); border-color: transparent; }
[data-theme="dark"] .iconpicker-item:hover { background-color: var(--c-head); }
[data-theme="dark"] .iconpicker-item.iconpicker-selected { background-color: var(--c-info); color: #ffffff; }
[data-theme="dark"] .iconpicker-search { background-color: var(--c-sunk); border-color: var(--c-line-input); color: var(--c-ink); }
[data-theme="dark"] .iconpicker-footer, [data-theme="dark"] .popover-footer { background-color: var(--c-head); border-top-color: var(--c-line); }


/* ---- jQuery UI (autocomplete lists, sortable helpers) -------------------- */

[data-theme="dark"] .ui-widget-content {
	background: var(--c-white);
	border-color: var(--c-line);
	color: var(--c-ink);
}
[data-theme="dark"] .ui-menu .ui-menu-item-wrapper { color: var(--c-ink); }
[data-theme="dark"] .ui-menu .ui-menu-item-wrapper.ui-state-active,
[data-theme="dark"] .ui-state-hover,
[data-theme="dark"] .ui-state-focus {
	background: var(--c-head);
	border-color: var(--c-line-input);
	color: var(--c-ink-strong);
}
[data-theme="dark"] .ui-widget-header { background: var(--c-head); border-color: var(--c-line); color: var(--c-ink-strong); }
[data-theme="dark"] .ui-sortable-helper { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); }


/* ---- magnific-popup ------------------------------------------------------
 * The overlay is already dark; only the frame around a non-image item is light.
 */
[data-theme="dark"] .mfp-content .mfp-iframe-scaler iframe,
[data-theme="dark"] .mfp-content .white-popup,
[data-theme="dark"] .mfp-inline-holder .mfp-content { background: var(--c-white); color: var(--c-ink); }
[data-theme="dark"] .mfp-bg { opacity: 0.9; }


/* ---- image cropper ------------------------------------------------------- */

[data-theme="dark"] .cropper-bg { background-color: var(--c-sunk); }
[data-theme="dark"] .cropper-modal { opacity: 0.7; }


/* ---- odds and ends ------------------------------------------------------- */

[data-theme="dark"] hr { border-top-color: var(--c-line); }
[data-theme="dark"] code, [data-theme="dark"] pre {
	background-color: var(--c-sunk);
	border-color: var(--c-line);
	color: var(--c-ink);
}
[data-theme="dark"] .text-muted { color: var(--c-muted); }
/* bootstrap's link blue is unreadable on a dark ground, but a .btn or a .badge is
   an anchor that already carries its own colour and must keep it -- and so is a pill (board switch,
   filter preset, chip): this rule outranks their one- or two-class selectors, so the active pill
   came out link blue on teal, 1.34:1 (DS2-07). The pills are left out inside :where(), which weighs
   nothing, so the rule keeps the weight the tab, menu and panel overrides below were written against */
[data-theme="dark"] a:not([class*="btn"]):not([class*="badge"]):where(:not(.db-view, .ff-preset, .ff-chip)) { color: var(--c-link); }

/* the sidebar writes on a near-black ground of its own and is not link territory;
   its own colours are set in the sidebar block above */
[data-theme="dark"] .close { color: var(--c-muted); text-shadow: none; opacity: 1; }
/* Scrollbars are deliberately NOT styled here. Giving ::-webkit-scrollbar a width
   turns the platform's overlay scrollbar into a classic one that occupies 10px of
   the scroll container -- which made every table in dark mode sit 10px further
   from the right edge than the same table in light. color-scheme does the whole
   job on its own: the browser draws its own dark scrollbar, at the same width as
   the light one. */
[data-theme="dark"] { color-scheme: dark; }


/* ---- the switch itself (styled in both modes) ---------------------------- */

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	/* the search trigger sits 4px above the line the header buttons use; the switch
	   is its neighbour, so it takes the same nudge or the two are visibly off */
	margin: -4px 0 0 8px;
	padding: 0;
	background-color: var(--c-ground);
	border: 1px solid var(--c-line-input-sm);
	border-radius: var(--r-btn);
	color: var(--c-muted);
	font-size: 14px;
	cursor: pointer;
	transition: background-color 150ms, color 150ms, border-color 150ms;
}
.theme-toggle:hover,
.theme-toggle:focus { background-color: var(--c-head); border-color: var(--c-line-input); color: var(--c-soft); outline: none; }
.theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: inline-block; }
[data-theme="dark"] .theme-toggle .fa-sun-bright { display: none; }


/* ---- the menu-variant switch (styled in both modes) ---------------------- */

.menu-variant { position: relative; margin-left: 8px; }
.menu-variant-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-top: -4px;
	padding: 0;
	background-color: var(--c-ground);
	border: 1px solid var(--c-line-input-sm);
	border-radius: var(--r-btn);
	color: var(--c-muted);
	font-size: 14px;
	cursor: pointer;
	transition: background-color 150ms, color 150ms, border-color 150ms;
}
.menu-variant-trigger:hover,
.menu-variant-trigger:focus,
.menu-variant.is-open .menu-variant-trigger {
	background-color: var(--c-head);
	border-color: var(--c-line-input);
	color: var(--c-soft);
	outline: none;
}
.menu-variant-list {
	position: absolute;
	right: 0;
	top: 34px;
	z-index: 1080;
	width: 268px;
	padding: 6px;
	background-color: var(--c-white);
	border: 1px solid var(--c-line);
	border-radius: 4px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	text-align: left;
}
.menu-variant-list[hidden] { display: none; }
.menu-variant-head {
	padding: 4px 8px 7px 8px;
	margin-bottom: 3px;
	border-bottom: 1px solid var(--c-line-quiet);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--c-soft);
}
.menu-variant-option {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	padding: 7px 8px;
	background: none;
	border: 0;
	border-radius: 3px;
	font-size: 13px;
	color: var(--c-ink);
	text-align: left;
	cursor: pointer;
}
.menu-variant-option:hover { background-color: var(--c-head); }
.menu-variant-option small { display: block; margin-top: 1px; font-size: 11px; color: var(--c-muted); }
.menu-variant-option > i { width: 12px; margin-top: 3px; font-size: 11px; color: var(--c-ok); visibility: hidden; }
[data-menu="classic"] .menu-variant-option[data-variant="classic"] > i,
[data-menu="mega"] .menu-variant-option[data-variant="mega"] > i,
[data-menu="columns"] .menu-variant-option[data-variant="columns"] > i { visibility: visible; }
[data-menu="classic"] .menu-variant-option[data-variant="classic"],
[data-menu="mega"] .menu-variant-option[data-variant="mega"],
[data-menu="columns"] .menu-variant-option[data-variant="columns"] { font-weight: 600; }

[data-theme="dark"] .menu-variant-trigger { background-color: var(--c-ground); border-color: var(--c-line-input-sm); color: var(--c-muted); }
[data-theme="dark"] .menu-variant-trigger:hover,
[data-theme="dark"] .menu-variant-trigger:focus,
[data-theme="dark"] .menu-variant.is-open .menu-variant-trigger { background-color: var(--c-head); color: var(--c-soft); }
[data-theme="dark"] .menu-variant-list { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }


/* ---- the user menu (DS2-02): who, which company, the account, the look, signing out ---- */

.ff-user-menu .ff-user-trigger {
	width: auto;
	max-width: 260px;
	gap: 8px;
	padding: 0 8px 0 3px;
	border-radius: 17px;
	text-align: left;
}
.ff-user-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background-color: var(--c-nav);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3px;
}
.ff-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.ff-user-name,
.ff-user-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-user-name { font-size: 12px; font-weight: 600; color: var(--c-ink); }
.ff-user-company { font-size: 11px; color: var(--c-muted); }
.ff-user-caret { font-size: 10px; color: var(--c-muted); }
.ff-user-menu .menu-variant-list { width: 280px; }
.ff-user-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 9px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line-quiet); font-size: 12px; color: var(--c-soft); }
.ff-user-head strong { font-size: 14px; color: var(--c-ink); }
.ff-user-head-company { color: var(--c-ink); }
.ff-user-head-company i { width: 14px; color: var(--c-muted); }
/* a row of the menu; the look switch keeps its class for the script, not the square of the old switch */
.menu-variant-list .ff-user-item {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 7px 8px;
	background: none;
	border: 0;
	border-radius: 3px;
	font-size: 13px;
	color: var(--c-ink);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.menu-variant-list .ff-user-item:hover,
.menu-variant-list .ff-user-item:focus { background-color: var(--c-head); color: var(--c-ink); text-decoration: none; outline: none; }
/* a row, not a link: the dark mode's link colour reaches every <a> that is not a button */
[data-theme] .ff-user-menu .menu-variant-list a.ff-user-item { color: var(--c-ink); }
.menu-variant-list .ff-user-item:focus-visible { outline: 2px solid var(--c-info); outline-offset: -2px; }
.menu-variant-list .ff-user-item > i { width: 14px; font-size: 13px; color: var(--c-muted); text-align: center; }
.menu-variant-list .ff-user-item + .menu-variant-head { margin-top: 4px; border-top: 1px solid var(--c-line-quiet); padding-top: 9px; }
.menu-variant-list .ff-user-signout { margin-top: 4px; border-top: 1px solid var(--c-line-quiet); border-radius: 0 0 3px 3px; }
/* the look switch says where it goes: to dark from light, to light from dark */
.menu-variant-list .ff-user-item .ff-theme-to-light { display: none; }
.menu-variant-list .ff-user-item i.ff-theme-to-dark { display: inline-block; }
[data-theme="dark"] .menu-variant-list .ff-user-item .ff-theme-to-light { display: inline; }
[data-theme="dark"] .menu-variant-list .ff-user-item i.ff-theme-to-light { display: inline-block; }
[data-theme="dark"] .menu-variant-list .ff-user-item .ff-theme-to-dark { display: none; }
[data-theme="dark"] .ff-user-avatar { background-color: var(--c-info); color: #10161d; }
/* at 1366 px the title bar needs the room: the search is its icon and the shortcut, the name stays */
@media (max-width: 1599px) {
	.global-search-trigger-label { display: none; }
}
@media (max-width: 1365px) {
	.ff-user-text { max-width: 120px; }
}


/* ---- login --------------------------------------------------------------- */

[data-theme="dark"] .login-card { box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55); }
[data-theme="dark"] .login-password-toggle:hover,
[data-theme="dark"] .login-password-toggle:focus { color: var(--c-ink); }

/* a field that cannot be typed into looks like one (DS-04) */
[data-theme="dark"] .form-control[disabled],
[data-theme="dark"] .form-control[readonly],
[data-theme="dark"] fieldset[disabled] .form-control { background-color: var(--c-head); color: var(--c-soft); border-color: var(--c-line); }

[data-theme="dark"] .ff-toast { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }

/* the dispatch board in the dark (plachta review r3, r4): weekends a step darker than the ground,
   a reservation visible as one, the inactive tabs readable */
[data-theme="dark"] :is(#dispatch-timeline, #dispatch-plan-timeline) .timeline-weekend,
[data-theme="dark"] #dispatch-pool .timeline-weekend { background-color: rgba(255, 255, 255, 0.055); } /* a darker shade did not show on the dark ground (review r6, r7) */
[data-theme="dark"] .vis-item.timeline-reservation { background-color: rgba(168, 159, 227, 0.16); border-color: #a89fe3; color: #cfc8f5; }
[data-theme="dark"] :is(#dispatch-timeline, #dispatch-plan-timeline) .vis-item.timeline-home:not(.is-home) .vis-item-content { background: var(--c-head); color: var(--c-muted); border-color: var(--c-line-input); }
/* the cards' tabs the same grey as the previews' (3. 11. 2026) */
[data-theme="dark"] :is(.modal .nav-tabs, .slim-tabs > .nav-tabs) > li:not(.active) > a { color: var(--c-muted); }

/* Bootstrap alerts kept the pale light-mode grounds of modern.css: a bright bar across a dark page
   (the locked-invoice notice on the invoice card, stage 12 check) -- the status washes instead */
[data-theme="dark"] .alert-success { background: var(--c-ok-wash); color: var(--c-ok-ink); }
[data-theme="dark"] .alert-info { background: var(--c-info-wash); color: var(--c-info-ink); }
[data-theme="dark"] .alert-warning { background: var(--c-warn-wash); color: var(--c-warn-ink); }
[data-theme="dark"] .alert-danger { background: var(--c-bad-wash); color: var(--c-bad-ink); }
[data-theme="dark"] .alert .alert-link { color: inherit; }
/* the links of the bar Provoz ("Otevřít", "a další N") in its text colour, told by the underline (DS5-04) */
[data-theme="dark"] .alert.ff-ops-alerts a[href],
[data-theme="dark"] .alert.ff-ops-alerts a[href]:hover,
[data-theme="dark"] .alert.ff-ops-alerts a[href]:focus { color: inherit; }

/* the message bubbles of Zprávy řidičům read --ff-* variables nobody defines, so they fell back to
   their light hex: light text on a near-white bubble, the driver's words unreadable */
[data-theme="dark"] .ff-message { border-color: var(--c-line); }
[data-theme="dark"] .ff-message-in { background: var(--c-sunk); }
[data-theme="dark"] .ff-message-out { background: var(--c-ok-wash); }
/* "stojí" over the map: a hard white pill carrying the light ink of the dark theme */
[data-theme="dark"] .dm-where-state:not(.is-moving) { background: rgba(25, 30, 38, 0.92); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }

/* HERE maps on the night map (map.js): the map's own controls, the copyright strip and the bubbles
   in the dark too -- HERE draws them white, and the strip carries its colours inline */
[data-theme="dark"] .H_ctl.H_grp,
[data-theme="dark"] .H_btn,
[data-theme="dark"] .H_overlay { background: var(--c-white); box-shadow: 0 0 0.4em 0 rgba(0, 0, 0, 0.7); }
[data-theme="dark"] .H_grp .H_btn { background: transparent; box-shadow: none; }
[data-theme="dark"] .H_l_vertical .H_zoom .H_el::after { background: var(--c-line); }
[data-theme="dark"] svg.H_icon { fill: var(--c-muted); }
[data-theme="dark"] .H_btn:hover > svg.H_icon { fill: var(--c-ink-strong); }
[data-theme="dark"] .H_btn.H_active { background-color: var(--c-head); }
[data-theme="dark"] .H_overlay .H_btn,
[data-theme="dark"] .H_overlay .H_btn:hover,
[data-theme="dark"] .H_overlay .H_btn.H_active { color: var(--c-ink); background: transparent; }
[data-theme="dark"] .H_overlay .H_btn.H_disabled { color: var(--c-muted); opacity: 0.5; }
[data-theme="dark"] .H_overlay .H_separator { background: var(--c-line); }
[data-theme="dark"] .H_overlay.H_left::after { border-right-color: var(--c-white); }
[data-theme="dark"] .H_overlay.H_right::after { border-left-color: var(--c-white); }
[data-theme="dark"] .H_overlay.H_bottom.H_center::after { border-top-color: var(--c-white); }
[data-theme="dark"] .H_copyright { background-color: rgba(18, 22, 28, 0.75) !important; color: var(--c-ink) !important; }
[data-theme="dark"] .H_scalebar { color: var(--c-ink); text-shadow: 0 0 3px #000; }
[data-theme="dark"] .H_ib_body { background: var(--c-white); box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.7); }
[data-theme="dark"] .H_ib_content { color: var(--c-ink); }
[data-theme="dark"] .H_ib.H_ib_top .H_ib_tail::after { border-top-color: var(--c-white); }
[data-theme="dark"] .H_ib_close svg.H_icon { fill: var(--c-muted); }

/* the chosen item of a chart's switch on the board keeps its white on the green (DS7-05): the dark mode's link blue
   took it, 2.16:1 on "Podle dne vzniku" */
[data-theme="dark"] a.db-chart-switch-item.is-active { color: #ffffff; }
