/* tema.css — i colori di MERCURIO: blu notte e ocra.

   I valori del Lab Design (vendor/lab-tokens.css) restano la base; qui
   MERCURIO li adatta al suo tema, in un posto solo. Il significato dei colori
   non cambia: verde = entrate e cose a posto, terracotta = uscite e problemi,
   ambra = da controllare, crema con bordo ocra = righe scelte. Tutti i testi
   hanno un contrasto di almeno 4,5 a 1 con il loro fondo. */
:root {
  --lab-background: #f6f4ef;
  --lab-surface: #ffffff;
  --lab-surface-header: #ffffff;
  --lab-surface-group: #efebe2;
  --lab-surface-hover: #f1ede4;
  --lab-border: #e4ded2;
  --lab-border-control: #b9b09f;
  --lab-text: #1c2b26;
  --lab-muted: #5f675f;
  --lab-accent: #1f4e8c;
  --lab-accent-hover: #173d6e;
  --lab-accent-soft: #e6eef8;
  --lab-success: #1e7a4f;
  --lab-success-soft: #e3f3ea;
  --lab-error: #b4442c;
  --lab-error-soft: #fbece7;
  --lab-warning: #8a5a12;
  --lab-warning-soft: #fbf1dc;
  --lab-selection: #fdf3dc;
  --lab-selection-border: #c99a3e;
  --ocra: #c99a3e;
  --ocra-scuro: #8a5a12;
  --menu-fondo: #14233a;
}
body { background: var(--lab-background); }

