/**
 *
 *  screen.css
 *
 *  Stili per le pagine del sito su schermo
 *
 *  @author      Carlo Simonelli <cs@tacun.it>
 *  @copyright   Copyright (c) 2021-2024, Tacun
 *  @package     bada
 *  @subpackage
 *  @category    bin
 *  @version     0.16.1
 *  @since       0.1.0
 *
 */

/* ============================================================
   AUTOCOMPLETE
   ============================================================ */

.ok {
    color: #006600;
}
.ko {
    color: #660000;
}
.riga.autocomplete {
    display: flex;
    align-items: center;
    padding: 4px 0;
    text-align: left;
}

/* wrapper interno per input + lista */
.riga.autocomplete .autocomplete-wrapper {
    position: relative;
    flex: 1;
}

/* input full width */
.riga.autocomplete .autocomplete-wrapper input {
    width: 100%;
}

/* lista suggerimenti */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.autocomplete-list li {
    border-bottom: 1px solid #eee;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.autocomplete-list li:last-child {
    border-bottom: none;
}

.autocomplete-list li:hover,
.autocomplete-list li.selected {
    background-color: #d0e0ff;
}

/* ============================================================
   RESET E UTILITÀ
   ============================================================ */

.container {
    position: relative;
    display: inline-block;
    font-size: 0;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border-color: #aaa;
}

.hidden {
    display: none !important;
}

.trasparente {
    opacity: 0;
}

.rosso {
    color: #990000;
}

/* barra di debug (trace) */
.trace {
    background: #900;
    color: #fff;
    font-size: 1rem;
    left: 0px;
    padding: 0.5rem;
    position: fixed;
    top: 0px;
    z-index: 100;
}
.trace A {
    color: #fff;
    margin: 0 0.5em auto 1em;
}

/* pulsante generico */
.button {
    font-weight: bold;
    border-style: groove;
    border: solid 1px #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 70px;
    padding: 0.5rem 1rem;
    text-align: center;
}

/* riga timestamp nelle form */
DIV.riga.string.timestamp {
    margin: 0.5rem 0;
}

/* ============================================================
   ELEMENTI SINGOLI
   ============================================================ */

DIV {
    display: inline-block;
}

A {
    color: #090;
    font-weight: bold;
    text-decoration: none;
}
A:hover {
    text-decoration: underline;
}
A.button {
    color: #fff;
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    cursor: pointer;
}
TD.anchor A {
    color: #090;
    text-decoration: underline;
}

LABEL {
    font-weight: bold;
    display: inline-block;
    min-height: 32px;
}
LABEL:after {
    content: ": ";
    padding: 0 4px;
}

FIELDSET {
    border: none;
}

INPUT,
SELECT,
TEXTAREA {
    border: solid 1px #999;
    border-bottom-right-radius: 10px;
    font-family: "Oxanium", "Verdana", "sans-serif";
    font-size: 1rem;
    margin: 0;
    padding: 0.25rem 0.5rem;
    width: auto;
}

OPTION {
    padding-right: 1rem;
}

TABLE {
    empty-cells: show;
}

TABLE,
TR,
TH,
TD {
    border-collapse: collapse;
}

/* ============================================================
   ELEMENTI DELLA PAGINA
   ============================================================ */

HTML {
    font-size: 14pt;
}

BODY {
    padding: 0;
    background: #eee;
    font-family: "Oxanium", "Verdana", "sans-serif";
}
BODY.wait {
    cursor: wait;
}

BODY HEADER {
    color: #fff;
    display: block;
    height: 120px;
    position: fixed;
    text-align: right;
    width: 100%;
    z-index: 20;
}

MAIN {
    display: inline-block;
    margin-top: 120px;
    padding-bottom: 5rem;
    text-align: center;
    width: 100%;
}

/* disattivato
HEADER IMG#katsu {
    height: 190px;
    position: relative;
    float: left;
    margin-left: 1rem;
}
*/

/* barra dei titoli */
HEADER DIV.titoli {
    background: linear-gradient(90deg, #555 0%, #666 45%, #777 100%);
    padding: 0;
    width: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    display: block;
    text-align: left;
}
HEADER DIV.titoli::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1),               /* molto più soft */
        rgba(255, 255, 255, 0.1) 1px,           /* linee sottili */
        transparent 1px,
        transparent 8px                         /* più spazio tra le righe */
    );
    pointer-events: none;
}

BODY HEADER H1 {
    color: #f5f5f5;
    float: right;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 120px;
    letter-spacing: 0.02em;
    margin-right: 2rem;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4),
                 0 0 8px rgba(0, 0, 0, 0.3);
}

HEADER IMG#logo {
    height: 100%;
    position: relative;
    margin-left: 0;
}

