:root{
  --bg-main:#1c1f24;
  --card-bg:#ffffff;
  --text-main:#111827;
  --text-muted:#6b7280;
  --accent:#0d6efd;
}

body{
  background:var(--bg-main)!important;
  margin:0;
}

/* Navbar */
.navbar{
  background:#0b0b0f!important;
}

/* Logo piccolo navbar */
.brand-logo{
  height: 26px;
  width: auto;
  border-radius: 6px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

/* Hero logo */
.hero-logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 10px 0 4px 0;
  margin: 0;
}
.hero-logo{
  width: min(680px, 90vw);
  height: auto;
  opacity: 0.98;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.40));
}

/* Variante dashboard */
.hero-logo-wrap--dashboard{
  padding: 12px 0 2px 0;
}
.hero-logo--dashboard{
  width: min(640px, 88vw);
}

main.container{
  padding-top: 10px !important;
}

/* Card */
.card{
  background:var(--card-bg)!important;
  color:var(--text-main)!important;
  border-radius:18px;
}

/* KPI per locale */
.kpi-row{ margin-bottom: 2px; }

.kpi-loc-card{
  border-radius: 18px;
}

.kpi-loc-card .card-body{
  padding: 14px 16px;
}

.kpi-loc-title{
  font-weight: 800;
  font-size: 16px;
  color: var(--text-main);
}

.kpi-loc-saldo{
  font-size: 14px;
  color: #374151;
}

.kpi-loc-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi-mini{
  background: #f5f6f8;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
}

