/* ============================================================
   Spese Saul & Noemi — Foglio di stile principale
   Mobile-first, tema chiaro caldo, accento oro
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f2ede6;   /* panna calda — sfondo principale */
  --bg2:        #faf7f3;   /* quasi bianco caldo — card/topbar */
  --bg3:        #ece7df;   /* input, elementi secondari */
  --bg4:        #e2dbd1;   /* hover, pressione */
  --gold:       #a0722a;   /* oro scurito per leggibilità su chiaro */
  --gold-light: #c9a84c;   /* oro originale, per decorazioni */
  --gold-bg:    rgba(160,114,42,.10);
  --text:       #1c1814;   /* quasi nero caldo */
  --text2:      #5a4e42;   /* grigio caldo medio */
  --text3:      #9e8f80;   /* grigio caldo chiaro */
  --green:      #2e7d32;
  --green-bg:   rgba(46,125,50,.10);
  --red:        #c62828;
  --red-bg:     rgba(198,40,40,.10);
  --red-dark:   #8e0000;
  --blue:       #1565c0;
  --border:     #d8d0c5;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 2px 12px rgba(100,80,50,.12);
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(70px + var(--safe-bottom));
  overscroll-behavior: contain;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
img { max-width: 100%; display: block; }

/* ── Pagina Auth ──────────────────────────────────────────── */
.page-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  padding-bottom: 1rem;
}
.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.5rem;
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.logo-icon {
  display: inline-block;
  font-size: 2.5rem;
  margin-bottom: .5rem;
}
.auth-logo h1 {
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .02em;
  line-height: 1.2;
}
.auth-logo p { color: var(--text2); font-size: .9rem; margin-top: .25rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: 52px;
}
.topbar-left { display: flex; align-items: center; gap: .5rem; }
.topbar-logo { font-size: 1.3rem; color: var(--gold); }
.topbar-name { font-weight: 700; color: var(--gold); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-utente { font-size: .85rem; color: var(--text2); }
.topbar-logout {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1.3rem;
  cursor: pointer;
  padding: .25rem;
  text-decoration: none;
  line-height: 1;
  display: flex;
}

/* ── Bottom Nav ───────────────────────────────────────────── */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 100;
  display: flex;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  height: calc(60px + var(--safe-bottom));
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text3);
  font-size: .7rem;
  gap: 2px;
  transition: color .15s;
}
.bnav-item.active { color: var(--gold); }
.bnav-icon { font-size: 1.4rem; line-height: 1; }
.bnav-item.bnav-add {
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  width: 52px; height: 52px;
  margin: -10px auto 0;
  flex: none;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(160,114,42,.35);
}
.bnav-item.bnav-add .bnav-label { display: none; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.page-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.page-title { font-size: 1.3rem; font-weight: 700; flex: 1; }
.btn-back { color: var(--gold); font-size: .95rem; white-space: nowrap; }
.link-small { font-size: .85rem; color: var(--gold); }

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; color: var(--gold); }