/* menu principale */
HEADER DIV.menu {
    display: block;
    padding-right: 0rem;
    text-align: right;
}
NAV#menu-main {
    font-size: 0;
    width: auto;
}
DIV.menu.utente NAV#menu-main {
    float: right;
}
NAV#menu-main A {
    background: #d0d0d0;
    border-left: solid 1px;
    color: #666;
    display: inline-block;
    font-size: 1rem;
    padding: 8px 12px 10px;
    position: relative;
    margin: 0 -4px;
    min-width: 110px;
    text-align: center;
    border: solid 1px;
    z-index: 2;
    box-shadow: 0 6px 4px rgba(0, 0, 0, 0.1);
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
}
NAV#menu-main A:hover,
NAV#menu-main A.corrente {
    z-index: 10;
    box-shadow: 0 10px 4px rgba(0, 0, 0, 0.1);
}
NAV#menu-main A.corrente {
    background: #eeeeee;
}
NAV#menu-main A#utente-entra,
NAV#menu-main A#utente {
    background-color: #28d183;
    color: #fff;
    border-bottom-right-radius: 20px;
}
NAV#menu-main A#bada-info {
    background: #2c7956;
    color: #ffffff;
    min-width: 60px;
    z-index: 1;
}

/* barra con informazioni sull'esito delle operazioni */
DIV#info {
    color: #ffffff;
    display: block;
    font-size: 1rem;
    font-weight: bold;
    line-height: 3rem;
    margin-bottom: 30px;
    height: 3rem;
    opacity: 0;
    position: relative;
    text-align: center;
    z-index: 1;
}
DIV#info.message {
    background: #28d183;
    opacity: 1;
    z-index: 100;
}
DIV#info.error {
    background: red;
    color: #fff;
    opacity: 1;
    z-index: 100;
}

/* ============================================================
   PAGINE DI SERVIZIO (ERRORI)
   ============================================================ */

/* pagina di segnalazione degli errori */
BODY.errore {
    text-align: center;
    padding: 10%;
}
BODY.errore P {
    margin: 1rem 0;
}
BODY.errore P A.href {
    color: #999;
}
BODY.errore IMG#katsu {
    margin-top: 2rem;
    width: 120px;
}
DIV.session-out {
    background-color: #eee;
    font-size: 0.9rem;
    margin: 3rem auto;
    text-align: left;
    width: auto;
}

/* pagina 404 */
BODY.error-404 IMG#not-found {
    max-width: 90%;
}
BODY.error-404 P {
    padding: 2rem 0;
}

/* ============================================================
   PAGINA INDICE (LOGIN)
   ============================================================ */

BODY.utente-entra {
    margin-top: 50px;
    text-align: center;
    background: #444;
}
BODY.utente-entra::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1),               /* molto più soft */
        rgba(255, 255, 255, 0.1) 1px,           /* linee sottili */
        transparent 1px,
        transparent 8px                         /* più spazio tra le righe */
    );
    pointer-events: none;
}

BODY.utente-entra HEADER {
    background: transparent;
    color: #fff;
    height: auto;
    position: relative;
    text-align: center;
}
BODY.utente-entra HEADER A.nome-sito {
    font-size: 4.5rem;
    font-weight: 700;
    float: none;
    letter-spacing: 0.04em;
    color: #fafafa;
    text-shadow: 0 8px 0 rgba(0, 0, 0, 0.4),
                 0 0 8px rgba(0, 0, 0, 0.3);
}
BODY.utente-entra HEADER H1 {
    color: #28d183;
}
BODY.utente-entra IMG#katsu {
    height: 90px;
    position: relative;
}
BODY.utente-entra MAIN {
    margin: auto;
    padding: 0;
    width: auto;
}

/* form di login */
BODY.utente-entra SECTION#form-login FORM {
    height: 148px;
    margin: 2rem auto;
}
BODY.utente-entra SECTION#form-login FORM INPUT {
    width: 13rem;
}
BODY.utente-entra SECTION#form-login FORM LABEL {
    min-width: 7rem;
    color: #fff;
}
BODY.utente-entra SECTION#form-login FORM DIV.barra {
    margin: 1rem;
    text-align: center;
}
BODY.utente-entra SECTION#form-login FORM INPUT.button {
    width: 6rem;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* ============================================================
   PULSANTI
   ============================================================ */

INPUT.button.cerca,
INPUT.button.submit {
    background: #009900;
    color: #ffffff;
    padding: 8px;
    min-width: 88px;
}
INPUT.button.reset {
    opacity: 40%;
    padding: 4px 1rem;
}

A.button {
    background: #f29000;
}
A.button.ai {
    background: #74aa9c;
}
A.button.submit {
    background: #009900;
}
A.button.delete {
    background: #990000;
}
A.button.reload,
A.button.reload:hover {
    background: #007bff;
}

/* ============================================================
   ELENCHI (TABLE.elenco, SECTION.elenco)
   ============================================================ */

TABLE.elenco {
    margin: auto;
    background-color: #fff;
}