.kpi-mini-label{
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-mini-value{
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
}

/* Testi */
.text-secondary,
.small{
  color:var(--text-muted)!important;
}

h1,h2,h3,h4,h5{
  color:#111827;
}

/* Input */
.form-control,
.form-select,
textarea{
  background:#f9fafb!important;
  color:#111827!important;
  border:1px solid #d1d5db!important;
}

.form-control::placeholder,
textarea::placeholder{
  color:#9ca3af!important;
}

/* Bottoni */
.btn-primary{
  background:var(--accent);
  border:none;
  border-radius:14px;
}

.btn-success,
.btn-danger,
.btn-outline-secondary,
.btn-outline-light,
.btn-warning{
  border-radius:14px;
}

/* Tabelle */
.table{
  background:#ffffff;
  color:#111827;
}

.table th{ color:#374151; }
.table td{ color:#111827; }

.table.table-dark{
  background:#ffffff !important;
  color:#111827 !important;
}
.table.table-dark th,
.table.table-dark td{
  color:#111827 !important;
}

/* Movimenti automatici: visivamente distinti e non modificabili */
.tx-automatic td{
  background:#f7f7f8 !important;
}

.pagination .page-link{
  color:#111827;
}

/* Miglioria 2: annullamenti e storico */
.tx-cancelled td{
  background:#fff8e6 !important;
  opacity:.86;
}
.tx-cancelled td:not(:last-child){
  text-decoration-color:#9ca3af;
}
.audit-entry{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 14px;
}
.audit-table th,
.audit-table td{
  font-size:13px;
  vertical-align:top;
}

/* Miglioria 3: Dashboard contabile e controllo sincronizzazione */
.dashboard-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
}
.dashboard-eyebrow{
  color:#9ca3af;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.dashboard-title,
.dashboard-section-title,
.dashboard-content-title{
  color:#f8fafc!important;
}
.dashboard-title{
  font-size:28px;
  font-weight:850;
}
.dashboard-subtitle,
.dashboard-content-subtitle{
  color:#aeb6c2!important;
}
.dashboard-section-title{
  font-size:18px;
  font-weight:800;
}
.dashboard-location-card{
  overflow:hidden;
}
.dashboard-location-name{
  color:#111827;
  font-size:19px;
  font-weight:850;
}
.dashboard-balance{
  min-width:150px;
  border-radius:14px;
  padding:9px 12px;
  text-align:right;
}
.dashboard-balance span{
  display:block;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.dashboard-balance strong{
  display:block;
  font-size:19px;
}
.dashboard-balance-positive{
  background:#ecfdf3;
  color:#166534;
}
.dashboard-balance-negative{
  background:#fff1f2;
  color:#b42318;
}
.dashboard-total-grid,
.sync-compare-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.dashboard-total-box{
  background:#f5f6f8;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:11px 13px;
}
.dashboard-total-box span,
.sync-compare-box span{
  display:block;
  color:#6b7280;
  font-size:12px;
}
.dashboard-total-box strong,
.sync-compare-box strong{
  display:block;
  color:#111827;
  font-size:20px;
  line-height:1.2;
  margin-top:2px;
}
.dashboard-origin-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.dashboard-origin-box{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 13px;
  background:#ffffff;
}
.dashboard-origin-auto{
  background:#f8fafc;
}
.dashboard-origin-title{
  color:#374151;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:7px;
}
.dashboard-origin-line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:3px 0;
  font-size:13px;
  color:#6b7280;
}
.dashboard-origin-line strong{
  color:#111827;
}
.dashboard-origin-saldo{
  border-top:1px solid #e5e7eb;
  margin-top:5px;
  padding-top:7px;
}
.sync-card{
  border-left:5px solid transparent!important;
}
.sync-card-ok{
  border-left-color:#16a34a!important;
}
.sync-card-warning{
  border-left-color:#dc2626!important;
}
.sync-title{
  color:#111827;
  font-size:17px;
  font-weight:850;
}
.sync-last{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:13px;
  padding:8px 12px;
  text-align:right;
}
.sync-last span{
  display:block;
  color:#6b7280;
  font-size:11px;
}
.sync-last strong{
  color:#111827;
  font-size:16px;
}
.sync-compare-box{
  background:#f5f6f8;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 13px;
}
.sync-compare-box small{
  display:block;
  color:#6b7280;
  margin-top:5px;
}
.sync-latest-detail{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 13px;
}
.sync-latest-title{
  color:#374151;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:6px;
}
.sync-detail-line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#6b7280;
  padding:3px 0;
  font-size:13px;
}
.sync-detail-line strong{
  color:#111827;
}
.sync-detail-time{
  border-top:1px solid #e5e7eb;
  margin-top:6px;
  padding-top:7px;
  color:#6b7280;
  font-size:11px;
}
.dashboard-logo-compact{
  padding-top:4px;
}
.dashboard-logo-compact .hero-logo--dashboard{
  width:min(390px,72vw);
}

@media (max-width: 767.98px){
  .dashboard-title{font-size:24px;}
  .dashboard-total-grid,
  .dashboard-origin-grid,
  .sync-compare-grid{grid-template-columns:1fr;}
  .dashboard-balance{width:100%; text-align:left;}
  .sync-last{width:100%; text-align:left;}
}

/* Miglioria 4: completezza chiusure e dettaglio giornaliero */
.sync-detail-button{
  min-height:46px;
  display:flex;
  align-items:center;
  white-space:nowrap;
}
.closing-kpi{
  height:100%;
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-left:5px solid #64748b;
  border-radius:15px;
  padding:14px 16px;
  box-shadow:0 4px 14px rgba(15,23,42,.05);
}
.closing-kpi span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.closing-kpi strong{
  display:block;
  color:#111827;
  font-size:24px;
  line-height:1.2;
  margin:4px 0 3px;
}
.closing-kpi small{
  display:block;
  color:#64748b;
}
.closing-kpi-ok{border-left-color:#16a34a;}
.closing-kpi-warning{border-left-color:#f59e0b;}
.closing-kpi-danger{border-left-color:#dc2626;}
.closing-kpi .closing-kpi-period{
  font-size:17px;
  padding-top:4px;
}
.closing-table-header h2{color:#111827; font-weight:800;}
.closing-table thead th{
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.035em;
  white-space:nowrap;
  border-bottom:1px solid #e5e7eb;
}
.closing-table td{
  color:#111827;
  vertical-align:middle;
}
.closing-row-missing td{
  background:#fff1f2!important;
}
.closing-row-mismatch td{
  background:#fffbeb!important;
}
.closing-id{
  color:#94a3b8;
  font-size:10px;
  font-weight:400;
  margin-top:2px;
  max-width:230px;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (max-width: 767.98px){
  .sync-detail-button{width:100%; justify-content:center;}
  .closing-kpi strong{font-size:21px;}
}

/* Miglioria 4.1: calendario giorni chiusi Millionaire City */
.closing-row-closed td{
  background:#eff6ff!important;
}
.closed-days-list{
  display:grid;
  gap:8px;
}
.closed-day-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:12px;
  padding:9px 11px;
}
.closed-day-chip strong{
  color:#1e3a8a;
  margin-right:8px;
}
.closed-day-chip span{
  color:#475569;
  font-size:13px;
}
@media (max-width: 575.98px){
  .closed-day-chip{align-items:flex-start; flex-direction:column;}
}

/* Miglioria 5: nuovo inserimento movimenti, rapido e guidato */
.newtx-launch{
  font-weight:800;
  box-shadow:0 8px 18px rgba(13,110,253,.18);
}
.newtx-page{padding-bottom:38px;}
.newtx-eyebrow{
  color:#93c5fd;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.09em;
}
.newtx-title{color:#f8fafc!important; font-size:30px; font-weight:900;}
.newtx-subtitle{color:#aeb6c2;}
.newtx-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:18px;
  align-items:start;
}
.newtx-main{display:grid; gap:14px;}
.newtx-section{border-radius:18px; overflow:hidden;}
.newtx-step-label{
  display:flex;
  align-items:center;
  gap:10px;
  color:#111827;
  font-weight:850;
  font-size:17px;
  margin-bottom:16px;
}
.newtx-step-label span{
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#111827;
  color:#fff;
  font-size:14px;
}
.newtx-choice-grid{display:grid; gap:12px;}
.newtx-location-grid,.newtx-type-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.newtx-choice{
  appearance:none;
  width:100%;
  border:2px solid #e5e7eb;
  background:#fff;
  color:#111827;
  border-radius:16px;
  padding:16px;
  display:flex;
  gap:12px;
  align-items:center;
  text-align:left;
  transition:.15s ease;
}
.newtx-choice:hover{border-color:#93c5fd; transform:translateY(-1px);}
.newtx-choice.is-selected{border-color:#0d6efd; background:#eff6ff; box-shadow:0 0 0 3px rgba(13,110,253,.08);}
.newtx-choice-income.is-selected{border-color:#16a34a; background:#ecfdf3; box-shadow:0 0 0 3px rgba(22,163,74,.08);}
.newtx-choice-expense.is-selected{border-color:#dc2626; background:#fff1f2; box-shadow:0 0 0 3px rgba(220,38,38,.07);}
.newtx-choice-icon{font-size:26px; line-height:1;}
.newtx-choice strong{display:block; font-size:17px;}
.newtx-choice small{display:block; color:#6b7280; margin-top:2px;}
.newtx-empty-state{
  border:1px dashed #cbd5e1;
  background:#f8fafc;
  border-radius:14px;
  padding:18px;
  color:#64748b;
}
.newtx-section-caption{
  color:#64748b;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:8px;
}
.newtx-quick-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px;}
.newtx-quick-category{
  border:1px solid #dbe3ee;
  background:#f8fafc;
  border-radius:13px;
  padding:11px 12px;
  text-align:left;
  color:#111827;
  min-height:66px;
}
.newtx-quick-category:hover{border-color:#93c5fd; background:#eff6ff;}
.newtx-quick-category.is-selected{border-color:#0d6efd; background:#dbeafe; box-shadow:inset 0 0 0 1px #0d6efd;}
.newtx-quick-category strong{display:block; font-size:14px; line-height:1.2;}
.newtx-quick-category small{display:block; color:#64748b; font-size:11px; margin-top:4px;}
.newtx-amount-wrap{position:relative;}
.newtx-amount-wrap>span{
  position:absolute;
  left:17px;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  color:#475569;
  font-size:26px;
  font-weight:800;
}
.newtx-amount-input{
  height:66px;
  padding-left:52px!important;
  font-size:31px!important;
  font-weight:850;
  letter-spacing:.01em;
}
.newtx-split-options{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;}
.newtx-radio-card{
  border:2px solid #e5e7eb;
  border-radius:14px;
  padding:13px 14px;
  display:flex;
  gap:10px;
  cursor:pointer;
  color:#111827;
}
.newtx-radio-card.is-selected{border-color:#0d6efd; background:#eff6ff;}
.newtx-radio-card input{margin-top:4px;}
.newtx-radio-card strong,.newtx-radio-card small{display:block;}
.newtx-radio-card small{color:#64748b; margin-top:2px;}
.newtx-split-preview{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:13px;
}
.newtx-details summary{cursor:pointer; font-weight:750; color:#111827;}
.newtx-aside{position:sticky; top:16px;}
.newtx-summary-card{border-radius:18px; overflow:hidden;}
.newtx-summary-title{color:#64748b; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em;}
.newtx-summary-type{margin-top:10px; font-size:13px; font-weight:900; color:#64748b;}
.newtx-summary-type.is-income{color:#15803d;}
.newtx-summary-type.is-expense{color:#b91c1c;}
.newtx-summary-amount{font-size:36px; line-height:1.15; font-weight:900; color:#111827; margin:3px 0 18px;}
.newtx-summary-list{border-top:1px solid #e5e7eb; border-bottom:1px solid #e5e7eb; margin-bottom:16px;}
.newtx-summary-list>div{display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid #f1f5f9;}
.newtx-summary-list>div:last-child{border-bottom:0;}
.newtx-summary-list span{color:#64748b; font-size:13px;}
.newtx-summary-list strong{color:#111827; font-size:13px; text-align:right;}
.newtx-submit{font-weight:850; min-height:52px;}
.newtx-safe-note{color:#64748b; font-size:11px; line-height:1.35; margin-top:10px; text-align:center;}
.newtx-confirm-modal{border:0; border-radius:18px; overflow:hidden;}
.newtx-confirm-box{background:#f8fafc; border:1px solid #e5e7eb; border-radius:15px; padding:18px; text-align:center; color:#111827;}
.newtx-confirm-type{font-size:12px; font-weight:900; color:#64748b;}
.newtx-confirm-type.is-income{color:#15803d;}
.newtx-confirm-type.is-expense{color:#b91c1c;}
.newtx-confirm-amount{font-size:37px; font-weight:900; line-height:1.2; margin:3px 0 10px;}
.newtx-confirm-split{margin-top:12px; padding:9px 10px; border-radius:10px; background:#dbeafe; color:#1e3a8a; font-size:13px; font-weight:650;}

@media (max-width: 991.98px){
  .newtx-layout{grid-template-columns:1fr;}
  .newtx-aside{position:static;}
  .newtx-summary-card{border:2px solid #bfdbfe!important;}
}
@media (max-width: 767.98px){
  .newtx-location-grid,.newtx-type-grid,.newtx-split-options{grid-template-columns:1fr;}
  .newtx-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .newtx-title{font-size:25px;}
}
@media (max-width: 479.98px){
  .newtx-quick-grid{grid-template-columns:1fr;}
}

/* Miglioria 5.1: lista movimenti compatta + protezioni inserimento manuale */
.txlist-eyebrow{
  color:#93c5fd;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.txlist-toolbar{border-radius:18px; overflow:hidden;}
.txlist-search-row{display:flex; gap:10px; align-items:stretch;}
.txlist-search-wrap{position:relative; flex:1; min-width:240px;}
.txlist-search-wrap .form-control{padding-left:46px;}
.txlist-search-icon{
  position:absolute; left:16px; top:50%; transform:translateY(-50%);
  font-size:24px; color:#64748b; z-index:2;
}
.txlist-filter-grid{display:grid; grid-template-columns:1fr 1fr 1.35fr; gap:16px;}
.txlist-filter-label{
  color:#64748b; font-size:11px; font-weight:850;
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px;
}
.txlist-pills{display:flex; flex-wrap:wrap; gap:7px;}
.txlist-pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:7px 11px; border:1px solid #d7dee8; border-radius:999px;
  color:#334155; background:#fff; text-decoration:none; font-size:13px; font-weight:700;
}
.txlist-pill:hover{background:#f8fafc; color:#0f172a; border-color:#a8b3c2;}
.txlist-pill.is-active{background:#111827; color:#fff; border-color:#111827;}
.txlist-pill-income.is-active{background:#15803d; border-color:#15803d;}
.txlist-pill-expense.is-active{background:#b91c1c; border-color:#b91c1c;}
.txlist-pill-warning.is-active{background:#a16207; border-color:#a16207;}
.txlist-advanced{border-top:1px solid #e5e7eb; padding-top:11px;}
.txlist-advanced summary{cursor:pointer; color:#334155; font-weight:750;}
.txlist-kpis{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px;}
.txlist-kpi{
  background:#fff; border:1px solid rgba(15,23,42,.06); border-radius:16px;
  padding:14px 16px; box-shadow:0 6px 18px rgba(15,23,42,.05);
}
.txlist-kpi span{display:block; color:#64748b; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em;}
.txlist-kpi strong{display:block; color:#111827; font-size:22px; line-height:1.2; margin-top:4px;}
.txlist-kpi small{display:block; color:#94a3b8; margin-top:3px;}
.txlist-kpi-income strong{color:#15803d;}
.txlist-kpi-expense strong{color:#b91c1c;}
.txlist-card{border-radius:18px; overflow:hidden;}
.txlist-table thead th{
  background:#f8fafc; color:#64748b; border-bottom:1px solid #e5e7eb;
  font-size:11px; text-transform:uppercase; letter-spacing:.045em; white-space:nowrap;
}
.txlist-main-row{cursor:default;}
.txlist-main-row .txlist-toggle{cursor:pointer;}
.txlist-main-row:hover td{background:#f8fafc;}
.txlist-main-row.is-automatic td{background:#fbfcfe;}
.txlist-main-row.is-cancelled td{background:#fffaf0; opacity:.9;}
.txlist-category{color:#111827;}
.txlist-inline-detail{display:block; max-width:420px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.txlist-status{
  display:inline-flex; align-items:center; border-radius:999px; padding:5px 8px;
  font-size:11px; font-weight:850; line-height:1; white-space:nowrap;
}
.txlist-status.is-manual{background:#eef2f7; color:#334155;}
.txlist-status.is-automatic{background:#e0f2fe; color:#075985;}
.txlist-status.is-modified{background:#fef3c7; color:#92400e;}
.txlist-status.is-cancelled{background:#fee2e2; color:#991b1b;}
.txlist-amount{font-size:17px; white-space:nowrap;}
.txlist-amount.is-income{color:#15803d;}
.txlist-amount.is-expense{color:#b91c1c;}
.txlist-detail-row td{background:#f8fafc!important; padding:0!important; border-top:0;}
.txlist-detail-panel{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px;
  padding:14px 18px 17px; border-top:1px dashed #dbe3ee;
}
.txlist-detail-panel>div{min-width:0;}
.txlist-detail-panel span{display:block; color:#94a3b8; font-size:10px; text-transform:uppercase; font-weight:800; letter-spacing:.04em;}
.txlist-detail-panel strong{display:block; color:#334155; font-size:13px; overflow-wrap:anywhere; margin-top:2px;}
.txlist-detail-actions{display:flex; flex-wrap:wrap; gap:7px; align-items:end; grid-column:1/-1;}
.newtx-emergency-label{color:#b45309!important; font-weight:800;}
.newtx-emergency-hint{
  margin-top:10px; padding:11px 12px; border:1px solid #f59e0b;
  border-radius:12px; background:#fffbeb; color:#92400e; font-size:13px; line-height:1.4;
}
.newtx-confirm-emergency{
  margin-top:12px; padding:11px 12px; border-radius:11px;
  background:#fff7ed; border:1px solid #fdba74; color:#9a3412;
  font-size:13px; line-height:1.4;
}
@media (max-width: 991.98px){
  .txlist-filter-grid{grid-template-columns:1fr;}
  .txlist-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .txlist-detail-panel{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 767.98px){
  .txlist-search-row{flex-wrap:wrap;}
  .txlist-search-wrap{flex-basis:100%;}
  .txlist-table thead th:nth-child(3), .txlist-table tbody td:nth-child(3){display:none;}
  .txlist-kpis{grid-template-columns:1fr 1fr;}
}
@media (max-width: 575.98px){
  .txlist-kpis{grid-template-columns:1fr;}
  .txlist-detail-panel{grid-template-columns:1fr;}
  .txlist-table thead th:first-child, .txlist-table tbody tr.txlist-main-row td:first-child{min-width:115px;}
  .txlist-amount{font-size:15px;}
}

/* Miglioria 5.2: report moderno + stampa/PDF */
.report-page{padding-top:4px;padding-bottom:24px;}
.report-eyebrow{color:#93c5fd;font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;}
.report-title{color:#f8fafc;font-weight:900;font-size:30px;}
.report-subtitle{color:#94a3b8;font-size:14px;}
.report-filter-card,.report-break-card,.report-detail-card{border:0;border-radius:18px;overflow:hidden;box-shadow:0 6px 18px rgba(15,23,42,.06);}
.report-filter-grid{display:grid;grid-template-columns:1fr 1fr 1.15fr 1.35fr auto;gap:12px;align-items:end;}
.report-filter-submit{min-width:160px;}
.report-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.report-kpi{background:#fff;border-radius:17px;padding:16px 18px;box-shadow:0 6px 18px rgba(15,23,42,.05);border:1px solid rgba(15,23,42,.06);}
.report-kpi span{display:block;color:#64748b;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.045em;}
.report-kpi strong{display:block;color:#111827;font-size:22px;line-height:1.2;margin-top:5px;}
.report-kpi small{display:block;color:#94a3b8;margin-top:4px;}
.report-kpi-income strong{color:#15803d;}
.report-kpi-expense strong{color:#b91c1c;}
.report-breakdown{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.report-break-title{font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.045em;margin-bottom:8px;}
.report-break-title.income{color:#15803d;}.report-break-title.expense{color:#b91c1c;}
.report-break-list>div{display:flex;justify-content:space-between;gap:18px;padding:9px 0;border-bottom:1px solid #eef2f7;}
.report-break-list>div:last-child{border-bottom:0;}
.report-break-list span{color:#475569;}.report-break-list strong{white-space:nowrap;}
.report-break-list .report-break-total{border-top:2px solid #e5e7eb;border-bottom:0;margin-top:3px;padding-top:12px;font-weight:850;}
.report-empty{color:#94a3b8;padding:14px 0;}
.report-detail-head{border-bottom:1px solid #e5e7eb;}
.report-table thead th{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.045em;border-bottom:1px solid #e5e7eb;white-space:nowrap;}
.report-table tbody td{padding-top:12px;padding-bottom:12px;}
.report-table tbody tr:hover td{background:#fbfdff;}
.report-origin{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:850;white-space:nowrap;}
.report-origin.manual{background:#eef2f7;color:#334155;}.report-origin.automatic{background:#e0f2fe;color:#075985;}
.report-amount{font-size:16px;white-space:nowrap;}.report-amount.income{color:#15803d;}.report-amount.expense{color:#b91c1c;}
.report-note{color:#64748b;max-width:520px;}
.print-only{display:none;}
.report-print-footer{margin-top:18px;text-align:center;color:#64748b;font-size:10px;}

@media (max-width: 991.98px){
  .report-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .report-filter-submit{min-width:0;}
  .report-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .report-breakdown{grid-template-columns:1fr;}
}
@media (max-width: 575.98px){
  .report-filter-grid{grid-template-columns:1fr;}
  .report-kpis{grid-template-columns:1fr 1fr;}
  .report-kpi{padding:13px;}.report-kpi strong{font-size:18px;}
  .report-title{font-size:25px;}
}

@media print{
  @page{size:A4;margin:12mm 10mm;}
  body{background:#fff!important;color:#111!important;font-size:10.5pt;}
  nav,.hero-logo-wrap,.no-print{display:none!important;}
  main.container{max-width:none!important;width:100%!important;padding:0!important;margin:0!important;}
  .print-only{display:block!important;}
  .report-page{padding:0!important;}
  .report-page-head{margin-bottom:8mm!important;}
  .report-eyebrow{color:#555!important;}.report-title{color:#111!important;font-size:22pt!important;}.report-subtitle{color:#555!important;}
  .report-kpis{grid-template-columns:repeat(4,1fr)!important;gap:5mm!important;margin-bottom:6mm!important;}
  .report-kpi{box-shadow:none!important;border:1px solid #d9d9d9!important;padding:4mm!important;break-inside:avoid;}
  .report-kpi strong{font-size:14pt!important;}
  .report-breakdown{grid-template-columns:1fr 1fr!important;gap:5mm!important;break-inside:avoid;}
  .report-break-card,.report-detail-card{box-shadow:none!important;border:1px solid #d9d9d9!important;}
  .report-table{font-size:9pt!important;}
  .report-table thead{display:table-header-group;}
  .report-table tr{break-inside:avoid;}
  .report-table thead th{background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .report-origin{border:1px solid #bbb;background:#fff!important;color:#222!important;}
  .report-amount.income{color:#111!important;}.report-amount.expense{color:#111!important;}
}


/* =========================================================
   ZEROCINQUE BRANDING 6
   Brand identity integrated into the UI (no "pasted photo")
   ========================================================= */
.brand-logo{
  width:32px;
  height:32px;
  object-fit:contain;
  border-radius:9px;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.35));
}
.brand-nav-name{
  font-size:18px;
  letter-spacing:.02em;
  line-height:1;
}
.brand-zero{color:#f8fafc;}
.brand-cinque{color:#d7a83e;}

.app-brand-hero{
  min-height:300px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:34px 20px 20px;
  text-align:center;
  background:
    radial-gradient(circle at 50% 40%, rgba(17,46,82,.28), transparent 42%);
}
.app-brand-hero-icon{
  width:142px;
  height:142px;
  object-fit:contain;
  filter:drop-shadow(0 14px 30px rgba(0,0,0,.42));
}
.app-brand-wordmark{
  font-size:44px;
  line-height:1;
  font-weight:800;
  letter-spacing:.14em;
  margin-left:.14em;
}
.app-brand-tagline{
  color:#d7a83e;
  font-size:12px;
  font-weight:700;
  letter-spacing:.23em;
  margin-left:.23em;
}

.dashboard-brand-divider{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  width:max-content;
  max-width:92%;
  margin:36px auto 48px;
  padding:12px 22px;
  border:1px solid rgba(215,168,62,.18);
  border-radius:22px;
  background:rgba(9,18,31,.28);
  box-shadow:0 12px 32px rgba(0,0,0,.12);
}
.dashboard-brand-icon{
  width:76px;
  height:76px;
  object-fit:contain;
}
.dashboard-brand-name{
  font-size:30px;
  line-height:1;
  font-weight:800;
  letter-spacing:.11em;
  margin-left:.11em;
}
.dashboard-brand-subtitle{
  margin-top:7px;
  color:#d7a83e;
  font-size:10px;
  font-weight:700;
  letter-spacing:.17em;
}

@media (max-width: 576px){
  .app-brand-hero{
    min-height:230px;
    padding-top:24px;
  }
  .app-brand-hero-icon{
    width:104px;
    height:104px;
  }
  .app-brand-wordmark{
    font-size:30px;
    letter-spacing:.10em;
    margin-left:.10em;
  }
  .app-brand-tagline{
    font-size:9px;
    letter-spacing:.13em;
    margin-left:.13em;
  }
  .dashboard-brand-divider{
    margin:24px auto 32px;
    padding:10px 15px;
    gap:11px;
  }
  .dashboard-brand-icon{
    width:58px;
    height:58px;
  }
  .dashboard-brand-name{
    font-size:22px;
  }
  .dashboard-brand-subtitle{
    font-size:8px;
  }
}


/* =========================================================
   FIX 6.1 - RETTIFICHE CON IMPORTO NEGATIVO
   ========================================================= */
.newtx-negative-hint,
.newtx-confirm-negative{
  margin-top:10px;
  padding:11px 13px;
  border:1px solid #f59e0b;
  border-radius:12px;
  background:#fff7ed;
  color:#92400e;
  font-size:.88rem;
  line-height:1.35;
}
.newtx-summary-amount.is-negative-adjustment{
  color:#b91c1c;
}