/* ── Section ──────────────────────────────────────────────── */
.section { margin-bottom: 1.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.section-title.entrata { color: var(--green); }
.section-title.uscita  { color: var(--red); }

/* ── Flash Messages ───────────────────────────────────────── */
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.flash-ok     { background: rgba(46,125,50,.10);  border: 1px solid rgba(46,125,50,.25);  color: #1b5e20; }
.flash-errore { background: rgba(198,40,40,.10);  border: 1px solid rgba(198,40,40,.25);  color: #7f0000; }
.flash-info   { background: var(--gold-bg);       border: 1px solid rgba(160,114,42,.3);  color: var(--gold); }

/* ── Form Elements ────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; color: var(--text2); font-weight: 500; }
.form-group label small { font-weight: 400; color: var(--text3); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
.input-styled {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .75rem 1rem;
  width: 100%;
  font-size: 1rem;
  transition: border-color .15s;
  -webkit-appearance: none;
}
input:focus, .input-styled:focus {
  outline: none;
  border-color: var(--gold);
}
.select-styled, select.select-styled {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .75rem 1rem;
  width: 100%;
  font-size: 1rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%235a4e42' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: .85em;
  padding-right: 2.5rem;
}
.select-styled:focus { outline: none; border-color: var(--gold); }
.textarea-styled {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .75rem 1rem;
  width: 100%;
  font-size: 1rem;
  resize: vertical;
  min-height: 80px;
}
.textarea-styled:focus { outline: none; border-color: var(--gold); }

.input-pwd { position: relative; }
.input-pwd input { padding-right: 3rem; }
.toggle-pwd {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text3);
}
.input-eur { display: flex; align-items: center; gap: .5rem; }
.eur-symbol { color: var(--gold); font-size: 1.2rem; font-weight: 700; }

.form-check { display: flex; align-items: center; gap: .6rem; }
.form-check input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.check-label { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .95rem; }
.check-label input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); }

.radio-group { display: flex; gap: .75rem; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .95rem; }
.radio-label input[type="radio"] { width: 18px; height: 18px; accent-color: var(--gold); }

.select-sm  { padding: .5rem .75rem; font-size: .9rem; border-radius: var(--radius-sm); background: var(--bg3); border: 1px solid var(--border); color: var(--text); }
.input-sm   { padding: .5rem .75rem; font-size: .9rem; border-radius: var(--radius-sm); background: var(--bg3); border: 1px solid var(--border); color: var(--text); width: 100%; }
.input-data { font-size: 1.1rem; letter-spacing: .05em; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-full { width: 100%; }
.btn-lg   { padding: 1rem 1.5rem; font-size: 1.1rem; }
.btn-sm   { padding: .45rem .9rem; font-size: .85rem; border-radius: 6px; }

.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-gold    { background: var(--gold-bg); color: var(--gold); border: 1px solid rgba(160,114,42,.4); }
.btn-ghost   { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.btn-danger  { background: var(--red-bg); color: var(--red); border: 1px solid rgba(198,40,40,.35); }
.btn-icon    { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 1.1rem; padding: .2rem .4rem; }

/* ── Tipo Switch (Entrata/Uscita) ─────────────────────────── */
.tipo-switch {
  display: flex;
  gap: .5rem;
  background: var(--bg3);
  border-radius: var(--radius);
  padding: .25rem;
  margin-bottom: 1rem;
}
.tipo-btn {
  flex: 1;
  padding: .65rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text2);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tipo-btn.active.uscita  { background: var(--red-bg);   color: var(--red); }
.tipo-btn.active.entrata { background: var(--green-bg); color: var(--green); }

/* ── Campo importo nativo ─────────────────────────────────── */
.importo-section {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1rem 1rem .85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.importo-input-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.importo-eur-sym {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  line-height: 1;
}
.importo-input-native {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  color: var(--gold);
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: .25rem .25rem .35rem;
  text-align: right;
  width: 100%;
  caret-color: var(--gold);
  -webkit-appearance: none;
}
.importo-input-native:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.importo-input-native::placeholder {
  color: var(--text3);
  font-weight: 400;
  font-size: 1.8rem;
}

/* ── Saldi ────────────────────────────────────────────────── */
.saldi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}
.saldo-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.saldo-totale { border-color: var(--gold); background: var(--gold-bg); }
.saldo-label { font-size: .8rem; color: var(--text2); margin-bottom: .4rem; }
.saldo-importo { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.saldo-importo.neg { color: var(--red); }

/* ── Carte di credito ─────────────────────────────────────── */
.carte-grid { display: flex; flex-direction: column; gap: .75rem; }
.carta-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.carta-nome { font-weight: 600; color: var(--gold); margin-bottom: .6rem; }
.carta-row { display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; font-size: .9rem; }
.carta-lbl { color: var(--text2); }
.carta-val { font-weight: 600; }
.carta-val.neg { color: var(--red); }

/* ── Riepilogo ────────────────────────────────────────────── */
.riepilogo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; }
.riepilogo-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  text-align: center;
}
.riepilogo-card.entrata { border-color: rgba(76,175,80,.3); }
.riepilogo-card.uscita  { border-color: rgba(229,57,53,.3); }
.riepilogo-lbl { font-size: .72rem; color: var(--text2); margin-bottom: .3rem; }
.riepilogo-val { font-size: .95rem; font-weight: 700; }

/* ── Grafici ──────────────────────────────────────────────── */
.chart-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  max-height: 300px;
}

/* ── Attribuzione ─────────────────────────────────────────── */
.attr-grid { display: flex; flex-direction: column; gap: .6rem; }
.attr-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.attr-nome { font-size: .85rem; color: var(--text2); margin-bottom: .4rem; }
.attr-bar-wrap { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; margin-bottom: .4rem; }
.attr-bar { height: 100%; background: var(--gold); border-radius: 3px; transition: width .4s; }
.attr-val { font-size: .9rem; font-weight: 600; }
.attr-val small { color: var(--text3); font-weight: 400; }
.attr-item.sfizio { border-color: rgba(160,114,42,.3); }

/* ── Transazioni list ─────────────────────────────────────── */
.tx-list { display: flex; flex-direction: column; gap: .5rem; }
.tx-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s;
}
.tx-item:active { border-color: var(--gold); }
.tx-left { flex: 1; min-width: 0; }
.tx-cat  { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub  { font-size: .8rem; color: var(--text2); margin-top: .15rem; }
.tx-data { font-size: .75rem; color: var(--text3); margin-top: .15rem; }
.tx-nota { font-size: .75rem; color: var(--text3); margin-top: .1rem; font-style: italic; }
.tx-importo { font-size: 1.05rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.tx-importo.entrata { color: var(--green); }
.tx-importo.uscita  { color: var(--red); }
.badge-sfizio { font-size: .75rem; }

/* Cestino items */
.cestino-item { flex-direction: column; align-items: flex-start; }
.cestino-item .tx-importo { align-self: flex-end; }
.cestino-actions { display: flex; gap: .5rem; margin-top: .5rem; width: 100%; }

/* ── Banner regolamento CC ────────────────────────────────── */
.banner-regolamento {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--gold-bg);
  border: 1px solid rgba(160,114,42,.35);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.banner-body { flex: 1; font-size: .9rem; color: var(--text2); line-height: 1.4; }
.banner-body strong { color: var(--text); }

/* ── Periodo bar ──────────────────────────────────────────── */
.periodo-bar { padding: .75rem; }
.periodo-form { display: flex; flex-direction: column; gap: .5rem; }
.periodo-tabs { display: flex; gap: .4rem; }
.tab-btn {
  flex: 1;
  padding: .5rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: .9rem;
  cursor: pointer;
}
.tab-btn.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }
.custom-range { display: flex; align-items: center; gap: .4rem; }
.custom-range input { flex: 1; }
.custom-range span { color: var(--text3); }
.periodo-label { font-size: .85rem; color: var(--text3); text-align: center; margin-top: .4rem; }
.hidden { display: none !important; }

/* ── Filtri ───────────────────────────────────────────────── */
.filtri-card { padding: .85rem; }
.filtri-form { display: flex; flex-direction: column; gap: .4rem; }
.filtri-row { display: flex; gap: .4rem; }
.filtri-row select, .filtri-row input { flex: 1; }

/* ── Totali bar ───────────────────────────────────────────── */
.totali-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  padding: .5rem 0;
  margin-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.tot-entrata { color: var(--green); font-weight: 600; }
.tot-uscita  { color: var(--red);   font-weight: 600; }
.tot-sep     { color: var(--text3); }
.tot-count   { color: var(--text3); margin-left: auto; }

/* ── Paginazione ──────────────────────────────────────────── */
.paginazione { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.pag-btn {
  padding: .4rem .75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: .85rem;
  text-decoration: none;
}
.pag-btn.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }

/* ── Categorie ────────────────────────────────────────────── */
.cat-accordion {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  overflow: hidden;
}
.cat-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1rem;
  user-select: none;
}
.cat-header:active { background: var(--bg3); }
.cat-nome  { flex: 1; font-weight: 600; cursor: pointer; }
.cat-count { cursor: pointer; }
.cat-count { font-size: .8rem; color: var(--text3); }
.cat-arrow { color: var(--text3); font-size: .8rem; transition: transform .2s; }
.cat-body  { padding: 0 1rem 1rem; }
.sub-item  { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.sub-nome  { font-size: .9rem; color: var(--text2); flex: 1; }
.sub-varie { color: var(--text3); font-style: italic; }
.sub-actions { display: flex; align-items: center; gap: .2rem; flex-shrink: 0; }
.sub-add   { display: flex; gap: .4rem; margin-top: .75rem; }
.rinomina-form { padding: .4rem 0 .4rem; border-bottom: 1px solid var(--gold-bg); }
.form-inline { display: flex; gap: .4rem; align-items: center; }

/* ── Utenti ───────────────────────────────────────────────── */
.utente-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.utente-inattivo { opacity: .5; }
.utente-info { flex: 1; min-width: 0; }
.utente-nome { font-weight: 600; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.utente-email { font-size: .85rem; color: var(--text2); margin-top: .15rem; }
.utente-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge-admin   { background: var(--gold-bg); color: var(--gold); font-size: .7rem; padding: .15rem .4rem; border-radius: 4px; font-weight: 600; }
.badge-inattivo { background: var(--red-bg);  color: var(--red);  font-size: .7rem; padding: .15rem .4rem; border-radius: 4px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
}
.modal-box h3 { margin-bottom: .75rem; color: var(--gold); }
.modal-box p  { color: var(--text2); font-size: .9rem; margin-bottom: .75rem; }

/* ── Setup wizard ─────────────────────────────────────────── */
.setup-title { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin-bottom: .5rem; }
.setup-desc  { font-size: .9rem; color: var(--text2); margin-bottom: 1.25rem; }
.setup-step  { margin-bottom: 1.5rem; }

/* ── Tx form ──────────────────────────────────────────────── */
.tx-form { display: flex; flex-direction: column; gap: 1rem; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-msg { text-align: center; color: var(--text3); padding: 2rem 0; }
.empty-msg a { color: var(--gold); }

/* ── Responsive ───────────────────────────────────────────── */
@media (min-width: 480px) {
  .riepilogo-grid { grid-template-columns: repeat(3,1fr); }
  .saldi-grid { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 600px) {
  .main-content { padding: 1.5rem; }
  .auth-container { padding: 2.5rem; }
}

/* ── Flatpickr — tema chiaro caldo ────────────────────────── */
.flatpickr-calendar {
  background: #faf7f3 !important;
  border: 1px solid #d8d0c5 !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(100,80,50,.15) !important;
  font-family: var(--font) !important;
  width: 320px !important;
}
.flatpickr-months {
  background: #f2ede6 !important;
  border-radius: 14px 14px 0 0 !important;
  padding: .25rem 0 !important;
}
.flatpickr-month { color: #1c1814 !important; fill: #1c1814 !important; }
.flatpickr-current-month { font-size: 1rem !important; font-weight: 600 !important; color: #1c1814 !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #f2ede6 !important;
  color: #a0722a !important;
  font-weight: 700 !important;
  font-size: .95rem !important;
  border: none !important;
  cursor: pointer !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: #faf7f3 !important;
  color: #1c1814 !important;
}
.flatpickr-current-month input.cur-year {
  color: #a0722a !important;
  font-weight: 700 !important;
  font-size: .95rem !important;
}
.flatpickr-prev-month, .flatpickr-next-month {
  fill: #9e8f80 !important;
  padding: 8px 12px !important;
}
.flatpickr-prev-month:hover, .flatpickr-next-month:hover { fill: #a0722a !important; }
.flatpickr-weekdays { background: #f2ede6 !important; }
.flatpickr-weekday { color: #9e8f80 !important; font-size: .8rem !important; font-weight: 600 !important; }
.flatpickr-day {
  color: #1c1814 !important;
  border-radius: 8px !important;
  font-size: .95rem !important;
  height: 40px !important;
  line-height: 40px !important;
  max-width: 40px !important;
}
.flatpickr-day:hover { background: #ece7df !important; border-color: #ece7df !important; }
.flatpickr-day.today {
  border-color: #a0722a !important;
  color: #a0722a !important;
  font-weight: 700 !important;
}
.flatpickr-day.today:hover { background: rgba(160,114,42,.12) !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover {
  background: #a0722a !important;
  border-color: #a0722a !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.flatpickr-day.flatpickr-disabled, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay {
  color: #c8bfb5 !important;
}
/* Input date stile integrato */
.input-data {
  cursor: pointer !important;
  caret-color: transparent !important;
}
.input-data:focus { border-color: var(--gold) !important; }