/* intestazione e piede */
TABLE.elenco TH,
TABLE.elenco TFOOT TR TD {
    background: #999;
    color: #fff;
    padding: 8px 20px;
}
TABLE.elenco TFOOT TR TD {
    text-align: right;
    height: 38px;
}

/* righe */
TABLE.elenco TR {
    background-color: #eee;
}
TABLE.elenco TR.associato,
TABLE.elenco TR.in-perimetro {
    background-color: #9fdf0066;
}
TABLE.elenco TR.sospeso {
    background-color: #ccc;
}
TABLE.elenco TR:hover {
    background-color: #28d183c2 !important;
}

/* celle */
TABLE.elenco TD {
    color: #000;
    line-height: 1rem;
    border: solid 2px #fff;
    padding: 4px 20px;
    height: 38px;
}
TABLE.elenco TD.button {
    padding: 0;
}

/* sezione contenitore dell'elenco */
SECTION.elenco {
    text-align: center;
    padding: 1rem;
}
SECTION.elenco H2 {
    padding: 1rem 0;
}
SECTION.elenco H2:before {
    position: relative;
    font-size: 16px;
    line-height: 1;
    padding-right: 0.5rem;
}
SECTION.elenco H2.hidden-table:before {
    content: "▼";
}
SECTION.elenco H2.hidden-table.show:before {
    content: "▶";
}

/* barra sopra l'elenco (nuovo, ricerca) */
DIV.barra-elenco {
    background-color: #666;
    color: #fff;
    padding: 10px 30px 10px;
    width: auto;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
DIV.barra-elenco DIV {
    padding-left: 1rem;
    height: 100%;
    position: relative;
}
DIV.barra-elenco DIV.nuovo {
    font-size: 0;
}
DIV.barra-elenco DIV.nuovo IMG {
    height: 35px;
}
DIV.barra-elenco FORM {
    margin-left: 10px;
    float: right;
}
DIV.barra-elenco FORM FIELDSET {
    display: inline-block;
}
DIV.barra-elenco SPAN {
    padding-left: 0.5em;
}
DIV.barra-elenco INPUT.chiave {
    margin: 0 8px;
}

/* checkbox */
DIV.check {
    display: inline-block;
}
DIV.check INPUT[type="checkbox"] {
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 0 0.25rem;
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: middle;
    accent-color: #28d183;
    cursor: pointer;
}

/* note, paginazione ed elenco vuoto */
P.elenco-info {
    padding: 1rem;
    font-size: 0.9em;
    color: #666;
}
SECTION.elenco DIV.pager,
SECTION.elenco P.no-record {
    color: #555;
    font-size: 1rem;
    padding: 1rem;
    display: block;
}
SECTION.elenco DIV.pager DIV.centro {
    padding: 0.5em;
}
SECTION.elenco DIV.pager A {
    background: #28d183;
    color: #ffffff;
    padding: 0.5rem;
}

TD.valore.subject {
    text-align: left;
}

/* ============================================================
   MASCHERE DI INPUT
   ============================================================ */

DIV.form {
    padding: 1rem 0 0 0;
}
DIV.form H2 {
    font-size: 1.25rem;
    padding-bottom: 2rem;
}

/* righe della form */
FORM DIV.riga {
    padding: 4px 0;
    display: block;
    text-align: left;
}
FORM DIV.riga.string {
    margin: 1em 0;
}
FORM DIV.riga.string SPAN {
    display: inline-block;
}
FORM DIV.riga A {
    text-decoration: underline;
    color: #666;
}
FORM DIV.riga A:hover {
    color: #28d183;
}
DIV.riga.data FIELDSET {
    display: inline-block;
}

/* etichette radiobutton */
FORM DIV.riga.radio SPAN {
    margin-right: 4px;
}

/* barra dei comandi della form */
FORM DIV.barra {
    display: block;
    margin: 2rem 0;
    text-align: right;
    height: 48px;
}
FORM DIV.barra FIELDSET {
    border: none;
}
FORM DIV.barra A {
    padding: 0 1em;
}
FORM DIV.barra A.new {
    border-left: solid 1px;
    padding: 0 1em;
}
FORM DIV.barra A.back {
    color: #28d183;
    line-height: 40px;
    float: left;
    padding: 0;
}
FORM DIV.barra A:hover {
    color: #28d183;
}
FORM DIV.barra INPUT.button {
    background-color: #28d183;
    color: #fff;
    padding: 8px;
    width: 88px;
}
FORM DIV.barra A.button {
    border-bottom-right-radius: 10px;
    color: #fff;
    padding: 8px;
    min-width: 88px;
}

/* ============================================================
   PAGINE INFORMATIVE
   ============================================================ */

BODY.info SECTION {
    margin: auto;
    text-align: center;
    width: 600px;
    max-width: 90%;
}
BODY.info SECTION H2 {
    margin: 2rem 0 2rem 0;
    text-align: left;
}
BODY.info SECTION H3 {
    font-size: 1.2rem;
    margin: 2rem 0 0.5rem 0;
    text-align: left;
}
BODY.info SECTION IMG#katsu {
    margin-bottom: 2rem;
    width: 120px;
}
BODY.info SECTION P {
    margin-bottom: 1rem;
    text-align: justify;
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: break-word;
}
BODY.info SECTION UL {
    text-align: left;
    margin: 1rem;
}
BODY.info SECTION LI {
    margin-bottom: 1rem;
}
BODY.info SECTION CODE.block {
    font-size: 0.9rem;
    margin: 1rem 1rem 1rem 2rem;
    display: block;
}
BODY.info SECTION BLOCKQUOTE {
    font-style: italic;
    text-align: left;
    font-size: 0.9rem;
    margin-left: 2rem;
    margin-bottom: 1rem;
}
BLOCKQUOTE SPAN {
    font-style: normal;
    margin-top: 10px;
    display: inline-block;
}