/* Menu a sinistra: verde scuro pieno, testo chiaro, voce attiva con barra ocra. */
.mc-menu { background: var(--menu-fondo) !important; border-right: 0 !important; }
.mc-menu .nu-sidebar { background: transparent; }
.mc-menu .nu-side-title { color: #9fb1cc; letter-spacing: .6px; }
.mc-menu .nu-side-item { color: #e8eef7; }
.mc-menu .nu-side-item .nu-icon { color: var(--ocra); }
.mc-menu .nu-side-item:hover { background: rgba(255,255,255,.07); }
.mc-menu .nu-side-item.is-on { background: rgba(255,255,255,.13); color: #ffffff; box-shadow: inset 3px 0 0 var(--ocra); }
.mc-menu .nu-side-item.is-on .nu-icon { color: #f0c873; }
.mc-menu .nu-side-count { color: #a9bbd4; }
.mc-menu .mc-menu-gira { color: #a9bbd4; }
.mc-menu .mc-menu-gira:hover { background: rgba(255,255,255,.07); color: #fff; }

/* Barra in alto bianca, con il nome in evidenza. */
.nu-toolbar { background: #ffffff; border-bottom: 1px solid var(--lab-border); }
.nu-toolbar-name { font-size: 15px; font-weight: 700; letter-spacing: .2px; color: var(--menu-fondo); }

/* Totali: numero piu grande, carattere normale con cifre allineate, la prima casella in evidenza. */
.nu-metric { border: 1px solid var(--lab-border); box-shadow: 0 1px 2px rgba(28,43,38,.04); }
.nu-metric-value { font-family: var(--lab-font); font-weight: 650; font-size: 22px; letter-spacing: -.4px; color: var(--lab-text); }
.mc-metriche > .nu-metric:first-child { border-top: 3px solid var(--ocra); }
.nu-metric.is-neg .nu-metric-value { color: var(--lab-error); }
.nu-metric.is-pos .nu-metric-value { color: var(--lab-success); }
.nu-metric-label { text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }

/* Tabelle: intestazione tinta, righe alternate, importi in carattere normale, negativi in terracotta. */
.nu-th { background: #efebe2 !important; color: #3d4a44; }
.nu-table tbody .nu-tr:nth-child(even):not(.is-selected) { background: #fbfaf6; }
.nu-td.is-num, .mc-dx { font-family: var(--lab-font); font-variant-numeric: tabular-nums; }
.nu-td.is-neg { color: var(--lab-error); }

/* Titoli di pagina piu decisi. */
.mc-contenuto h1, .t-large-title { color: var(--menu-fondo); letter-spacing: -.5px; }

/* Pulsante principale verde, secondari su bianco. */
.nu-btn-secondary { background: #ffffff; }

/* La riga scelta: crema con il bordo ocra anche sulla prima cella. */
.nu-tr.is-selected > .nu-td:first-child { box-shadow: inset 3px 0 0 var(--lab-selection-border); }

/* ---------------------------------------------------------------------------
   Dashboard "vetrina" (4.74): testata blu notte con riflessi di luce, riquadri
   con icona tonda, barre sfumate. Solo qui: le altre pagine restano sobrie.
   --------------------------------------------------------------------------- */
.mc-dash { --dash-blu: #1463f3; --dash-notte: #0a1f44; }
.mc-dash .mc-dash-fascia {
  position: relative; overflow: hidden; isolation: isolate;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, 300px); gap: 22px;
  padding: 26px 30px; border-radius: 18px; color: #fff;
  background:
    radial-gradient(120% 140% at 85% 120%, rgba(56,140,255,.55) 0%, rgba(56,140,255,0) 55%),
    radial-gradient(60% 90% at 10% -20%, rgba(90,170,255,.35) 0%, rgba(90,170,255,0) 60%),
    linear-gradient(120deg, #071735 0%, #0c2a5c 55%, #123f86 100%);
  box-shadow: 0 10px 30px rgba(10,31,68,.25);
}
/* i riflessi: due lame di luce diagonali */
.mc-dash .mc-dash-fascia::before, .mc-dash .mc-dash-fascia::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
  filter: blur(2px);
}
.mc-dash .mc-dash-fascia::before {
  width: 120%; height: 3px; left: 5%; bottom: 46px; transform: rotate(-9deg);
  background: linear-gradient(90deg, rgba(120,190,255,0) 0%, rgba(150,205,255,.9) 50%, rgba(255,255,255,1) 68%, rgba(120,190,255,0) 100%);
  box-shadow: 0 0 24px 8px rgba(60,150,255,.55); opacity: .8;
}
.mc-dash .mc-dash-fascia::after {
  width: 80%; height: 2px; left: 38%; bottom: 22px; transform: rotate(-15deg);
  background: linear-gradient(90deg, rgba(120,190,255,0), rgba(200,230,255,1), rgba(120,190,255,0));
  box-shadow: 0 0 30px 10px rgba(60,140,255,.45); opacity: .75;
}
.mc-dash .mc-dash-fascia-ico {
  width: 66px; height: 66px; border-radius: 16px; display: grid; place-items: center; color: #5fb2ff;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.mc-dash .mc-dash-fascia-et { font-size: 15px; opacity: .9; text-transform: none; }
.mc-dash .mc-dash-fascia-v { font-size: 44px; line-height: 52px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.mc-dash .mc-dash-fascia-sotto { font-size: 17px; color: #6fb6ff; opacity: 1; font-weight: 500; }
@media (max-width: 760px) { .mc-dash .mc-dash-fascia { grid-template-columns: minmax(0, 1fr); } .mc-dash .mc-dash-fascia-ico { display: none; } }

.mc-dash .mc-dash-anno.is-on { background: var(--dash-notte); border-color: var(--dash-notte); }

/* riquadri dei totali: icona tonda grande a sinistra */
.mc-dash .mc-dash-totale {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; border-color: #e3e8f1;
  background: linear-gradient(135deg, #ffffff 60%, #f1f6ff 100%); box-shadow: 0 4px 16px rgba(16,40,90,.06);
}
.mc-dash .mc-dash-totale-corpo { min-width: 0; }
.mc-dash .mc-dash-totale-et { font-size: 15px; font-weight: 600; color: var(--ink); }
.mc-dash .mc-dash-totale-v { font-size: 26px; line-height: 32px; font-weight: 700; margin-top: 2px; }
.mc-dash .mc-dash-totale-sotto { font-size: 14px; }
.mc-dash-tondo { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; }
.mc-dash-tondo.is-pos { background: radial-gradient(circle at 30% 30%, #e9fbf1, #c9f0da); color: #138a45; }
.mc-dash-tondo.is-acc { background: radial-gradient(circle at 30% 30%, #edf4ff, #d3e3ff); color: #1463f3; }
.mc-dash-tondo.is-neg { background: radial-gradient(circle at 30% 30%, #fff0ea, #fdd9cc); color: #c43d1a; }
.mc-dash-tondo.is-avv { background: radial-gradient(circle at 30% 30%, #edf4ff, #d3e3ff); color: #1463f3; }

/* riquadri grandi */
.mc-dash .mc-dash-riquadro { border-radius: 16px; border-color: #e3e8f1; box-shadow: 0 4px 16px rgba(16,40,90,.05); padding: 18px 22px; }
.mc-dash .mc-dash-titolo { font-size: 19px; font-weight: 700; }
.mc-dash-titolo-testo { display: inline-flex; align-items: center; gap: 10px; }
.mc-dash-titolo-testo .nu-icon { color: var(--dash-blu); }

/* barre sfumate */
.mc-dash .mc-dash-ricavi { fill: url(#mc-grad-ricavi); }
.mc-dash .mc-dash-costi { fill: url(#mc-grad-costi); }
.mc-dash .mc-dash-legenda i.is-ricavi { background: linear-gradient(#3d8bff, #0a4fd6); }
.mc-dash .mc-dash-legenda i.is-costi { background: linear-gradient(#e4e8ef, #a9b2c1); }
.mc-dash .mc-dash-et { font-size: 13px; }

/* da fare: icone quadrate colorate */
.mc-dash .mc-dash-fare { padding: 12px 4px; font-size: 15px; }
.mc-dash .mc-dash-icona { width: 36px; height: 36px; border-radius: 10px; }

/* costi per cantiere */
.mc-dash .mc-dash-cc { font-size: 14px; gap: 12px 18px; }
.mc-dash .mc-dash-cc-barra { height: 12px; background: #e8edf5; }
.mc-dash .mc-dash-cc-barra span { background: linear-gradient(90deg, #0a4fd6, #3d8bff); box-shadow: 0 0 8px rgba(61,139,255,.35); }

/* barra laterale: blu notte profondo, voce attiva come pillola blu luminosa */
.mc-menu {
  background:
    radial-gradient(140% 40% at 0% 100%, rgba(40,120,255,.28) 0%, rgba(40,120,255,0) 60%),
    linear-gradient(180deg, #0b1c3a 0%, #0a1830 100%) !important;
}
.mc-menu .nu-side-item.is-on {
  background: linear-gradient(90deg, #1463f3, #2f7dff); color: #fff; box-shadow: 0 0 14px rgba(47,125,255,.45);
}
.mc-menu .nu-side-item.is-on .nu-icon { color: #fff; }
