﻿/* Stili delle pagine del core (apps/nucleo). Vengono da apps/csic/csic.css di Cybersic, solo le
   regole che servono a queste pagine; i colori delle fasce di rischio non ci sono: sono della norma.
   Le variabili --tpc-* stanno in tpc-dialoghi.css, comune alla famiglia. */

body.nu-sfondo { background: #eef1f5; }

.cs-kpi-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.cs-kpi { flex: 1 1 130px; background: #fff; border: 1px solid var(--tpc-bd); border-radius: 8px; padding: 8px 12px; }
.cs-kpi .n { font-size: 1.45rem; font-weight: 700; line-height: 1.2; color: var(--tpc-tx); }
.cs-kpi .l { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tpc-txm); }

.cs-tabella { font-size: .78rem; }
.cs-tabella td, .cs-tabella th { vertical-align: middle !important; }

/* ==========================================================================
   LA PAGINA DEL LAVORO (lavoro.aspx, nucleo.lavoro.js). Le regole vengono da
   apps/csic/csic.css di Cybersic, solo quelle del meccanismo comune (sezioni,
   schede, griglie, modifiche in sospeso, finestre, allegati); i colori della
   valutazione del rischio restano della norma. Chi cambia l'altezza delle barre
   in alto cambia anche .cs-area (margine) e .cs-fissa (dove si fermano i filtri).
   ========================================================================== */
:root { --cs-alto: #c62828; }
.cs-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .72rem; background: var(--tpc-bg-soft); border: 1px solid var(--tpc-bd); color: var(--tpc-tx); white-space: nowrap; }
.cs-badge b { font-weight: 700; }
.cs-barra-sezioni .nav-link, .dropdown-item, a[onclick], [data-riep], [data-pag], [data-reg], [data-dai-dati], [data-predefiniti] { cursor: pointer; }
.cs-barra-sezioni .nav-link, .cs-tema { user-select: none; }
.cs-area { margin-top: 94px; } 
.cs-intro { font-size: .86rem; color: #4a5561; margin: 0 0 8px; }
.cs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.cs-toolbar .spazio { flex: 1; }
.cs-toolbar .form-control-sm { width: auto; display: inline-block !important; }
.cs-card { border: 1px solid var(--tpc-bd); border-radius: 8px; background: #fff; margin-bottom: 6px; }
.cs-card > .cs-testa { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; user-select: none; }
.cs-card > .cs-testa:hover { background: var(--tpc-bg-soft); }
.cs-card > .cs-testa .fr { color: var(--tpc-txm); width: 12px; transition: transform .12s; }
.cs-card.aperta > .cs-testa .fr { transform: rotate(90deg); }
.cs-card > .cs-testa .tit { flex: 1; min-width: 0; }
.cs-card > .cs-testa .tit .t1 { font-size: .93rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-card > .cs-testa .tit .t2 { font-size: .78rem; color: #5f6b77; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-card > .cs-corpo { display: none; padding: 8px 12px 12px; border-top: 1px solid var(--tpc-bd); }
.cs-card.aperta > .cs-corpo { display: block; }
.cs-corpo .form-group label, .cs-org .form-group label { text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: #56616d; }
.cs-corpo .form-control-sm { font-size: .88rem; }
.cs-card > .cs-corpo { background: #eaeff5; border-radius: 0 0 8px 8px; }
.cs-org, .cs-card > .cs-corpo[style*="border-top:0"] { border-radius: 8px; }
.cs-corpo fieldset { background: rgba(255,255,255,.35); }
#sezione .form-control { background-color: #fff; border: 1px solid #aebbc8; color: #16212c; font-weight: 600; }
#sezione .form-control:focus { border-color: var(--tpc-ac); box-shadow: 0 0 0 3px rgba(106, 27, 154,.18); }
#sezione .form-control::placeholder { color: #a7b1bb; font-weight: 400; font-style: italic; opacity: 1; }
#sezione .form-control.cs-senza { color: #a7b1bb; font-weight: 400; font-style: italic; }
#sezione select.form-control option { color: #16212c; font-weight: 400; font-style: normal; }
.cs-corpo fieldset { border: 1px solid var(--tpc-bd); border-radius: 6px; padding: 4px 10px 8px; margin: 8px 0; }
.cs-corpo legend { font-size: .76rem; font-weight: 700; color: var(--tpc-txm); width: auto; padding: 0 4px; margin: 0; }
.cs-gruppo { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tpc-ac); margin: 14px 0 6px; }
.cs-gruppo .conta { color: var(--tpc-txm); font-weight: 400; }
.cs-vuoto { padding: 18px; text-align: center; color: var(--tpc-txm); font-size: .85rem; border: 1px dashed var(--tpc-bd); border-radius: 8px; background: #fff; }
.cs-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 8px; margin: 2px 4px 2px 0; border-radius: 10px; background: var(--tpc-ac-soft); color: var(--tpc-ac); font-size: .72rem; }
.cs-tag button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 3px; line-height: 1; }
.cs-salva { font-size: .72rem; color: #fff; opacity: .85; }
.cs-salva.errore { color: #ffcdd2; opacity: 1; font-weight: 700; }
.cs-card.aperta { border-color: rgba(106, 27, 154,.45); box-shadow: 0 1px 6px rgba(106, 27, 154,.12); }
.cs-card.aperta > .cs-testa { background: var(--tpc-ac-soft); border-radius: 8px 8px 0 0; }
.cs-fissa { position: sticky; top: 92px; z-index: 20; background: #f7f9fc; padding: 6px 0 4px; margin-bottom: 6px; border-bottom: 1px solid var(--tpc-bd); }
.cs-fissa .cs-toolbar { margin-bottom: 0; }
.cs-toolbar.cs-fissa { margin-bottom: 8px; }
.cs-temi { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.cs-tema { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--tpc-bd); background: #fff; border-radius: 16px; padding: 3px 11px; font-size: .82rem; color: var(--tpc-tx); }
.cs-tema:hover { border-color: var(--tpc-ac); }
.cs-tema .conta { font-size: .72rem; color: var(--tpc-txm); background: var(--tpc-bg-soft); border-radius: 8px; padding: 0 6px; }
.cs-tema.attivo { background: var(--tpc-ac); border-color: var(--tpc-ac); color: #fff; font-weight: 600; }
.cs-tema.attivo .conta { background: rgba(255,255,255,.25); color: #fff; }
.form-control.cs-mod { background: #fff8e1 !important; border-color: #f0b429 !important; }
fieldset.cs-mod { background: #fff8e1; }
.form-control.cs-rifiutato { background: #fdecea !important; border-color: var(--cs-alto) !important; box-shadow: 0 0 0 2px rgba(198,40,40,.2) !important; }
.cs-card.cs-modificata { border-color: #f0b429; }
.cs-card.cs-modificata > .cs-testa .t1::after { content: "  · da salvare"; color: #b26a00; font-weight: 700; font-size: .78rem; }
.cs-conferma { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; gap: 6px; margin: 10px -12px -12px; padding: 8px 12px; background: #fff8e1; border-top: 1px solid #f0b429; border-radius: 0 0 8px 8px; }
.cs-conferma .msg { font-size: .82rem; font-weight: 600; color: #8a5300; }
.cs-conferma .spazio { flex: 1; }
.cs-sospese { position: fixed; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 1030; color: #8a5300; font-size: .84rem; font-weight: 600; white-space: nowrap;
  background: #fff8e1; border: 1px solid #f0b429; border-radius: 18px; padding: 5px 6px 5px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.cs-aiuto { font-size: .76rem; line-height: 1.3; color: #4a5561; margin-top: 3px; padding-left: 7px; border-left: 3px solid var(--tpc-ac-soft); min-height: 1em; }
.cs-q { color: var(--tpc-ac); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400; white-space: nowrap; }
.cs-q:hover { text-decoration: underline; color: var(--tpc-ac); }
label .cs-q { font-size: .82rem; margin-left: 3px; }
.cs-griglia-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--tpc-bd); border-radius: 8px; }
table.cs-griglia { margin: 0; font-size: .84rem; }
table.cs-griglia thead th { position: sticky; top: 0; background: #eaeff5; border-top: 0; border-bottom: 1px solid #aebbc8; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #56616d; white-space: nowrap; }
table.cs-griglia th.ordina { cursor: pointer; user-select: none; }
table.cs-griglia th.ordina:hover, table.cs-griglia th.ordina.attivo { color: var(--tpc-ac); }
table.cs-griglia td { vertical-align: middle; }
table.cs-griglia td.nome { font-weight: 600; color: #16212c; }
table.cs-griglia tr.apri { cursor: pointer; }
table.cs-griglia tr.cs-riga-mod td.nome::after { content: "  · da salvare"; color: #b26a00; font-weight: 700; font-size: .76rem; }
table.cs-griglia tr.cs-riga-mod td { background: #fffdf3; }
table.cs-griglia td.azioni { width: 1%; }
.cs-finestra .tpc-modal-body { padding: 0; background: #eaeff5; }
.cs-card.cs-in-finestra { border: 0; border-radius: 0; margin: 0; box-shadow: none; background: transparent; }
.cs-card.cs-in-finestra > .cs-corpo { border-radius: 0; padding: 12px 16px 14px; }
.cs-card.cs-in-finestra .cs-conferma { margin: 12px -16px -14px; border-radius: 0; }
#corpoFinestra .form-control { background-color: #fff; border: 1px solid #aebbc8; color: #16212c; font-weight: 600; }
#corpoFinestra .form-control:focus { border-color: var(--tpc-ac); box-shadow: 0 0 0 3px var(--tpc-ac-soft); }
#corpoFinestra .form-control::placeholder { color: #a7b1bb; font-weight: 400; font-style: italic; opacity: 1; }
#corpoFinestra .form-control.cs-senza { color: #a7b1bb; font-weight: 400; font-style: italic; }
#corpoFinestra select.form-control option { color: #16212c; font-weight: 400; font-style: normal; }
.cs-tema.attivo .conta.fuori { background: #fff; color: var(--cs-alto); }
.cs-avviso { font-size: .8rem; color: #8a5300; background: #fff8e1; border: 1px solid #f0b429; border-radius: 6px; padding: 5px 9px; margin-top: 14px; }
.cs-file { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #aebbc8; border-radius: 6px; padding: 2px 4px 2px 9px; margin: 2px 6px 2px 0; font-size: .82rem; }
.cs-file a { color: var(--tpc-ac); font-weight: 600; }
.cs-file small { color: #6c757d; white-space: nowrap; }
.cs-file button { border: 0; background: transparent; color: var(--cs-alto); cursor: pointer; padding: 0 4px; font-size: 1rem; line-height: 1; }
.cs-clip { color: #6c757d; font-weight: 400; font-size: .76rem; white-space: nowrap; margin-left: 4px; }
table.cs-griglia tr.cs-chiusa td { color: #8b95a1; }
table.cs-griglia tr.cs-chiusa td.nome { color: #5f6b77; font-weight: 400; }
.cs-fuori-modello { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #8a5300; border-top: 1px dashed #f0b429; margin: 10px 0 6px; padding-top: 4px; }
.cs-aiuto:empty { display: none; }
.cs-avviso { margin-top: 0; margin-bottom: 10px; }
textarea.cs-voci { font-family: Consolas, "Courier New", monospace; font-size: .82rem; line-height: 1.45; white-space: pre; }
[data-tag][disabled] { background: #fdecea; }
.cs-barra-sezioni { position: fixed; top: 40px; left: 0; right: 0; z-index: 1029; height: 52px; background: #fff;
  border-bottom: 1px solid #e3d5ec; box-shadow: 0 2px 8px rgba(40, 20, 60, .10); overflow-x: auto; overflow-y: hidden; }
.cs-barra-sezioni .cs-sezioni { display: flex; justify-content: center; align-items: stretch; gap: 2px; list-style: none; margin: 0 auto; padding: 0 8px; height: 100%; min-width: max-content; }
.cs-barra-sezioni .cs-sezioni li { display: flex; }
.cs-barra-sezioni .cs-sezioni li.ultima { margin-left: 10px; padding-left: 10px; border-left: 1px solid #e3d5ec; }
.cs-barra-sezioni .nav-link { display: flex; align-items: center; gap: 5px; padding: 0 8px; margin: 7px 0; border-radius: 8px;
  color: #3d2a4f; font-size: .9rem; font-weight: 600; white-space: nowrap; opacity: 1; transition: background .15s, color .15s; }
.cs-barra-sezioni .nav-link i { color: var(--tpc-ac); font-size: 1.05rem; }
.cs-barra-sezioni .nav-link:hover { background: #f3ebf8; color: #2a1838; text-decoration: none; }
.cs-barra-sezioni .nav-link.active { background: var(--tpc-ac); color: #fff; box-shadow: 0 2px 6px rgba(106, 27, 154, .35); }
.cs-barra-sezioni .nav-link.active i { color: #ffd54f; }
.cs-barra-sezioni .ultima .nav-link span { display: none; }
.cs-righe-voci { display: flex; flex-wrap: wrap; gap: 4px 14px; background: #fff; border: 1px solid #dde2ea; border-radius: 4px; padding: 6px 9px; }
.cs-righe-voce { font-size: .84rem; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; color: #1f2733 !important; margin: 0; cursor: pointer; }
.cs-righe-voce input { margin-right: 3px; vertical-align: -1px; }
/* in piu' rispetto a Cybersic */
.nu-titolo { color: var(--tpc-ac); }
.nu-corpo { background: #f7f9fc; }
.nu-fonti { display: inline; }
.nu-pastiglia { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 9px; background: rgba(255,255,255,.22); color: #fff; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.nu-apre { border-style: dashed; }
.nu-apre-segno { font-size: .62rem; opacity: .6; }
.cs-corpo fieldset.nu-fonte { border-color: rgba(106, 27, 154, .35); }
.cs-corpo fieldset.nu-fonte > legend { color: var(--tpc-ac); }
.nu-sola-lettura .form-control[disabled] { background-color: #f4f6f9 !important; }
.nu-finestra-corpo { padding: 12px 16px; background: #f7f9fc; }
.nu-finestra-corpo .cs-anteprima { background: #fff; border: 1px solid var(--tpc-bd); border-radius: 6px; padding: 10px 14px; }
.nu-esito { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: #eef0f3; color: #6c757d; }
.nu-esito-ok { background: #e8f5e9; color: #2e7d32; }
.nu-esito-att { background: #fff4e0; color: #b26a00; }
.nu-esito-ko { background: #fdecea; color: #c62828; }
.nu-domanda { border-bottom: 1px dotted var(--tpc-bd); padding: 6px 0 2px; }
.nu-domanda .row { margin-top: 3px; }
