/* Stili propri dell'area «direction» nel restyling come HubLEM (docs/restyle). */

/* --- Report Eurospin/MD (E2) --- */
.store-report__month { display: flex; flex-direction: column; gap: 1rem; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1.25rem; margin-bottom: 1rem; transition: box-shadow .15s; }
.store-report__month:last-child { margin-bottom: 0; }
.store-report__month:hover { box-shadow: 0 4px 12px -2px rgba(0, 0, 0, .1); }
@media (min-width: 992px) { .store-report__month { flex-direction: row; align-items: flex-start; } }
.store-report__main { flex: 1 1 auto; min-width: 0; }
.store-report__head { display: flex; align-items: center; gap: .75rem; }
.store-report__head > .bi { font-size: 1.5rem; }
.store-report__title { font-size: 1.25rem; font-weight: 700; color: #111827; text-decoration: none; }
.store-report__title:hover { text-decoration: underline; }
.store-report__actions { display: flex; gap: .5rem; flex: 0 0 auto; }
.store-report__boxes { margin-top: 1rem; }
.store-report__boxes .hub-box { text-align: left; padding: .75rem; }
.store-report__boxes .hub-box small { font-size: .75rem; font-weight: 500; }
.store-report__boxes .hub-box strong { font-size: 1.5rem; font-weight: 700; }
@media (max-width: 767.98px) { .store-report__boxes { --boxes: 2 !important; } }
.store-report__wide { margin-top: .5rem; text-align: left; padding: .65rem .75rem; }
.store-report__mcard { border-color: #fee2e2; }
.store-report__mcard--md { border-color: #fef3c7; }
.store-report__empty { width: 6rem; height: 6rem; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; color: #9ca3af; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
.store-price__edit > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; }
.store-price__edit > summary::-webkit-details-marker { display: none; }
.store-price__edit[open] > summary { display: none; }
.store-price__pencil { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: .5rem; color: #7e22ce; background: #f3e8ff; font-size: .8rem; }
.store-price__form { display: flex; gap: .35rem; align-items: center; }
.store-price__form .form-control { min-width: 0; max-width: 7rem; border-color: #d8b4fe; }
.btn-purple { color: #fff; background: #9333ea; border-color: #9333ea; }
.btn-purple:hover, .btn-purple:focus { color: #fff; background: #7e22ce; border-color: #7e22ce; }
.store-month__stores { display: grid; gap: .5rem; }
.store-month__store { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem; background: #fff; border: 1px solid #bbf7d0; border-radius: .5rem; }
.store-month__name { font-size: 1.1rem; font-weight: 700; color: #111827; margin-bottom: .15rem; }
.store-month__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.store-month__count { font-size: 1.1rem; font-weight: 700; color: #15803d; text-align: right; white-space: nowrap; }
.store-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .75rem; cursor: pointer; }
.store-chip .form-check-input { margin: 0; width: .85rem; height: .85rem; }
.store-chip__mf { color: #dc2626; font-weight: 600; }
.store-chip.is-cold-missed { box-shadow: inset 0 0 0 1px #fca5a5; }

/* --- HACCP (E4) --- */
.hub-haccp { display: grid; gap: 1.5rem; }
.hub-haccp > .hub-tabs { margin-bottom: 0; }
.hub-haccp .hub-mhero { margin-bottom: -.5rem; }
.haccp-sign { border: 2px solid #e9d5ff; background: #faf5ff; border-radius: .9rem; padding: 1.25rem 1.5rem; }
.haccp-sign__title { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 700; color: #581c87; margin: 0 0 1rem; }
.haccp-sign__saved { background: #fff; border: 2px solid #e9d5ff; border-radius: .6rem; padding: 1rem; }
.haccp-sign__saved img { height: 6rem; max-width: 100%; border: 1px solid #d1d5db; border-radius: .35rem; background: #fff; }
.haccp-sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.haccp-sector { display: flex; align-items: center; gap: .75rem; padding: 1.5rem; border: 2px solid #e5e7eb; border-radius: .9rem; background: #fff; color: #111827; text-decoration: none; transition: border-color .15s, background-color .15s; }
.haccp-sector:hover { border-color: #d1d5db; color: #111827; }
.haccp-sector strong { display: block; font-size: 1.25rem; font-weight: 700; }
.haccp-sector small { display: block; font-size: .85rem; color: #4b5563; }
.haccp-sector__icon { width: 3rem; height: 3rem; flex: 0 0 3rem; border-radius: .6rem; display: grid; place-items: center; color: #fff; font-size: 1.6rem; background: #9ca3af; }
.haccp-sector--green.is-active { border-color: #22c55e; background: #f0fdf4; }
.haccp-sector--green.is-active .haccp-sector__icon { background: #16a34a; }
.haccp-sector--blue.is-active { border-color: #3b82f6; background: #eff6ff; }
.haccp-sector--blue.is-active .haccp-sector__icon { background: #2563eb; }
.haccp-card { border: 2px solid #e5e7eb; border-radius: .9rem; background: #fff; overflow: hidden; }
.haccp-card__head { display: flex; align-items: center; gap: .5rem; margin: 0; padding: 1.1rem 1.5rem; font-size: 1.1rem; font-weight: 700; color: #111827; border-bottom: 1px solid #e5e7eb; }
.haccp-card__head--indigo { background: #eef2ff; }
.haccp-card__head--purple { background: #faf5ff; }
.haccp-card__head--green { background: #f0fdf4; }
.haccp-card__head--blue { background: #eff6ff; }
.haccp-card__body { display: grid; gap: 1.25rem; padding: 1.5rem; }
.haccp-card__input { max-width: 20rem; }
.haccp-card__info-title { display: flex; align-items: center; gap: .35rem; font-size: .95rem; font-weight: 700; margin: 0 0 .4rem; color: inherit; }
.haccp-btn { color: #fff; font-weight: 600; }
.haccp-btn:hover, .haccp-btn:focus { color: #fff; filter: brightness(.92); }
.haccp-btn--indigo { background: #4f46e5; border-color: #4f46e5; }
.haccp-btn--purple { background: #9333ea; border-color: #9333ea; }
.haccp-btn--green { background: #16a34a; border-color: #16a34a; }
.haccp-btn--blue { background: #2563eb; border-color: #2563eb; }
.haccp-tone--indigo { color: #4f46e5; }
.haccp-tone--purple { color: #9333ea; }
.haccp-tone--green { color: #16a34a; }
.haccp-tone--blue { color: #2563eb; }
.haccp-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; border: 1px solid #e5e7eb; border-radius: .75rem; }
.haccp-item__main { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; min-width: 0; }
.haccp-item__icon { font-size: 1.25rem; }
.haccp-item__title { font-size: 1.1rem; font-weight: 600; color: #111827; text-decoration: none; }
.haccp-item__title:hover { text-decoration: underline; color: #111827; }
.haccp-item__meta { flex-basis: 100%; font-size: .78rem; color: #6b7280; padding-left: 2rem; }
.haccp-item__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.haccp-item__actions form { margin: 0; }
.haccp-empty { text-align: center; padding: 2.5rem 0; color: #6b7280; }
.haccp-empty .bi { display: block; font-size: 4rem; color: #d1d5db; margin-bottom: .75rem; }
.haccp-empty p { margin: 0; }
.haccp-confirm { display: grid; gap: 1rem; }
.haccp-confirm .hub-note { font-size: .875rem; }
.haccp-confirm__pad { display: block; width: 100%; background: #fff; border: 1px solid #d1d5db; border-radius: .35rem; touch-action: none; cursor: crosshair; }
.haccp-print__frame { width: 100%; height: 70vh; border: 1px solid #e5e7eb; border-radius: .5rem; background: #fff; }
.haccp-print__bar { display: flex; justify-content: flex-end; gap: .75rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid #e5e7eb; }
/* Telefono: selettore CAT. 3 / CAT. 1 e firma del responsabile come HubLEM. */
.haccp-mcats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; background: #fff; border: 1px solid #f3e8ff; border-radius: 1.5rem; padding: 1rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); }
.haccp-mcats__item { padding: .75rem; border-radius: .75rem; text-align: center; font-size: .75rem; font-weight: 900; text-decoration: none; background: #f3f4f6; color: #4b5563; }
.haccp-mcats__item.is-active { color: #fff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .15); }
.haccp-mcats__item--green.is-active { background: linear-gradient(90deg, #22c55e, #10b981); }
.haccp-mcats__item--blue.is-active { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.haccp-msign { background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 1rem; padding: 1rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .08); }
.haccp-msign small { display: block; font-size: .625rem; font-weight: 900; color: #9333ea; margin-bottom: .5rem; }
.haccp-msign img { height: 4rem; max-width: 100%; border: 1px solid #d1d5db; border-radius: .35rem; background: #fff; }
@media (max-width: 767.98px) {
  .hub-haccp { gap: 1rem; }
  .haccp-card { border-radius: 1.25rem; }
  .haccp-card__head { padding: 1rem; font-size: 1rem; }
  .haccp-card__body { padding: 1rem; }
  .haccp-card__input { max-width: none; }
  .haccp-item__actions { width: 100%; }
  .haccp-item__actions > .btn, .haccp-item__actions > form { flex: 1 1 0; }
  .haccp-item__actions > form .btn { width: 100%; }
  .haccp-item__meta { padding-left: 0; }
}
/* --- fine HACCP (E4) --- */

/* --- News (E5) --- */
.news-list > .news-row + .news-row { border-top: 1px solid #e5e7eb; }
.news-row { display: flex; gap: 1rem; padding: 1.5rem; }
.news-row:hover { background: #f9fafb; }
.news-row__thumb { flex: 0 0 8rem; width: 8rem; height: 8rem; object-fit: cover; border-radius: .5rem; }
.news-row__main { flex: 1 1 auto; min-width: 0; }
.news-row__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.news-row__title { font-size: 1.125rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.news-row__text, .news-mcard__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; font-size: .875rem; color: #4b5563; margin-bottom: .75rem; }
.news-row__meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .75rem; color: #6b7280; margin-bottom: .75rem; }
.news-row__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.news-mcard { border-color: #f3f4f6; }
.news-mcard__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.news-mcard__title { flex: 1 1 auto; min-width: 0; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-mcard__image { width: 100%; height: 8rem; object-fit: cover; border-radius: 1rem; margin-bottom: .75rem; }
.news-mcard__text { font-size: .75rem; }
.news-form__preview { display: block; width: 100%; max-height: 12rem; object-fit: cover; border-radius: .5rem; }
.news-form__preview[hidden] { display: none; }
.news-form__publish { display: flex; align-items: center; gap: .75rem; padding: 1rem; background: #f0fdf4; border: 2px solid #bbf7d0; border-radius: .5rem; }
.news-form__publish .form-check-input { width: 1.25rem; height: 1.25rem; margin: 0; border: 2px solid #4ade80; accent-color: #16a34a; }
.news-form__publish .form-check-input:checked { background-color: #16a34a; border-color: #16a34a; }
.news-form__publish .form-check-label { color: #14532d; font-weight: 600; cursor: pointer; }

/* --- Budget di settore (D) --- */
/* Toni come Tailwind: 50, 100, 200, 300, 600, 700, 900. */
.dir-t-green { --t50: #f0fdf4; --t100: #dcfce7; --t200: #bbf7d0; --t300: #86efac; --t600: #16a34a; --t700: #15803d; --t900: #14532d; }
.dir-t-red { --t50: #fef2f2; --t100: #fee2e2; --t200: #fecaca; --t300: #fca5a5; --t600: #dc2626; --t700: #b91c1c; --t900: #7f1d1d; }
.dir-t-orange { --t50: #fff7ed; --t100: #ffedd5; --t200: #fed7aa; --t300: #fdba74; --t600: #ea580c; --t700: #c2410c; --t900: #7c2d12; }
.dir-t-yellow { --t50: #fefce8; --t100: #fef9c3; --t200: #fef08a; --t300: #fde047; --t600: #ca8a04; --t700: #a16207; --t900: #713f12; }
.dir-t-amber { --t50: #fffbeb; --t100: #fef3c7; --t200: #fde68a; --t300: #fcd34d; --t600: #d97706; --t700: #b45309; --t900: #78350f; }
.dir-t-indigo { --t50: #eef2ff; --t100: #e0e7ff; --t200: #c7d2fe; --t300: #a5b4fc; --t600: #4f46e5; --t700: #4338ca; --t900: #312e81; }
.dir-t-pink { --t50: #fdf2f8; --t100: #fce7f3; --t200: #fbcfe8; --t300: #f9a8d4; --t600: #db2777; --t700: #be185d; --t900: #831843; }
.dir-t-cyan { --t50: #ecfeff; --t100: #cffafe; --t200: #a5f3fc; --t300: #67e8f9; --t600: #0891b2; --t700: #0e7490; --t900: #164e63; }
.dir-t-teal { --t50: #f0fdfa; --t100: #ccfbf1; --t200: #99f6e4; --t300: #5eead4; --t600: #0d9488; --t700: #0f766e; --t900: #134e4a; }
.dir-t-purple { --t50: #faf5ff; --t100: #f3e8ff; --t200: #e9d5ff; --t300: #d8b4fe; --t600: #9333ea; --t700: #7e22ce; --t900: #581c87; }
.dir-t-blue { --t50: #eff6ff; --t100: #dbeafe; --t200: #bfdbfe; --t300: #93c5fd; --t600: #2563eb; --t700: #1d4ed8; --t900: #1e3a8a; }
.dir-t-lime { --t50: #f7fee7; --t100: #ecfccb; --t200: #d9f99d; --t300: #bef264; --t600: #65a30d; --t700: #4d7c0f; --t900: #365314; }
.dir-t-fuchsia { --t50: #fdf4ff; --t100: #fae8ff; --t200: #f5d0fe; --t300: #f0abfc; --t600: #c026d3; --t700: #a21caf; --t900: #701a75; }
.dir-t-emerald { --t50: #ecfdf5; --t100: #d1fae5; --t200: #a7f3d0; --t300: #6ee7b7; --t600: #059669; --t700: #047857; --t900: #064e3b; }
.dir-t-slate { --t50: #f8fafc; --t100: #f1f5f9; --t200: #e2e8f0; --t300: #cbd5e1; --t600: #475569; --t700: #334155; --t900: #0f172a; }
.dir-t-gray { --t50: #f9fafb; --t100: #f3f4f6; --t200: #e5e7eb; --t300: #d1d5db; --t600: #4b5563; --t700: #374151; --t900: #111827; }
.dir-text-blue { color: #1e3a8a; }
.dir-text-orange { color: #7c2d12; }
.dir-text-tone { color: var(--t900); font-size: .875rem; }
.dir-amber-note { font-size: .65rem; color: #d97706; margin: .1rem 0 0; }

/* Card con testata colorata */
.dir-bcard { background: #fff; border: 2px solid #e5e7eb; border-radius: .75rem; overflow: hidden; }
.dir-bcard--border { border-color: var(--t200); }
.dir-bcard--soft { background: var(--t50); border-color: var(--t200); }
.dir-bcard__head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1.5rem; background: var(--t50, #f9fafb); border-bottom: 1px solid #e5e7eb; }
.dir-bcard--soft > .dir-bcard__head { background: transparent; }
.dir-bcard__head h3 { font-size: 1.05rem; font-weight: 700; color: #111827; margin: 0; }
.dir-bcard__head > .bi { font-size: 1.15rem; }
.dir-bcard__head--split { justify-content: space-between; flex-wrap: wrap; }
.dir-bcard__head--split > span:first-child { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dir-bcard__body { padding: 1.5rem; display: grid; gap: 1rem; }
.dir-bperiod .dir-bcard__body { gap: 0; }
.dir-bperiod__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: end; }
@media (max-width: 991.98px) { .dir-bperiod__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .dir-bperiod__grid { grid-template-columns: 1fr; } }

/* Righe, totali, riquadri, note */
.dir-brow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem; background: #f9fafb; border-radius: .5rem; }
.dir-brow span { color: #374151; }
.dir-brow strong { font-size: 1.05rem; font-weight: 700; color: #111827; white-space: nowrap; }
.dir-brow--tint { background: var(--t50); border: 1px solid var(--t200); }
.dir-brow--tint span { color: var(--t700); }
.dir-brow--tint strong { color: var(--t900); }
.dir-btotal { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; background: var(--t100); border: 2px solid var(--t300); border-radius: .5rem; color: var(--t900); }
.dir-btotal span { font-weight: 600; }
.dir-btotal strong { font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.dir-btotal--stack { flex-direction: column; align-items: flex-start; gap: .25rem; }
.dir-btotal--stack small { font-size: .7rem; color: var(--t700); }
.dir-bbox { padding: 1rem; background: var(--t50); border: 2px solid var(--t200); border-radius: .5rem; display: grid; gap: .4rem; }
.dir-bbox__title { font-size: .72rem; font-weight: 700; color: var(--t700); margin: 0 0 .25rem; }
.dir-bbox__line { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--t700); }
.dir-bbox__line strong { color: var(--t900); }
.dir-bbox__line.is-total { border-top: 1px solid var(--t300); padding-top: .5rem; font-weight: 600; }
.dir-bbox__line.is-total strong { font-size: 1.1rem; }
.dir-bnote { margin: 0; padding: .75rem; font-size: .75rem; color: var(--t700); background: var(--t50); border: 1px solid var(--t200); border-radius: .5rem; }
.dir-bbadges { display: flex; flex-wrap: wrap; gap: .75rem; }
.dir-bbadge { display: inline-block; padding: .5rem 1rem; font-size: .95rem; font-weight: 600; color: #111827; background: var(--t50); border: 1px solid #e5e7eb; border-radius: 999px; }
.dir-badge-outline { background: #fff; color: #374151; border: 1px solid #d1d5db; font-weight: 600; }

/* Griglie */
.dir-bgrid { display: grid; gap: 1.5rem; }
.dir-bgrid--tight { gap: .75rem; }
.dir-bgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dir-bgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dir-bgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dir-bgrid--1 { grid-template-columns: 1fr; }
.dir-bspan-2 { grid-column: span 2; }
@media (max-width: 1199.98px) { .dir-bgrid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .dir-bgrid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .dir-bgrid--2, .dir-bgrid--3, .dir-bgrid--4 { grid-template-columns: 1fr; } .dir-bspan-2 { grid-column: auto; } }
.dir-bstack { display: grid; gap: 1rem; }
.dir-bsection { font-size: 1rem; font-weight: 700; color: #111827; margin: 1rem 0 .75rem; }

/* Card dei totali in testa */
.dir-bstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 991.98px) { .dir-bstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dir-bstat { padding: 1.25rem 1.5rem; background: var(--t50); border: 2px solid var(--t200); border-radius: .75rem; color: var(--t900); }
.dir-bstat__label { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; font-size: .875rem; font-weight: 500; }
.dir-bstat__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dir-bstat__value { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.dir-bstat__icon { font-size: 2.25rem; color: var(--t600); opacity: .6; }
.dir-bstat__badge { display: inline-block; margin-top: .5rem; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--t200); color: var(--t900); }
.dir-bstat__note { margin: .5rem 0 0; font-size: .75rem; color: #4b5563; }

/* Schede interne lato client */
.dir-btabs .hub-tabs__item { border: 0; background: transparent; }
.dir-btabs .hub-tabs__item.active { background: #fff; color: #0a0a0a; box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .12); }
.dir-budget .tab-content { margin-top: 1.25rem; }

/* Analisi per autista (Olio) */
.dir-blist { background: #fff; border: 2px solid #e5e7eb; border-radius: .75rem; overflow: hidden; }
.dir-blist__item { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; color: inherit; text-decoration: none; }
.dir-blist__item + .dir-blist__item { border-top: 1px solid #e5e7eb; }
a.dir-blist__item:hover { background: #f9fafb; color: inherit; }
.dir-blist__item.is-hidden { display: none; }
.dir-avatar { flex: 0 0 3.5rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: var(--t100); color: var(--t700); }
.dir-blist__main { flex: 1 1 auto; min-width: 0; }
.dir-blist__name { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: .5rem; }
.dir-blist__name h3 { font-size: 1.25rem; font-weight: 700; color: #111827; margin: 0; }
.dir-blist__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; font-size: .875rem; }
.dir-blist__grid dt { font-size: .75rem; font-weight: 400; color: #6b7280; }
.dir-blist__grid dd { margin: 0; font-weight: 600; color: #111827; }
.dir-blist__margin { font-size: 1.1rem; font-weight: 700 !important; }
.dir-blist__margin.is-good { color: #14532d !important; }
.dir-blist__margin.is-bad { color: #7f1d1d !important; }
.dir-blist__chevron { font-size: 1.4rem; color: #9ca3af; }
.dir-pct { display: inline-block; padding: .25rem .75rem; border-radius: 999px; font-size: .875rem; font-weight: 700; background: var(--t100); color: var(--t900); white-space: nowrap; }
.dir-bempty { text-align: center; padding: 3rem 1rem; background: #fff; border: 2px solid #e5e7eb; border-radius: .75rem; color: #6b7280; }
.dir-bempty .bi { display: block; font-size: 4rem; color: #d1d5db; margin-bottom: 1rem; }
.dir-bempty p { margin: 0; }
@media (max-width: 767.98px) { .dir-blist__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dir-blist__item { padding: 1rem; } }

/* Cat.3: sottocategorie e autisti */
.dir-bsub__title { font-size: 1.25rem !important; }
.dir-bcol h4 { font-size: .875rem; font-weight: 700; color: #374151; margin: 0 0 .5rem; }
.dir-bcol p { display: flex; justify-content: space-between; gap: .5rem; margin: 0 0 .3rem; font-size: .875rem; color: #4b5563; }
.dir-bcol p strong { color: #111827; }
.dir-bcol--green h4, .dir-bcol--green p, .dir-bcol--green p strong { color: #15803d; }
.dir-bcol--red h4, .dir-bcol--red p, .dir-bcol--red p strong { color: #b91c1c; }
.dir-bcol p.is-total { border-top: 1px solid #e5e7eb; padding-top: .3rem; font-weight: 700; }
.dir-bmargin { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1rem; background: #f9fafb; border-radius: .5rem; }
.dir-bmargin div { display: grid; }
.dir-bmargin span { font-size: .875rem; color: #4b5563; }
.dir-bmargin strong { font-size: 1.5rem; font-weight: 700; }
.dir-bmargin.is-good strong { color: #1e3a8a; }
.dir-bmargin.is-bad strong { color: #7f1d1d; }
.dir-bdriver { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; background: #fff; border: 2px solid #e5e7eb; border-radius: .75rem; color: inherit; text-decoration: none; transition: box-shadow .15s; }
.dir-bdriver:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); color: inherit; }
.dir-bdriver__name { flex: 0 0 14rem; display: grid; min-width: 0; }
.dir-bdriver__name strong { font-size: 1.1rem; color: #111827; }
.dir-bdriver__name small { color: #6b7280; }
.dir-bdriver__cols { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.dir-bdriver__cols > span { display: grid; }
.dir-bdriver__cols small { font-size: .75rem; color: #6b7280; }
.dir-bdriver__cols strong { font-size: 1.25rem; font-weight: 700; }
@media (max-width: 991.98px) { .dir-bdriver { flex-wrap: wrap; } .dir-bdriver__name { flex: 1 1 auto; } .dir-bdriver__cols { flex-basis: 100%; gap: 1rem; } }

/* Cliente IMAC */
.dir-bwhite { padding: 1rem; background: #fff; border-radius: .5rem; display: grid; gap: .25rem; }
.dir-bwhite p { margin: 0; font-size: .875rem; color: #6b7280; }
.dir-bwhite > strong { font-size: 1.75rem; font-weight: 700; color: #1e3a8a; }
.dir-bwhite small { font-size: .75rem; color: #6b7280; }
.dir-imac-list { margin-top: 1rem; padding: 1rem; background: var(--t100); border: 2px solid var(--t300); border-radius: .5rem; display: grid; gap: .5rem; max-height: 24rem; overflow-y: auto; }
.dir-imac-list__title { margin: 0 0 .25rem; font-size: .875rem; font-weight: 600; color: var(--t900); }
.dir-imac-list__empty { margin: 0; padding: 1rem 0; text-align: center; font-size: .875rem; color: #6b7280; }
.dir-imac-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; }
.dir-imac-row__head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .25rem; font-size: .875rem; }
.dir-imac-row__sub { margin: 0; font-size: .75rem; color: #4b5563; }
.dir-imac-row__dest { margin: .25rem 0 0; font-size: .75rem; color: #6b7280; }
.dir-imac-row__amount { font-size: 1.1rem; font-weight: 700; color: #15803d; white-space: nowrap; }

/* Metriche per kg */
.dir-metric { padding: 1.5rem; background: linear-gradient(135deg, var(--t50), var(--t100)); border: 2px solid var(--t200); border-radius: .5rem; }
.dir-metric__label { margin: 0 0 .5rem; font-size: .875rem; color: var(--t700); }
.dir-metric__value { margin: 0; font-size: 2.25rem; font-weight: 700; color: var(--t900); }
.dir-metric__sub { margin: .5rem 0 0; font-size: .75rem; color: var(--t600); }
.dir-binterp { margin-top: 1rem; padding: 1.5rem; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: .5rem; font-size: .875rem; color: #374151; }
.dir-binterp h4 { font-size: 1rem; font-weight: 600; color: #111827; margin-bottom: 1rem; }
.dir-binterp p { margin: 0 0 .75rem; }
.dir-binterp p:last-child { margin-bottom: 0; }
.dir-bextra { display: grid; gap: .5rem; max-width: 40rem; }

/* Finestra «dettaglio autista» */
.dir-driver { display: grid; gap: 1.5rem; }
.dir-driver__who { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.25rem; font-weight: 700; }
.dir-dmargin { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem; background: var(--t50); border: 2px solid var(--t200); border-radius: .75rem; color: var(--t900); }
.dir-dmargin p { margin: 0 0 .25rem; font-size: .875rem; color: #4b5563; }
.dir-dmargin strong { font-size: 2.25rem; font-weight: 700; }
.dir-dmargin__pct { padding: .5rem 1rem; border-radius: 999px; font-size: 1.5rem; font-weight: 700; background: var(--t200); }
.dir-dmargin--split > div { flex: 1 1 0; }
.dir-dcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 991.98px) { .dir-dcols { grid-template-columns: 1fr; } }
.dir-dcols section { display: grid; gap: .75rem; align-content: start; }
.dir-dcols h4 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; font-weight: 700; margin: 0; }
.dir-ditem { padding: 1rem; background: var(--t50); border: 1px solid var(--t200); border-radius: .5rem; }
.dir-ditem__label { margin: 0; font-size: .75rem; color: #4b5563; }
.dir-ditem__value { margin: .1rem 0 0; font-size: 1.35rem; font-weight: 700; color: var(--t900); }
.dir-ditem__sub { margin: .15rem 0 0; font-size: .72rem; color: #6b7280; }
.dir-dsub { padding: 1rem; background: #fff; border: 2px solid #e5e7eb; border-radius: .75rem; }
.dir-dsub__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; font-size: 1.05rem; }
.dir-dsub__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.dir-dsub__grid div { display: grid; }
.dir-dsub__grid small { font-size: .7rem; color: #6b7280; }
.dir-dsub__grid strong { font-weight: 700; }
.dir-dsub__foot { display: flex; justify-content: space-between; margin-top: .75rem; padding-top: .5rem; border-top: 1px solid #e5e7eb; font-size: .875rem; }
@media (max-width: 767.98px) { .dir-dsub__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Telefono: testata «Budget …», quattro tessere (due bianche, due piene) */
.dir-btiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: -1.5rem 1.25rem 1rem; position: relative; }
.dir-btile { display: grid; gap: .35rem; padding: 1rem; background: #fff; border: 1px solid #f3f4f6; border-radius: 1.5rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); }
.dir-btile strong { font-size: 1.25rem; font-weight: 900; color: #111827; }
.dir-btile small { font-size: .625rem; font-weight: 700; }
.dir-btile--solid { color: #fff; border: 0; }
.dir-btile--solid .bi { font-size: 2.25rem; opacity: .8; }
.dir-btile--solid strong { font-size: 1.5rem; color: #fff; }
.dir-btile--solid small { color: rgba(255, 255, 255, .8); }
.dir-btile--blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.dir-btile--orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.dir-btile--purple { background: linear-gradient(135deg, #a855f7, #9333ea); }
.dir-bmhero__note { margin: 1rem 1.25rem; text-align: center; font-size: .875rem; font-weight: 600; color: #9ca3af; }
.dir-bmhero__more { display: block; margin: 0 1.25rem 1rem; text-align: center; cursor: pointer; }
.dir-bmhero__more .bi { transition: transform .15s; }
.dir-budget-toggle:checked ~ .dir-bmhero .dir-bmhero__more .bi { transform: rotate(180deg); }
@media (max-width: 767.98px) {
  /* Come HubLEM il telefono mostra solo la testata; i dettagli si aprono a richiesta (senza JavaScript). */
  .dir-budget-toggle:not(:checked) ~ .dir-budget--collapsible { display: none; }
  .dir-bstat__value { font-size: 1.35rem; }
}
/* --- fine Budget di settore (D) --- */

/* --- Modulo Acquisti (E1) --- */
.btn-orange { color: #fff; background: #ea580c; border-color: #ea580c; }
.btn-orange:hover, .btn-orange:focus { color: #fff; background: #c2410c; border-color: #c2410c; }
.hub-mbtn--orange { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.dir-pbadges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: -.4rem; }
.dir-pamount { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: .75rem; }
.dir-pamount small { display: block; font-size: .75rem; color: #1d4ed8; }
.dir-pamount strong { font-size: 1.35rem; font-weight: 700; color: #1e3a8a; }
.dir-pdoc { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.dir-pdoc a { margin-left: auto; font-weight: 600; }
.dir-pmcard--orange { border-color: #fed7aa; background: linear-gradient(135deg, #fff7ed, #fff); }
.dir-pmcard--yellow { border-color: #fef08a; background: linear-gradient(135deg, #fefce8, #fff); }
.dir-pmcard__amount { background: #fff; border-color: #e5e7eb; text-align: center; margin-bottom: .5rem; }
.dir-pmcard__amount strong { font-size: 1.35rem; }
.dir-pform__urgent { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: #fef2f2; border: 2px solid #fecaca; border-radius: .75rem; color: #991b1b; font-weight: 700; }
.dir-pform__urgent .form-check-input { margin: 0; }
@media (min-width: 768px) {
  /* Sul computer la finestra di HubLEM e' un modulo semplice: i blocchi numerati restano del telefono. */
  .dir-pform .hub-step { background: transparent; border: 0; box-shadow: none; padding: 0; margin-bottom: 1rem; border-radius: 0; }
  .dir-pform .hub-step__label { display: none; }
  .dir-pform__bar { position: static; display: flex; justify-content: flex-end; background: none; padding: 0; }
  .dir-pform__bar .btn { padding: .5rem 1rem; border-radius: .5rem; font-weight: 600; }
}
/* --- fine Modulo Acquisti (E1) --- */

/* --- Scadenziario Ambientale (E3) --- */
.dir-badge-orange { background: #f97316; color: #fff; }
.dir-env { display: flex; gap: 1rem; padding: 1.5rem; background: #fff; border: 2px solid #e5e7eb; border-radius: .75rem; }
.dir-env--overdue { border-color: #fca5a5; background: #fef2f2; }
.dir-env--soon { border-color: #fdba74; background: #fff7ed; }
.dir-env__main { flex: 1 1 auto; min-width: 0; display: grid; gap: .9rem; }
.dir-env__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.dir-env__title { font-size: 1.15rem; font-weight: 700; color: #111827; text-decoration: none; }
.dir-env__title:hover { text-decoration: underline; color: #111827; }
.dir-env__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; margin: 0; }
.dir-env__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dir-env__grid dt { font-size: .75rem; font-weight: 500; color: #6b7280; }
.dir-env__grid dd { margin: 0; font-weight: 600; color: #111827; }
.dir-env__due { font-weight: 700 !important; }
.dir-env__due span { font-size: .8rem; font-weight: 500; }
.dir-env__due--overdue { color: #b91c1c !important; }
.dir-env__due--soon { color: #c2410c !important; }
.dir-env__due--ok { color: #15803d !important; }
.dir-env__req { padding: .75rem 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; }
.dir-env__req--done { background: #f9fafb; }
.dir-env__req small, .dir-env__notes small, .dir-env__docs small { display: block; font-size: .75rem; color: #6b7280; margin-bottom: .2rem; }
.dir-env__req p, .dir-env__notes p { margin: 0; white-space: pre-line; color: #374151; }
.dir-env__docgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.dir-env__doc { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; min-width: 0; }
.dir-env__doc a { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-env__doc form { margin: 0; }
.dir-env__side { display: flex; flex-direction: column; gap: .5rem; flex: 0 0 auto; }
.dir-env__side form { margin: 0; }
.dir-env__side .btn { width: 100%; }
.dir-env-m--overdue { border-color: #fecaca; background: linear-gradient(135deg, #fef2f2, #fff); }
.dir-env-m--soon { border-color: #fed7aa; background: linear-gradient(135deg, #fff7ed, #fff); }
.dir-env-m--ok { border-color: #e5e7eb; }
.dir-env-m__date { padding: .65rem .85rem; border-radius: .75rem; background: #fff; border: 1px solid #e5e7eb; margin-bottom: .75rem; }
.dir-env-m__date span { font-size: .75rem; }
@media (max-width: 991.98px) { .dir-env__grid, .dir-env__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dir-env__docgrid { grid-template-columns: 1fr; } }
/* --- fine Scadenziario Ambientale (E3) --- */