/* soglie di priority */
DIV.soglie {
    margin: 0 1rem 1rem;
    text-align: left;
}
DIV.soglie STRONG {
    display: inline-block;
    min-width: 5rem;
}

/* ============================================================
   UTENTE
   ============================================================ */

FORM[id^="utente-"] LABEL {
    min-width: 7rem;
    float: left;
}

TABLE.elenco.utente-elenco TD.nome,
TABLE.elenco.utente-elenco TD.cognome {
    text-align: left;
}

/* ============================================================
   OVERLAY
   ============================================================ */

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#overlay.visible {
    display: flex;
}
#overlay .overlay-content {
    background: #fff;
    border-radius: 8px;
    padding: 2rem 3rem;
    text-align: center;
    max-width: 480px;
    width: 90%;
}
#overlay-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 1rem 0;
}
#overlay-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* indicatore di attesa */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   FEED
   ============================================================ */

TABLE.elenco.feed-elenco {
    margin-top: 2rem;
}
TABLE.elenco.feed-elenco TD.title {
    max-width: 60rem;
    text-align: left;
}
TABLE.elenco.feed-elenco TD.title SMALL,
TABLE.elenco.feed-elenco TD.title SPAN,
TABLE.elenco.feed-elenco TD.title A {
    display: block;
    padding: 8px 0;
}

/* evidenzia i link visitati */
TABLE.elenco.feed-elenco TD.title A:visited {
    color: #888888;
}

/* ============================================================
   PRODOTTO
   ============================================================ */

/* form */
FORM[id^="prodotto-"] {
    width: auto;
}
FORM[id^="prodotto-"] LABEL {
    float: left;
    min-width: 10rem;
}
FORM[id^="prodotto-"] INPUT[type="text"] {
    width: 24rem;
}

SECTION#prodotto-utente-elenco {
    margin-bottom: 4rem;
}
/* elenco */
TABLE.elenco.prodotto-elenco TD.nome,
TABLE.elenco.prodotto-elenco TD.vendor,
TABLE.elenco.prodotto-elenco TD.anchor.prodotto {
    text-align: left;
}
TABLE.elenco.prodotto-elenco TD.nome,
TABLE.elenco.prodotto-elenco TD.vendor {
    min-width: 20rem;
}

/* esito del caricamento prodotti del cliente (prodotto_utente_elenco()) */
TABLE.elenco.prodotto-utente-risultati TD.riga,
TABLE.elenco.prodotto-utente-risultati TD.esito {
    text-align: center;
}
TABLE.elenco.prodotto-utente-risultati TD.vendor,
TABLE.elenco.prodotto-utente-risultati TD.prodotto,
TABLE.elenco.prodotto-utente-risultati TD.dettaglio {
    text-align: left;
}
TABLE.elenco.prodotto-utente-risultati TD.vendor,
TABLE.elenco.prodotto-utente-risultati TD.prodotto {
    min-width: 12rem;
}
TABLE.elenco.prodotto-utente-risultati TR.ok {
    background-color: #9fdf0066;
}
TABLE.elenco.prodotto-utente-risultati TR.errore {
    background-color: #cb011833;
}
TABLE.elenco.prodotto-utente-risultati TR.ok TD.esito {
    color: #2c7956;
    font-weight: bold;
}
TABLE.elenco.prodotto-utente-risultati TR.errore TD.esito {
    color: #cb0118;
    font-weight: bold;
}

/* valori ricevuti in input dal caricamento prodotti del cliente */
DIV.prodotto-utente-input {
    display: block;
    margin: auto;
    max-width: 50rem;
    text-align: center;
}
DIV.prodotto-utente-input H3 {
    font-size: 1.2rem;
    margin: 0.5rem auto;
}
DIV.prodotto-utente-input PRE {
    background: #fff;
    border: solid 1px #ccc;
    font-family: monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    padding: 1rem;
    text-align: left;
}
/* ============================================================
   CPE
   ============================================================ */

