/*
 * OmbraForma R11
 * Il sistema visivo completo vive in styles.css. Questo foglio raccoglie le
 * rifiniture dell'applicazione pubblica, compresa la gerarchia piatta approvata.
 */

body{padding-top:76px}.site-header.global-header{position:fixed;inset:0 0 auto;z-index:10010;display:flex;width:100%;height:76px;min-height:76px;padding:0;margin:0;border:0;background:#102219;box-shadow:0 1px 0 rgba(255,255,255,.08);color:#fff}.global-header *,.global-header *::before,.global-header *::after{box-sizing:border-box}.global-header__inner{width:min(1680px,calc(100% - 32px));height:76px;margin:0 auto;display:flex;align-items:center}.global-brand{display:flex;align-items:center;justify-content:flex-start;width:176px;height:44px;margin-right:auto;flex:0 0 auto}.global-brand img{display:block;width:176px;height:auto;max-height:36px;object-fit:contain}.global-header__actions{display:flex;align-items:center;justify-content:flex-end;min-width:0;margin-left:auto}.esnav{--esnav-line:#dce2dc;--esnav-green:#00833e;color:#fff;font:500 16px/1.3 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:left}.esnav ul,.esnav li{list-style:none;margin:0;padding:0}.esnav a,.esnav button{font:inherit;text-transform:none;text-decoration:none;color:inherit;box-shadow:none;border-radius:0;cursor:pointer}.esnav button{appearance:none;background:transparent;border:0;margin:0}.esnav [hidden]{display:none!important}.esnav a:focus-visible,.esnav button:focus-visible,.global-header a:focus-visible{outline:2px solid #fff;outline-offset:3px}.esnav__trigger{display:none}.esnav__list{display:flex;align-items:center;gap:14px}.esnav__item{position:relative}.esnav__row{display:flex;align-items:center}.esnav__link,.esnav__label{display:flex;align-items:center;justify-content:flex-start;min-height:44px;min-width:44px;padding:10px 4px;gap:10px;white-space:nowrap;line-height:24px}.esnav__label--branch{padding-right:10px}.esnav__chevron{display:inline-block;width:7px;height:7px;border-right:1.7px solid currentColor;border-bottom:1.7px solid currentColor;transform:translateY(-2px) rotate(45deg);flex:none}.esnav .is-open>.esnav__row .esnav__chevron{transform:translateY(2px) rotate(225deg)}.esnav__sub{position:absolute;top:100%;left:-12px;min-width:240px;max-width:calc(100vw - 32px);padding:10px!important;background:#fff;color:#1d1d1b;border:1px solid var(--esnav-line);box-shadow:0 10px 24px #10271a12;z-index:2}.esnav__sub .esnav__link{width:100%;min-height:44px;padding:10px 14px;font-size:15px;white-space:normal}.esnav__link:hover,.esnav__label:hover{text-decoration:underline;text-underline-offset:7px}.esnav__sub .esnav__link:hover{background:#f0f7f2}.esnav__link svg,.global-utilities svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}.esnav__link svg{margin-right:6px}.global-utilities{display:flex;align-items:center;gap:6px;margin-left:10px}.global-utilities a{display:flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;color:#fff;text-decoration:none;font:600 15px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.global-account-utility{display:none!important}.global-cart-utility svg{width:23px;height:23px}.topbar{top:76px}
@media(max-width:1199px){.esnav__trigger{display:flex;width:44px;height:44px;align-items:center;justify-content:center;padding:10px;position:relative;color:#fff}.esnav__bars,.esnav__bars::before,.esnav__bars::after{display:block;width:23px;height:2px;background:currentColor;position:relative}.esnav__bars::before,.esnav__bars::after{content:"";position:absolute;left:0;top:-7px}.esnav__bars::after{top:7px}.esnav.is-open .esnav__bars{background:transparent}.esnav.is-open .esnav__bars::before{top:0;transform:rotate(45deg)}.esnav.is-open .esnav__bars::after{top:0;transform:rotate(-45deg)}.esnav__panel{position:fixed;top:76px;right:16px;width:min(380px,calc(100% - 32px));max-height:calc(100vh - 92px);overflow-y:auto;background:#fff;color:#1d1d1b;border:1px solid var(--esnav-line);padding:12px 20px 18px;box-shadow:0 12px 28px #10271a14}.esnav__list{display:block}.esnav__list>.esnav__item{border-bottom:1px solid var(--esnav-line)}.esnav__row{min-height:50px}.esnav__row>.esnav__link,.esnav__row>.esnav__label{flex:1;min-height:50px;font-size:18px;white-space:normal;padding:12px 0}.esnav__label--branch{justify-content:space-between}.esnav__sub{position:static;min-width:0;max-width:none;border:0;border-left:2px solid var(--esnav-green);margin:0 0 12px 2px!important;padding:0 0 0 12px!important;box-shadow:none}.esnav__sub .esnav__link{font-size:16px;min-height:44px;padding:10px 6px}.global-account-utility{display:flex!important}.global-orders-utility{display:none!important}.esnav a:focus-visible,.esnav button:focus-visible{outline-color:var(--esnav-green)}}
@media(max-width:959px){body{padding-top:56px}.site-header.global-header,.global-header__inner{height:56px;min-height:56px}.global-brand,.global-brand img{width:144px}.global-brand{height:40px}.esnav__panel{top:56px;max-height:calc(100vh - 72px)}.topbar{top:56px}}
@media(max-width:760px){.site-header.global-header{background:#102219}.global-header__inner{width:calc(100% - 24px)}.global-header__actions{gap:0}.global-utilities{margin-left:2px}.global-utilities a{min-width:40px}}

.top-mini {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: transparent;
  color: #e9e9f2;
  font-size: .72rem;
  font-weight: 850;
}

.projects-button { display: flex; align-items: center; gap: 7px; }
.projects-button b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--lime); color: var(--night); font-size: .62rem; }

.project-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.actions { position: static; }
.commerce-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #c9c0ff; border-radius: 14px; background: linear-gradient(135deg, #f0ecff, #fff8e9); }
.commerce-state > div { display: grid; }
.commerce-state span { color: #5b43b0; font-size: .58rem; font-weight: 950; letter-spacing: .08em; }
.commerce-state strong { margin-top: 2px; font-size: .75rem; }
.commerce-state small { margin-top: 2px; color: var(--muted); font-size: .6rem; }
.commerce-state button { flex: 0 0 auto; padding: 8px 10px; border: 1px solid #b7ace8; border-radius: 10px; background: white; color: #4c388f; font-size: .66rem; font-weight: 900; }
.commerce-facts { display: grid; gap: 9px; margin-top: 20px; }
.commerce-facts p { margin: 0; padding: 13px; border-radius: 14px; background: #f3f0e8; }
.commerce-facts b, .commerce-facts span { display: block; }
.commerce-facts b { font-size: .76rem; }
.commerce-facts span { margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.project-actions .ghost, .import-label { min-height: 42px; margin: 0; padding: 9px 10px; justify-content: center; align-items: center; text-align: center; font-size: .7rem; cursor: pointer; }
.project-save { border-color: #a9c82d; background: #f3ffc0; color: #263000; }
.import-label { display: flex; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--muted); font-weight: 900; }
.import-label input { display: none; }

.app-dialog { width: min(760px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 30px; overflow: auto; border: 0; border-radius: 25px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px rgba(10, 10, 30, .32); }
.app-dialog::backdrop { background: rgba(13, 13, 30, .72); backdrop-filter: blur(7px); }
.app-dialog h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.3rem); letter-spacing: -.04em; }
.dialog-close { position: absolute; top: 15px; right: 15px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #ebe7dc; color: var(--night); font-size: 1.25rem; }
.dialog-intro, .legal-dialog > p:last-child { color: var(--muted); line-height: 1.6; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.onboarding-steps article { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #f5f2ea; }
.onboarding-steps span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 11px; background: var(--night); color: var(--lime); font-size: .72rem; font-weight: 950; transform: rotate(-3deg); }
.onboarding-steps h3 { margin: 13px 0 5px; }
.onboarding-steps p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.dialog-note { margin: 0 0 20px; padding: 14px; border-radius: 15px; background: #fff0d9; color: #66451e; }
.dialog-note p { margin: 4px 0 0; font-size: .8rem; line-height: 1.45; }
.onboarding-dialog > .primary { width: 100%; }

.projects-list { display: grid; gap: 9px; margin-top: 20px; }
.projects-list article { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #f7f4ec; }
.projects-list article > div:first-child { display: grid; min-width: 0; }
.projects-list strong { overflow: hidden; text-overflow: ellipsis; }
.projects-list small { margin-top: 3px; color: var(--muted); }
.projects-list article > div:last-child { display: flex; gap: 6px; }
.mini-button.danger { border-color: #efc4c4; color: #8a3030; background: #fff2f2; }
.empty-projects { padding: 24px; border: 2px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }

.footer-link { padding: 0; background: transparent; color: var(--sky); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: min(360px, calc(100vw - 40px)); padding: 13px 16px; border-radius: 14px; background: var(--night); color: white; box-shadow: var(--shadow); font-size: .8rem; font-weight: 800; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #7c2e36; }

/*
 * Gerarchia piatta: un solo contenitore principale per fase.
 * Colore resta riservato a stati e avvisi; i gruppi interni usano spazio e
 * separatori, evitando l'effetto "riquadro dentro riquadro".
 */
.friendly-setting {
  padding: 12px 0;
  border-top: 1px solid #e1dcea;
  border-bottom: 1px solid #e1dcea;
  border-radius: 0;
  background: transparent;
}

.actions {
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.commerce-state {
  padding: 0 0 13px;
  border: 0;
  border-bottom: 1px solid #d7cfef;
  border-radius: 0;
  background: transparent;
}

.metrics {
  gap: 0;
  padding: 3px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid rgba(222, 217, 205, .72);
  border-radius: 0;
  background: transparent;
}

.metric:nth-last-child(-n + 4) { border-bottom: 0; }

.wall-grid { gap: 18px; }
.wall-grid article {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.gate-grid { gap: 0 22px; }
.gate-grid p {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.glossary-grid { gap: 0 24px; }
.glossary-grid p {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.onboarding-steps { gap: 0; }
.onboarding-steps article {
  padding: 4px 18px 8px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.onboarding-steps article:first-child { border-left: 0; }

.commerce-facts { gap: 0; }
.commerce-facts p {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.projects-list { gap: 0; }
.projects-list article {
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

@media (max-width: 1280px) {
  .metric:nth-last-child(-n + 4) { border-bottom: 1px solid rgba(222, 217, 205, .72); }
  .metric:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 980px) {
  .top-actions .privacy-chip { display: none; }
}

@media (max-width: 720px) {
  .top-actions { gap: 6px; }
  .top-mini { padding: 7px 8px; font-size: .64rem; }
  #onboarding-open { display: none; }
  .project-actions { grid-template-columns: 1fr; }
  .commerce-state { align-items: flex-start; flex-direction: column; }
  .onboarding-steps { grid-template-columns: 1fr; }
  .onboarding-steps article {
    padding: 16px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .onboarding-steps article:first-child { border-top: 0; }
  .projects-list article { align-items: flex-start; flex-direction: column; }
  .app-dialog { padding: 27px 18px 20px; }
}

@media (max-width: 430px) {
  .projects-button { max-width: 145px; }
  .projects-button b { display: none; }
}
