:root{
  --dm-black:#0a0a0a;
  --dm-panel:#141414;
  --dm-panel-2:#1c1c1c;
  --dm-lime:#c6f432;
  --dm-lime-d:#a8d827;
  --dm-border:#262626;
}
body{ background:var(--dm-black)!important; color:#e6e6e6; }
.page-wrapper{ background:var(--dm-black); }

/* Sidebar */
.dm-sidebar{ background:var(--dm-panel)!important; border-right:1px solid var(--dm-border); }
.dm-topbar{ background:var(--dm-panel)!important; border-bottom:1px solid var(--dm-border); }
.dm-logo{ font-weight:800; letter-spacing:2px; font-size:1.35rem; color:#fff; }
.dm-accent{ color:var(--dm-lime); }
.dm-avatar{ background:var(--dm-lime); color:#000; font-weight:700; }

.navbar-vertical .nav-link{ color:#b8b8b8; border-radius:8px; margin:2px 8px; }
.navbar-vertical .nav-link:hover{ background:var(--dm-panel-2); color:#fff; }
.navbar-vertical .nav-item.active .nav-link{
  background:linear-gradient(90deg, rgba(198,244,50,.18), transparent);
  color:var(--dm-lime); border-left:3px solid var(--dm-lime);
}
.navbar-vertical .nav-link-icon{ color:inherit; }

/* Cards */
.card{ background:var(--dm-panel)!important; border:1px solid var(--dm-border)!important; border-radius:14px; }
.card-header{ border-bottom:1px solid var(--dm-border); background:transparent; }
.dm-kpi{ position:relative; overflow:hidden; }
.dm-kpi .dm-kpi-val{ font-size:1.8rem; font-weight:800; color:#fff; }
.dm-kpi .dm-kpi-accent{ color:var(--dm-lime); }
.dm-kpi-icon{ font-size:2rem; opacity:.25; position:absolute; right:16px; top:16px; color:var(--dm-lime); }

/* Buttons */
.btn-lime{ background:var(--dm-lime); color:#000; border:none; font-weight:600; }
.btn-lime:hover{ background:var(--dm-lime-d); color:#000; }
.btn-outline-lime{ border:1px solid var(--dm-lime); color:var(--dm-lime); background:transparent; }
.btn-outline-lime:hover{ background:var(--dm-lime); color:#000; }

/* Forms */
.form-control,.form-select{ background:var(--dm-panel-2); border:1px solid var(--dm-border); color:#eee; }
.form-control:focus,.form-select:focus{ background:var(--dm-panel-2); color:#fff; border-color:var(--dm-lime); box-shadow:0 0 0 .2rem rgba(198,244,50,.15); }
.form-check-input:checked{ background-color:var(--dm-lime); border-color:var(--dm-lime); }

/* Badges stato */
.badge-attivo{ background:rgba(198,244,50,.15); color:var(--dm-lime); }
.badge-disdire{ background:rgba(255,193,7,.15); color:#ffc107; }
.badge-disdetto{ background:rgba(220,53,69,.15); color:#ff6b7a; }
.badge-trasferito{ background:rgba(108,117,125,.2); color:#adb5bd; }

/* Tabulator override */
.tabulator{ background:var(--dm-panel)!important; border:1px solid var(--dm-border); border-radius:10px; }
.tabulator .tabulator-header{ background:var(--dm-panel-2)!important; border-bottom:1px solid var(--dm-border); }
.tabulator .tabulator-header .tabulator-col{ background:var(--dm-panel-2)!important; }
.tabulator-row{ background:var(--dm-panel)!important; }
.tabulator-row.tabulator-row-even{ background:#171717!important; }
.tabulator-row:hover{ background:#202020!important; }

/* Login */
.dm-login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; background:radial-gradient(circle at 30% 20%, #1a1a1a, #050505); }
.dm-login-card{ width:100%; max-width:420px; background:var(--dm-panel); border:1px solid var(--dm-border); border-radius:18px; padding:2.5rem; }
.dm-login-logo{ font-size:2rem; font-weight:800; letter-spacing:3px; text-align:center; margin-bottom:.3rem; }
.dm-otp-input{ letter-spacing:12px; text-align:center; font-size:1.6rem; font-weight:700; }

/* ===== Select2 dark theme Dominium ===== */
/* Selezione singola */
.select2-container--default .select2-selection--single{
  background:var(--dm-panel-2)!important; border:1px solid var(--dm-border)!important;
  height:38px!important; border-radius:6px; }
.select2-container--default .select2-selection--single .select2-selection__rendered{
  color:#eee!important; line-height:36px!important; }
.select2-container--default .select2-selection--single .select2-selection__placeholder{
  color:#888!important; }
.select2-container--default .select2-selection--single .select2-selection__arrow{ height:36px!important; }
.select2-container--default .select2-selection--single .select2-selection__arrow b{
  border-color:#888 transparent transparent transparent!important; }

/* Selezione multipla */
.select2-container--default .select2-selection--multiple{
  background:var(--dm-panel-2)!important; border:1px solid var(--dm-border)!important;
  border-radius:6px; min-height:38px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice{
  background:#2a2a2a!important; border:1px solid var(--dm-border)!important; color:#eee!important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{
  color:#888!important; }
.select2-container--default .select2-search--inline .select2-search__field{
  color:#eee!important; }

/* Dropdown (pannello a tendina) */
.select2-dropdown{
  background:var(--dm-panel-2)!important; border:1px solid var(--dm-border)!important; color:#eee!important; }
.select2-results__option{
  color:#ddd!important; background:var(--dm-panel-2)!important; }
.select2-container--default .select2-results__option{
  color:#ddd!important; background:var(--dm-panel-2)!important; }
.select2-container--default .select2-results__option[aria-selected=true]{
  background:#2a2a2a!important; color:var(--dm-lime)!important; }
.select2-container--default .select2-results__option--highlighted[aria-selected]{
  background:var(--dm-lime)!important; color:#000!important; }

/* Campo di ricerca nel dropdown */
.select2-search--dropdown .select2-search__field{
  background:var(--dm-black)!important; border:1px solid var(--dm-border)!important; color:#fff!important; }

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple{
  border-color:var(--dm-lime)!important; }

/* Proforma / rinnovi status badges */
.st-Da.inviare,.badge-st-DaInviare{ background:rgba(108,117,125,.2); color:#adb5bd; }
.dm-days-crit{ color:#ff6b7a; font-weight:700; }
.dm-days-warn{ color:#ffc107; font-weight:700; }
.dm-days-ok{ color:var(--dm-lime); font-weight:700; }