/*
 * Pinko CMS - modalità scura (06/11/2026)
 * Si attiva con l'icona luna nella barra in alto (inc/header.php): mette la classe pk-dark su <html> e la ricorda
 * nel browser (localStorage "pk-tema"). Senza quella classe nessuna regola di questo file si applica.
 * Va caricato dopo pk-theme.css: ridefinisce i colori del tema e copre quelli di AdminLTE, Bootstrap e dei plugin.
 */
/* niente sfondo su <html>: quello del <body> deve continuare a estendersi a tutta la finestra (login) */
html.pk-dark { color-scheme: dark; }
html.pk-dark body.pk-theme {
  --t-bg: #0e1217;
  --t-card: #161b22;
  --t-line: #262d37;
  --t-line-strong: #353d49;
  --t-text: #e4e7ec;
  --t-muted: #98a2b3;
  --t-primary: #4c8dff;
  --t-primary-dark: #8ab4ff;
  --t-primary-soft: rgba(76, 141, 255, .16);
  --t-side: #0b0f14;
  --t-side-2: #080b0f;
  --t-side-text: #c3cad6;
  --t-side-muted: #7c8696;
  --t-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --d-raised: #1c222b;   /* intestazioni di tabella, campi in sola lettura, hover */
  --d-hover: #212833;
  --d-input: #0f141a;
  color: var(--t-text);
}

