@import url("/media/templates/site/schola/css/fonts.css");
/* Contabilità Schola Cantorum */
:root {
  --bg: #f5f3ee; --card: #fff; --ink: #1f2430; --muted: #6b7180; --line: #e3e0d8;
  --blu: #1f3a60; --blu2: #2d5a91; --oro: #b8862b; --pos: #1d7a46; --neg: #b3261e;
  --avviso: #fff4d6; --info: #e8f0fb; --ok: #e5f4ea; --err: #fbe6e4;
  --r: 10px;
}
* { box-sizing: border-box }
body { margin: 0; font: 15px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg) }
a { color: var(--blu2) }
h1 { font-size: 1.55rem; margin: .2em 0 .6em; color: var(--blu) }
h2 { font-size: 1.12rem; margin: .2em 0 .7em; color: var(--blu) }
h3 { font-size: .95rem; margin: 1em 0 .3em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em }
main { max-width: 1240px; margin: 0 auto; padding: 22px 16px 40px }
.stretto { max-width: 440px; margin: 6vh auto 0 }

header.top { background: var(--blu); color: #fff; display: flex; align-items: center; gap: 18px; padding: 10px 18px; flex-wrap: wrap }
.brand { display: flex; align-items: center; gap: 10px }
.brand small { display: block; opacity: .75; font-size: .78rem }
.logo { width: 36px; height: 36px; border-radius: 50%; background: var(--oro); display: grid; place-items: center; font-size: 20px }
header nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; flex: 1 }
header nav a { color: #dfe7f3; text-decoration: none; padding: 7px 11px; border-radius: 7px; font-size: .93rem }
header nav a:hover { background: rgba(255,255,255,.1) }
header nav a.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600 }
header .chi { margin-left: auto; font-size: .82rem; opacity: .85 }
header .chi a { padding: 0; color: #fff; text-decoration: underline }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 20px; border-radius: 6px; padding: 2px 10px }
.badge { background: var(--oro); color: #fff; border-radius: 9px; padding: 0 6px; font-size: .75rem; font-weight: 700 }
footer.piede { text-align: center; color: var(--muted); font-size: .78rem; padding: 20px }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03) }
details.card > summary { cursor: pointer; color: var(--blu2) }
details.card[open] > summary { margin-bottom: 12px }
.griglia2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start }
.griglia2.larga-sx { grid-template-columns: 1.4fr 1fr }
.griglia3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px }
.tile { display: block; text-decoration: none; color: var(--ink); margin: 0 }
.tile b { display: block; color: var(--blu); margin-bottom: 4px }
.tile span { color: var(--muted); font-size: .88rem }
.tile:hover { border-color: var(--blu2) }
.intest { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px }
.intest h1, .intest h2 { margin-bottom: .3em }
.azioni-riga { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 }
.barra-fissa { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line) }