DIV.form.cpe {
    margin-bottom: 2rem;
}
FORM[id^="cpe-"] {
    min-width: 460px;
}
FORM[id^="cpe-"] LABEL {
    min-width: 8rem;
    float: left;
}
FORM[id^="cpe-"] DIV.prodotto SPAN {
    font-size: 1.1rem;
    font-weight: bold;
}

TABLE.cpe-elenco TD {
    text-align: center;
}
TABLE.cpe-elenco TD.vendor,
TABLE.cpe-elenco TD.prodotto {
    text-align: left;
}

/* ============================================================
   VENDOR
   ============================================================ */

TABLE.vendor-elenco TR TD.valore {
    text-align: left;
    min-width: 250px;
}
TABLE.vendor-elenco TR TD.valore.n-prodotti {
    text-align: center;
    min-width: unset;
}

FORM[id^="vendor-"] LABEL {
    min-width: 9rem;
    float: left;
}
FORM[id^="vendor-"] INPUT {
    width: 35rem;
}
FORM[id^="vendor-"] IMG {
    max-width: 800px;
    border: solid 1px #aaa;
}

/* ============================================================
   REFERENCE
   ============================================================ */

TABLE.reference-elenco TR TD {
    text-align: left;
}

FORM[id^="reference-"] LABEL {
    min-width: 6rem;
    float: left;
}
FORM[id^="reference-"] INPUT {
    width: 35rem;
}

/* ============================================================
   CVE
   ============================================================ */

.barra-elenco-cve INPUT#chiave {
    width: 12rem;
}

/* form */
FORM[id^="cve-"] LABEL {
    min-width: 9rem;
    float: left;
}
FORM[id^="cve-"] DIV.text INPUT {
    width: 16rem;
}
FORM[id^="cve-"] DIV.text INPUT#title {
    width: 50rem;
}
FORM[id^="cve-"] DIV.text INPUT[id^="cvss-"] {
    width: 40rem;
}
FORM[id^="cve-"] TEXTAREA {
    width: 50rem;
    height: 10rem;
}
FORM[id^="cve-"] DIV.string {
    margin: 1em 0;
}
FORM[id^="cve-"] DIV.string DIV,
FORM[id^="cve-"] DIV.string SPAN {
    max-width: 50rem;
}
FORM[id^="cve-"] DIV.string.cwe DIV {
    max-width: 50rem;
}
FORM[id^="cve-"] DIV.string.cvss-3 SPAN,
FORM[id^="cve-"] DIV.string.cvss-4 SPAN,
FORM[id^="cve-"] DIV.string.kev SPAN,
FORM[id^="cve-"] DIV.string.epss SPAN {
    font-weight: bold;
    padding: 0.5em;
}
FORM[id^="cve-"] DIV.string.in-kev SPAN.si {
    background-color: #cb0118;
    color: #ffffff;
}
FORM[id^="cve-"] DIV.string.in-kev SPAN.no {
    background-color: #649900;
    color: #ffffff;
}

/* import JSON */
FORM[id^="cve-json"] TEXTAREA {
    height: 30rem;
}

/* nuova reference */
DIV.barra.bollettino-cve-new,
DIV.barra.cve-reference-new {
    display: block;
    margin: 1rem auto;
}

DIV.barra.bollettino-cve-new FORM,
DIV.barra.cve-reference-new FORM {
    padding: 1rem 2rem;
    background: #999999;
    display: inline-block;
}

DIV.barra.bollettino-cve-new LABEL,
DIV.barra.cve-reference-new LABEL {
    color: #ffffff;
}

DIV.barra.bollettino-cve-new SELECT,
DIV.barra.cve-reference-new INPUT#nuova-url {
    width: 30rem;
}

/* elenchi */
TABLE.cve-elenco-cpe TD.prodotto {
    text-align: left;
}
TABLE.elenco.cve TR.visibile {
    background-color: #ffd51e;
}
TABLE.elenco.cve TD.title {
    text-align: left;
    width: 40rem;
    max-width: 80rem;
}

/* ============================================================
   CVE_CPE
   ============================================================ */

FORM[id^="cve-cpe"] {
    min-width: 460px;
}
FORM[id^="cve-cpe"] LABEL {
    min-width: 10rem;
    float: left;
}
FORM[id^="cve-cpe"] .text INPUT {
    width: 20rem !important;
}
FORM[id^="cve-cpe"] .radio INPUT {
    width: auto;
    margin: 0 0.5em;
}

/* import CVE */
BODY.cve-import SECTION {
    background: #f8f8f8;
    border: 1px solid #ccc;
    margin: 1rem auto;
    overflow: auto;
    padding: 10px;
    text-align: left;
    width: 80%;
}
SECTION.json DIV.out {
    font-size: 9pt;
}

