/* Barra comune di BG Legno Control System: uguale nel nucleo e in tutti i moduli.
   Tutte le regole sono sotto .bgcs-barra per non toccare le pagine dei moduli. */
@font-face { font-family: "Inter BG"; font-weight: 400; font-display: swap; src: url("/static/font/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter BG"; font-weight: 500; font-display: swap; src: url("/static/font/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter BG"; font-weight: 600; font-display: swap; src: url("/static/font/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter BG"; font-weight: 700; font-display: swap; src: url("/static/font/inter-700.woff") format("woff"); }
@font-face { font-family: "Inter BG"; font-weight: 800; font-display: swap; src: url("/static/font/inter-800.woff") format("woff"); }

.bgcs-barra, .bgcs-barra * { box-sizing: border-box; }
.bgcs-barra {
  --b-fondo: #00313d; --b-fondo2: #004252; --b-testo: #d6e6e9; --b-chiaro: #ffffff; --b-verde: #8cc63f;
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; gap: 6px;
  height: 58px; padding: 0 14px 0 12px;
  background: linear-gradient(90deg, var(--b-fondo) 0%, var(--b-fondo2) 100%);
  color: var(--b-testo);
  font: 500 14px/1.2 "Inter BG", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 6px 18px rgba(0, 35, 44, .18);
  -webkit-font-smoothing: antialiased;
}
.bgcs-barra a { color: inherit; text-decoration: none; }
.bgcs-barra svg.ic { width: 18px; height: 18px; flex: none; }

.bgcs-marchio { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 4px; margin-right: 8px;
  border-right: 1px solid rgba(255,255,255,.12); height: 40px; }
.bgcs-marchio img { height: 30px; width: auto; display: block; }
.bgcs-marchio span { display: flex; flex-direction: column; line-height: 1.05; }
.bgcs-marchio b { color: var(--b-chiaro); font-weight: 800; font-size: 15px; letter-spacing: .01em; }
.bgcs-marchio small { color: var(--b-verde); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-top: 3px; }

.bgcs-voci { display: flex; align-items: stretch; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.bgcs-voci::-webkit-scrollbar { display: none; }
.bgcs-voci a { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; white-space: nowrap;
  color: var(--b-testo); border-radius: 0; transition: color .15s, background .15s; }
.bgcs-voci a:hover { color: var(--b-chiaro); background: rgba(255,255,255,.06); }
.bgcs-voci a.on { color: var(--b-chiaro); font-weight: 600; }
.bgcs-voci a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--b-verde); }
.bgcs-voci a .bgcs-sep { width: 1px; }
.bgcs-voci .bgcs-divisore { width: 1px; margin: 16px 6px; background: rgba(255,255,255,.14); flex: none; }
.bgcs-conta { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e0533d; color: #fff;
  font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.bgcs-utente { position: relative; margin-left: 6px; }
.bgcs-utente > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 8px 6px 6px;
  border-radius: 999px; color: var(--b-chiaro); }
.bgcs-utente > summary::-webkit-details-marker { display: none; }
.bgcs-utente > summary:hover, .bgcs-utente[open] > summary { background: rgba(255,255,255,.1); }
.bgcs-iniziali { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg, #8cc63f, #4f8a1b); color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.bgcs-nome { display: flex; flex-direction: column; line-height: 1.15; max-width: 180px; }
.bgcs-nome b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgcs-nome small { color: #9fc0c6; font-size: 11.5px; font-weight: 500; }
.bgcs-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; padding: 8px; border-radius: 14px;
  background: #fff; color: #10272d; box-shadow: 0 18px 50px rgba(0, 35, 44, .28), 0 0 0 1px rgba(0,0,0,.05); }
.bgcs-menu .bgcs-chi { padding: 10px 10px 12px; border-bottom: 1px solid #e6ecec; margin-bottom: 6px; }
.bgcs-menu .bgcs-chi b { display: block; font-size: 14px; }
.bgcs-menu .bgcs-chi span { display: block; font-size: 12px; color: #6b7f84; margin-top: 2px; }
.bgcs-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #22383e; font-weight: 500; }
.bgcs-menu a:hover { background: #eef5f6; color: #004252; }
.bgcs-menu a svg.ic { width: 17px; height: 17px; color: #5b7b82; }
.bgcs-menu hr { border: 0; border-top: 1px solid #e6ecec; margin: 6px 0; }
.bgcs-menu a.esci { color: #b3361f; }
.bgcs-menu a.esci svg.ic { color: #b3361f; }

@media (max-width: 860px) {
  .bgcs-marchio span, .bgcs-nome { display: none; }
  .bgcs-marchio { padding-right: 8px; margin-right: 2px; }
  .bgcs-voci a { padding: 0 10px; }
  .bgcs-voci a span.t { display: none; }
  .bgcs-voci a.on span.t { display: inline; }
}
@media print { .bgcs-barra { display: none !important; } }

/* ---- tendine: «Programmi» (tutti i moduli per area) e menu dell'utente ---- */
.bgcs-tendina > summary { list-style: none; }
.bgcs-tendina > summary::-webkit-details-marker { display: none; }
.bgcs-app { position: relative; margin-right: 8px; flex: none; }
.bgcs-app > summary { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 11px; cursor: pointer;
  color: #fff; font-weight: 600; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); transition: background .15s; }
.bgcs-app > summary:hover, .bgcs-app[open] > summary { background: rgba(255,255,255,.17); }
.bgcs-app > summary .ch { display: inline-flex; opacity: .75; transition: transform .2s; }
.bgcs-app > summary .ch svg.ic { width: 14px; height: 14px; }
.bgcs-app[open] > summary .ch { transform: rotate(180deg); }
.bgcs-pannello { position: absolute; left: 0; top: calc(100% + 10px); width: min(960px, calc(100vw - 32px)); padding: 16px 18px 18px;
  border-radius: 18px; background: #fff; color: #10272d; box-shadow: 0 26px 64px rgba(0,35,44,.32), 0 0 0 1px rgba(0,0,0,.05); z-index: 1001; }
.bgcs-p-testa { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2px 6px 12px;
  border-bottom: 1px solid #e6ecec; margin-bottom: 12px; }
.bgcs-p-testa b { font-size: 15px; font-weight: 700; }
.bgcs-p-testa span { font-size: 12px; color: #6b7f84; }
.bgcs-aree { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 16px; }
.bgcs-area h4 { margin: 4px 0 6px 8px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #5b7b82; font-weight: 700; }
.bgcs-barra .bgcs-mod { display: flex; align-items: center; gap: 11px; padding: 7px 8px; border-radius: 12px; color: #10272d; }
.bgcs-barra .bgcs-mod:hover { background: #eef5f6; color: #004252; }
.bgcs-barra .bgcs-mod.on { background: #e2eff1; }
.bgcs-mod .q { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.bgcs-mod .q svg.ic { width: 19px; height: 19px; }
.bgcs-mod .tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.22; }
.bgcs-mod b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgcs-mod small { font-size: 11.5px; color: #6b7f84; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgcs-voci a.bgcs-corrente { gap: 9px; }
.bgcs-corrente .q { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.bgcs-corrente .q svg.ic { width: 15px; height: 15px; }
@media (max-width: 860px) {
  .bgcs-app > summary { padding: 0 10px; }
  .bgcs-app > summary span.t, .bgcs-app > summary .ch { display: none; }
  .bgcs-pannello { position: fixed; left: 10px; right: 10px; top: 64px; width: auto; max-height: calc(100vh - 80px); overflow: auto; }
  .bgcs-aree { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .bgcs-aree { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .bgcs-voci a.bgcs-corrente span.t { display: none; }
  .bgcs-voci a.bgcs-corrente { padding: 0 8px; }
}
@media (max-width: 420px) {
  .bgcs-barra { padding: 0 8px; gap: 2px; }
  .bgcs-marchio { margin-right: 0; border-right: 0; }
  .bgcs-app { margin-right: 2px; }
  .bgcs-voci a { padding: 0 8px; }
}