/* ------------------------------------------------------------------ struttura */
html.pk-dark body.pk-theme .content-wrapper, html.pk-dark body.pk-theme .right-side { background: var(--t-bg); }
html.pk-dark body.pk-theme .content-header > h1 { color: var(--t-text); }
html.pk-dark body.pk-theme h1, html.pk-dark body.pk-theme h2, html.pk-dark body.pk-theme h3,
html.pk-dark body.pk-theme h4, html.pk-dark body.pk-theme h5, html.pk-dark body.pk-theme h6 { color: var(--t-text); }
html.pk-dark body.pk-theme.skin-blue .main-header .navbar { background: var(--t-card); border-bottom-color: var(--t-line); box-shadow: none; }
html.pk-dark body.pk-theme.skin-blue .main-header .navbar .sidebar-toggle { color: var(--t-muted); }
html.pk-dark body.pk-theme.skin-blue .main-header .navbar .sidebar-toggle:hover,
html.pk-dark body.pk-theme.skin-blue .main-header .navbar .nav > li > a:hover,
html.pk-dark body.pk-theme.skin-blue .main-header .navbar .nav > .open > a { background: var(--d-hover); color: var(--t-text); }
html.pk-dark body.pk-theme .navbar-nav > .user-menu > .dropdown-menu { box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
html.pk-dark body.pk-theme .navbar-nav > .user-menu > .dropdown-menu > li.pk-user-logout > a,
html.pk-dark body.pk-theme .navbar-nav > .user-menu > .dropdown-menu > li.pk-user-logout > a > .fa { color: #f97066; }
html.pk-dark body.pk-theme .navbar-nav > .user-menu > .dropdown-menu > li.pk-user-logout > a:hover { background: rgba(240, 68, 56, .14); color: #fda29b; }
html.pk-dark body.pk-theme .main-footer { background: var(--t-card); border-top-color: var(--t-line); color: var(--t-muted); }
html.pk-dark body.pk-theme .content-header > .breadcrumb > li > a, html.pk-dark body.pk-theme .breadcrumb > .active { color: var(--t-muted); }
html.pk-dark body.pk-theme hr { border-top-color: var(--t-line); }
html.pk-dark body.pk-theme .text-muted { color: var(--t-muted); }
/* i link usano già var(--t-primary) (pk-theme.css), ridefinita sopra: nessuna regola generale qui,
   così i colori specifici delle pagine (pulsanti, etichette) restano quelli giusti */
html.pk-dark body.pk-theme .main-footer strong { color: var(--t-text); }
html.pk-dark body.pk-theme .breadcrumb { background: var(--d-raised); }
html.pk-dark body.pk-theme .progress { background: var(--d-raised); box-shadow: none; }
html.pk-dark body.pk-theme .nav-tabs-custom > .nav-tabs > li.header { color: var(--t-text); }
html.pk-dark body.pk-theme.skin-blue.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
html.pk-dark body.pk-theme.skin-blue.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu { background: #151b23; }

/* ------------------------------------------------------------------ box, pannelli, tab */
html.pk-dark body.pk-theme .box, html.pk-dark body.pk-theme .card, html.pk-dark body.pk-theme .panel,
html.pk-dark body.pk-theme .nav-tabs-custom, html.pk-dark body.pk-theme .info-box, html.pk-dark body.pk-theme .small-box-footer {
  background: var(--t-card); border-color: var(--t-line); color: var(--t-text);
}
html.pk-dark body.pk-theme .box.collapsed-box { background: var(--t-card); }
html.pk-dark body.pk-theme .box > .box-header, html.pk-dark body.pk-theme .box-header .box-title { color: var(--t-text); }
html.pk-dark body.pk-theme .box.box-solid.box-default > .box-header { background: var(--d-raised); color: var(--t-text); }
html.pk-dark body.pk-theme .box > .box-footer { background: var(--d-raised); border-top-color: var(--t-line); }
html.pk-dark body.pk-theme .box > .overlay, html.pk-dark body.pk-theme .overlay-wrapper > .overlay { background: rgba(14, 18, 23, .7); }
html.pk-dark body.pk-theme .panel-default > .panel-heading, html.pk-dark body.pk-theme .panel-footer { background: var(--d-raised); border-color: var(--t-line); color: var(--t-text); }
html.pk-dark body.pk-theme .well, html.pk-dark body.pk-theme .bordatura { background: var(--d-raised); border-color: var(--t-line); color: var(--t-text); }
html.pk-dark body.pk-theme .nav-tabs { border-bottom-color: var(--t-line); }
html.pk-dark body.pk-theme .nav-tabs > li > a { color: var(--t-muted); }
html.pk-dark body.pk-theme .nav-tabs > li > a:hover { background: var(--d-hover); border-color: transparent; color: var(--t-text); }
html.pk-dark body.pk-theme .nav-tabs > li.active > a, html.pk-dark body.pk-theme .nav-tabs > li.active > a:hover,
html.pk-dark body.pk-theme .nav-tabs > li.active > a:focus { background: var(--t-card); border-color: var(--t-line); border-bottom-color: transparent; color: var(--t-text); }
html.pk-dark body.pk-theme .nav-tabs-custom > .nav-tabs { border-bottom-color: var(--t-line); }
html.pk-dark body.pk-theme .nav-tabs-custom > .nav-tabs > li > a { color: var(--t-muted); }
html.pk-dark body.pk-theme .nav-tabs-custom > .nav-tabs > li.active > a { background: var(--t-card); color: var(--t-text); }
html.pk-dark body.pk-theme .nav-tabs-custom > .tab-content { background: var(--t-card); }
html.pk-dark body.pk-theme .nav-pills > li > a { color: var(--t-muted); }
html.pk-dark body.pk-theme .list-group-item { background: var(--t-card); border-color: var(--t-line); color: var(--t-text); }
html.pk-dark body.pk-theme .callout { color: var(--t-text) !important; }
html.pk-dark body.pk-theme .callout.callout-info { background: rgba(11, 165, 236, .14) !important; border-color: #0ba5ec; }
html.pk-dark body.pk-theme .callout.callout-warning { background: rgba(247, 144, 9, .14) !important; border-color: #f79009; }
html.pk-dark body.pk-theme .callout.callout-danger { background: rgba(240, 68, 56, .14) !important; border-color: #f04438; }
html.pk-dark body.pk-theme .callout.callout-success { background: rgba(18, 183, 106, .14) !important; border-color: #12b76a; }
html.pk-dark body.pk-theme .alert { border-color: transparent; }
html.pk-dark body.pk-theme .alert-info { background: rgba(11, 165, 236, .16) !important; color: #7cd4fd !important; }
html.pk-dark body.pk-theme .alert-warning { background: rgba(247, 144, 9, .16) !important; color: #fec84b !important; }
html.pk-dark body.pk-theme .alert-danger { background: rgba(240, 68, 56, .16) !important; color: #fda29b !important; }
html.pk-dark body.pk-theme .alert-success { background: rgba(18, 183, 106, .16) !important; color: #6ce9a6 !important; }
html.pk-dark body.pk-theme .alert a { color: inherit; text-decoration: underline; }

/* ------------------------------------------------------------------ pulsanti */
html.pk-dark body.pk-theme .btn-default, html.pk-dark body.pk-theme .btn-icon, html.pk-dark body.pk-theme .btn-icon.btn-sm,
html.pk-dark body.pk-theme .icon-info { background: var(--d-raised); border-color: var(--t-line-strong); color: var(--t-text); }
html.pk-dark body.pk-theme .btn-default:hover, html.pk-dark body.pk-theme .btn-default:active, html.pk-dark body.pk-theme .btn-default.active,
html.pk-dark body.pk-theme .open > .dropdown-toggle.btn-default, html.pk-dark body.pk-theme .btn-icon:hover {
  background: var(--d-hover); border-color: #4a5462; color: #fff;
}
/* --t-primary-dark in scuro è un blu chiaro (per i testi): lo sfondo dei pulsanti al passaggio va scritto a parte */
html.pk-dark body.pk-theme .btn-primary:hover, html.pk-dark body.pk-theme .btn-primary:active, html.pk-dark body.pk-theme .btn-primary.active,
html.pk-dark body.pk-theme .open > .dropdown-toggle.btn-primary, html.pk-dark .pk-fs .btn-primary:hover { background: #2f6fe0; border-color: #2f6fe0; color: #fff; }
html.pk-dark .pk-fs .btn-primary { border-color: var(--t-primary); }
html.pk-dark body.pk-theme .btn-box-tool,
html.pk-dark body.pk-theme .box.box-solid.box-default > .box-header .btn { color: var(--t-muted); }
html.pk-dark body.pk-theme .btn-box-tool:hover { color: var(--t-primary-dark); }
html.pk-dark body.pk-theme .btn-link { color: var(--t-primary); }
html.pk-dark body.pk-theme .close { color: var(--t-text); text-shadow: none; opacity: .6; }

/* ------------------------------------------------------------------ form */
html.pk-dark body.pk-theme .form-control, html.pk-dark body.pk-theme select, html.pk-dark body.pk-theme textarea,
html.pk-dark body.pk-theme input[type="text"], html.pk-dark body.pk-theme input[type="search"], html.pk-dark body.pk-theme input[type="email"],
html.pk-dark body.pk-theme input[type="password"], html.pk-dark body.pk-theme input[type="number"], html.pk-dark body.pk-theme input[type="date"],
html.pk-dark body.pk-theme input[type="url"], html.pk-dark body.pk-theme input[type="tel"] {
  background-color: var(--d-input); border-color: var(--t-line-strong); color: var(--t-text);
}
html.pk-dark body.pk-theme .form-control::placeholder, html.pk-dark body.pk-theme input::placeholder, html.pk-dark body.pk-theme textarea::placeholder { color: #6b7585; }
html.pk-dark body.pk-theme .form-control[readonly], html.pk-dark body.pk-theme .form-control[disabled],
html.pk-dark body.pk-theme fieldset[disabled] .form-control { background-color: var(--d-raised); color: var(--t-muted); }
html.pk-dark body.pk-theme label { color: #cfd4dc; }
html.pk-dark body.pk-theme .help-block { color: var(--t-muted); }
html.pk-dark body.pk-theme .input-group-addon { background: var(--d-raised); border-color: var(--t-line-strong); color: var(--t-muted); }
html.pk-dark body.pk-theme option { background: var(--t-card); color: var(--t-text); }
html.pk-dark body.pk-theme .has-error .form-control { border-color: #f04438; }

/* select2 */
html.pk-dark body.pk-theme .select2-container--default .select2-selection--single,
html.pk-dark body.pk-theme .select2-container--default .select2-selection--multiple { background-color: var(--d-input) !important; border-color: var(--t-line-strong) !important; }
html.pk-dark body.pk-theme .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--t-text) !important; }
html.pk-dark body.pk-theme .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #6b7585; }
html.pk-dark body.pk-theme .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--t-primary-soft) !important; border-color: rgba(76, 141, 255, .35) !important; color: #b9d0ff !important;
}
html.pk-dark body.pk-theme .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: #8ab4ff !important; }
html.pk-dark body.pk-theme .select2-container--default .select2-search--inline .select2-search__field { color: var(--t-text); background: transparent; }
html.pk-dark body.pk-theme .select2-dropdown { background: var(--t-card); border-color: var(--t-line-strong); color: var(--t-text); box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
html.pk-dark body.pk-theme .select2-container--default .select2-search--dropdown .select2-search__field { background: var(--d-input); border-color: var(--t-line-strong); color: var(--t-text); }
html.pk-dark body.pk-theme .select2-container--default .select2-results__option[aria-selected="true"] { background: var(--d-hover); }
html.pk-dark body.pk-theme .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--t-primary); color: #fff; }
html.pk-dark body.pk-theme .select2-container--default.select2-container--disabled .select2-selection--single { background: var(--d-raised) !important; }

/* ------------------------------------------------------------------ tabelle e DataTables */
html.pk-dark body.pk-theme .table { color: var(--t-text); background: transparent; }
html.pk-dark body.pk-theme .table > thead > tr > th { background: var(--d-raised); color: var(--t-muted); border-bottom-color: var(--t-line); }
html.pk-dark body.pk-theme .table > tbody > tr > td, html.pk-dark body.pk-theme .table > tbody > tr > th,
html.pk-dark body.pk-theme .table > tfoot > tr > td, html.pk-dark body.pk-theme .table > thead > tr > td { border-top-color: var(--t-line); }
html.pk-dark body.pk-theme .table-bordered, html.pk-dark body.pk-theme .table-bordered > thead > tr > th,
html.pk-dark body.pk-theme .table-bordered > tbody > tr > td, html.pk-dark body.pk-theme .table-bordered > tbody > tr > th { border-color: var(--t-line); }
html.pk-dark body.pk-theme .table-bordered td { border-bottom-color: var(--t-line) !important; }
html.pk-dark body.pk-theme .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255, 255, 255, .02); }
html.pk-dark body.pk-theme .table-hover > tbody > tr:hover > td, html.pk-dark body.pk-theme .table-hover > tbody > tr:hover > th { background: var(--d-hover); }
html.pk-dark body.pk-theme table.dataTable thead .sorting:after, html.pk-dark body.pk-theme table.dataTable thead .sorting_asc:after,
html.pk-dark body.pk-theme table.dataTable thead .sorting_desc:after { color: var(--t-muted); }
html.pk-dark body.pk-theme .dataTables_wrapper .dataTables_filter input, html.pk-dark body.pk-theme .dataTables_wrapper .dataTables_length select {
  background: var(--d-input); border-color: var(--t-line-strong); color: var(--t-text);
}
html.pk-dark body.pk-theme .dataTables_wrapper .dataTables_info, html.pk-dark body.pk-theme .dataTables_wrapper .dataTables_length,
html.pk-dark body.pk-theme .dataTables_wrapper .dataTables_filter { color: var(--t-muted); }
html.pk-dark body.pk-theme table.fixedHeader-floating { background: var(--t-card); }
html.pk-dark body.pk-theme .pagination > li > a, html.pk-dark body.pk-theme .pagination > li > span { background: var(--t-card); border-color: var(--t-line); color: var(--t-text); }
html.pk-dark body.pk-theme .pagination > li > a:hover { background: var(--d-hover); color: #fff; }
html.pk-dark body.pk-theme .pagination > .disabled > a, html.pk-dark body.pk-theme .pagination > .disabled > a:hover,
html.pk-dark body.pk-theme .pagination > .disabled > span { background: var(--t-card); color: #4f5866; }
html.pk-dark body.pk-theme .pagination > .active > a, html.pk-dark body.pk-theme .pagination > .active > a:hover { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
html.pk-dark body.pk-theme table.tablelistcodeadd th { background: var(--d-raised); color: var(--t-muted); }
html.pk-dark body.pk-theme .ajaxsearchbox { background: var(--d-raised); }

/* ------------------------------------------------------------------ menu a tendina, modali, tooltip */
html.pk-dark body.pk-theme .dropdown-menu { background: var(--t-card); border-color: var(--t-line-strong); box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }
html.pk-dark body.pk-theme .dropdown-menu > li > a { color: var(--t-text); }
html.pk-dark body.pk-theme .dropdown-menu > li > a:hover, html.pk-dark body.pk-theme .dropdown-menu > li > a:focus { background: var(--d-hover); color: #fff; }
html.pk-dark body.pk-theme .dropdown-menu > .divider { background: var(--t-line); }
html.pk-dark body.pk-theme .dropdown-header { color: var(--t-muted); }
html.pk-dark body.pk-theme .modal-content { background: var(--t-card); border-color: var(--t-line); color: var(--t-text); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
html.pk-dark body.pk-theme .modal-header, html.pk-dark body.pk-theme .modal-footer { border-color: var(--t-line); }
html.pk-dark body.pk-theme .modal-backdrop.in { opacity: .7; }
html.pk-dark body.pk-theme .popover { background: var(--t-card); border-color: var(--t-line-strong); color: var(--t-text); }
html.pk-dark body.pk-theme .popover-title { background: var(--d-raised); border-color: var(--t-line); }
html.pk-dark body.pk-theme .popover.bottom > .arrow:after { border-bottom-color: var(--t-card); }
html.pk-dark body.pk-theme .popover.top > .arrow:after { border-top-color: var(--t-card); }
html.pk-dark body.pk-theme .popover.left > .arrow:after { border-left-color: var(--t-card); }
html.pk-dark body.pk-theme .popover.right > .arrow:after { border-right-color: var(--t-card); }

/* calendari: jQuery UI, daterangepicker, editor date pk-cal (Meta) */
html.pk-dark body.pk-theme .ui-widget-content { background: var(--t-card); color: var(--t-text); border-color: var(--t-line); }
html.pk-dark body.pk-theme .ui-datepicker { box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
html.pk-dark body.pk-theme .ui-datepicker .ui-datepicker-prev-hover, html.pk-dark body.pk-theme .ui-datepicker .ui-datepicker-next-hover,
html.pk-dark body.pk-theme .ui-datepicker td .ui-state-default.ui-state-hover { background: var(--d-hover) !important; }
html.pk-dark body.pk-theme .ui-datepicker .ui-icon { filter: invert(1); }
html.pk-dark body.pk-theme .daterangepicker { background: var(--t-card); border-color: var(--t-line-strong); color: var(--t-text); }
html.pk-dark body.pk-theme .daterangepicker .calendar-table { background: var(--t-card); border-color: var(--t-line); }
html.pk-dark body.pk-theme .daterangepicker td.off, html.pk-dark body.pk-theme .daterangepicker td.off.in-range { background: transparent; color: #4f5866; }
html.pk-dark body.pk-theme .daterangepicker td.available:hover, html.pk-dark body.pk-theme .daterangepicker th.available:hover { background: var(--d-hover); }
html.pk-dark body.pk-theme .daterangepicker td.in-range { background: var(--t-primary-soft); color: var(--t-text); }
html.pk-dark body.pk-theme .daterangepicker .ranges li { background: var(--d-raised); border-color: var(--t-line); color: var(--t-text); }
html.pk-dark body.pk-theme .daterangepicker .ranges li.active, html.pk-dark body.pk-theme .daterangepicker .ranges li:hover { background: var(--t-primary); color: #fff; }
html.pk-dark body.pk-theme .pk-cal-btn { color: var(--t-muted); }
html.pk-dark body.pk-theme .pk-cal-btn:hover, html.pk-dark body.pk-theme .pk-cal-btn:focus { color: #8ab4ff; background: var(--t-primary-soft); }
html.pk-dark body.pk-theme .pk-cal-info { color: #b3bac6; }
html.pk-dark body.pk-theme .pk-cal-info.pk-cal-muted { color: var(--t-muted); }
html.pk-dark body.pk-theme .pk-cal-info.pk-cal-errore, html.pk-dark body.pk-theme .pk-cal-link:hover { color: #f97066; }
html.pk-dark body.pk-theme .pk-cal-durata { background: rgba(18, 183, 106, .16); color: #6ce9a6; }
html.pk-dark body.pk-theme .pk-cal-avviso { background: rgba(247, 144, 9, .16); color: #fec84b; }
html.pk-dark body.pk-theme .pk-cal-pop { background: var(--t-card); border-color: var(--t-line-strong); color: var(--t-text); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
html.pk-dark body.pk-theme .pk-cal-nav, html.pk-dark body.pk-theme .pk-cal-titolo, html.pk-dark body.pk-theme .pk-cal-day { color: var(--t-text); }
html.pk-dark body.pk-theme .pk-cal-nav:hover, html.pk-dark body.pk-theme .pk-cal-titolo:hover { background: var(--d-hover); }
html.pk-dark body.pk-theme .pk-cal-dow, html.pk-dark body.pk-theme .pk-cal-sep, html.pk-dark body.pk-theme .pk-cal-link { color: var(--t-muted); }
html.pk-dark body.pk-theme .pk-cal-day:hover { background: var(--t-primary-soft); border-color: rgba(76, 141, 255, .4); }
html.pk-dark body.pk-theme .pk-cal-day.pk-cal-weekend { color: #fdba74; }
html.pk-dark body.pk-theme .pk-cal-day.pk-cal-fuori { color: #4f5866; }
html.pk-dark body.pk-theme .pk-cal-day.pk-cal-scelto, html.pk-dark body.pk-theme .pk-cal-day.pk-cal-scelto:hover { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
html.pk-dark body.pk-theme .pk-cal-label { color: #cfd4dc; }
html.pk-dark body.pk-theme .pk-cal-pop input, html.pk-dark body.pk-theme .pk-cal-pop select { background: var(--d-input); border-color: var(--t-line-strong); color: var(--t-text); }
html.pk-dark body.pk-theme .pk-cal-chip { background: var(--d-raised); border-color: var(--t-line-strong); color: var(--t-text); }
html.pk-dark body.pk-theme .pk-cal-chip:hover { background: var(--t-primary-soft); border-color: var(--t-primary); color: #b9d0ff; }

/* caricamento file (Dropzone) */
html.pk-dark body.pk-theme .dropzone { background: var(--d-raised); border-color: var(--t-line-strong); color: var(--t-muted); }
html.pk-dark body.pk-theme .dropzone .dz-preview.dz-image-preview { background: transparent; }

/* ------------------------------------------------------------------ vecchio CSS del CMS (lw-style.css) */
html.pk-dark body.pk-theme .bg-rosso { background-color: rgba(240, 68, 56, .18); }
html.pk-dark body.pk-theme .bg-rosso:hover { background-color: rgba(240, 68, 56, .26) !important; }
html.pk-dark body.pk-theme .bg-giallo { background-color: rgba(247, 144, 9, .16); }
html.pk-dark body.pk-theme .bg-giallo:hover { background-color: rgba(247, 144, 9, .24) !important; }
html.pk-dark body.pk-theme .bloccoelencofilmdelivery { background: var(--t-card) !important; border-color: var(--t-line); color: var(--t-text); }

/* colori scritti direttamente nelle pagine (style="...") */
html.pk-dark body.pk-theme [style*="color:red"], html.pk-dark body.pk-theme [style*="color: red"] { color: #f97066 !important; }
html.pk-dark body.pk-theme [style*="color:green"] { color: #4ade80 !important; }
html.pk-dark body.pk-theme [style*="color:#6d6d1d"] { color: #d6d36b !important; }
html.pk-dark body.pk-theme [style*="color:#1b00ff"] { color: #8ab4ff !important; }
html.pk-dark body.pk-theme [style*="background-color:#ccc"] { background-color: var(--d-raised) !important; }
html.pk-dark body.pk-theme [style*="background-color: white"], html.pk-dark body.pk-theme [style*="background-color:white"],
html.pk-dark body.pk-theme [style*="background-color: #fff"], html.pk-dark body.pk-theme [style*="background-color:#fff"],
html.pk-dark body.pk-theme [style*="background: #fff"], html.pk-dark body.pk-theme [style*="background:#fff"],
html.pk-dark body.pk-theme [style*="background-color: #ffffff"], html.pk-dark body.pk-theme [style*="background-color:#ffffff"] { background-color: var(--t-card) !important; color: var(--t-text); }
html.pk-dark body.pk-theme [style*="background-color:#23b023"] { background-color: rgba(18, 183, 106, .22) !important; }

/* ------------------------------------------------------------------ bacheca */
html.pk-dark body.pk-theme .pk-home-card { background: var(--t-card); border-color: var(--t-line); }
html.pk-dark body.pk-theme .pk-home-card:hover { border-color: rgba(76, 141, 255, .5); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }

/* ------------------------------------------------------------------ film / scene / Meta (film-scene.css) */
html.pk-dark .pk-fs {
  --pk-bg: var(--t-bg);
  --pk-card: var(--t-card);
  --pk-line: var(--t-line);
  --pk-line-strong: var(--t-line-strong);
  --pk-text: var(--t-text);
  --pk-muted: var(--t-muted);
  --pk-primary: var(--t-primary);
  --pk-primary-dark: var(--t-primary-dark);
  --pk-red: #f97066;
  --pk-red-bg: rgba(240, 68, 56, .16);
  --pk-amber: #fdb022;
  --pk-amber-bg: rgba(247, 144, 9, .16);
  --pk-green: #4ade80;
  --pk-green-bg: rgba(18, 183, 106, .16);
}
html.pk-dark .pk-fs .pk-card { box-shadow: none; }
html.pk-dark .pk-fs .pk-chip { background: var(--d-raised); }
html.pk-dark .pk-fs .pk-badge { background: var(--d-hover); }
html.pk-dark .pk-fs .pk-badge-red { background: var(--pk-red-bg); }
html.pk-dark .pk-fs .pk-badge-amber { background: var(--pk-amber-bg); }
html.pk-dark .pk-fs .pk-badge-green { background: var(--pk-green-bg); }
html.pk-dark .pk-fs .pk-table > thead > tr > th { background: var(--d-raised); }
html.pk-dark .pk-fs .pk-table > tbody > tr:hover > td { background: var(--d-hover); }
html.pk-dark .pk-fs .pk-alert-red { border-color: rgba(240, 68, 56, .35); color: #fda29b; }
html.pk-dark .pk-fs .pk-alert-amber { border-color: rgba(247, 144, 9, .35); color: #fec84b; }
html.pk-dark .pk-fs .pk-alert-blue { background: var(--t-primary-soft); border-color: rgba(76, 141, 255, .35); color: #b9d0ff; }
html.pk-dark .pk-fs .pk-sectionnav a { background: var(--d-raised); }
html.pk-dark .pk-fs .pk-section .nav-tabs-custom.nav-lang, html.pk-dark .pk-fs .pk-section .nav-tabs-custom.nav-sc { background: var(--d-raised); }
html.pk-dark .pk-fs .nav-tabs-custom > .nav-tabs > li > a { color: #b3bac6; }
html.pk-dark .pk-fs .nav-tabs-custom > .nav-tabs > li.active > a { color: var(--t-text); }
html.pk-dark .pk-fs .pk-checkgrid .pk-check, html.pk-dark .pk-fs .pk-upload { background: var(--d-raised); }
html.pk-dark .pk-fs .pk-media-images img, html.pk-dark .pk-fs .pk-tv-img img, html.pk-dark .pk-fs .pk-fascette img { background: var(--d-raised); }
html.pk-dark .pk-fs .pk-linkchip { background: var(--t-primary-soft); border-color: rgba(76, 141, 255, .35); color: #b9d0ff; }
html.pk-dark .pk-fs .pk-foto-table > tbody > tr > td { background: var(--t-card); }
html.pk-dark .pk-fs .pk-foto-table > tbody > tr.pk-foto-off > td { background: rgba(240, 68, 56, .1); }
html.pk-dark .pk-fs .ui-state-highlight { background: var(--t-primary-soft); }
html.pk-dark .pk-fs [class*="pk-savebar"], html.pk-dark .pk-savebar { background: rgba(22, 27, 34, .96); border-color: var(--t-line); }

/* ------------------------------------------------------------------ programmazione */
html.pk-dark body.pk-theme .pk-prog {
  --p-ok: rgba(18, 183, 106, .13);   --p-ok-line: #12b76a;
  --p-warn: rgba(247, 144, 9, .13);  --p-warn-line: #f79009;
  --p-err: rgba(240, 68, 56, .14);   --p-err-line: #f04438;
  --p-slot: rgba(238, 70, 188, .12); --p-slot-line: #ee46bc; --p-slot-text: #f381d0;
  --p-today: rgba(76, 141, 255, .12);
  --p-weekend: rgba(255, 255, 255, .02);
  --p-cell-line: var(--t-line);
}
html.pk-dark body.pk-theme .pk-prog-code { background: var(--d-hover); color: var(--t-text); }
html.pk-dark body.pk-theme .pk-prog-code.is-pub { background: #087443; color: #fff; }
html.pk-dark body.pk-theme .pk-prog-code.is-otherdate { background: rgba(247, 144, 9, .18); color: #fec84b; border-color: rgba(247, 144, 9, .4); }
html.pk-dark body.pk-theme .pk-prog-code.is-notitle { background: transparent; color: #fdb022; border-color: #b54708; }
html.pk-dark body.pk-theme .pk-prog-code.is-missing { background: rgba(240, 68, 56, .18); color: #fda29b; border-color: rgba(240, 68, 56, .4); }
html.pk-dark body.pk-theme .pk-prog-code.is-tube { background: transparent; }
html.pk-dark body.pk-theme .pk-prog .editablenote { color: #b3bac6; }
html.pk-dark body.pk-theme .pk-prog .editablenote:hover { background: var(--t-primary-soft); }

/* ------------------------------------------------------------------ tube */
html.pk-dark body.pk-theme .pk-tube {
  --u-late: rgba(240, 68, 56, .13);     --u-late-l: #f04438;
  --u-noat: rgba(238, 70, 188, .12);    --u-noat-l: #ee46bc;
  --u-nofree: rgba(253, 111, 142, .12); --u-nofree-l: #fd6f8e;
  --u-future: rgba(247, 144, 9, .12);   --u-future-l: #f79009;
  --u-none: transparent;                --u-none-l: #4f5866;
  --u-recent: rgba(158, 119, 237, .14); --u-recent-l: #9e77ed;
  --u-xhxv: rgba(74, 222, 128, .1);     --u-xhxv-l: #4ade80;
  --u-done: rgba(18, 183, 106, .16);    --u-done-l: #12b76a;
  --u-on: rgba(18, 183, 106, .24);      --u-on-l: #12b76a;
  --u-line: var(--t-line);
}
html.pk-dark body.pk-theme .pk-tube-stato { background: var(--d-raised); border-color: var(--t-line-strong); color: #cfd4dc; }
html.pk-dark body.pk-theme .pk-tube-stato:hover { border-color: #5b6575; }
html.pk-dark body.pk-theme .pk-tube-stato.active { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
html.pk-dark body.pk-theme .pk-tube .editableDateTxt:hover, html.pk-dark body.pk-theme .pk-tube .editablenote:hover { background: var(--t-primary-soft); color: var(--t-text); }
html.pk-dark body.pk-theme .pk-tube .editableDateTxt.is-empty, html.pk-dark body.pk-theme .pk-tube-ph { color: #737e8f; }
html.pk-dark body.pk-theme .pk-tube .canceldata { color: #f97066; }

/* ------------------------------------------------------------------ login */
html.pk-dark body.pk-theme .login-box-body { background: var(--t-card); color: var(--t-text); }
html.pk-dark body.pk-theme .pk-login-error { background: rgba(240, 68, 56, .16); color: #fda29b; }

/* ------------------------------------------------------------------ interruttore nella barra in alto */
body.pk-theme .pk-tema-toggle > a { display: flex !important; align-items: center; justify-content: center; width: 44px; padding-left: 0 !important; padding-right: 0 !important; }
body.pk-theme .pk-tema-toggle .fa { font-size: 17px; color: var(--t-muted); transition: color .15s, transform .25s; }
body.pk-theme .pk-tema-toggle > a:hover .fa { color: var(--t-text); transform: rotate(-15deg); }
body.pk-theme .pk-tema-toggle .pk-tema-sun { display: none; }
html.pk-dark body.pk-theme .pk-tema-toggle .pk-tema-moon { display: none; }
html.pk-dark body.pk-theme .pk-tema-toggle .pk-tema-sun { display: inline-block; color: #fdb022; }

/* immagini e loghi restano come sono; scrollbar scure */
html.pk-dark body.pk-theme ::-webkit-scrollbar { width: 10px; height: 10px; }
html.pk-dark body.pk-theme ::-webkit-scrollbar-track { background: var(--t-bg); }
html.pk-dark body.pk-theme ::-webkit-scrollbar-thumb { background: #2c3440; border-radius: 6px; border: 2px solid var(--t-bg); }