/* ============================================================
   PRIORITY E KEV
   Classi condivise da CVE e BOLLETTINO
   ============================================================ */

.undefined {
    background-color: #eeeeee !important;
}
.low,
.no-kev {
    background-color: #649900 !important;
    color: #ffffff !important;
}
.medium {
    background-color: #ffd51e !important;
}
.high {
    background-color: #f29000 !important;
    color: #ffffff !important;
}
.critical,
.in-kev {
    background-color: #cb0118 !important;
    color: #ffffff !important;
}

/* ============================================================
   BOLLETTINO
   ============================================================ */

DIV.form.bollettino {
    padding: 1rem;
}
DIV.form.bollettino.chiuso {
    background-color: #cccccc;
}

/* form */
FORM[id^="bollettino-"] LABEL {
    min-width: 11rem;
    float: left;
}
FORM[id^="bollettino-"] INPUT[type="text"] {
    width: 400px;
}
FORM[id^="bollettino-"] DIV.riga {
    display: block;
    padding: 4px 0;
    min-height: 2rem;
}
FORM[id^="bollettino-"] DIV.riga SELECT,
FORM[id^="bollettino-"] DIV.riga OPTION,
FORM[id^="bollettino-"] DIV.riga TEXTAREA,
FORM[id^="bollettino-"] DIV.riga INPUT[type="text"] {
    font-size: 1rem;
}
FORM[id^="bollettino-"] DIV.riga TEXTAREA,
FORM[id^="bollettino-"] DIV.riga INPUT[type="text"] {
    width: 50rem;
    padding: 4px;
}
FORM[id^="bollettino-"] DIV.riga TEXTAREA {
    height: 20rem;
}
FORM[id^="bollettino-"] DIV.riga.img IMG {
    max-width: 300px;
    border: solid 1px;
}

/* pulsante di invio */
FORM DIV.barra A.button.invia {
    background-color: darkcyan;
    color: #fff;
    padding: 8px;
    width: 88px;
}

/* ============================================================
   BOLLETTINO - ELENCHI
   ============================================================ */

TABLE.bollettino-elenco TR.published {
    background-color: #fff;
}

SECTION.elenco.bollettino-cpe-elenco TD.prodotto,
SECTION.elenco.bollettino-cpe-elenco TD.versioni,
SECTION.elenco.bollettino-cwe-elenco TD.nome,
SECTION.elenco.bollettino-reference-elenco TD.url {
    text-align: left;
}

SECTION.bollettino-cve-elenco TD.valore {
    max-width: 60rem;
    overflow-wrap: break-word;
    word-break: break-word;
}
SECTION.bollettino-cve-elenco TD.valore.cvss {
    text-align: left;
}

/* elenco CPE nel bollettino */
#bollettino-elenco-cpe TH,
#bollettino-elenco-cpe TD {
    border: 1px solid #ccc;
    padding: 6px 8px;
    vertical-align: top;
}
#bollettino-elenco-cpe UL {
    margin: 4px 0 8px 16px;
    padding: 0;
    list-style-type: disc;
}
#bollettino-elenco-cpe STRONG {
    display: block;
    margin-top: 4px;
}

/* stato del bollettino */
DIV.string.pubblicato SPAN {
    background-color: #f29000;
    color: #fff;
    padding: 4px;
}
DIV.string.inviato SPAN {
    background-color: darkcyan;
    color: #fff;
    padding: 4px;
}

/* elenco invii bollettino */
DIV.barra.bollettino-invio-new {
    display: block;
    margin-bottom: 2rem;
}
SECTION.elenco.bollettino-invio TD {
    text-align: left;
}
SECTION.elenco.bollettino-invio TD.data {
    text-align: center;
}

/* ============================================================
   BOLLETTINO - ANTEPRIMA
   ============================================================ */

SECTION#bollettino-anteprima {
    margin: auto;
    max-width: 90%;
    padding: 1em 2em;
    text-align: left;
    width: 210mm;
}
SECTION#bollettino-anteprima DIV {
    display: block;
}
SECTION#bollettino-anteprima IMG#og-image {
    margin: 1rem 0;
    max-width: 500px;
    border-bottom-right-radius: 20px;
}

/* titoli */
SECTION#bollettino-anteprima H1,
SECTION#bollettino-anteprima H2,
SECTION#bollettino-anteprima H3,
SECTION#bollettino-anteprima H4 {
    color: #333;
    font-weight: bold;
    text-align: left;
    font-variant: all-small-caps;
    padding: 0;
    margin: 0;
    margin-bottom: 1rem;
}
SECTION#bollettino-anteprima H1 {
    font-size: 2.5rem;
}
SECTION#bollettino-anteprima H2 {
    font-size: 2rem;
}
SECTION#bollettino-anteprima H3 {
    font-size: 1.2rem;
    margin: 2rem 0 0.5rem 0;
}