.btn { display: inline-block; border: 1px solid #c9c4b8; background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 8px; font: inherit; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap }
.btn:hover { border-color: var(--blu2) }
.btn.primario { background: var(--blu2); border-color: var(--blu2); color: #fff }
.btn.primario:hover { background: var(--blu) }
.btn.pericolo { color: var(--neg); border-color: #e3b5b1 }
.btn.piccolo, .piccolo .btn { padding: 4px 9px; font-size: .82rem }
button.link { background: none; border: none; color: var(--blu2); cursor: pointer; text-decoration: underline; font: inherit; font-size: .88rem; padding: 0 4px }
button.link.neg { color: var(--neg) }
form.inline { display: inline }

.form label { display: block; margin-bottom: 12px; font-size: .88rem; color: var(--muted); flex: 1 }
.form label.check, .form label.radio, label.check, label.radio { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: .93rem }
input, select, textarea { font: inherit; font-size: .95rem; padding: 7px 9px; border: 1px solid #cfcabe; border-radius: 7px; background: #fff; color: var(--ink); max-width: 100% }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea { display: block; width: 100%; margin-top: 3px }
input:focus, select:focus, textarea:focus { outline: 2px solid #9db8dd; border-color: var(--blu2) }
.form .riga, .riga { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end }
.form .riga > label { min-width: 160px }
.form.largo { max-width: 900px }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0 }
fieldset.dest { margin: 8px 0 14px }
.scelta-soci { columns: 3 200px; background: #faf9f6; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 8px 0 }
.scelta-soci label { font-size: .88rem; margin: 2px 0 }

.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid transparent }
.flash.ok { background: var(--ok); border-color: #b9dfc6 }
.flash.err { background: var(--err); border-color: #efbdb7 }
.flash.info { background: var(--info); border-color: #c4d6f0 }
.flash.avviso { background: var(--avviso); border-color: #ecd391 }
.flash a { color: inherit }
.muted { color: var(--muted) }
.piccolo, small { font-size: .84rem }
.pos { color: var(--pos) }
.neg { color: var(--neg) }
.nowrap { white-space: nowrap }
.grande { font-size: 1.15rem }
code { background: #f1efe9; padding: 1px 5px; border-radius: 4px; font-size: .9em }

.tab { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem }
.tab th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--line); padding: 8px 8px }
.tab td { border-bottom: 1px solid #efece5; padding: 7px 8px; vertical-align: top }
.tab tfoot th { border-top: 2px solid var(--line); border-bottom: 0; color: var(--ink); font-size: .9rem }
.tab.compatta td { padding: 5px 6px }
.tab tr.spento td { color: #9a9a9a; text-decoration: line-through }
.tab tr.giro td { background: #f7f7fb; color: #555 }
.tab tr.manca td { background: #fffbf0 }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums }
.scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px }
.scroll .tab th:first-child, .scroll .tab td:first-child { padding-left: 14px }
.voce { display: inline-block; font-size: .72rem; color: var(--blu2); background: #eaf0f8; border-radius: 4px; padding: 0 5px; font-family: ui-monospace, Menlo, monospace }
.tag { display: inline-block; font-size: .76rem; border-radius: 10px; padding: 1px 8px; background: #eee; color: #555; white-space: nowrap }
.tag.avviso { background: var(--avviso); color: #7a5a00 }
.tag.st-pagato { background: var(--ok); color: var(--pos) }
.tag.st-da_pagare { background: var(--err); color: var(--neg) }
.tag.st-in_verifica { background: var(--info); color: var(--blu2) }

.filtri { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px }
.filtri select, .filtri input { font-size: .88rem; padding: 6px 8px }
.totali-riga { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0 10px; font-size: .92rem }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-size: .92rem }
.tabs a.on { color: var(--blu); border-color: var(--blu); font-weight: 600 }

.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px }
.kpi .k { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px }
.kpi .k span { display: block; color: var(--muted); font-size: .82rem }
.kpi .k b { font-size: 1.35rem; font-variant-numeric: tabular-nums }
.kpi .k small { display: block; color: var(--muted) }
.kpi .k.tot { background: var(--blu); color: #fff; border-color: var(--blu) }
.kpi .k.tot span { color: #c8d6ea }
.progress { height: 7px; background: #eee; border-radius: 4px; overflow: hidden; width: 120px }
.progress i { display: block; height: 100%; background: var(--pos) }
.barre { display: flex; gap: 6px; align-items: flex-end; height: 160px; padding-top: 6px }
.barre .mese { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100% }
.barre .col { flex: 1; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center }
.barre i { width: 42%; border-radius: 3px 3px 0 0; min-height: 1px }
.barre span { font-size: .75rem; color: var(--muted) }
i.e { background: #3c8d5f } i.u { background: #c9a14f }
.legenda { font-size: .82rem; color: var(--muted) }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px }

/* area socio */
.lista-pag { display: flex; flex-direction: column; gap: 10px }
.pag { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; border-left: 4px solid #ccc }
.pag.stato-da_pagare { border-left-color: var(--neg) }
.pag.stato-in_verifica { border-left-color: var(--blu2) }
.pag.stato-pagato { border-left-color: var(--pos) }
.pag .importo { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums }
.pag .azioni { display: flex; gap: 8px; align-items: center }
.pag .stato { font-size: .82rem; color: var(--muted) }
.totale-pag { font-size: 1.25rem; margin: 6px 0 16px }
.dati-bon { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px }
.dati-bon dt { color: var(--muted); font-size: .88rem }
.dati-bon dd { margin: 0; word-break: break-all }
.scelta-importo label { margin-bottom: 8px }
#paypal-buttons { max-width: 380px }

/* import */
.tab.import td.descr { font-size: .82rem; max-width: 420px }
.tab.import select { font-size: .82rem; max-width: 230px; padding: 4px }
.tab.import select.vuoto { border-color: #e2b93b; background: #fffaf0 }
.tab.import tr.st-importato td { color: #999 }
.tab.import tr.st-doppione td { background: #f6f8fc }
.abbina-quota { margin-top: 5px; background: var(--ok); border-radius: 6px; padding: 4px 8px; display: flex; gap: 12px; flex-wrap: wrap }
.abbina-quota label { font-size: .82rem }
details.mini { display: inline-block; position: relative }
details.mini summary { list-style: none }
details.mini summary::-webkit-details-marker { display: none }
.form.pop { position: absolute; right: 0; z-index: 10; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.12); border-radius: 10px; padding: 14px; width: 320px; white-space: normal }

/* tabelle-form (impostazioni) */
.tabform { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; overflow-x: auto }
.tabform .tf-head, .tabform .tf-row { display: grid; grid-template-columns: var(--cols); gap: 8px; align-items: center; padding: 6px 12px; min-width: 760px }
.tabform .tf-head { font-size: .78rem; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line) }
.tabform .tf-row { border-bottom: 1px solid #efece5 }
.tabform .tf-row input:not([type=checkbox]), .tabform .tf-row select { width: 100%; font-size: .88rem; padding: 5px 7px }

/* rendiconto Mod. D */
.modd { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 26px; margin-bottom: 18px }
.modd-head { text-align: center; line-height: 1.35; font-size: .9rem; position: relative; margin-bottom: 14px }
.modd-head h2 { margin-top: 14px; letter-spacing: .06em }
.modd-mod { position: absolute; left: 0; top: 0; font-weight: 700 }
.modd-tab { width: 100%; border-collapse: collapse; font-size: .82rem; margin-bottom: 16px }
.modd-tab th { background: #eef2f7; text-align: left; padding: 6px 7px; border: 1px solid #d5dbe4 }
.modd-tab td { padding: 4px 7px; border-left: 1px solid #e3e6eb; border-right: 1px solid #e3e6eb; vertical-align: top }
.modd-tab tr.sez td { background: #f6f7fa; font-weight: 700; border-top: 1px solid #d5dbe4; padding-top: 7px }
.modd-tab tr.tot td { font-weight: 700; border-top: 1px solid #bfc6d1 }
.modd-tab tr.av td { font-style: italic; border-bottom: 1px solid #d5dbe4 }
.modd-tab tr.grande td { background: #eef2f7; font-size: .9rem }
.modd-tab td.figlia { padding-left: 22px; color: #444 }
.modd-tab td.madre { font-weight: 600 }
.modd-tab td.num { width: 105px }
.modd-tab.riepilogo, .modd-tab.quadratura { max-width: 760px }
.modd-tab.quadratura { max-width: 420px; border: 1px solid #d5dbe4 }
.modd-piede { text-align: right; font-size: .85rem; color: var(--muted) }

/* report stampabili */
.rep-head { text-align: center; margin-bottom: 16px }
.rep-head h1 { margin-top: 10px }
.tab.rep { font-size: .84rem }

@media (max-width: 860px) {
  .griglia2, .griglia2.larga-sx { grid-template-columns: 1fr }
  .menu-btn { display: block }
  header nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch }
  body.menu-open header nav { display: flex }
  header .chi { margin: 8px 0 0 }
  .pag { grid-template-columns: 1fr auto; }
  .pag .azioni { grid-column: 1 / -1 }
  .modd { padding: 12px; overflow-x: auto }
  .modd-tab { min-width: 720px }
}
@media print {
  body { background: #fff; font-size: 11px }
  header.top, footer.piede, .no-print, .azioni-riga, .filtri { display: none !important }
  main { padding: 0; max-width: none }
  .modd, .card, .scroll { border: 0; padding: 0; box-shadow: none }
  .modd-tab { font-size: 9.5px }
  .modd-tab tr { page-break-inside: avoid }
  a { color: inherit; text-decoration: none }
  @page { size: A4; margin: 12mm }
}
.griglia2 > *, .griglia3 > * { min-width: 0 }
.card { overflow-x: auto }
@media (max-width: 860px) { .tab th, .tab td { padding: 6px 5px } }
/* v1.1 */
.centro { text-align: center }
.firme { display: flex; justify-content: space-between; margin-top: 40px; text-align: center; gap: 40px }
.firme > div { flex: 1 }
.relazione-testo p { margin: 0 0 .7em; text-align: justify }
.relazione-testo h2 { margin-top: 1.2em }
.relazione-edit { font-family: ui-monospace, Menlo, monospace; font-size: .88rem; line-height: 1.5 }
.docs { list-style: none; padding: 0; margin: 0 }
.docs li { padding: 5px 0; border-bottom: 1px solid #f0ede6 }
.docs li:last-child { border: 0 }
.mini-tot { display: flex; gap: 16px; flex-wrap: wrap; font-size: .88rem; color: var(--muted) }
.mini-tot b { color: var(--ink) }
.lista-cariche { list-style: none; padding: 0; margin: 6px 0 0 }
.lista-cariche li { padding: 2px 0; font-size: .92rem }
code.chiave { font-size: 1.05rem; letter-spacing: .05em; padding: 4px 8px; display: inline-block; margin: 4px 0 }
.griglia-voti { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; margin-top: 10px }
.voto-socio { display: flex !important; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid #f0ede6; padding: 3px 0; margin: 0 !important; color: var(--ink) !important }
.voto-socio input { width: 70px !important; display: inline-block !important; margin: 0 !important; text-align: right }
.filtro-soci { width: 100%; max-width: 320px }
tr.eletto td { background: #eef8f1 }
tr.spento-soft td { color: #999 }
.kpi .k.avviso { background: var(--avviso) }
.foglio td { height: 30px }
mark { background: #fff1a8; padding: 0 2px; border-radius: 3px }
@media print { mark { background: #fff1a8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact } }

/* ---- Colori e caratteri del sito della Schola Cantorum (bordeaux, oro, avorio) ---- */
:root {
  --bg: #faf6ef; --card: #fff; --ink: #2b2120; --muted: #6f625c; --line: #e7dccb;
  --blu: #6b1a1d; --blu2: #8a2a2e; --oro: #b8963e;
}
body { font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif }
h1, h2, .brand strong { font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; letter-spacing: .01em }
h1 { font-size: 1.9rem; font-weight: 600 }
h2 { font-size: 1.35rem; font-weight: 600 }
header.top { background: var(--blu); border-bottom: 3px solid var(--oro); box-shadow: 0 2px 10px rgba(60,10,12,.18) }
.brand strong { font-size: 1.25rem; font-weight: 600 }
.brand small { color: #f3e6c4; opacity: .9 }
.logo-img { width: 46px; height: 46px; object-fit: contain; flex: none; display: block }
header nav a { color: #f3e6c4 }
header nav a.on { background: rgba(184,150,62,.28); color: #fff }

.rep-logo { display: block; height: 60px; width: auto; margin: 0 auto 8px }
/* finestra «Modifica» delle cariche: in primo piano al centro dello schermo, con lo sfondo scurito */
details.mini[open] > summary::after { content: ""; position: fixed; inset: 0; background: rgba(20, 10, 10, .45); z-index: 999; cursor: default }
details.mini[open] > .pop { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); width: min(420px, 92vw); max-height: 90vh; overflow: auto; z-index: 1000; font-size: 1rem; box-shadow: 0 0 0 100vmax rgba(20, 10, 10, .45), 0 10px 40px rgba(0,0,0,.3) }
/* nota delle cariche (ⓘ): si apre toccandola */
details.nota-i { display: inline }
details.nota-i > summary { display: inline; list-style: none; cursor: pointer; color: var(--accent, #6b1a1d); font-weight: 600; padding: 0 4px }
details.nota-i > summary::-webkit-details-marker { display: none }
details.nota-i[open] > small { display: block; margin: 2px 0 4px; white-space: normal }
@media print {
  /* Safari stampa pagine bianche se le tabelle stanno in riquadri scorrevoli: in stampa niente scorrimento */
  .scroll, .card, .modd, .tabform { overflow: visible !important }
  table.rep tr, .tab tr { page-break-inside: avoid; break-inside: avoid }
  .rep-logo { height: 52px !important }
}

/* scelta iniziale per i consiglieri */
.benvenuto{max-width:820px;margin:3rem auto;text-align:center}
.benvenuto h1{margin-bottom:2rem}
.benvenuto .scelte{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.6rem}
.benvenuto a.scelta{display:flex;flex-direction:column;align-items:center;gap:.7rem;padding:2.4rem 1.6rem 2rem;border:1px solid #e3d6b4;border-top:4px solid #c9a24a;border-radius:14px;background:#fff;text-decoration:none!important;color:#333;box-shadow:0 3px 12px rgba(90,20,30,.08);transition:transform .15s,box-shadow .15s}
.benvenuto a.scelta:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(90,20,30,.16)}
.benvenuto .scelta .ico{display:flex;align-items:center;justify-content:center;width:96px;height:96px;border-radius:50%;background:#7a1f2b}
.benvenuto .scelta svg{width:56px;height:56px;fill:none;stroke:#f3e3b5;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.benvenuto .scelta b{font-family:Georgia,serif;font-size:1.45rem;color:#7a1f2b}
.benvenuto .scelta small{display:block;font-size:.98rem;line-height:1.45;color:#555;max-width:30ch}
.cm-box{border:1px dashed #c9b37e;border-radius:8px;padding:.6rem 1rem;margin:.8rem 0}
.cm-box legend{font-weight:600;padding:0 .4rem}
.saldi-conti{margin:.6rem 0 1rem;max-width:760px}
.guida-voce{display:block;margin-top:.3rem;font-size:.85rem;color:#6b5a2e;background:#fbf6e9;border-radius:4px;padding:.3rem .5rem}
.guida-voce:empty{display:none}
dl.guida dt{font-weight:600;margin-top:.6rem}dl.guida dd{margin:.15rem 0 0 0;color:#444}
dl.guida .voce{display:inline-block;min-width:3.4em;font-size:.8rem;background:#7a1f2b;color:#fff;border-radius:3px;padding:0 .3rem;text-align:center}