/* Gestione · Green Club Lainate */
@font-face { font-family: "Cormorant Garamond"; font-weight: 300 700; src: url(/stile-sito/font/cormorant-garamond-latin-wght-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 100 900; src: url(/stile-sito/font/inter-latin-wght-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --bosco: #2C5F4E; --bosco-scuro: #1E4538; --corallo: #C84B3E; --panna: #FAF6EE; --carta: #FFFDF8;
  --salvia: #7A8B6A; --salvia-tenue: #E4E8DA; --grafite: #1F2925; --grafite-2: #5A635E; --filo: #DDD5C4; --filo-tenue: #ECE6D9;
  --verde-ok: #2F7A4F;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 400 14.5px/1.5 var(--sans); color: var(--grafite); background: var(--panna); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--bosco); margin: 0; line-height: 1.15; }
a { color: var(--bosco); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--corallo); outline-offset: 2px; }

/* pulsanti e campi */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border: 1px solid var(--filo); background: #fff; border-radius: 4px; cursor: pointer; font-weight: 500; font-size: .86rem; white-space: nowrap; text-decoration: none; color: var(--grafite); }
.btn:hover { border-color: var(--bosco); }
.btn.primario { background: var(--bosco); border-color: var(--bosco); color: #fff; }
.btn.primario:hover { background: var(--bosco-scuro); }
.btn.pericolo { color: var(--corallo); }
.btn.pericolo:hover { border-color: var(--corallo); background: #FBF1EC; }
.btn.piccolo { padding: .3rem .55rem; font-size: .78rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icona { background: none; border: 1px solid transparent; border-radius: 4px; width: 28px; height: 28px; cursor: pointer; color: var(--grafite-2); line-height: 1; }
.icona:hover { border-color: var(--filo); color: var(--bosco); background: #fff; }
.campo { display: flex; flex-direction: column; gap: .3rem; }
.campo > span { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grafite-2); }
.campo small { color: var(--grafite-2); font-size: .76rem; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--filo); border-radius: 4px; background: #fff; min-height: 36px;
}
input:focus, select:focus, textarea:focus { border-color: var(--bosco); outline: none; box-shadow: 0 0 0 3px rgba(44, 95, 78, .12); }
textarea { min-height: 90px; resize: vertical; }
.scelta { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.griglia-campi { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1rem; }
.griglia-campi .largo { grid-column: 1 / -1; }
.errore { color: var(--corallo); min-height: 1.2em; margin: .2rem 0; font-size: .86rem; }
.aiuto { color: var(--grafite-2); font-size: .84rem; margin: .2rem 0 0; max-width: 70ch; }

/* accesso */
.accesso { min-height: 100%; display: grid; place-items: center; padding: 20px; background: var(--bosco); }
.accesso-scheda { width: min(400px, 100%); background: var(--carta); padding: 2.2rem; border-radius: 6px; display: grid; gap: .9rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.accesso-occhiello { margin: 0; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--salvia); font-weight: 600; }
.accesso h1 { font-size: 2.2rem; }
.accesso p { margin: 0; color: var(--grafite-2); }

/* impaginazione */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100%; }
.barra { background: var(--bosco-scuro); color: rgba(255, 255, 255, .85); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.barra-testa { padding: 1.3rem 1.2rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.barra-testa strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.4rem; color: #fff; }
.barra-testa span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.barra-menu { padding: .6rem .6rem; overflow-y: auto; flex: 1; }
.barra-menu a { display: block; padding: .5rem .7rem; border-radius: 4px; text-decoration: none; color: inherit; }
.barra-menu a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.barra-menu a.attiva { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--corallo); }
.barra-gruppo { margin: 1rem .7rem .3rem; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; opacity: .55; }
.barra-piede { padding: 1rem 1.2rem; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; font-size: .84rem; }
.barra-piede a, .barra-piede .link { color: rgba(255, 255, 255, .85); }
.principale { min-width: 0; display: flex; flex-direction: column; }
.testata { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .8rem 1.6rem; background: rgba(250, 246, 238, .96); border-bottom: 1px solid var(--filo); backdrop-filter: blur(6px); }
.testata h1 { font-size: 1.8rem; flex: 1; }
.pubblica { display: flex; align-items: center; gap: .8rem; }
.stato { font-size: .8rem; color: var(--grafite-2); display: inline-flex; align-items: center; gap: .4rem; }
.stato::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--verde-ok); }
.stato.da-pubblicare { color: var(--corallo); font-weight: 600; }
.stato.da-pubblicare::before { background: var(--corallo); }
.apri-barra { display: none; background: none; border: 1px solid var(--filo); border-radius: 4px; width: 36px; height: 36px; cursor: pointer; }
main { padding: 1.6rem; max-width: 1280px; width: 100%; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .barra { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
  .app.barra-aperta .barra { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .apri-barra { display: block; }
  .testata { padding: .7rem 1rem; flex-wrap: wrap; }
  .testata h1 { font-size: 1.4rem; }
  main { padding: 1rem; }
}

/* blocchi */
.pannello { background: var(--carta); border: 1px solid var(--filo); border-radius: 6px; padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.pannello > h2 { font-size: 1.5rem; margin-bottom: .2rem; }
.pannello-testa { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pannello-testa h2 { font-size: 1.5rem; }
.azioni { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.azioni.fine { justify-content: flex-end; margin-top: 1rem; }
.divisa { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .divisa { grid-template-columns: 1fr; } }
.cruscotto { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.tessera { background: #fff; border: 1px solid var(--filo); border-radius: 6px; padding: 1rem 1.1rem; text-decoration: none; color: inherit; display: block; }
.tessera:hover { border-color: var(--bosco); }
.tessera strong { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; color: var(--bosco); line-height: 1; }
.tessera span { font-size: .84rem; color: var(--grafite-2); }
.vuoto { color: var(--grafite-2); padding: 1rem 0; }
.etichetta-t { display: inline-block; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .45rem; border-radius: 3px; background: var(--salvia-tenue); color: var(--bosco); }
.etichetta-t.rossa { background: #FBE7E2; color: var(--corallo); }
.etichetta-t.grigia { background: #eee; color: #777; }
.etichetta-t.gialla { background: #FFF3D6; color: #8B6D14; }
.etichetta-t.verde { background: #E2F2E7; color: var(--verde-ok); }

/* albero pagine */
.albero { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.albero ul { list-style: none; margin: 0 0 0 1rem; padding: 0; border-left: 1px dotted var(--filo); }
.nodo { display: flex; align-items: center; gap: .2rem; padding: .15rem .2rem; border-radius: 4px; }
.nodo:hover { background: #fff; }
.nodo.selezionato { background: var(--salvia-tenue); }
.nodo button.nome { flex: 1; text-align: left; background: none; border: 0; padding: .35rem .3rem; cursor: pointer; border-radius: 4px; }
.nodo.nascosto button.nome { color: #999; text-decoration: line-through; }
.nodo .strumenti { display: none; }
.nodo:hover .strumenti, .nodo.selezionato .strumenti { display: flex; }
.cerca { margin-bottom: .8rem; }

/* editor */
.editor-barra { display: flex; flex-wrap: wrap; gap: .25rem; padding: .45rem; border: 1px solid var(--filo); border-bottom: 0; border-radius: 6px 6px 0 0; background: #F4EFE4; position: sticky; top: 62px; z-index: 5; }
.editor-barra button, .editor-barra select { border: 1px solid transparent; background: none; border-radius: 4px; padding: .3rem .5rem; cursor: pointer; font-size: .82rem; min-height: 30px; }
.editor-barra button:hover { background: #fff; border-color: var(--filo); }
.editor-barra button[aria-pressed="true"] { background: var(--bosco); color: #fff; }
.editor-barra .sep { width: 1px; background: var(--filo); margin: 0 .2rem; }
.editor-barra select { border-color: var(--filo); background: #fff; width: auto; max-width: 220px; }
.editor-quadro { width: 100%; height: 62vh; min-height: 420px; border: 1px solid var(--filo); border-radius: 0 0 6px 6px; background: #FAF6EE; display: block; }
.editor-html { width: 100%; height: 62vh; min-height: 420px; font: 13px/1.5 ui-monospace, Menlo, monospace; border-radius: 0 0 6px 6px; }

/* tabelle di gestione */
.tabella-g { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tabella-g th { text-align: left; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--grafite-2); padding: .5rem .45rem; border-bottom: 2px solid var(--filo); white-space: nowrap; }
.tabella-g td { padding: .35rem .45rem; border-bottom: 1px solid var(--filo-tenue); vertical-align: middle; }
.tabella-g tr:hover td { background: #fff; }
.tabella-g input, .tabella-g select { min-height: 32px; padding: .3rem .45rem; }
.scorri { overflow-x: auto; }
.miniatura { width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--filo-tenue); border-radius: 3px; display: block; }
.miniatura.vuota { background: var(--salvia-tenue); }

/* orari */
.orari-g td:first-child { font-weight: 600; width: 110px; }
.fascia { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.fascia input[type=time] { width: 108px; }
.giorno-stato { width: 140px; }

/* listino editor */
.griglia-listino input { min-width: 110px; }
.griglia-listino th input { font-weight: 600; background: #F4EFE4; }
.griglia-listino th .fascia { flex-wrap: nowrap; }
.foto-g .azioni { flex-wrap: nowrap; min-width: 0; }

/* foto */
.galleria-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.foto-g { background: #fff; border: 1px solid var(--filo); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.foto-g img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--salvia-tenue); }
.foto-g .corpo { padding: .7rem; display: grid; gap: .5rem; }
.foto-g .sezioni { display: flex; flex-wrap: wrap; gap: .3rem .7rem; font-size: .8rem; }
.carica { border: 2px dashed var(--filo); border-radius: 6px; padding: 1.4rem; text-align: center; color: var(--grafite-2); background: #fff; cursor: pointer; }
.carica.sopra { border-color: var(--bosco); background: var(--salvia-tenue); }

/* maestri, notizie, prodotti */
.schede-g { display: grid; gap: .8rem; }
.scheda-g { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--filo); border-radius: 6px; padding: .7rem .9rem; }
.scheda-g img, .scheda-g .segnaposto { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; background: var(--salvia-tenue); display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; color: var(--bosco); }
.scheda-g h3 { font-size: 1.3rem; }
.scheda-g p { margin: .1rem 0 0; color: var(--grafite-2); font-size: .84rem; }
.categorie { list-style: none; margin: 0; padding: 0; }
.categorie button { width: 100%; display: flex; justify-content: space-between; gap: .5rem; text-align: left; background: none; border: 0; border-radius: 4px; padding: .5rem .6rem; cursor: pointer; }
.categorie button:hover { background: #fff; }
.categorie button.attiva { background: var(--salvia-tenue); font-weight: 600; }
.categorie small { color: var(--grafite-2); font-weight: 400; }

/* finestre e avvisi */
.finestra { border: 0; border-radius: 8px; padding: 0; width: min(720px, 94vw); max-height: 90vh; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.finestra::backdrop { background: rgba(20, 30, 26, .55); }
.finestra-corpo { padding: 1.4rem 1.5rem; display: grid; gap: 1rem; }
.finestra-corpo h2 { font-size: 1.7rem; }
.anteprima-foto { display: flex; gap: 1rem; align-items: center; }
.anteprima-foto img { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--filo); border-radius: 4px; }
.avvisi { position: fixed; right: 16px; bottom: 16px; display: grid; gap: .5rem; z-index: 100; }
.avviso { background: var(--grafite); color: #fff; padding: .7rem 1rem; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); max-width: 420px; font-size: .88rem; }
.avviso.errore-a { background: var(--corallo); }
.avviso.ok { background: var(--bosco); }
.registro { white-space: pre-wrap; font: 12px/1.5 ui-monospace, Menlo, monospace; background: #1F2925; color: #E4E8DA; padding: .8rem; border-radius: 4px; max-height: 300px; overflow: auto; }

/* hotel */
.etichetta-t.verde { background: #E2F0E6; color: var(--verde-ok); }
.etichetta-t.gialla { background: #FFF3CD; color: #856404; }