/* paragrafi */
SECTION#bollettino-anteprima P {
    text-align: justify;
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: break-word;
}
SECTION#bollettino-anteprima P.tpl {
    font-weight: bold;
    margin-bottom: 1rem;
}
SECTION#bollettino-anteprima P.data {
    color: #333;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: lowercase;
}
SECTION#bollettino-anteprima P.scope {
    color: #999;
    font-family: monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
    text-align: left;
    text-transform: lowercase;
}
SECTION#bollettino-anteprima P.description {
    padding: 1rem 0;
}

/* tabelle */
SECTION#bollettino-anteprima TABLE,
SECTION#bollettino-anteprima TABLE TR,
SECTION#bollettino-anteprima TABLE TR TH,
SECTION#bollettino-anteprima TABLE TR TD {
    border: solid 1px #666;
}
SECTION#bollettino-anteprima TABLE {
    margin: 1em 0;
    font-size: 12pt;
}
SECTION#bollettino-anteprima TABLE TH,
SECTION#bollettino-anteprima TABLE TD {
    padding: 0.5em;
}
SECTION#bollettino-anteprima TABLE TH {
    background: #666;
    color: #fff;
    text-align: center;
}
SECTION#bollettino-anteprima TABLE TD.cwe {
    min-width: 6rem;
    text-align: center;
}
SECTION#bollettino-anteprima TABLE TD.zero-day {
    text-transform: uppercase;
    font-weight: bold;
    text-align: center;
    color: #009900;
}
SECTION#bollettino-anteprima TABLE TD.target_sw {
    text-align: center;
}
SECTION#bollettino-anteprima TABLE TD.vendor {
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}
SECTION#bollettino-anteprima TABLE TD.prodotto {
    text-align: left;
    vertical-align: top;
    font-weight: bold;
    color: #666;
}

/* elenco CVE (zero-day evidenziati) */
TABLE#bollettino-elenco-cve TR.zero-day {
    background-color: #ee0000;
}
TABLE#bollettino-elenco-cve TR.zero-day TD.epss,
TABLE#bollettino-elenco-cve TR.zero-day A {
    color: #ffffff;
}
/* NB: la classe "zero-dayx" non esiste, probabile refuso o regola disattivata: da verificare */
TABLE#bollettino-elenco-cve TR.zero-dayx A {
    text-decoration: underline;
}
SECTION#bollettino-anteprima TABLE#bollettino-elenco-cve TD.cve {
    white-space: nowrap;
}
SECTION#bollettino-anteprima TABLE#bollettino-elenco-cve TD.score {
    color: #666;
    font-weight: bold;
    text-align: center;
    word-break: normal;
}
SECTION#bollettino-anteprima TABLE#bollettino-elenco-cve TD.priority {
    text-align: center;                 /* era severity */
}
SECTION#bollettino-anteprima TABLE#bollettino-elenco-cve TD.cvss {
    white-space: normal;
    word-break: break-all;
}
.priority-note {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* elenco reference */
SECTION#bollettino-anteprima TABLE#bollettino-elenco-ref,
SECTION#bollettino-anteprima TABLE#bollettino-elenco-ref TR,
SECTION#bollettino-anteprima TABLE#bollettino-elenco-ref TD {
    border: none;
}
SECTION#bollettino-anteprima TABLE#bollettino-elenco-ref TD A {
    font-size: 1rem;
    text-decoration: underline;
}

/* barra di invio / sola lettura */
SECTION#bollettino-anteprima DIV.barra.invia,
SECTION#bollettino-anteprima DIV.barra.readonly {
    border-top: solid 1px;
    margin-top: 3rem;
    padding: 1rem 0;
    display: inline-block;
    text-align: left;
    width: 100%;
}
SECTION#bollettino-anteprima DIV.barra.invia INPUT {
    float: right;
    background-color: #0000ee;
}

/* ============================================================
   BOLLETTINI PUBBLICATI
   ============================================================ */

SECTION#bollettino-pubblicati {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    min-height: auto;
    padding: 1rem;
}

/* contenitore griglia centrato */
SECTION#bollettino-pubblicati DIV.grid {
    display: grid;
    gap: 2em 1em;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* articoli singoli */
SECTION#bollettino-pubblicati ARTICLE {
    background: #fff;
    color: #000;
    border: solid 1px #666;
    text-align: left;
    height: 550px;                      /* altezza fissa desktop */
    box-shadow: 0 10px 4px rgba(0, 0, 0, 0.1);
    border-bottom-right-radius: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;          /* animazione fluida */
}

/* immagine articolo */
SECTION#bollettino-pubblicati ARTICLE DIV.img {
    background-color: #666;
    height: auto;
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 0;
}
SECTION#bollettino-pubblicati ARTICLE IMG {
    width: 100%;
    aspect-ratio: 2/1;
}

