/* Verdex — Tinte di card e bordi dei tre sfondi dell'area di lavoro (caricato dopo shield-theme.css e shield-theme-night.css).
 * Solo colori: dimensioni, spaziature, layout del computer e proporzioni dello smartphone restano quelli di sempre
 * (in Notte i bordi delle card principali passano a 1px sottile e nitido, come richiesto dal tema).
 * - Chiaro:       pagina azzurro-ghiaccio #EAF0F7 · card #FFFFFF · bordi azzurro-grigio #CBD5E1
 * - Sabbia Calda: pagina crema/sabbia #EDE5D5 · card avorio #FAF6EE · bordi sabbia #DDD0B8
 * - Notte:        pagina blu-ardesia #070D19 · card #111C33 · bordi rgba(148,163,184,.18) · testi secondari #A8B8D0
 * Il riquadro del logo Verdex resta sempre bianco puro #FFFFFF. Con «Alto Contrasto» attivo nulla di questo si applica.
 * Il cambio di sfondo sfuma in 2200 ms cubic-bezier(0.22, 1, 0.36, 1) (classe «ws-theming», shield-theme.css). */

/* =====================================================================
   CHIARO — card bianche, bordi azzurro-grigio sottili
   ===================================================================== */
html[data-ws-theme="light"]:not(.high-contrast) #work-area { background-color: #FFFFFF; border-color: #CBD5E1; }
html[data-ws-theme="light"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active) { background-color: #FFFFFF; border-color: #CBD5E1; }
html[data-ws-theme="light"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active):hover { background-color: #F8FAFF; border-color: #1E3A8A; }
html[data-ws-theme="light"]:not(.high-contrast) #acc-rows > :is(#sample-row, #mode-guide, #history-section, #install-card):not(.is-open) { background-color: #FFFFFF; border-color: #CBD5E1; }
html[data-ws-theme="light"]:not(.high-contrast) #app-header { border-bottom-color: #CBD5E1; }

/* =====================================================================
   SABBIA CALDA — pagina crema/sabbia, card avorio caldo, bordi sabbia
   ===================================================================== */
html[data-ws-theme="sand"]:not(.high-contrast) #app-header { background-color: #FAF6EE; border-bottom-color: #DDD0B8; box-shadow: 0 1px 0 rgba(120, 83, 30, .06); }
html[data-ws-theme="sand"]:not(.high-contrast) #work-area { background-color: #FAF6EE; border-color: #DDD0B8; box-shadow: 0 1px 2px rgba(120, 83, 30, .06), 0 10px 30px rgba(120, 83, 30, .08); }

/* Schede delle categorie */
html[data-ws-theme="sand"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active) { background-color: #FAF6EE; border-color: #DDD0B8; box-shadow: 0 1px 2px rgba(120, 83, 30, .07); }
html[data-ws-theme="sand"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active):hover { background-color: #FFFBF4; border-color: #1E3A8A; }
html[data-ws-theme="sand"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active) .tab-icon { background-color: #F2EADB; box-shadow: inset 0 0 0 1px #E4D7BF; }
html[data-ws-theme="sand"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active) .tab-hint { color: #5C5345; }

/* Righe sotto la verifica (Esempi, Guida, Archivio, Installa) */
html[data-ws-theme="sand"]:not(.high-contrast) #acc-rows > :is(#sample-row, #mode-guide, #history-section, #install-card) { background-color: #FAF6EE; border-color: #DDD0B8; box-shadow: 0 1px 2px rgba(120, 83, 30, .06); }
html[data-ws-theme="sand"]:not(.high-contrast) #acc-rows > :is(#sample-row, #mode-guide, #history-section, #install-card).is-open { border-color: #C9B48F; }
html[data-ws-theme="sand"]:not(.high-contrast) #acc-rows > :is(#sample-row, #mode-guide, #history-section, #install-card) .arc-toggle:hover { background-color: #F4EDE0; }

/* Casella del messaggio: carta avorio chiara, bordo sabbia (il blu del focus resta quello di sempre) */
html[data-ws-theme="sand"]:not(.high-contrast) #work-area textarea:not(:focus) { background-color: #FFFDF8; }
html[data-ws-theme="sand"]:not(.high-contrast) #work-area textarea:not(:focus):not(:hover) { border-color: #C9B48F; }

/* =====================================================================
   NOTTE — gerarchia netta tra pagina (#070D19) e card (#111C33)
   ===================================================================== */
html[data-ws-theme="night"]:not(.high-contrast) #app-header { background-color: #111C33; border-bottom-color: rgba(148, 163, 184, .18); }

/* Riquadro principale di verifica */
html[data-ws-theme="night"]:not(.high-contrast) #work-area {
  background-color: #111C33; border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .32);
}

/* Schede delle categorie (Messaggi, Screenshot, Foto, Documenti, Audio, Video, Numeri, Link) */
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare) {
  background-color: #111C33; color: #EAF0FA; border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active):hover { background-color: #15223D; border-color: rgba(148, 163, 184, .38); }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active) .tab-icon { background-color: #0B1426; box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .22); }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab:not(.tool-compare):not(.tab-active) .tab-hint { color: #A8B8D0; }

/* Scheda selezionata: blu elettrico satinato con leggero bagliore esterno */
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab.tab-active:not(.tool-compare) {
  background-color: #2563EB; border-color: #1D4ED8; color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .28);
}
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab.tab-active:not(.tool-compare) .tab-icon { background-color: rgba(255, 255, 255, .16); box-shadow: none; }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-tab.tab-active:not(.tool-compare) .tab-hint { color: #DBEAFE; }

/* «Confronta Originale vs Sospetto» (PRO): oro-ambra satinato, coordinato con il badge PRO in alto e l'oro del logo */
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare {
  background: rgba(245, 158, 11, .14); border: 1px solid rgba(251, 191, 36, .40); color: #FDE68A;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare .tab-label { color: #FDE68A; }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare .tab-hint { color: #F3D9A4; }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare .tab-icon { background-color: rgba(245, 158, 11, .16); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .45); }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare .tab-icon[data-ico] { color: #FCD34D; }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare .tab-new { background: #FBBF24; color: #451A03; }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare:hover:not(.tab-active) { background: rgba(245, 158, 11, .20); border-color: rgba(251, 191, 36, .60); }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare.tab-active {
  background: rgba(245, 158, 11, .26); border-color: #FBBF24; color: #FEF3C7;
  box-shadow: 0 6px 20px rgba(245, 158, 11, .20);
}
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare.tab-active .tab-label,
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare.tab-active .tab-hint { color: #FDE68A; }
html[data-ws-theme="night"]:not(.high-contrast) #tools-nav .tool-compare.tab-active .tab-new { background: #FBBF24; color: #451A03; }

/* «Allerte attive»: rosso-corallo traslucido, testo chiaro ben leggibile */
html[data-ws-theme="night"]:not(.high-contrast) .sg-alerts { background: rgba(239, 68, 68, .10); border: 1px solid rgba(248, 113, 113, .35); color: #F1F5F9; }
html[data-ws-theme="night"]:not(.high-contrast) .sg-alerts-title { color: #FECACA; }
html[data-ws-theme="night"]:not(.high-contrast) .sg-alerts-sub { color: #F1D5D5; }
html[data-ws-theme="night"]:not(.high-contrast) .sg-alert { background: #111C33; border-color: rgba(248, 113, 113, .35); color: #F1F5F9; }
html[data-ws-theme="night"]:not(.high-contrast) .sg-alert[data-source="baseline"] { border-color: rgba(251, 146, 60, .35); }
html[data-ws-theme="night"]:not(.high-contrast) .sg-alert:hover { border-color: #F87171; }
html[data-ws-theme="night"]:not(.high-contrast) .sg-alert-meta { color: #FCA5A5; }

/* Altri riquadri della Home: stesso blu delle card, bordi sottili nitidi */
html[data-ws-theme="night"]:not(.high-contrast) #acc-rows > :is(#sample-row, #mode-guide, #history-section, #install-card) { background-color: #111C33; border-color: rgba(148, 163, 184, .18); }
html[data-ws-theme="night"]:not(.high-contrast) #acc-rows > :is(#sample-row, #mode-guide, #history-section, #install-card).is-open { border-color: rgba(148, 163, 184, .32); }

/* Testi secondari e sottotitoli: grigio-ghiaccio chiaro ad alta leggibilità */
html[data-ws-theme="night"]:not(.high-contrast) :is(.text-slate-700, .text-slate-600, .text-slate-500) { color: #A8B8D0; }
html[data-ws-theme="night"]:not(.high-contrast) #work-area > [id^="panel-"] > div:first-child > p { color: #A8B8D0; }
html[data-ws-theme="night"]:not(.high-contrast) :is(.ws-h, .ws-desc, .ws-opt-sub) { color: #A8B8D0; }

/* Casella di inserimento: più profonda della card, bordo sottile, focus blu luminoso */
html[data-ws-theme="night"]:not(.high-contrast) #work-area :is(textarea, input[type="text"], input[type="tel"], input[type="url"], input[type="search"], input[type="email"]),
html[data-ws-theme="night"]:not(.high-contrast) .cmp-col textarea {
  background-color: #0B1426; color: #EAF0FA; border-color: rgba(148, 163, 184, .25);
}
html[data-ws-theme="night"]:not(.high-contrast) #work-area :is(textarea, input[type="text"], input[type="tel"], input[type="url"], input[type="search"], input[type="email"]):hover:not(:focus),
html[data-ws-theme="night"]:not(.high-contrast) .cmp-col textarea:hover:not(:focus) { border-color: rgba(148, 163, 184, .42); }
html[data-ws-theme="night"]:not(.high-contrast) #work-area :is(textarea, input[type="text"], input[type="tel"], input[type="url"], input[type="search"], input[type="email"]):focus,
html[data-ws-theme="night"]:not(.high-contrast) .cmp-col textarea:focus {
  background-color: #0B1426; border-color: #3B82F6; outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, .30);
}
