/* VendiFlow Dipendenti — Tema scuro, isolato alle pagine WebApp.
   Nessun cambiamento allo stile amministratore o ai form di backend.
   Il tema chiaro usa integralmente il CSS originale. */
html[data-vf-theme="dark"] {
  color-scheme:dark;
  --ink:#f0eee9;
  --muted:#a9b5bf;
  --brown:#b88951;
  --line:#3b4652;
  --paper:#242c36;
  --soft:#202731;
  --vf-gold:#d2a15e;
  background:#171c24;
}
html[data-vf-theme="dark"] body {
  background:linear-gradient(145deg,#171c24,#202630)!important;
  color:#f0eee9;
}
html[data-vf-theme="dark"] .shell {color:#f0eee9}
html[data-vf-theme="dark"] .brand-sub,
html[data-vf-theme="dark"] .employee-head small,
html[data-vf-theme="dark"] .muted,
html[data-vf-theme="dark"] .small,
html[data-vf-theme="dark"] .date,
html[data-vf-theme="dark"] .home-icon small {color:#adb9c3}
html[data-vf-theme="dark"] .card,
html[data-vf-theme="dark"] .home-icon,
html[data-vf-theme="dark"] .settings-sheet,
html[data-vf-theme="dark"] .settings-item,
html[data-vf-theme="dark"] .install-sheet,
html[data-vf-theme="dark"] .exit-confirm-modal,
html[data-vf-theme="dark"] .employee-data-item,
html[data-vf-theme="dark"] .photo-upload,
html[data-vf-theme="dark"] .summary div {
  background:#242c36;color:#f0eee9;
  border-color:#3b4652;box-shadow:0 12px 32px #05080f35;
}
html[data-vf-theme="dark"] .settings-item,
html[data-vf-theme="dark"] .employee-data-item,
html[data-vf-theme="dark"] .summary div,
html[data-vf-theme="dark"] .photo-upload {background:#29313c}
html[data-vf-theme="dark"] .settings-item p,
html[data-vf-theme="dark"] .settings-head .small,
html[data-vf-theme="dark"] .install-sheet p,
html[data-vf-theme="dark"] .exit-confirm-modal p,
html[data-vf-theme="dark"] .employee-data-item span,
html[data-vf-theme="dark"] .summary span,
html[data-vf-theme="dark"] .mail-meta,
html[data-vf-theme="dark"] .intervention-place {color:#aebbc5}
html[data-vf-theme="dark"] .settings-sheet h2,
html[data-vf-theme="dark"] .settings-item strong,
html[data-vf-theme="dark"] .install-sheet h2,
html[data-vf-theme="dark"] .exit-confirm-modal h2,
html[data-vf-theme="dark"] .employee-data-item strong {color:#f2f0ec}
html[data-vf-theme="dark"] .settings-close,
html[data-vf-theme="dark"] .exit-cancel,
html[data-vf-theme="dark"] .settings-btn,
html[data-vf-theme="dark"] .bell-btn,
html[data-vf-theme="dark"] .home-btn,
html[data-vf-theme="dark"] .logout button,
html[data-vf-theme="dark"] .photo-modal-close {
  background:#303947;color:#f1e9da;border-color:#536071;
}
html[data-vf-theme="dark"] .settings-action,
html[data-vf-theme="dark"] .primary,
html[data-vf-theme="dark"] .install-sheet button,
html[data-vf-theme="dark"] .doc-download,
html[data-vf-theme="dark"] .submit {
  background:#ac7c47;color:#111820;
}
html[data-vf-theme="dark"] .logout button {box-shadow:none}
html[data-vf-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
html[data-vf-theme="dark"] textarea,
html[data-vf-theme="dark"] select {
  background:#1c242e;color:#f5f1e9;border-color:#536071;
}
html[data-vf-theme="dark"] input::placeholder,
html[data-vf-theme="dark"] textarea::placeholder {color:#a6b3bf;opacity:1}
html[data-vf-theme="dark"] input:focus-visible,
html[data-vf-theme="dark"] select:focus-visible,
html[data-vf-theme="dark"] textarea:focus-visible {outline:2px solid #d1a15c;outline-offset:1px}
html[data-vf-theme="dark"] option {background:#1c242e;color:#f5f1e9}
html[data-vf-theme="dark"] .row,
html[data-vf-theme="dark"] .mail-item,
html[data-vf-theme="dark"] .intervention-card,
html[data-vf-theme="dark"] .doc-row,
html[data-vf-theme="dark"] .report-line {border-bottom-color:#3c4755}
html[data-vf-theme="dark"] .notice,
html[data-vf-theme="dark"] .vf-wizard-note,
html[data-vf-theme="dark"] .retention {
  background:#423522;color:#f8deb0;border-color:#796039;
}
html[data-vf-theme="dark"] .notice a{color:#ffe0a5}
html[data-vf-theme="dark"] .offline-punch-banner {
  background:#1c344c;color:#b5d7f4;border-color:#355d80;
}
html[data-vf-theme="dark"] .inside,
html[data-vf-theme="dark"] .approved,
html[data-vf-theme="dark"] .pill.closed {background:#204633;color:#b7e5c0}
html[data-vf-theme="dark"] .outside,
html[data-vf-theme="dark"] .pill.priority {background:#39414b;color:#d8e0e7}
html[data-vf-theme="dark"] .wait,
html[data-vf-theme="dark"] .pill.open{background:#47391e;color:#f4d39b}
html[data-vf-theme="dark"] .rejected,
html[data-vf-theme="dark"] .msg.error {background:#48292e;color:#ffc1b9}
html[data-vf-theme="dark"] .msg.success,
html[data-vf-theme="dark"] .done {background:#244432;color:#b7e8c6;border-color:#3d7252}
html[data-vf-theme="dark"] .priority-alta {background:#482931;color:#ffb5bd}
html[data-vf-theme="dark"] .priority-media {background:#42381f;color:#f4d79d}
html[data-vf-theme="dark"] .priority-bassa {background:#254437;color:#b5e4c3}
html[data-vf-theme="dark"] .settings-status.ok{color:#95daa7}
html[data-vf-theme="dark"] .settings-status.warn{color:#f4c783}
html[data-vf-theme="dark"] .settings-status.bad{color:#ffaaa5}
html[data-vf-theme="dark"] .push-setup,
html[data-vf-theme="dark"] .attachment,
html[data-vf-theme="dark"] .description,
html[data-vf-theme="dark"] .info>div {
  background:#29313c;color:#f0eee9;border-color:#485361
}
html[data-vf-theme="dark"] .navigation-link{
  background:#493926;border-color:#8f6a43;color:#ffe2b5;
}
html[data-vf-theme="dark"] .photo-upload label[style*="background:#fff"] {
  background:#333e4b!important;color:#f0e9dc!important;border-color:#596676!important
}
html[data-vf-theme="dark"] .install-steps {color:#e9e0d5}
html[data-vf-theme="dark"] .settings-backdrop {background:#080b10b8}

/* Scelta tema sotto Impostazioni — radio cards accessibili. */
.vf-theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.vf-theme-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:79px;border:1px solid #dcd0c3;background:#fff;color:#4b392d;border-radius:12px;padding:9px 4px;cursor:pointer;font:inherit}
.vf-theme-choice .vf-theme-symbol{font-size:21px}
.vf-theme-choice strong{font-size:12px}
.vf-theme-choice small{font-size:10px}
.vf-theme-choice.is-selected,.vf-theme-choice[aria-checked="true"]{border:2px solid #bb8440;background:#fff4e3;box-shadow:0 0 0 1px #c5945240}
.vf-theme-choice:focus-visible{outline:3px solid #bf904f;outline-offset:2px}
.vf-theme-current{font-size:11px;font-weight:800;color:#846037;margin-top:10px}
html[data-vf-theme="dark"] .vf-theme-choice{background:#303a47;color:#eee5da;border-color:#526171}
html[data-vf-theme="dark"] .vf-theme-choice.is-selected,
html[data-vf-theme="dark"] .vf-theme-choice[aria-checked="true"]{background:#493c2f;border-color:#d1a15c;color:#ffe0ad}
html[data-vf-theme="dark"] .vf-theme-current{color:#e2b47e}

/* Modal «Nuovo intervento» e Maps: mantiene evidenti tutti i campi. */
html[data-vf-theme="dark"] .vf-new-request-card,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-panel {
  background:#242c36!important;border-color:#3d4855!important;color:#f0eee9!important;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-title h1,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-panel-heading h2,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-field-label,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-step label,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-summary dd {color:#f0eee9!important}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-title p,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-panel-heading p,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-summary dt {color:#b2bec8!important}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-progress,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-map-heading,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priority-heading {border-color:#46515d!important}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-progress span {
  background:#35414e;border-color:#586778;color:#e2e7eb;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-progress [aria-current="step"] span,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-progress .vf-wizard-finished span {
  background:#b98443;color:#151b22;border-color:#bd965e;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-category-choices button,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-chips button,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priorities button,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-summary>div {
  background:#2c3540;border-color:#526071;color:#f0eee9;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-category-choices button small,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priorities button small{color:#b5c0cb}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-category-choices [aria-pressed="true"],
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priorities [aria-pressed="true"]{
  background:#4c3b29;border-color:#cb9655;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priorities [data-vf-priority="Alta"]{color:#ff929f}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priorities [data-vf-priority="Media"]{color:#f7bf7d}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-priorities [data-vf-priority="Bassa"]{color:#93e0b5}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-actions{background:transparent;border-top-color:#485461}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-back{background:#333e4b;color:#eee4d7;border-color:#5a6977}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-next,
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-send{background:#b88448;color:#15191e}
html[data-vf-theme="dark"] .vf-new-request-card .vf-map-trigger,
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-button {
  background:#35404e;color:#f4e4ce;border-color:#8e6c47;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-status{color:#bdc7d1}
html[data-vf-theme="dark"] .vf-new-request-card .vf-wizard-summary>div{border-color:#526071}

/* Interventi, punto 3: localizzazione e allegati seguono anche il tema scuro
   automatico del dispositivo. Sfondi uniformi, senza gradiente chiaro. */
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-location,
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments {
  background:#2c3540!important;
  border-color:#526071!important;
  color:#f0eee9!important;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments>strong {
  color:#f0eee9;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments p,
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments small {
  color:#bdc8d2;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments .vf-problem-upload-button {
  background:#35404e;
  border-color:#65778a;
  color:#f4e4ce!important;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments .vf-problem-upload-button:hover {
  background:#405062;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-selection,
html[data-vf-theme="dark"] .vf-new-request-card .vf-problem-attachments #vf-problem-selection {
  background:#254536;
  color:#bfe8cc;
  border-color:#456a55;
}
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-status[data-type="success"] {color:#a7dfb6}
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-status[data-type="warning"] {color:#f0c18b}
html[data-vf-theme="dark"] .vf-new-request-card .vf-onsite-status[data-type="error"] {color:#ffb3ab}

/* Sistema di messaggi e popup condivisi */
html[data-vf-theme="dark"] .vf-dialog,
html[data-vf-theme="dark"] .vf-modal,
html[data-vf-theme="dark"] .vf-popup,
html[data-vf-theme="dark"] .vf-modal-content {
  background:#242c36;color:#f0eee9;border-color:#495666;
}

/* Chat aziendale (pagina indipendente) */
html[data-vf-theme="dark"] {
  --mine:#294939;--other:#2b3440;--chatbg:#171f29;
}
html[data-vf-theme="dark"] .app{background:var(--chatbg);box-shadow:0 0 35px #050a10}
html[data-vf-theme="dark"] .topbar,
html[data-vf-theme="dark"] .composer,
html[data-vf-theme="dark"] .upload-preview,
html[data-vf-theme="dark"] .emoji-panel {background:#242d38;border-color:#415061;color:#f1eee9}
html[data-vf-theme="dark"] .icon-btn,
html[data-vf-theme="dark"] .tool {background:#333f4c;border-color:#536274;color:#f5ebde}
html[data-vf-theme="dark"] .retention {background:#3b3225;color:#f7dcad;border-color:#74603a}
html[data-vf-theme="dark"] .messages{background:var(--chatbg)}
html[data-vf-theme="dark"] .day-note span {background:#39434d;color:#d2dce6}
html[data-vf-theme="dark"] .mine .bubble{background:#2e503e;color:#eff7ef}
html[data-vf-theme="dark"] .other .bubble{background:#303b47;color:#eff2f6}
html[data-vf-theme="dark"] .sender{color:#dfb68a}
html[data-vf-theme="dark"] .meta,
html[data-vf-theme="dark"] .voice-times,
html[data-vf-theme="dark"] .empty{color:#bdc8d2}
html[data-vf-theme="dark"] .voice-speed,
html[data-vf-theme="dark"] .preview-remove {background:#394551;color:#f5eee7}
html[data-vf-theme="dark"] .message-input{background:#17212b;color:#f1eee8;border-color:#516172}
html[data-vf-theme="dark"] .send{background:#b48248;color:#16202a}
html[data-vf-theme="dark"] .emoji-panel emoji-picker{
  --background:#242d38;--border-color:#3c4b5b;--input-border-color:#576477;
  --input-font-color:#f0eee9;--input-placeholder-color:#abb9c6;
  --category-font-color:#c7d2dc;--indicator-color:#d4a264;
  --button-hover-background:#3b4858;--button-active-background:#455569;
}
html[data-vf-theme="dark"] .recording{background:#442a2c;color:#ffc4be;border-color:#78474b}
html[data-vf-theme="dark"] .rec-cancel{color:#ffbcb5}
html[data-vf-theme="dark"] .rec-trash{background:#543338;color:#ffc2bd}
html[data-vf-theme="dark"] .home-icon{transition:none}
/* Confirmationi e avvisi usano il componente condiviso della WebApp. */
html[data-vf-theme="dark"] .vf-popup-card{
  background:#252e38;color:#f0eee9;border-color:#566271;
  box-shadow:0 26px 78px #080d16aa
}
html[data-vf-theme="dark"] .vf-popup-copy strong{color:#f7eee1}
html[data-vf-theme="dark"] .vf-popup-copy p{color:#c0cbd4}
html[data-vf-theme="dark"] .vf-popup-btn.secondary{background:#374450;color:#e9f0f4}
html[data-vf-theme="dark"] .vf-popup-btn.primary{background:#b8884c;color:#18202a}
html[data-vf-theme="dark"] .vf-popup-btn.primary:hover{background:#ce9b5b}
html[data-vf-theme="dark"] .vf-popup-card.danger .vf-popup-btn.primary{background:#ba5961;color:#fff}
html[data-vf-theme="dark"] .vf-popup-icon{background:#284b36;color:#b2e5c6}
html[data-vf-theme="dark"] .vf-popup-card.warning .vf-popup-icon{background:#493b24;color:#f7d698}
html[data-vf-theme="dark"] .vf-popup-card.error .vf-popup-icon,
html[data-vf-theme="dark"] .vf-popup-card.danger .vf-popup-icon{background:#523037;color:#ffaab3}

/* Schermata accesso: usa la stessa preferenza WebApp sul dispositivo.
   L'autenticazione resta identica: solo colori e superfici. */
html[data-vf-theme="dark"] body.vf-employee-login {
  background:radial-gradient(ellipse 82% 62% at 50% 9%,#293342 0%,#181e27 64%,#121820 100%)!important;
  color:#f0eee9;
}
html[data-vf-theme="dark"] .vf-employee-login .card {
  background:linear-gradient(160deg,#29323d 0%,#222b35 100%);
  color:#f3eee6;
  border:1px solid #445060;
  box-shadow:0 25px 70px #090d16a6;
}
html[data-vf-theme="dark"] .vf-employee-login .card h1,
html[data-vf-theme="dark"] .vf-employee-login label {color:#f2eee7}
html[data-vf-theme="dark"] .vf-employee-login .powered,
html[data-vf-theme="dark"] .vf-employee-login .sub,
html[data-vf-theme="dark"] .vf-employee-login .note,
html[data-vf-theme="dark"] .vf-employee-login .remember {color:#b7c2ce}
html[data-vf-theme="dark"] .vf-employee-login .card input:not([type="checkbox"]) {
  background:#171f29;color:#f4eee6;border:1px solid #556579;
}
html[data-vf-theme="dark"] .vf-employee-login .card input::placeholder {color:#a8b8c7}
html[data-vf-theme="dark"] .vf-employee-login .card input:focus-visible {
  border-color:#d2a35f;outline:2px solid #d2a35f;outline-offset:2px
}
html[data-vf-theme="dark"] .vf-employee-login .card button[type="submit"] {
  background:linear-gradient(115deg,#cc9b59,#af7b3d);color:#18202a;
}
html[data-vf-theme="dark"] .vf-employee-login .remember input {accent-color:#d1a163}
html[data-vf-theme="dark"] .vf-employee-login .msg{
  background:#472e31;color:#ffbebb;border:1px solid #75474a
}

/* Sfumatura per immagini con sfondo bianco/avorio riconosciuto automaticamente.
   Non modifica alcun file logo e lascia intatti i marchi trasparenti. */
html[data-vf-theme="dark"] img[data-vf-brand-logo] {
  filter:brightness(1.12) drop-shadow(0 5px 13px #d7a5642b);
  transition:filter .22s ease,opacity .22s ease;
}
html[data-vf-theme="dark"] img[data-vf-brand-logo].vf-logo-light-background {
  /* Il bianco del raster diventa scuro e si fonde col tema:
     i tratti scuri tornano luminosi, le tonalità restano riconoscibili. */
  filter:invert(1) hue-rotate(180deg) saturate(1.12) brightness(1.15);
  mix-blend-mode:screen;
  -webkit-mask-image:radial-gradient(ellipse 84% 82% at 50% 50%,#000 69%,transparent 100%);
  mask-image:radial-gradient(ellipse 84% 82% at 50% 50%,#000 69%,transparent 100%);
}
html[data-vf-theme="dark"] .brand,
html[data-vf-theme="dark"] .vf-employee-login .card {
  isolation:isolate;
}
html[data-vf-theme="dark"] .brand {
  background:radial-gradient(ellipse 54% 55% at 50% 44%,#bc874016 0%,transparent 100%);
}
html[data-vf-theme="dark"] .vf-employee-login .logo {
  max-height:min(35vh,240px);
  object-fit:contain;
}
@media (prefers-reduced-motion:reduce) {
  img[data-vf-brand-logo] {transition:none!important}
}
/* Marchi trasparenti con parti scure: un'aura avorio sfumata migliora
   la lettura senza invertire i colori originali del disegno. */
html[data-vf-theme="dark"] .vf-employee-login .logo:not(.vf-logo-light-background) {
  background:radial-gradient(ellipse 58% 28% at 50% 74%,#dfb77a36 0%,#dfb77a15 48%,transparent 100%);
  filter:brightness(1.18) drop-shadow(0 6px 14px #ce985c36);
}
html[data-vf-theme="dark"] .brand img[data-vf-brand-logo]:not(.vf-logo-light-background) {
  background:radial-gradient(ellipse 59% 28% at 50% 74%,#e3bf8434 0%,transparent 100%);
}

/* /login e /badge: il vero punto d'accesso WebApp viene reso da badge.html. */
html[data-vf-theme="dark"] body.vf-employee-badge {
  background:radial-gradient(ellipse 90% 60% at 50% 5%,#2c3746 0%,#1a222c 62%,#151b23 100%)!important;
  color:#f2eee7;
}
html[data-vf-theme="dark"] .vf-employee-badge .card {
  background:linear-gradient(155deg,#29333e,#212a34);border-color:#4b596a;
  box-shadow:0 19px 47px #04081270;
}
html[data-vf-theme="dark"] .vf-employee-badge h1,
html[data-vf-theme="dark"] .vf-employee-badge label,
html[data-vf-theme="dark"] .vf-employee-badge .employee strong,
html[data-vf-theme="dark"] .vf-employee-badge .clock {color:#f6f0e8}
html[data-vf-theme="dark"] .vf-employee-badge .brand>div[style],
html[data-vf-theme="dark"] .vf-employee-badge .employee small,
html[data-vf-theme="dark"] .vf-employee-badge .date,
html[data-vf-theme="dark"] .vf-employee-badge .note{color:#b8c4d0!important}
html[data-vf-theme="dark"] .vf-employee-badge input:not([type="checkbox"]):not([type="hidden"]) {
  background:#1a232e;color:#f3efe8;border:1px solid #59697a;
}
html[data-vf-theme="dark"] .vf-employee-badge input::placeholder{color:#a9b9c6}
html[data-vf-theme="dark"] .vf-employee-badge input:focus-visible {
  border-color:#d6a663;outline:2px solid #d6a663;outline-offset:1px;
}
html[data-vf-theme="dark"] .vf-employee-badge .primary{
  background:linear-gradient(115deg,#c99a59,#ac7a40);color:#171f28;
}
html[data-vf-theme="dark"] .vf-employee-badge .remember{color:#bdc9d3}
html[data-vf-theme="dark"] .vf-employee-badge .remember input{accent-color:#c99756}
html[data-vf-theme="dark"] .vf-employee-badge .logout a{
  color:#e7bd83;text-decoration-color:#ac8555;
}
html[data-vf-theme="dark"] .vf-employee-badge .today,
html[data-vf-theme="dark"] .vf-employee-badge .row{border-color:#445361}
html[data-vf-theme="dark"] .vf-employee-badge .msg.error{background:#4a3035;color:#ffb9b1}
html[data-vf-theme="dark"] .vf-employee-badge .msg.success{background:#274636;color:#aee4c0}
html[data-vf-theme="dark"] .vf-employee-badge .status.outside{background:#3c4550;color:#d6e1e8}
html[data-vf-theme="dark"] .vf-employee-badge .status.inside{background:#24513a;color:#b5ebc8}
html[data-vf-theme="dark"] .vf-employee-badge .brand img:not(.vf-logo-light-background){
  background:radial-gradient(ellipse 58% 28% at 50% 75%,#e2ba8130,transparent 100%);
  filter:brightness(1.16) drop-shadow(0 5px 12px #d4a16228);
}
/* Piccola luce sfumata solo dietro i marchi trasparenti con scritte scure. */
html[data-vf-theme="dark"] .vf-employee-badge .brand img[data-vf-brand-logo]:not(.vf-logo-light-background){
  background:radial-gradient(ellipse 58% 24% at 50% 77%,#f1ce9c66 0%,#dcb47f24 53%,transparent 100%);
}

/* Allegati Richieste e Rapportino: il tema scuro deve coprire anche
   le superfici di caricamento e la fotocamera (nessun input file bianco). */
html[data-vf-theme="dark"] .vf-new-request-card .vf-upload-copy strong,
html[data-vf-theme="dark"] .vf-report-upload-copy strong{color:#f0eee9!important}
html[data-vf-theme="dark"] .vf-new-request-card .vf-upload-copy strong span,
html[data-vf-theme="dark"] .vf-report-upload-copy strong span,
html[data-vf-theme="dark"] .vf-new-request-card .vf-upload-copy small,
html[data-vf-theme="dark"] .vf-report-upload-copy small{color:#bdc8d2!important}
html[data-vf-theme="dark"] .vf-report-attachments{
  background:#29313c!important;border-color:#526071!important;color:#f0eee9!important
}
html[data-vf-theme="dark"] .vf-report-camera-button{
  background:#35404e!important;border-color:#65778a!important;color:#f4e4ce!important
}
html[data-vf-theme="dark"] .vf-report-camera-button:hover{background:#405062!important}
html[data-vf-theme="dark"] #vf-report-file-selection{
 background:#254536;color:#bfe8cc;border:1px solid #456a55
}
html[data-vf-theme="dark"] .vf-report-source-link{color:#e2b47e}


/* Ricambi dal rapportino: segue sempre il tema VendiFlow scelto dal tecnico.
   Override scoped: il tema chiaro e le pagine amministrative rimangono invariati. */
html[data-vf-theme="dark"] .vf-report-spares {
  background:#29313c!important;
  border:1px solid #485361!important;
  color:#f0eee9!important;
  box-shadow:none;
}
html[data-vf-theme="dark"] .vf-report-spares h3,
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-search-label,
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-list-title,
html[data-vf-theme="dark"] .vf-report-spares .vf-report-spares-prior strong {
  color:#f0eee9!important;
}
html[data-vf-theme="dark"] .vf-report-spares>p,
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-result small,
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-picked-label small {
  color:#bdc8d2!important;
}
html[data-vf-theme="dark"] .vf-report-spares input[data-spares-search],
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-picked input {
  background:#1c242e!important;
  border-color:#536071!important;
  color:#f5f1e9!important;
}
html[data-vf-theme="dark"] .vf-report-spares input[data-spares-search]::placeholder {
  color:#a6b3bf!important;opacity:1;
}
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-result,
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-picked,
html[data-vf-theme="dark"] .vf-report-spares .vf-report-spares-prior>div {
  background:#242c36!important;
  border-color:#485361!important;
  color:#f0eee9!important;
}
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-result:hover,
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-result:focus-visible {
  background:#35404e!important;border-color:#c79d63!important;
}
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-result-right b {
  color:#eac18b!important;
}
html[data-vf-theme="dark"] .vf-report-spares .vf-spares-remove {
  background:#473139!important;color:#ffb8b3!important;border-color:#83535c!important;
}
html[data-vf-theme="dark"] .vf-report-spares .vf-report-spares-error {
  background:#48292e!important;color:#ffbdb7!important;border:1px solid #754850!important;
}
/* Dialog nativo di ricerca, anche in top layer Safari iOS. */
html[data-vf-theme="dark"] dialog.vf-spares-warning {
  color-scheme:dark;
  background:#29313c!important;
  color:#f0eee9!important;
  border:1px solid #596777!important;
  box-shadow:0 24px 60px #080b12b8!important;
}
html[data-vf-theme="dark"] dialog.vf-spares-warning h3 {
  color:#f0eee9!important;
}
html[data-vf-theme="dark"] dialog.vf-spares-warning p {
  color:#c3ced8!important;
}
html[data-vf-theme="dark"] dialog.vf-spares-warning button {
  background:#b88951!important;color:#151a21!important;border:1px solid #d5a96e!important;
  font-size:15px;min-height:44px;
}
html[data-vf-theme="dark"] dialog.vf-spares-warning::backdrop {
  background:rgba(6,10,17,.70)!important;
}
/* Altri avvisi e conferme VendiFlow aperti nello stesso rapportino. */
html[data-vf-theme="dark"] .vf-popup-card {
  background:#29313c!important;color:#f0eee9!important;border-color:#596777!important;
  box-shadow:0 24px 65px #050811a8;
}
html[data-vf-theme="dark"] .vf-popup-copy strong {
  color:#f0eee9!important;
}
html[data-vf-theme="dark"] .vf-popup-copy p {
  color:#c3ced8!important;
}
html[data-vf-theme="dark"] .vf-popup-card .vf-popup-btn.primary {
  background:#b88951!important;color:#141b22!important;
}
html[data-vf-theme="dark"] .vf-popup-card .vf-popup-btn.secondary {
  background:#35404e!important;color:#f0eee9!important;
}
html[data-vf-theme="dark"] .vf-popup-card.warning .vf-popup-icon {
  background:#4e4029!important;color:#f3d39f!important;
}