/* info articolo */
SECTION#bollettino-pubblicati ARTICLE DIV.info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
SECTION#bollettino-pubblicati ARTICLE H2 {
    color: #000;
    font-size: 1.5rem;
    padding: 0.5rem 0;
}
SECTION#bollettino-pubblicati P.subject {
    font-weight: bold;
}
SECTION#bollettino-pubblicati P.date {
    font-size: 0.9rem;
}
SECTION#bollettino-pubblicati P.description {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
}

/* bottone "load more" */
#load-more-container {
    display: block;
    text-align: center;
    margin: 2rem 0;
}
#load-more {
    padding: 0.6em 1.2em;
    font-size: 1rem;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s,
                transform 0.3s;
}
#load-more:hover:not(:disabled) {
    background-color: #0056b3;
}
#load-more:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* animazione per i nuovi articoli */
SECTION#bollettino-pubblicati ARTICLE {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   CLIENTE
   ============================================================ */

BODY.cliente-home H2 {
    margin-bottom: 2rem;
}

SECTION#cliente-link {
    max-width: 600px;
    display: inline-block;
    margin: auto;
}
SECTION#cliente-link P {
    text-align: left;
    margin-bottom: 2rem;
}

/* menu del cliente (compreso il form di caricamento prodotti) */
NAV#cliente-menu {
    padding: 0 2rem;
}
NAV#cliente-menu DIV {
    width: 100%;
    text-align: left;
    display: block;
    margin-bottom: 2rem;
}
NAV#cliente-menu DIV A {
    text-decoration: underline;
}
NAV#cliente-menu DIV FORM {
    margin: 1rem auto;
    width: 100%;
}
NAV#cliente-menu DIV FORM TEXTAREA {
    width: 100%;
    height: 20rem;
}
/* barra del bottone nel form di caricamento prodotti */
NAV#cliente-menu DIV FORM DIV.barra {
    margin: 1rem 0 0;
    text-align: right;
}

/* ============================================================
   RESPONSIVE / MOBILE
   Regole applicate con viewport fino a 1000px
   ============================================================ */

@media (max-width: 1000px) {

    A {
        text-decoration: underline;
    }

    /* pagina */
    BODY HEADER {
        text-align: center;
        height: auto;
        position: relative;
    }
    BODY MAIN {
        margin-top: 0px;
    }
    HEADER DIV.titoli {
        font-size: 0;
        padding: 10px 1rem 10px;
        text-align: center;
    }
    HEADER IMG#logo {
        height: 100px;
    }
    HEADER DIV.menu {
        padding-right: 0;
    }
    BODY HEADER H1 {
        font-size: 1.5rem;
        float: none;
        line-height: 1.1;
        margin: 0;
    }
    DIV#info {
        display: none;
    }

    /* login */
    BODY.utente-entra HEADER H1 {
        display: unset;
    }
    BODY.utente-entra FORM#utente-login DIV.riga {
        display: block;
        text-align: center;
    }
    BODY.utente-entra FORM#utente-login DIV.riga LABEL {
        float: none;
    }

    SECTION H2 {
        max-width: 90%;
        margin: auto;
    }

    /* bollettini pubblicati */
    SECTION#bollettino-pubblicati ARTICLE {
        float: none;
        margin: 0 auto 30px auto;
    }

    /* anteprima bollettino */
    SECTION#bollettino-anteprima {
        margin: auto;
        padding: 1em 0;
        text-align: left;
        width: 100%;
    }
    SECTION#bollettino-anteprima DIV {
        overflow-x: auto;
    }
    SECTION#bollettino-anteprima P.scope {
        text-align: left;
    }
    SECTION#bollettino-anteprima IMG#og-image {
        width: 100%;
    }
    SECTION#bollettino-anteprima H1,
    SECTION#bollettino-anteprima H2,
    SECTION#bollettino-anteprima H3,
    SECTION#bollettino-anteprima H4 {
        line-height: 1;
        margin: 1rem 0;
    }
}

/* ============================================================
   MOBILE SPECIFICO
   Regole applicate con viewport fino a 768px
   ============================================================ */

@media screen and (max-width: 768px) {

    SECTION#bollettino-pubblicati DIV.grid {
        gap: 1em 0.5em;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    SECTION#bollettino-pubblicati ARTICLE {
        height: auto;                   /* altezza automatica su mobile */
        min-height: 400px;              /* mantiene un minimo uniforme */
    }
    SECTION#bollettino-pubblicati ARTICLE DIV.img {
        height: 150px;                  /* immagini più basse su mobile */
    }
    SECTION#bollettino-pubblicati ARTICLE DIV.info {
        padding: 0.5rem;
    }
    SECTION#bollettino-pubblicati ARTICLE H2 {
        font-size: 1.2rem;
    }
    SECTION#bollettino-pubblicati P.description {
        -webkit-line-clamp: 3;          /* massimo 3 righe su mobile */
    }
}
