/* Viste Previsione, Scadenze e Documenti. */

/* Accesso e onboarding Account. */
body.auth-pending .desktop,
body.auth-pending .mobile-wrap,
body.auth-pending .modal,
body.auth-required .desktop,
body.auth-required .mobile-wrap,
body.auth-required .modal { display: none !important; }

#auth-root { display: none; }
body.auth-required #auth-root { display: block; }
body.auth-required { overflow: hidden; }
body.auth-required #auth-root { height: 100dvh; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.18fr);
  height: 100dvh;
  min-height: 100dvh;
  background: #faf9f6;
}

.auth-art {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(145deg, #dbe9d2, #bfd7b5);
}

.auth-art::before,
.auth-art::after { position: absolute; border-radius: 999px; content: ''; }
.auth-art::before { width: 65%; height: 25%; top: 12%; left: -18%; border: 22px solid #ffffff70; }
.auth-art::after { width: 50px; height: 50px; top: 26%; right: 20%; background: #fac54c; box-shadow: 86px 82px 0 -11px #9fc796; }
.auth-illustration-stage {
  position: absolute;
  z-index: 2;
  bottom: -8px;
  left: 50%;
  width: min(94%, 560px);
  aspect-ratio: 500 / 475;
  transform: translateX(-55%);
  transform-origin: center bottom;
  transition: transform 360ms cubic-bezier(.22, 1, .36, 1);
}
.auth-shell[data-auth-mode="register"] .auth-illustration-stage { transform: translateX(-55%) scale(.94); }
.auth-illustration { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.auth-art-sun,
.auth-art-arc { position: absolute; display: block; border-radius: 999px 999px 0 0; }
.auth-art-sun { right: -12%; bottom: -5%; width: 60%; height: 27%; background: #f6df8d; }
.auth-art-arc { left: 15%; bottom: 10%; width: 48%; height: 19%; background: #96c78d; }

.auth-panel {
  min-width: 0;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.auth-card {
  box-sizing: border-box;
  width: min(100%, 620px);
  min-height: 100%;
  margin: auto;
  padding: clamp(28px, 5vh, 56px) clamp(28px, 6vw, 78px);
}

.auth-shell:not(.auth-registration-shell) .auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-registration-card { width: min(100%, 960px); }
.auth-logo { display: block; width: 142px; height: 58px; object-fit: contain; object-position: left center; }
.auth-eyebrow { margin: 30px 0 10px; color: #78956f; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.auth-card h1 { margin: 0; color: var(--ink); font-size: clamp(30px, 4vw, 43px); letter-spacing: -1.5px; line-height: 1.04; }
.auth-card h1:focus { outline: none; }
.auth-card h1:focus-visible { outline: 3px solid #3e6b3e33; outline-offset: 5px; }
.auth-intro { max-width: 460px; margin: 12px 0 22px; color: #747d70; line-height: 1.5; }

.auth-field { display: grid; gap: 8px; margin: 14px 0; color: #465044; font-size: 13px; font-weight: 800; }
.auth-field input,
.auth-field select { box-sizing: border-box; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #d9e2d4; border-radius: 14px; outline: 0; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; }
.auth-field input:focus,
.auth-field select:focus { border-color: var(--green); box-shadow: 0 0 0 4px #3e6b3e1a; }
.auth-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.auth-optional { color: #899487; font-size: 11px; font-weight: 600; }
.auth-checkbox { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0; color: #63705f; font-size: 12px; font-weight: 650; line-height: 1.4; }
.auth-checkbox input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--green); }
.auth-checkbox input:focus-visible { outline: 3px solid #3e6b3e33; outline-offset: 2px; }
.auth-subtitle { margin: 19px 0 -2px; color: #53604e; font-size: 14px; letter-spacing: -.2px; }
.auth-field-help { display: block; margin: -7px 0 12px; color: #859080; font-size: 11px; font-weight: 600; }

.auth-password-control { position: relative; display: block; }
.auth-password-control input { padding-right: 52px; }
.auth-password-toggle { position: absolute; top: 50%; right: 4px; display: grid; width: 42px; height: 42px; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: 11px; background: transparent; color: #71816d; }
.auth-password-toggle:hover { background: #edf3e9; color: var(--green); }
.auth-password-toggle:focus-visible { outline: 3px solid #3e6b3e33; outline-offset: 1px; }
.auth-password-toggle .ui-icon { width: 19px; height: 19px; }
.auth-password-feedback { margin: -7px 0 12px; padding: 11px 12px; border: 1px solid #e2eadc; border-radius: 13px; background: #f7faf5; }
.auth-password-status { margin: 0; color: #5e6d59; font-size: 12px; font-weight: 800; line-height: 1.35; }
.auth-password-rules { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; color: #7d8978; font-size: 11px; font-weight: 600; list-style: none; }
.auth-password-rules li { display: flex; align-items: center; gap: 7px; }
.auth-password-rules li::before { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #b5c1b1; content: ''; }
.auth-password-rules li[data-state="met"] { color: #3e6b3e; }
.auth-password-rules li[data-state="met"]::before { background: #3e6b3e; }
.auth-password-rules li[data-state="advised"] { color: #8a7441; }
.auth-password-rules li[data-state="advised"]::before { background: #c5a85c; }
.auth-password-rules li[data-state="missing"],
.auth-password-rules li[data-state="invalid"] { color: #a84e40; }
.auth-password-rules li[data-state="missing"]::before,
.auth-password-rules li[data-state="invalid"]::before { background: #c96c5e; }

.auth-primary,
.auth-secondary,
.auth-back,
.auth-text-button { font: inherit; font-weight: 800; }
.auth-primary { display: inline-flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; border: 0; border-radius: 15px; background: var(--green); color: #fff; box-shadow: 0 8px 20px #3e6b3e32; }
.auth-primary:disabled { cursor: progress; opacity: .65; }
.auth-switch { margin: 18px 0 0; color: #737d70; font-size: 13px; text-align: center; }
.auth-text-button,
.auth-back { padding: 0; border: 0; background: transparent; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.auth-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff0ee; color: #a94436; font-size: 12px; font-weight: 700; line-height: 1.4; }

.auth-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-topline .auth-logo { flex: 0 0 auto; }
.auth-back { font-size: 12px; text-align: right; }
.auth-steps { display: flex; gap: 12px; margin: 24px 0 20px; padding: 0; color: #9ba39a; font-size: 11px; font-weight: 800; list-style: none; }
.auth-steps li { display: flex; min-width: 0; align-items: center; gap: 6px; }
.auth-steps span { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #d7e1d1; border-radius: 50%; background: #fff; }
.auth-steps .is-active,
.auth-steps .is-complete { color: var(--green); }
.auth-steps .is-active span,
.auth-steps .is-complete span { border-color: var(--green); background: var(--green); color: #fff; }

.auth-ateco-results { display: grid; overflow: hidden; margin-top: -8px; border: 1px solid #dce6d7; border-radius: 14px; background: #fff; }
.auth-ateco-option { display: grid; gap: 3px; padding: 12px 14px; border: 0; border-bottom: 1px solid #edf1e9; background: #fff; color: var(--ink); text-align: left; }
.auth-ateco-option:last-child { border-bottom: 0; }
.auth-ateco-option:hover,
.auth-ateco-option:focus-visible { background: #f1f6ee; }
.auth-ateco-option strong { color: var(--green); font-size: 12px; }
.auth-ateco-option span,
.auth-selection,
.auth-note { color: #788273; font-size: 11px; line-height: 1.4; }
.auth-selection { margin: 9px 0 0; color: var(--green); font-weight: 800; }
.auth-note { margin: 14px 0; }
.auth-actions { display: grid; grid-template-columns: minmax(100px, .42fr) 1fr; gap: 12px; align-items: end; }
.auth-actions .auth-primary { margin-top: 0; }
.auth-secondary { min-height: 50px; border: 1px solid #d7e1d1; border-radius: 15px; background: #fff; color: var(--green); }
.auth-summary { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: 0 14px; margin: 20px 0; overflow: hidden; border: 1px solid #dfe8da; border-radius: 18px; background: #fff; }
.auth-summary dt,
.auth-summary dd { margin: 0; padding: 12px 14px; border-bottom: 1px solid #edf1e9; font-size: 12px; }
.auth-summary dt:nth-last-of-type(1),
.auth-summary dd:last-child { border-bottom: 0; }
.auth-summary dt { color: #758070; font-weight: 800; }
.auth-summary dd { min-width: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  body.auth-required { overflow-y: auto; }
  body.auth-required #auth-root { height: auto; min-height: 100dvh; }
  .auth-shell,
  .auth-registration-shell { display: flex; height: auto; min-height: 100dvh; flex-direction: column; }
  .auth-art {
    display: block;
    width: 100%;
    height: clamp(178px, 25svh, 224px);
    min-height: clamp(178px, 25svh, 224px);
    flex: 0 0 auto;
  }
  .auth-art::before { width: 72%; height: 34%; top: -7%; left: -27%; border-width: 14px; }
  .auth-art::after { width: 30px; height: 30px; top: 14%; right: 15%; box-shadow: 55px 51px 0 -7px #9fc796; }
  .auth-art-sun { right: -9%; bottom: -18%; width: 50%; height: 39%; }
  .auth-art-arc { left: 8%; bottom: -1%; width: 48%; height: 34%; }
  .auth-illustration-stage,
  .auth-shell[data-auth-mode="register"] .auth-illustration-stage {
    bottom: -5px;
    width: min(88vw, 300px);
    transform: translateX(-55%);
  }
  .auth-panel { height: auto; overflow: visible; scrollbar-gutter: auto; }
  .auth-card { min-height: 0; padding: 22px 24px 34px; }
  .auth-shell:not(.auth-registration-shell) .auth-card { display: block; min-height: 0; }
  .auth-registration-card { padding-top: 18px; }
  .auth-logo { width: 118px; height: 46px; }
  .auth-eyebrow { margin-top: 22px; }
  .auth-registration-card .auth-eyebrow { margin-top: 8px; }
  .auth-topline { align-items: flex-start; }
  .auth-field-grid { grid-template-columns: 1fr; gap: 0; }
  .auth-back { max-width: 145px; line-height: 1.3; }
  .auth-steps { justify-content: space-between; gap: 5px; font-size: 10px; }
  .auth-steps li { flex: 1 1 0; justify-content: center; gap: 4px; }
  .auth-steps li:not(.is-active) { font-size: 0; }
  .auth-steps li span { font-size: 10px; }
  .auth-actions { grid-template-columns: 1fr; }
  .auth-actions .auth-secondary { grid-row: 2; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .auth-card { padding-top: 22px; padding-bottom: 22px; }
  .auth-eyebrow { margin-top: 18px; }
  .auth-intro { margin-bottom: 16px; }
  .auth-field { margin: 10px 0; }
  .auth-steps { margin: 16px 0; }
}

@media (min-width: 600px) and (max-width: 760px) {
  .auth-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .auth-steps li:not(.is-active) { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-illustration-stage { transition: none; }
}
.tab-page {
  display: grid;
  gap: 20px;
  max-width: 960px;
  margin: auto
}

.tab-header,
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.tab-header h1 {
  margin: 0;
  font-size: 28px
}

.tab-header p,
.chart-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 500
}

.invoices-back,
.spese-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid #dce6d7;
  border-radius: 12px;
  background: #f8faf6;
  color: var(--green);
  font-weight: 800
}

.invoices-back-icon,
.spese-back-icon {
  transform: rotate(180deg)
}

.invoices-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid #eef2ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(60, 80, 50, 0.05);
}

.invoices-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invoices-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

.invoices-search .ui-icon-search {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #7b8877;
  pointer-events: none;
}

.invoices-search input[type="search"] {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border: 1px solid #dce4d9;
  border-radius: 12px;
  background: #fbfdfa;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.15s ease;
}

.invoices-search input[type="search"]:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 112, 62, 0.12);
}

.invoices-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.invoices-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #dce4d9;
  border-radius: 12px;
  background: #fbfdfa;
  color: #61705d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.invoices-reset .ui-icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.invoices-reset:hover {
  border-color: #bccbb7;
  background: #f2f7ef;
  color: var(--ink);
}

.invoices-export {
  position: relative;
  display: inline-block;
}

.invoices-export summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(34, 112, 62, 0.2);
}

.invoices-export summary::-webkit-details-marker {
  display: none;
}

.invoices-export summary:hover {
  background: #1c552b;
  box-shadow: 0 4px 12px rgba(34, 112, 62, 0.28);
}

.invoices-export summary .ui-icon {
  width: 15px;
  height: 15px;
}

.invoices-export-chevron {
  width: 12px !important;
  height: 12px !important;
  margin-left: 2px;
  transition: transform 0.15s ease;
}

.invoices-export[open] .invoices-export-chevron {
  transform: rotate(180deg);
}

.invoices-export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eef2ea;
  box-shadow: 0 12px 32px rgba(25, 40, 20, 0.16);
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: floatingCardEnter .2s ease forwards;
}

.invoices-export-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.12s ease;
}

.invoices-export-menu a:hover {
  background: #f0f7ec;
  color: var(--green);
}

.invoices-export-menu a .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--green);
}

/* Riga Secondaria Filtri */
.invoices-toolbar-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #f2f5f0;
}

.invoices-filter-pill,
.spese-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8faf6;
  border: 1px solid #dce4d9;
  border-radius: 10px;
  padding: 4px 10px 4px 12px;
  transition: border-color 0.15s ease;
}

.invoices-filter-pill:focus-within,
.spese-filter-pill:focus-within {
  border-color: var(--green);
  background: #fff;
}

.invoices-filter-label,
.spese-filter-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7b8877;
  white-space: nowrap;
}

.invoices-filter-pill select,
.invoices-filter-pill input,
.spese-filter-pill select {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

.invoices-year-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f8faf6;
  border: 1px solid #dce4d9;
  border-radius: 10px;
  padding: 3px 6px 3px 12px;
  transition: border-color 0.15s ease;
}

.invoices-year-pill:focus-within {
  border-color: var(--green);
  background: #fff;
}

.invoices-year-pill select {
  border: 0;
  background: transparent;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

.invoices-year-nav {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7b8877;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.invoices-year-nav:hover {
  background: #eef7eb;
  color: var(--green);
}

.invoices-year-nav:active {
  transform: scale(0.92);
}

.invoices-year-nav .ui-icon {
  width: 13px;
  height: 13px;
}

.invoices-chevron-prev {
  transform: rotate(180deg);
}

.invoices-date-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8faf6;
  border: 1px solid #dce4d9;
  border-radius: 10px;
  padding: 4px 10px 4px 12px;
  transition: border-color 0.15s ease;
}

.invoices-date-group:focus-within {
  border-color: var(--green);
  background: #fff;
}

.invoices-date-pill input[type="date"] {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  width: 120px;
}

.invoices-date-arrow {
  color: #9aa796;
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}


.invoices-archive-card {
  overflow: hidden;
  border: 1px solid #eef2ea;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 18px #3c50320d
}

.invoices-archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  border-bottom: 1px solid #eef2ea;
  background: #fff;
  color: var(--ink);
  transition: background .12s ease;
}

.invoices-archive-row:last-child {
  border-bottom: 0;
}

.invoices-archive-row:hover,
.invoices-archive-row:focus-within {
  background: #f8faf6;
}

.invoices-archive-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.invoices-archive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.invoice-print-btn,
.invoice-row-delete-btn,
.spesa-row-delete-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e4ebe0;
  border-radius: 10px;
  background: #fbfdfa;
  color: #61705d;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.invoice-print-btn .ui-icon,
.invoice-row-delete-btn .ui-icon,
.spesa-row-delete-btn .ui-icon {
  width: 17px;
  height: 17px;
}

.invoice-print-btn:hover {
  background: #eef7eb;
  border-color: #bee3c6;
  color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.15);
}

.invoice-row-delete-btn:hover,
.spesa-row-delete-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}

.invoice-print-btn:active,
.invoice-row-delete-btn:active,
.spesa-row-delete-btn:active {
  transform: translateY(0);
}

.invoice-print-btn:focus-visible,
.invoice-row-delete-btn:focus-visible,
.spesa-row-delete-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.invoices-archive-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #eeecf3;
  color: #7769a6
}

.invoices-archive-copy,
.invoices-archive-total {
  min-width: 0
}

.invoices-archive-copy strong,
.invoices-archive-copy time,
.invoices-archive-total strong {
  display: block
}

.invoices-archive-customer {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoices-archive-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoices-archive-bullet {
  color: #a3b09e;
  font-size: 10px;
}

.invoices-archive-date-mobile {
  display: none;
}

.invoices-archive-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invoices-dock-btn-paid {
  color: #1b542a;
}

.invoices-dock-btn-paid:hover {
  background: #eef8ee;
  color: #1b5e20;
}

.invoices-dock-btn-emitted {
  color: #92540d;
}

.invoices-dock-btn-emitted:hover {
  background: #fffbf0;
  color: #b45309;
}

.invoices-archive-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoices-archive-copy time {
  margin-top: 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.invoices-archive-total {
  display: grid;
  justify-items: end;
  gap: 5px
}

.invoices-archive-total strong {
  white-space: nowrap
}

.invoices-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid #eef2ea;
  background: #fbfdfa;
}

.invoices-list-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invoices-select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.invoices-select-all-label input[type="checkbox"],
.invoice-row-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  accent-color: var(--green);
  cursor: pointer;
}

.invoice-row-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.invoices-archive-row.is-selected {
  background: #f2f8ef;
}

.invoices-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 14px;
  border: 1px solid #c7ddc3;
  border-radius: 14px;
  background: #f3f8f1;
}

.invoices-batch-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin-right: 4px;
}

.invoices-batch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #d6e2d3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}

.invoices-batch-btn:hover {
  border-color: var(--green);
  background: #eef6ec;
  color: var(--green);
}

.invoices-batch-btn .ui-icon {
  font-size: 14px;
}

.invoices-batch-btn-paid:hover {
  background: #eef8ee;
  border-color: #2e7d32;
  color: #1b5e20;
}

.invoices-batch-btn-emitted:hover {
  background: #fffbf0;
  border-color: #d97706;
  color: #b45309;
}

.invoices-batch-btn-danger {
  color: #c53030;
  border-color: #fed7d7;
}

.invoices-batch-btn-danger:hover {
  background: #fff5f5;
  border-color: #e53e3e;
  color: #9b2c2c;
}

.invoices-batch-link {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.invoices-batch-link:hover {
  color: var(--ink);
}

.invoices-empty,
.spese-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 58px 24px;
  color: var(--muted);
  text-align: center
}

.invoices-empty>.ui-icon,
.spese-empty>.ui-icon {
  width: 34px;
  height: 34px;
  color: #8b7fb5
}

.invoices-empty h2,
.invoices-empty p,
.spese-empty h2,
.spese-empty p {
  margin: 0
}

.invoices-sidebar {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid #e5ddf2;
  border-radius: 22px;
  background: #f5f2fa
}

.invoices-sidebar h2,
.invoices-sidebar p {
  margin: 0
}

.invoices-sidebar p {
  color: #756d82;
  line-height: 1.45
}

.invoices-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--muted);
}

.invoices-pagination p strong {
  color: var(--ink);
}

.invoices-pagination .outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid #dce4d9;
  border-radius: 12px;
  background: #fff;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.invoices-pagination .outline:hover {
  background: #f0f7ec;
  border-color: #c5d8bf;
}

@media(max-width:760px) {
  .invoices-page {
    gap: 14px
  }

  .invoices-header {
    align-items: flex-start
  }

  .invoices-header h1,
  .spese-header h1 {
    font-size: 24px
  }

  .invoices-back,
  .spese-back {
    padding: 8px 10px;
    font-size: 12px
  }

  .invoices-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .invoices-toolbar-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .invoices-search {
    width: 100%;
    min-width: 0;
  }

  .invoices-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .invoices-reset {
    flex: 1;
    justify-content: center;
    height: 40px;
  }

  .invoices-export {
    flex: 1;
  }

  .invoices-export summary {
    justify-content: center;
    width: 100%;
    height: 40px;
  }

  .invoices-export-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .invoices-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding-top: 10px;
  }

  .invoices-filter-pill,
  .spese-filter-pill {
    flex: 1;
    min-width: calc(50% - 4px);
    justify-content: space-between;
  }

  .invoices-filter-pill select,
  .spese-filter-pill select {
    max-width: 65%;
    text-align: right;
  }

  .invoices-year-pill {
    padding: 3px 6px;
  }

  .invoices-year-pill select {
    max-width: none;
    text-align: center;
  }

  .invoices-date-group {
    width: 100%;
    justify-content: space-between;
  }

  .invoices-date-pill input[type="date"] {
    width: 105px;
    font-size: 11.5px;
  }

  .invoices-page[data-invoices-scope="mobile"] {
    padding-bottom: calc(var(--mobile-bottom-nav-height, 96px) + 24px);
  }

  .invoices-archive-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    padding: 12px 14px;
    gap: 8px 10px;
  }

  .invoices-archive-row .invoice-row-check {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    padding-top: 2px;
  }

  .invoices-archive-main {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .invoices-archive-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .invoices-archive-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .invoices-archive-customer {
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .invoices-archive-sub {
    margin-top: 0;
    font-size: 11.5px;
    color: var(--muted);
  }

  .invoices-archive-sub time,
  .invoices-archive-bullet {
    display: none;
  }

  .invoices-archive-total {
    text-align: right;
    white-space: nowrap;
    padding-left: 6px;
  }

  .invoices-archive-total strong {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink);
  }

  .invoices-archive-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-top: 8px;
    margin-top: 2px;
    border-top: 1px dashed #e8efe7;
    gap: 8px;
  }

  .invoices-archive-date-mobile {
    display: block;
    font-size: 11.5px;
    color: #6f7f6c;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .invoices-archive-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .invoice-status-toggle {
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 9999px;
  }

  .invoice-print-btn,
  .invoice-row-delete-btn {
    width: 32px;
    height: 32px;
  }

  .invoice-print-btn .ui-icon,
  .invoice-row-delete-btn .ui-icon {
    width: 15px;
    height: 15px;
  }

  .invoices-pagination {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .invoices-pagination .outline {
    justify-content: center;
  }
}

/* Stili Righe Fattura e Progressive Hint Form */
.invoice-progressive-hint {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #f0f7ec;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

.invoice-field-hint {
  margin: -6px 0 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #61705d;
}

.invoice-lines-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}

.invoice-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}

.invoice-lines-head .eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.invoice-lines-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invoice-add-line-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1.5px dashed #c0d4be;
  border-radius: 10px;
  background: #fbfdfa;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  width: fit-content;
  align-self: flex-start;
  margin-top: 2px;
}

.invoice-add-line-btn .ui-icon {
  width: 14px;
  height: 14px;
}

.invoice-add-line-btn:hover {
  background: #eef7eb;
  border-color: var(--green);
  border-style: solid;
  color: #164e26;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(34, 112, 62, 0.12);
}

.invoice-add-line-btn:active {
  transform: translateY(0);
}

.invoice-add-line-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.invoice-line {
  border: 1px solid #dce4d9;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fafdf8;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.2fr auto;
  gap: 12px;
  align-items: end;
  position: relative;
  margin: 0;
}

.invoice-line-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
}

.invoice-line label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.invoice-line input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #dce4d9;
  background: #fff;
  font-size: 13.5px;
}

.invoice-line-total {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.invoice-line-total strong {
  font-size: 14px;
  color: var(--ink);
  padding: 8px 0;
}

.invoice-line-remove {
  background: transparent;
  border: none;
  color: #dc2626;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.invoice-line-remove:hover {
  background: #fee2e2;
}

@media (max-width: 640px) {
  .invoice-line {
    grid-template-columns: 1fr 1fr;
  }
  .invoice-line-description {
    grid-column: 1 / -1;
  }
  .invoice-line-total {
    grid-column: 1;
  }
  .invoice-line-remove {
    grid-column: 2;
    justify-self: end;
  }
  .invoice-add-line-btn {
    width: 100%;
    align-self: stretch;
    height: 42px;
  }
}

.tab-tags {
  display: flex;
  gap: 8px
}

.tab-tags span {
  padding: 6px 12px;
  border: 1px solid #dce6d7;
  border-radius: 18px;
  background: #edf3e9;
  color: var(--green);
  font-size: 12px;
  font-weight: 700
}

.forecast-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 22px 28px;
  border: 1px solid #c5d8bf;
  border-radius: 24px;
  background: linear-gradient(135deg, #e4eee0, #d8e5d3);
  box-shadow: 0 8px 24px #3e6b3e17;
  z-index: 2;
}

.forecast-hero>div,
.forecast-hero .forecast-breakdown {
  position: relative;
  z-index: 2;
}

.forecast-hero-dec-mobile {
  display: none;
}

.forecast-hero strong {
  display: block;
  margin: 5px 0;
  font-size: 40px;
  letter-spacing: -1px
}

.forecast-amount-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 5px 0;
}

.forecast-amount-row strong {
  margin: 0;
}

.forecast-netto-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.12);
  border: 1px solid rgba(46, 125, 50, 0.25);
  font-size: 13px;
  color: #2b542c;
  line-height: 1.2;
}

.forecast-netto-pill small {
  font-weight: 600;
  color: #4b6a4c;
}

.forecast-netto-pill b {
  font-weight: 800;
  color: #173b18;
  font-variant-numeric: tabular-nums;
}

.forecast-hero p {
  margin: 0;
  color: #627060
}

.forecast-breakdown {
  display: grid;
  gap: 10px;
  min-width: 260px;
  padding-left: 28px;
  border-left: 1px solid #b8d0b2
}

.forecast-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #627060;
  font-size: 12px;
  font-weight: 600
}

.forecast-breakdown b {
  color: var(--ink);
  font-size: 14px
}

.forecast-breakdown .forecast-netto-row {
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed #b8d0b2;
  font-weight: 700;
  color: #2b542c;
}

.forecast-breakdown .forecast-netto-valore {
  color: #1b431c;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.simulator-card,
.chart-card,
.history-card,
.filters-card,
.calendar-card,
.document-list {
  padding: 22px 28px;
  border: 1px solid #eef2ea;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 18px #3c50320d
}

.card-row h2,
.chart-card h2,
.history-card h2,
.late-card h2 {
  margin: 0;
  font-size: 16px
}

.card-row button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 700
}

.simulator-control {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 6px
}

.simulator-control input[type=range] {
  width: 100%;
  accent-color: var(--green)
}

.revenue-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1.5px solid #dfebd9;
  border-radius: 14px;
  background: #faf9f6;
  color: var(--green);
  font-weight: 800
}

.revenue-input input {
  width: 100px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800
}

.range-labels,
.quick-add {
  display: flex;
  justify-content: space-between;
  color: #8a9487;
  font-size: 11px;
  font-weight: 600
}

.quick-add {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin: 17px 0
}

.quick-add button,
.filters-card button {
  padding: 5px 11px;
  border: 1px solid #dbe2d7;
  border-radius: 10px;
  background: #f8faf6;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700
}

.simulated-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border: 1px solid #dfebd9;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4f7f2, #ebf2e7)
}

.simulated-result small {
  display: block;
  color: #596657;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .6px
}

.simulated-result b {
  display: block;
  font-size: 28px
}

.simulated-result em {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  background: #e2f0df;
  color: #276827;
  font-size: 12px;
  font-style: normal;
  font-weight: 700
}

.simulated-result em.negative {
  background: #fcebe6;
  color: #c0392b
}

.simulated-result p {
  margin: 0;
  color: #748071;
  font-size: 12px;
  text-align: right
}

.assistant-card {
  padding: 22px 28px;
  border: 1px solid #e1d3f2;
  border-radius: 24px;
  background: linear-gradient(135deg, #f7f2fc, #ede3f7);
  box-shadow: 0 4px 18px #6e3c9610
}

.assistant-card h3 {
  margin: 9px 0 3px;
  color: #291b42;
  font-size: 16px
}

.assistant-card p {
  margin: 0 0 16px;
  color: #665385;
  font-size: 13px
}

.assistant-card button {
  width: 100%;
  padding: 12px;
  border: 2px solid #6c44bf;
  border-radius: 14px;
  background: #fff;
  color: #6c44bf;
  font-weight: 800
}

.bar-chart {
  display: flex;
  height: 150px;
  align-items: flex-end;
  gap: 9px;
  margin-top: 18px;
  padding: 0 8px;
  border-bottom: 1px solid #e8ede4
}

.bar-chart div {
  display: flex;
  flex: 1;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px
}

/* L'altezza arriva dai dati come custom property inline: la serie è calcolata
   sulle fatture reali e coprirla con classi enumerate richiederebbe una utility
   per ogni percentuale. Il fallback a 0% tiene la barra valida anche se la
   previsione non è ancora stata caricata. */
.bar-chart i {
  display: block;
  width: 100%;
  max-width: 28px;
  height: var(--bar-h, 0%);
  min-height: 2px;
  border-radius: 5px 5px 0 0;
  background: var(--green)
}

/* Mesi precedenti alla prima fattura: nessuna attività, non un mese a vuoto. */
.bar-chart i.bar-pre {
  background: transparent;
  border: 1px dashed #d4dccd;
  border-bottom: none;
  min-height: 6px;
  height: 6px
}

/* Mesi chiusi con fatture registrate. */
.bar-chart i.bar-real {
  background: var(--green)
}

/* Mese in corso: contiene denaro certo e la quota ancora attesa. */
.bar-chart i.bar-current {
  background: linear-gradient(180deg, #b7caa8 0%, #b7caa8 28%, var(--green) 28%, var(--green) 100%)
}

/* Mesi futuri stimati dal motore. */
.bar-chart i.bar-projected {
  background: #b7caa8
}

/* Mesi con un accordo già firmato: impegno preso, non ancora incassato. */
.bar-chart i.bar-contracted {
  background: linear-gradient(180deg, #b7caa8 0%, #b7caa8 35%, #7ea766 35%, #7ea766 100%)
}

/* Barra a zero: resta un segno leggero, non sparisce. */
.bar-chart i.bar-empty {
  background: #eef1ea;
  min-height: 2px
}

.bar-chart span {
  font-size: 10px;
  font-weight: 700;
  color: #687265
}

.chart-legend {
  font-size: 11px;
  color: #688564;
  font-weight: 700
}

.forecast-chart-subtitle,
.simulator-subtitle {
  font-size: 12px;
  color: #687265
}

/* Spiegazione mostrata quando la proiezione non è ancora disponibile. */
.forecast-nota {
  font-size: 13px;
  line-height: 1.45;
  color: #5d6a58
}

.forecast-quota {
  font-weight: 700
}

/* I tre strati della previsione: fatturato, contratti, stima residua. */
.forecast-strati {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px
}

.forecast-strato {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.forecast-strato small {
  font-size: 11px;
  color: #687265;
  text-transform: uppercase;
  letter-spacing: .04em
}

.forecast-strato b {
  font-size: 15px
}

.forecast-blending-label {
  white-space: nowrap
}

/* Card Accordi e Contratti Futuri (Previsione) */
.contracts-card {
  background: #fff;
  border: 1px solid #e2e9dd;
  border-radius: 20px;
  padding: 22px 24px;
  margin-top: 20px;
  box-shadow: 0 4px 18px rgba(35, 50, 30, 0.04);
}

.contracts-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contracts-icon-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #eef6eb;
  color: var(--green);
}

.contracts-icon-badge .ui-icon {
  width: 22px;
  height: 22px;
}

.contracts-card .card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.contracts-card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.contracts-subtitle {
  font-size: 12.5px;
  color: #687464;
  margin: 0;
  max-width: 54ch;
  line-height: 1.45;
}

.contracts-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c9dec3;
  background: #eef6ea;
  color: var(--green);
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.contracts-add:hover {
  background: #e2f1dc;
  border-color: #b5d5ab;
  transform: translateY(-1px);
}

.contracts-add .ui-icon {
  width: 15px;
  height: 15px;
}

.contracts-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #f8faf6;
  border: 1.5px dashed #d8e5d2;
}

.contracts-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eaf3e5;
  color: var(--green);
}

.contracts-empty-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.contracts-empty-content {
  flex: 1;
  min-width: 0;
}

.contracts-empty-content strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: #2c3829;
}

.contracts-empty-content p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #667562;
  line-height: 1.4;
}

.contracts-empty-cta {
  padding: 8px 16px;
  border: 1px solid #cce2c7;
  border-radius: 10px;
  background: #ffffff;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.contracts-empty-cta:hover {
  background: #eef7eb;
}

.contracts-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.contracts-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid #e7eee2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(35, 50, 30, 0.03);
  transition: border-color .15s ease;
}

.contracts-list li:hover {
  border-color: #cdddc7;
}

.contracts-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.contracts-month {
  display: grid;
  place-items: center;
  min-width: 46px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #eef6ea;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
}

.contracts-item-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.contracts-desc {
  font-size: 13.5px;
  font-weight: 700;
  color: #283325;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contracts-item-sub {
  font-size: 11px;
  color: #798775;
  font-weight: 500;
  text-transform: capitalize;
}

.contracts-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.contracts-amount {
  font-size: 15px;
  font-weight: 800;
  color: #1c2619;
  white-space: nowrap;
}

.contracts-remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #9aa696;
  cursor: pointer;
  transition: all .15s ease;
}

.contracts-remove:hover {
  background: #fde8e8;
  color: #c81e1e;
}

.contracts-remove .ui-icon {
  width: 16px;
  height: 16px;
}

/* Modal Inserimento Accordo Futuro (#contratto) */
.contratto-dialog {
  width: min(640px, 94vw);
}

.contratto-eyebrow {
  margin: 0 0 6px;
  color: #75926c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.contratto-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contratto-field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contratto-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.contratto-label {
  font-size: 13px;
  font-weight: 800;
  color: #384535;
}

.contratto-hint {
  font-size: 11.5px;
  color: #7a8876;
  font-weight: 500;
}

.contratto-optional {
  font-size: 11px;
  font-weight: 600;
  color: #8b9787;
}

.contratto-field-sub {
  font-size: 11.5px;
  color: #7d8b79;
  font-weight: 500;
}

/* Visual Month Picker Grid */
.contratto-month-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 9px;
}

.contratto-month-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 12px;
  min-height: 52px;
  border: 1.5px solid #dce5d8;
  border-radius: 13px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  user-select: none;
}

.contratto-month-chip:hover {
  border-color: #b5cdb0;
  background: #f7faf5;
  transform: translateY(-1px);
}

.contratto-month-chip.is-selected {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(47, 82, 48, 0.28);
}

.contratto-month-chip .chip-short {
  font-size: 10px;
  font-weight: 900;
  color: #7d8b7a;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.contratto-month-chip.is-selected .chip-short {
  color: #d1ead0;
}

.contratto-month-chip .chip-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #2a3528;
  margin-top: 1px;
}

.contratto-month-chip.is-selected .chip-name {
  color: #ffffff;
  font-weight: 800;
}

.contratto-month-chip .chip-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eaf3e6;
  color: var(--green);
  font-size: 9.5px;
  font-weight: 800;
  margin-top: 4px;
}

.contratto-month-chip.is-selected .chip-badge {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

/* Amount Input with Currency Badge */
.contratto-amount-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #dce5d8;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.contratto-amount-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(62, 107, 62, 0.12);
}

.contratto-currency {
  display: grid;
  place-items: center;
  padding: 12px 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--green);
  background: #f2f7ef;
  border-right: 1px solid #dce6d8;
  user-select: none;
}

.contratto-amount-wrap input {
  flex: 1;
  border: 0 !important;
  outline: none !important;
  padding: 12px 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  width: 100%;
}

.contratto-form input[name="descrizione"] {
  border: 1.5px solid #dce5d8;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  width: 100%;
  outline: none;
  background: #ffffff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.contratto-form input[name="descrizione"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(62, 107, 62, 0.12);
}

/* Footer Banner Card */
.contratto-footer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2a4c2a 0%, #3e6b3e 100%);
  color: #ffffff;
  margin-top: 6px;
  box-shadow: 0 8px 24px rgba(35, 62, 35, 0.15);
}

.contratto-banner-info {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.contratto-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #aae0a8;
  text-transform: uppercase;
}

.contratto-banner-tag .ui-icon {
  width: 13px;
  height: 13px;
}

.contratto-banner-info strong {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.contratto-banner-info p {
  margin: 0;
  font-size: 11.5px;
  color: #d6ebd4;
  line-height: 1.4;
  max-width: 44ch;
}

.contratto-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 13px;
  padding: 13px 22px;
  background: #ffffff;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform .15s ease, background-color .15s ease;
  flex-shrink: 0;
}

.contratto-submit-btn:hover {
  background: #f4fbf2;
  transform: translateY(-1px);
}

.contratto-submit-btn:active {
  transform: translateY(0);
}

.contratto-submit-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #f0f4ec;
  min-width: 0;
  overflow: hidden;
}

.history-row>span:nth-child(2) {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  word-break: break-word;
}

.history-row small {
  color: var(--muted);
  font-size: 11px
}

.history-row strong {
  font-size: 14px
}

.deadlines-summary {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  border: 1px solid #c5d8bf;
  border-radius: 24px;
  background: linear-gradient(135deg, #e4eee0, #d8e5d3)
}

.deadlines-summary div {
  display: grid;
  gap: 3px
}

.deadlines-summary small {
  font-size: 10px;
  font-weight: 800;
  color: #61705d;
  letter-spacing: .6px
}

.deadlines-summary b {
  font-size: 26px
}

.deadlines-summary span {
  color: #627060;
  font-size: 12px
}

.deadlines-summary button {
  border: 0;
  border-radius: 13px;
  padding: 10px 14px;
  background: #fff;
  color: var(--green);
  font-weight: 800
}

.filters-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px
}

.filter-group b {
  margin-right: 3px;
  font-size: 12px;
  color: #687265
}

.filters-card button.active,
.view-switch button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff
}

.view-switch {
  display: flex;
  gap: 5px;
  margin-left: auto
}

.deadline-detail-list {
  display: grid;
  overflow: hidden;
  border: 1px solid #eef2ea;
  border-radius: 24px;
  background: #fff
}

.deadline-detail {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid #f0f4ec
}

.deadline-detail:last-child {
  border: 0
}

.deadline-detail h3 {
  margin: 0;
  font-size: 14px
}

.deadline-detail p {
  margin: 3px 0 6px;
  color: var(--muted);
  font-size: 12px
}

.deadline-status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 10px;
  background: #f3e9c9;
  color: #896b23;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize
}

.deadline-status.pianificata {
  background: #eaf0e7;
  color: #557151
}

.deadline-status.completata,
.completed .datebox {
  background: #e1f0dc;
  color: #2f7131
}

.deadline-actions {
  display: flex;
  gap: 7px
}

.deadline-actions button {
  border: 1px solid #b2cbb2;
  border-radius: 10px;
  padding: 7px 10px;
  background: #fff;
  color: var(--green);
  font-size: 11px;
  font-weight: 800
}

.deadline-actions button+button {
  border-color: #e1e7dc;
  color: #5c6458
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-top: 15px;
  text-align: center
}

.calendar-grid b {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 11px
}

.calendar-grid span {
  padding: 10px 4px;
  border-radius: 10px;
  background: #f5f7f3;
  font-size: 12px
}

.calendar-grid .marked {
  background: #d9e7d0;
  color: var(--green);
  font-weight: 900
}

.late-card {
  padding: 20px 24px;
  border: 1.5px dashed #d5ded0;
  border-radius: 24px;
  background: #faf9f6
}

.late-card input {
  width: 100%;
  margin: 15px 0;
  accent-color: #c0392b
}

.late-days-label {
  padding: 4px 8px;
  border: 1px solid #f7c5be;
  border-radius: 8px;
  background: #fff;
  color: #c0392b;
  font-size: 11px;
  font-weight: 700
}

.late-result {
  display: grid;
  gap: 6px;
  padding: 13px 16px;
  border: 1px solid #e1e7dc;
  border-radius: 16px;
  background: #fff;
  color: #687265;
  font-size: 12px
}

.late-result span,
.late-result strong {
  display: flex;
  justify-content: space-between
}

.late-result strong {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f0f4ec;
  color: var(--ink);
  font-size: 14px
}

.late-result strong b {
  color: #c0392b;
  font-size: 18px
}

.documents-drop {
  position: relative;
  overflow: hidden;
  padding: 42px 24px;
  border: 2px dashed #b5c7b0;
  border-radius: 24px;
  background: #f6f9f4;
  text-align: center
}

.documents-drop-body {
  position: relative;
  z-index: 2;
}

.documents-drop-body>div {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: auto;
  border-radius: 50%;
  background: #d9e7d0;
  color: var(--green);
  font-size: 28px
}

.documents-robot-img {
  position: absolute;
  right: -450px;
  bottom: -60px;
  height: 270px;
  width: 1000px;
  pointer-events: none;
  z-index: 1;
  transform: rotate(-8deg);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.06));
}

.documents-drop h2 {
  margin: 13px 0 5px;
  font-size: 17px
}

.documents-drop p {
  margin: 0 0 15px;
  color: var(--muted)
}

.documents-drop button {
  border: 0;
  border-radius: 13px;
  padding: 11px 18px;
  background: var(--green);
  color: #fff;
  font-weight: 800
}

.documents-drop.is-dragging {
  border-style: solid;
  border-color: var(--green);
  background: var(--sage);
}

/* Document Inbox Notification Banner */
.doc-inbox-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 14px 20px;
  border: 1px solid #c8dec4;
  border-radius: 18px;
  background: #edf6eb;
  color: var(--ink);
}

.doc-inbox-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-inbox-banner-content .ui-icon {
  font-size: 18px;
  color: var(--green);
}

.doc-inbox-banner-content p {
  margin: 0;
  font-size: 13.5px;
  color: #334430;
}

/* Document Filters & Search */
.doc-filters-container {
  margin: 16px 0 20px;
  padding: 18px 22px;
  border: 1px solid #eef2ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 18px #3c50320d;
}

.doc-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dbe6d7;
  border-radius: 12px;
  background: #f7faf5;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.doc-search-bar:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(62, 107, 62, 0.12);
  background: #fff;
}

.doc-search-icon {
  margin-right: 10px;
  color: var(--muted);
  font-size: 16px;
}

.doc-search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.doc-search-clear {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.doc-search-clear:hover {
  color: var(--ink);
}

.doc-filters-pills-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f5ee;
}

.doc-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.doc-filter-tag {
  min-width: 68px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-year-pills,
.doc-category-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-pill,
.doc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border: 1px solid #dce6d8;
  border-radius: 18px;
  background: #f7faf5;
  color: #4a5647;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1.2;
}

.doc-pill:hover,
.doc-chip:hover {
  background: #eef6ec;
  border-color: #bad3b4;
  color: var(--green);
}

.doc-pill.active,
.doc-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(62, 107, 62, 0.2);
}

.doc-chip-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 11px;
  font-weight: 700;
  color: inherit;
}

.doc-chip.active .doc-chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Document List Header & Batch Actions */
.doc-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2ea;
}

.doc-list-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.doc-select-all-label input,
.doc-row-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

.doc-select-all-text {
  font-size: 13px;
}

.doc-total-badge {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  background: #f0f4ee;
  padding: 3px 10px;
  border-radius: 10px;
}

.doc-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 14px;
  border: 1px solid #c7ddc3;
  border-radius: 14px;
  background: #f3f8f1;
}

.doc-batch-count {
  font-size: 13px;
  color: var(--green);
  margin-right: 4px;
}

/* Document List Rows */
.document-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-bottom: 1px solid #edf3ea;
  border-radius: 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.document-row:hover {
  background: #fbfdfa;
}

.document-row.is-selected {
  background: #f2f8ef;
  border-color: #cde4c9;
}

.doc-row-check {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.doc-type-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
  flex-shrink: 0;
}

.doc-type-fatture {
  background: #eef6ec;
  color: var(--green);
}

.doc-type-f24 {
  background: #f4effb;
  color: #6b46c1;
}

.doc-type-spese {
  background: #fff6ed;
  color: #c05621;
}

.doc-type-altri {
  background: #f1f3f0;
  color: #556252;
}

.doc-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.doc-badge-fatture {
  background: #eaf5e7;
  color: #2e632b;
}

.doc-badge-f24 {
  background: #f2eef9;
  color: #5f379e;
}

.doc-badge-spese {
  background: #fef2e6;
  color: #b45309;
}

.doc-badge-altri {
  background: #f1f3f1;
  color: #475569;
}

.doc-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.doc-meta-dot {
  font-weight: 800;
  color: #b0bcac;
}

.doc-xml-candidates {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.doc-xml-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

.doc-xml-imported {
  background: #eaf5e7;
  color: var(--green);
}

.doc-xml-imported .ui-icon-check {
  font-size: 12px;
}

.doc-xml-warning {
  background: #fef3c7;
  color: #92400e;
}

.doc-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.doc-icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dce5da;
  border-radius: 10px;
  background: #fff;
  color: #4a5647;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-icon-btn:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.doc-icon-btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

/* Document Button Utilities */
.doc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #d2ded0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-btn:hover {
  background: #f4f8f1;
  border-color: var(--green);
  color: var(--green);
}

.doc-btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.doc-btn-xs {
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: 8px;
}

.doc-btn-accent {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.doc-btn-accent:hover {
  background: #335933;
  border-color: #335933;
  color: #fff;
}

.doc-btn-danger {
  background: #fff6f6;
  border-color: #fed7d7;
  color: #c53030;
}

.doc-btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.doc-btn-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

.doc-btn-link:hover {
  color: var(--ink);
}

.doc-btn-more {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  border: 1px dashed #bdd4bb;
  border-radius: 12px;
  background: #f7faf5;
  color: var(--green);
  font-weight: 700;
}

.doc-btn-more:hover {
  background: #eef6ec;
  border-color: var(--green);
}

.doc-empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}

.document-inbox {
  --document-inbox-muted: #687065;
  width: min(820px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 24px 70px #17211738;
}

.document-inbox[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.document-inbox::backdrop { background: #1f231f99; }
.document-inbox-header { display: flex; align-items: flex-start; gap: 20px; justify-content: space-between; padding: 24px 24px 16px; background: var(--paper); }
.document-inbox h2 { margin: 0; }
.document-inbox-header p { max-width: 590px; margin: 6px 0 0; color: var(--document-inbox-muted); line-height: 1.45; }
.document-inbox-close { flex: 0 0 auto; min-height: 44px; padding: 9px 13px; }
.document-inbox-close .ui-icon { width: 16px; height: 16px; }
.document-inbox-feedback { padding: 0 24px 14px; }
.document-inbox-feedback [data-inbox-message] { margin: 0; color: var(--green); font-weight: 700; }
.document-inbox-feedback [data-inbox-message]:empty { display: none; }
.document-inbox-summary { margin: 0; color: var(--document-inbox-muted); font-size: 13px; font-weight: 700; }
.document-inbox-scroll { display: grid; align-content: start; gap: 12px; min-height: 0; padding: 0 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.document-inbox-row { padding: 16px; border: 1px solid #dfe9dc; border-radius: 18px; background: #fff; box-shadow: 0 3px 12px #31482b0a; }
.document-inbox-row-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.document-selection { display: flex; align-items: center; gap: 10px; min-height: 44px; overflow-wrap: anywhere; }
.document-selection input { flex-shrink: 0; width: 22px; height: 22px; accent-color: var(--green); }
.document-selection strong { line-height: 1.35; }
.document-inbox-status { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; margin: 0; padding: 5px 9px; border-radius: 999px; background: #f0f3ee; color: #596056; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.document-inbox-status::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.document-inbox-status[data-status="waiting"],
.document-inbox-status[data-status="uploading"],
.document-inbox-status[data-status="scanning"] { background: #f2eef9; color: #6b46c1; }
.document-inbox-status[data-status="clean"],
.document-inbox-status[data-status="archived"] { background: #eaf5e7; color: #2e632b; }
.document-inbox-status[data-status="error"],
.document-inbox-status[data-status="quarantined"],
.document-inbox-status[data-status="rejected"] { background: #fff1f1; color: #a92828; }
.document-inbox-metadata { margin-top: 8px; }
.document-inbox-metadata summary { width: fit-content; min-height: 44px; display: flex; align-items: center; color: var(--document-inbox-muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.document-inbox-metadata summary::before { content: "+"; width: 20px; color: var(--green); font-size: 17px; }
.document-inbox-metadata[open] summary::before { content: "−"; }
.document-inbox-metadata summary::marker { content: ""; }
.document-inbox-metadata summary:focus-visible,
.document-inbox-metadata select:focus-visible,
.document-inbox-metadata input:focus-visible { outline: 0; box-shadow: 0 0 0 3px #3e6b3e2e; }
.document-inbox-metadata .documents-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 4px 0 8px 30px; }
.document-inbox-metadata label { display: grid; gap: 6px; min-width: 0; color: #4a5647; font-size: 12px; font-weight: 800; }
.document-inbox-metadata label span { display: flex; gap: 4px; align-items: baseline; }
.document-inbox-metadata label small { color: var(--document-inbox-muted); font-size: 11px; font-weight: 600; }
.document-inbox-metadata select,
.document-inbox-metadata input { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid #d6e1d3; border-radius: 11px; background: #fbfdfa; color: var(--ink); font: inherit; font-size: 13px; }
.document-inbox-metadata select:disabled,
.document-inbox-metadata input:disabled { color: var(--document-inbox-muted); background: #f3f5f1; }
.invoice-candidates { display: grid; gap: 10px; margin: 10px 0; }
.invoice-candidate { display: grid; gap: 9px; padding: 14px; border: 1px solid #cfe0cb; border-radius: 14px; background: #f7faf5; }
.invoice-candidate-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.invoice-candidate-heading > div { display: grid; gap: 3px; min-width: 0; }
.invoice-candidate-heading strong { font-size: 16px; }
.invoice-candidate-heading small { color: var(--document-inbox-muted); }
.invoice-candidate-heading b { flex: 0 0 auto; font-size: 16px; }
.invoice-candidate-counterparty,
.invoice-candidate-valid { margin: 0; overflow-wrap: anywhere; }
.invoice-candidate-counterparty { color: #465043; font-weight: 700; }
.invoice-candidate-valid { color: var(--document-inbox-muted); font-size: 13px; }
.invoice-candidate-warnings { margin: 0; padding: 10px 12px 10px 30px; border-radius: 10px; background: #fff8e7; color: #7a4b08; font-size: 13px; }
.invoice-imported,
.invoice-import-ready { display: inline-flex; align-items: center; min-height: 32px; color: var(--green); font-size: 13px; }
.invoice-expense-pending { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-size: 13px; }
.document-inbox-candidate-action { width: fit-content; min-height: 44px; padding: 9px 14px; }
.document-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.document-actions .doc-btn { min-height: 44px; padding: 8px 12px; }
.document-inbox-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 24px; border-top: 1px solid #dfe9dc; background: #fff; box-shadow: 0 -8px 24px #31482b0a; }
.document-inbox-footer > p { max-width: 410px; margin: 0; color: var(--document-inbox-muted); font-size: 12px; line-height: 1.4; }
.document-inbox-footer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.document-inbox-footer-actions .doc-btn { min-height: 46px; padding: 10px 16px; white-space: nowrap; }
.archived-invoice-candidates { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.archived-invoice-candidates span { color: var(--muted); font-size: .82rem; }

@media (max-width: 760px) {
  .document-row { flex-wrap: wrap; }
  .doc-item-actions { width: 100%; justify-content: flex-end; margin-top: 4px; }
  .doc-filter-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .doc-filters-container { padding: 14px 16px; }
  .document-inbox { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .document-inbox-header { padding: 18px 16px 12px; }
  .document-inbox-header p { font-size: 13px; }
  .document-inbox-feedback { padding: 0 16px 12px; }
  .document-inbox-scroll { padding: 0 16px 18px; }
  .document-inbox-row { padding: 14px; }
  .document-inbox-footer { align-items: stretch; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .document-inbox-footer > p { display: none; }
  .document-inbox-footer-actions { width: 100%; }
  .document-inbox-footer-actions .doc-btn { flex: 1 1 0; white-space: normal; }
}

@media (max-width: 390px) {
  .documents-page .tab-header { flex-wrap: wrap; }
  .document-inbox-header { align-items: center; }
  .document-inbox-header p { display: none; }
  .document-inbox-close span:last-child { display: none; }
  .document-inbox-row-header { align-items: flex-start; flex-direction: column; gap: 6px; }
  .document-inbox-status { margin-left: 32px; }
  .document-inbox-metadata .documents-filters { grid-template-columns: 1fr; padding-left: 0; }
  .invoice-candidate-heading { flex-direction: column; gap: 6px; }
  .document-actions { justify-content: stretch; }
  .document-actions .doc-btn { flex: 1 1 0; }
  .document-inbox-footer-actions { flex-direction: column-reverse; }
  .document-inbox-footer-actions .doc-btn { width: 100%; }
  .doc-list-head { flex-direction: column; align-items: flex-start; }
}

.compact-primary {
  width: auto
}

.empty-filter {
  padding: 30px 20px;
  color: #8a9487;
  text-align: center;
  font-weight: 600
}

@media(max-width:760px) {
  .mobile-hero-decoration {
    position: absolute;
    inset: 0 0 auto auto;
    width: 160px;
    height: 135px;
    z-index: 2;
    pointer-events: none
  }

  .mobile-op::after {
    content: "";
    position: absolute;
    right: 52px;
    bottom: 7px;
    width: 42px;
    height: 34px;
    background-image: radial-gradient(circle, #c9a24a 1.2px, transparent 1.4px);
    background-size: 9px 9px;
    opacity: .55
  }

  .mobile-op>div {
    position: relative;
    z-index: 1
  }
}

@media(max-width:760px) {
  .tab-page {
    gap: 16px;
    padding-top: 14px
  }

  .tab-page.compact-page {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }

  .tab-header {
    align-items: flex-start
  }

  .tab-header h1 {
    font-size: 24px;
    line-height: 1.15
  }

  .tab-header p {
    font-size: 12.5px;
    line-height: 1.35
  }

  .tab-tags {
    display: none
  }

  .forecast-hero {
    display: grid;
    gap: 15px;
    padding: 18px;
    border-radius: 22px
  }

  .forecast-hero strong {
    font-size: 34px
  }

  .forecast-breakdown {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0
  }

  .forecast-breakdown span {
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid #d4e2d0;
    border-radius: 11px;
    background: #fff;
    font-size: 10px
  }

  .simulator-card,
  .chart-card,
  .history-card,
  .filters-card,
  .calendar-card,
  .document-list {
    padding: 18px;
    border-radius: 22px;
    max-width: 100%;
    overflow: hidden;
  }

  .simulator-control {
    gap: 10px
  }

  .revenue-input {
    padding: 7px 9px
  }

  .revenue-input input {
    width: 72px;
    font-size: 13px
  }

  .range-labels span:nth-child(3) {
    display: none
  }

  .quick-add {
    gap: 5px
  }

  .quick-add span {
    display: none
  }

  .quick-add button {
    flex: 1;
    padding: 6px 3px;
    font-size: 10px
  }

  .simulated-result {
    padding: 14px 15px
  }

  .simulated-result b {
    font-size: 23px
  }

  .simulated-result p {
    font-size: 10.5px
  }

  .assistant-card {
    padding: 18px;
    border-radius: 22px
  }

  .bar-chart {
    height: 110px;
    gap: 4px;
    padding: 0
  }

  .bar-chart span {
    font-size: 8px;
    transform: rotate(-35deg);
    margin-bottom: -6px
  }

  .chart-legend {
    display: none
  }

  .contracts-card {
    padding: 16px;
  }

  .contracts-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .contracts-card .card-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .contracts-add {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
  }

  .contracts-empty {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 20px 16px;
    gap: 12px;
  }

  .contracts-empty-content p {
    margin: 4px auto 0;
    max-width: 32ch;
  }

  .contracts-empty-cta {
    width: 100%;
    min-height: 42px;
  }

  .contracts-list li {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .contracts-item-left {
    width: 100%;
  }

  .contracts-desc {
    font-size: 13px;
  }

  .contracts-item-right {
    width: 100%;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed #e8efe3;
  }

  .contracts-amount {
    font-size: 16px;
  }

  .contracts-remove {
    width: 36px;
    height: 36px;
  }

  /* Modal Inserimento Accordo Futuro Mobile */
  .modal .contratto-dialog {
    max-height: min(92dvh, calc(100dvh - 24px)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 14px 18px 20px !important;
  }

  .modal .contratto-dialog .dialog-header {
    flex-shrink: 0;
    margin-bottom: 12px;
  }

  .modal .contratto-form {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 2px;
    padding-bottom: 12px;
    gap: 16px;
  }

  .modal .contratto-month-picker {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .modal .contratto-month-chip {
    padding: 10px 12px;
    min-height: 52px;
  }

  .modal .contratto-amount-wrap input,
  .modal .contratto-form input[name="descrizione"] {
    font-size: 16px !important;
  }

  .modal .contratto-footer-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    margin-top: 4px;
  }

  .modal .contratto-banner-info p {
    max-width: 100%;
  }

  .modal .contratto-submit-btn {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
    font-weight: 800;
  }

  .forecast-strati {
    gap: 12px
  }

  .history-row {
    gap: 9px
  }

  .history-row strong {
    font-size: 12px
  }

  .deadlines-summary {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px
  }

  .deadlines-summary b {
    font-size: 20px
  }

  .deadlines-summary span {
    font-size: 10px
  }

  .deadlines-summary button {
    grid-column: 1/-1;
    width: 100%
  }

  .filters-card {
    display: grid;
    gap: 12px
  }

  .filter-group {
    gap: 5px
  }

  .filter-group b {
    width: 100%
  }

  .view-switch {
    margin: 0
  }

  .deadline-detail {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 14px
  }

  .deadline-detail h3 {
    font-size: 13px
  }

  .deadline-detail p {
    font-size: 10.5px
  }

  .deadline-detail>strong {
    font-size: 12px
  }

  .deadline-actions {
    grid-column: 2/-1;
    justify-content: flex-end
  }

  .deadline-actions button {
    padding: 6px 8px;
    font-size: 10px
  }

  .calendar-grid {
    gap: 4px
  }

  .calendar-grid span {
    padding: 8px 2px;
    font-size: 11px
  }

  .late-card {
    padding: 18px
  }

  .documents-drop {
    padding: 32px 15px
  }

  .documents-robot-img {
    display: none !important;
  }

  .compact-primary {
    padding: 9px 10px;
    font-size: 11px
  }

  .document-list .empty-filter {
    padding: 22px 8px;
    font-size: 12px
  }
}

/* Card Assistente AI Fiscale V2 (Mockup 2) */
.assistant-card-v2 {
  background: linear-gradient(135deg, #f7f2fe 0%, #ede3fc 100%);
  border: 1px solid #e1d3f8;
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: 0 8px 24px rgba(110, 68, 226, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.assistant-card-v2.compact {
  padding: 18px 20px;
  gap: 12px;
}

.assistant-card-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #7c4dff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.assistant-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.assistant-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c4dff 0%, #5e35b1 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

.assistant-card-icon img {
  width: 90px;
  height: 90px;
  object-fit: contain;

  /* SPOSTAMENTO (Orizzontale, Verticale) */
  transform: translate(-22px, -23px);
}

.assistant-card-titles h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #1e1535;
  letter-spacing: -0.3px;
}

.assistant-card-titles p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #796d93;
  font-weight: 500;
}

.assistant-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assistant-sug-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e7deee;
  border-radius: 14px;
  color: #4a3e63;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.assistant-sug-btn:hover {
  background: #fcfaff;
  border-color: #7c4dff;
  color: #6e44e2;
}

.assistant-sug-btn.active {
  border: 2px solid #7c4dff;
  background: #ffffff;
  color: #1e1535;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.12);
}

.sug-check {
  color: #7c4dff;
  font-weight: 800;
  font-size: 15px;
  margin-left: 8px;
}

.assistant-ask-btn {
  width: 100%;
  padding: 13px 20px;
  background: #ffffff;
  border: 2px solid #7c4dff;
  border-radius: 16px;
  color: #6e44e2;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.08);
}

.assistant-ask-btn:hover {
  background: #7c4dff;
  color: #ffffff;
}

/* Pannello Strategico Impatto & Rischi 2026 (Mockup 1) */
.strategic-panel-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.strategic-panel-head .eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #8e958b;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.strategic-panel-head h2 {
  font-size: 22px;
  font-weight: 800;
  color: #1f231f;
  margin: 0;
  letter-spacing: -0.5px;
}

.strategic-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid #e5ece0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.strategic-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.strategic-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #1f231f;
}

.safe-zone-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf6eb;
  color: #356235;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #d4e7d1;
}

.safe-zone-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #eef3eb;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-bar-fill.green-fill {
  background: #3e6b3e;
}

.progress-bar-fill.muted-fill {
  background: #9db299;
}

.progress-bar-fill.dark-green-fill {
  background: #2d522d;
}

.strategic-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: #6d756b;
}

.strategic-split.line-top {
  border-top: 1px dashed #e5ece0;
  padding-top: 10px;
}

.green-bold {
  color: #3e6b3e;
  font-weight: 800;
}

.threshold-pill-box {
  background: #edf6eb;
  border: 1px solid #d2e6cf;
  color: #3e6b3e;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 10px 14px;
  border-radius: 14px;
  margin-top: 4px;
}

.strategic-card-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #7a8277;
  font-weight: 500;
}

.strategic-reconciliation-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f7faf5;
  border: 1px solid #e2ede0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 4px;
}

.strategic-reconciliation-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #556050;
}

.strategic-reconciliation-line b {
  color: #1f231f;
  font-weight: 700;
  white-space: nowrap;
}

.strategic-action-pill {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.forecast-strategic-badges-mobile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.forecast-badge-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #f4f6f2;
  border: 1px solid #e1e7de;
  font-size: 13px;
  color: #384236;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.forecast-badge-pill:hover {
  background: #edf3eb;
  border-color: #c9dbc4;
}

.forecast-badge-pill:active {
  transform: scale(0.99);
}

.forecast-badge-pill b {
  color: #1f231f;
  font-weight: 700;
}

.forecast-badge-pill .pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.forecast-badge-pill .pill-tag.safe {
  background: #e3ede0;
  color: var(--green);
}

.forecast-badge-pill .pill-tag.danger {
  background: #fde8e8;
  color: #b84f4f;
}

.forecast-badge-pill .pill-tag.savings {
  background: #ede8f7;
  color: #5c3599;
}

.forecast-badge-pill .pill-info {
  flex: 1;
  font-size: 12.5px;
  color: #384236;
  text-align: right;
  padding: 0 4px;
}

.forecast-badge-pill .pill-arrow {
  color: #8c9688;
  font-size: 13px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.forecast-badge-pill:hover .pill-arrow {
  transform: translateX(2px);
  color: var(--green);
}

.compare-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #6d756b;
}

.highlight-year {
  color: #1f231f;
  font-weight: 700;
}

.highlight-val {
  color: #1f231f;
  font-weight: 800;
}

.tax-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f0f4ee;
  color: #657060;
}

.tax-badge.active {
  background: #e2ede0;
  color: #3e6b3e;
}

.diff-row {
  margin-top: 4px;
}

.diff-amount {
  color: #c0392b;
  font-weight: 800;
  font-size: 15px;
}

/* Elemento decorativo dec3.svg per la sezione Previsione (Desktop vs Mobile) */
.forecast-page {
  position: relative;
}

.forecast-dec3-bg {
  position: absolute;
  top: -15px;
  right: -20px;
  width: 320px;
  height: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

.forecast-page .tab-header,
.forecast-page .forecast-hero {
  position: relative;
  z-index: 2;
}

/* Layout Cronologia Stime + Illustrazione Ragazza Previsione (Esclusivo per vista Previsione) */
.forecast-page .history-section-wrap {
  position: relative;
  margin-bottom: 24px;
}

.forecast-page .history-section-wrap .history-card {
  margin-right: 220px;
  position: relative;
  z-index: 2;
}

.forecast-dec2-bg {
  position: absolute;
  right: 0;
  bottom: 10px;
  width: 320px;
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
  transform: rotate(-10deg);
}

.forecast-girl-img {
  position: absolute;
  right: -206px;
  top: 50%;
  transform: translateY(-50%);
  width: 750px;
  height: auto;
  z-index: 5;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.08));
}

@media (max-width: 760px) {
  .forecast-dec3-bg {
    display: none;
  }

  .forecast-hero {
    overflow: hidden;
  }

  .forecast-hero-dec-mobile {
    display: block;
    position: absolute;
    top: -20px;
    right: -10px;
    width: 140px;
    height: auto;
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
  }

  .forecast-page .history-section-wrap .history-card {
    margin-right: 0;
  }

  .forecast-girl-img,
  .forecast-dec2-bg {
    display: none;
  }
}

/* Sidebar Sezione Documenti */
/* Sidebar Sezione Documenti */
.doc-sidebar-wrap,
.spese-sidebar-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doc-sidebar-section,
.spese-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-sidebar-section .sidebar-eyebrow,
.spese-sidebar-wrap .sidebar-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-sidebar-card,
.spese-sidebar-card {
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #eef2ea;
  box-shadow: 0 4px 18px #3c50320d;
}

.doc-sidebar-head,
.spese-sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.doc-sidebar-head h3,
.spese-sidebar-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.doc-sidebar-icon-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.doc-sidebar-icon-badge.green {
  background: #eef6ec;
  color: var(--green);
}

.doc-sidebar-icon-badge.purple {
  background: #f3eff9;
  color: #6b46c1;
}

.doc-sidebar-icon-badge.blue {
  background: #ebf4fc;
  color: #0284c7;
}

.doc-sidebar-desc {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.doc-sidebar-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #e4ede2;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.doc-export-summary-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid #dce7d8;
  border-radius: 12px;
  background: #f7faf5;
}

.doc-export-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-export-summary-item small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-export-summary-item strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.doc-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-export-btn:hover {
  background: #335933;
}

.doc-compliance-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #d5e4d2;
  font-size: 12px;
  color: #556252;
}

.doc-compliance-footer .ui-icon-check {
  color: var(--green);
}

.doc-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.doc-stat-item:hover {
  background: #f2f8ef;
  transform: translateX(3px);
}

.doc-stat-item.active {
  background: #eaf5e7;
  border-color: #c7ddc3;
}

.doc-stat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
  flex-shrink: 0;
}

.doc-stat-icon.green {
  background: #eef6ec;
  color: var(--green);
}

.doc-stat-icon.purple {
  background: #f3eff9;
  color: #6b46c1;
}

.doc-stat-icon.orange {
  background: #fff5eb;
  color: #dd6b20;
}

.doc-stat-icon.grey {
  background: #f1f3f0;
  color: #556252;
}

.doc-stat-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.doc-stat-count {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.doc-sync-status-box {
  margin-bottom: 10px;
}

.doc-sync-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.doc-sync-all-good {
  background: #eaf5e7;
  border: 1px solid #c8dec4;
  color: #235320;
}

.doc-sync-all-good .ui-icon {
  color: var(--green);
  font-size: 16px;
  flex-shrink: 0;
}

.doc-sync-pending {
  background: #fef7ee;
  border: 1px solid #fbd9ad;
  color: #92400e;
}

.doc-sync-pending .ui-icon {
  color: #dd6b20;
  font-size: 16px;
  flex-shrink: 0;
}

.doc-sync-pill div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.doc-sync-pill strong {
  font-size: 12.5px;
  font-weight: 700;
}

.doc-sync-pill small {
  font-size: 11px;
  opacity: 0.85;
}

.doc-sync-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-sync-all-btn:hover {
  background: #335933;
}

/* Floating Bottom Action Dock */
.doc-floating-dock {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: auto;
  max-width: min(92vw, 680px);
  animation: docDockSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-floating-dock[hidden] {
  display: none !important;
}

@keyframes docDockSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes docDockMobileSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.doc-floating-dock-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #cce2c8;
  box-shadow: 0 8px 30px rgba(45, 80, 45, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-dock-selected-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  border-right: 1px solid #d5e5d1;
}

.doc-dock-badge {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.doc-dock-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.doc-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-dock-clear {
  margin-left: 2px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .documents-page.compact-page {
    padding-bottom: 96px;
  }

  .documents-page .documents-drop {
    padding: 18px 14px;
  }

  .documents-page .documents-drop-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .documents-page .documents-drop-body > div,
  .documents-page .documents-drop-body > h2,
  .documents-page .documents-drop-body > p {
    grid-column: 1 / -1;
  }

  .documents-page .documents-drop-body > div {
    width: 44px;
    height: 44px;
  }

  .documents-page .documents-drop h2 {
    margin: 3px 0 0;
    font-size: 15px;
  }

  .documents-page .documents-drop p {
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.4;
  }

  .documents-page .documents-drop button {
    min-height: 44px;
    width: 100%;
    padding: 9px 8px;
    font-size: 11.5px;
  }

  .documents-page .document-list {
    padding: 14px;
  }

  .documents-page .document-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 6px;
  }

  .documents-page .doc-type-icon {
    display: none;
  }

  .documents-page .doc-item-actions {
    width: auto;
    margin-top: 0;
  }

  .documents-page .doc-icon-btn {
    width: 44px;
    height: 44px;
  }

  .doc-floating-dock[data-doc-dock-scope="mobile"],
  .invoices-floating-dock[data-invoice-dock-scope="mobile"] {
    position: fixed;
    bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-fab-overhang) + var(--mobile-overlay-gap) + env(safe-area-inset-bottom, 0px));
    left: 8px;
    right: 8px;
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    transform: none;
    animation-name: docDockMobileSlideUp;
    z-index: 100;
  }

  .doc-floating-dock-content {
    gap: 8px;
    min-height: 60px;
    padding: 7px 9px;
    border-radius: 9999px;
    justify-content: space-between;
  }

  .doc-dock-selected-info {
    gap: 0;
    padding-right: 8px;
  }

  .doc-dock-label,
  .doc-dock-action-label {
    display: none;
  }

  .doc-dock-actions {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .doc-dock-actions .doc-btn,
  .doc-dock-clear {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    text-decoration: none;
  }

  .doc-dock-actions .ui-icon {
    font-size: 17px;
  }
}

@media (max-width: 350px) {
  .documents-page .document-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .documents-page .doc-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-floating-dock {
    animation: none
  }
}

/* Registro spese e acquisti: il ciclo passivo riusa la grammatica visiva
   dell'archivio fatture (card unica, righe separate da capelli, pill dei
   filtri), distinguendosi per i totali di cassa e competenza. Le regole
   condivise con fatture e documenti vivono nei blocchi di quelle sezioni:
   qui resta solo ciò che è specifico delle spese. */
/* .tab-page è una griglia e i suoi figli nascono con min-width:auto: senza
   azzeramento il riepilogo si dimensiona sul proprio contenuto minimo e sfonda
   la colonna sotto i 360px. */
.spese-page > * {
  min-width: 0;
}

.spese-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.spese-summary-card {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid #eef2ea;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 4px 18px #3c50320d;
}

.spese-summary-card span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #9aa096;
}

.spese-summary-card strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

.spese-summary-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.spese-summary-card-cassa strong {
  color: var(--green);
}

.spese-summary-card-pending strong {
  color: #7a4b08;
}

.spese-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid #eef2ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(60, 80, 50, 0.05);
}

.spese-filter-pill {
  min-height: 44px;
}

.spese-toolbar .spese-add {
  min-height: 44px;
  margin-left: auto;
  padding: 12px 18px;
}

.spese-archive-card {
  overflow: hidden;
  border: 1px solid #eef2ea;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 18px #3c50320d;
}

.spese-archive-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  border-bottom: 1px solid #eef2ea;
  background: #fff;
  transition: background 0.12s ease;
}

.spese-archive-row:last-child {
  border-bottom: 0;
}

.spese-archive-row:hover,
.spese-archive-row:focus-within {
  background: #f8faf6;
}

/* Marcatore non cromatico dello stato: resta percepibile senza colore e si
   somma all'icona e all'etichetta testuale della pill di pagamento. */
.spese-archive-row.is-da-pagare {
  box-shadow: inset 3px 0 0 #d99b3c;
}

.spese-archive-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 15px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.spese-archive-main:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 12px;
}

.spese-archive-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #f1f4ee;
  color: #5c6b58;
}

.spese-archive-row.is-storno .spese-archive-icon {
  background: #eef6ec;
  color: var(--green);
}

.spese-archive-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.spese-archive-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
}

.spese-archive-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spese-archive-meta,
.spese-archive-copy time {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ogni riga è una griglia a sé: senza una larghezza minima gli importi si
   allineerebbero a offset diversi e la colonna non si leggerebbe a colpo d'occhio. */
.spese-archive-total {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 104px;
}

.spese-archive-total strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.spese-archive-total small {
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef6ec;
  color: var(--green);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* icons.css è caricato dopo views.css: a parità di specificità .ui-icon
   vincerebbe su .spese-archive-go, quindi il chevron va qualificato. */
.spese-archive-main .spese-archive-go {
  width: 16px;
  height: 16px;
  color: #9aa796;
  opacity: 0.4;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.spese-archive-row:hover .spese-archive-main .spese-archive-go,
.spese-archive-row:focus-within .spese-archive-main .spese-archive-go {
  opacity: 1;
  transform: translateX(2px);
}

.spesa-origine {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef2fb;
  color: #33507f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.spese-archive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.spesa-status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #dce4d9;
  border-radius: 999px;
  background: #fbfdfa;
  color: #4a5647;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spesa-status-toggle .ui-icon {
  width: 15px;
  height: 15px;
}

.spesa-status-toggle.is-da-pagare {
  border-color: #ecd7b0;
  background: #fdf6ea;
  color: #7a4b08;
}

.spesa-status-toggle.is-pagata {
  border-color: #bee3c6;
  background: #eef7eb;
  color: var(--green);
}

.spesa-status-toggle:hover {
  transform: translateY(-1px);
}

.spesa-status-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.spese-empty h2 {
  color: var(--ink);
  font-size: 18px;
}

.spese-empty p {
  max-width: 44ch;
  line-height: 1.45;
}

.spese-sidebar-total {
  display: grid;
  gap: 2px;
  margin: 12px 0 14px;
}

.spese-sidebar-total strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

.spese-sidebar-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.spese-sidebar-split {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 0 0;
  border-top: 1px solid #f0f5ee;
  list-style: none;
}

.spese-sidebar-split li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.spese-sidebar-split li b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.spese-sidebar-split .ui-icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}

.spese-sidebar-note {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.spese-mobile-rail {
  display: grid;
  gap: 14px;
}

/* Il form vive in un drawer che impagina già a 32px 36px: il padding locale
   lo disallineava rispetto al proprio header. */
.spesa-form-host {
  padding: 0;
  margin-top: 18px;
}

.spesa-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.spesa-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.spesa-field>span {
  font-size: 13px;
  font-weight: 600;
}

.spesa-field small {
  color: var(--muted);
  font-weight: 400;
}

.spesa-field-wide {
  grid-column: 1 / -1;
}

.spesa-pagamento {
  gap: 10px;
}

.spesa-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
}

.spesa-form-total {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.spesa-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.spesa-form-actions button {
  min-height: 44px;
}

/* .outline e .primary nascono a piena larghezza per la colonna destra: in una
   riga di azioni tornano a larghezza contenuto. */
.spesa-form-actions .outline,
.spesa-form-actions .primary {
  justify-content: center;
  width: auto;
  padding: 6px 18px;
}

@media (max-width: 760px) {
  .spese-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .spese-summary-card {
    padding: 14px 16px;
    border-radius: 18px;
  }

  .spese-summary-card:first-child {
    grid-column: 1 / -1;
  }

  .spese-summary-card strong {
    font-size: 22px;
  }

  .spese-summary-card small {
    font-size: 11px;
  }

  .spese-toolbar {
    gap: 8px;
    padding: 14px 16px;
  }

  .spese-toolbar .spese-add {
    width: 100%;
    margin-left: 0;
  }

  /* I select ereditano una larghezza intrinseca dall'opzione più lunga:
     senza azzeramento sfondano la pill sotto i 360px. */
  .spese-filter-pill select {
    min-width: 0;
  }

  .spese-archive-card {
    border-radius: 20px;
  }

  .spese-archive-row {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .spese-archive-main {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
  }

  .spese-archive-total {
    min-width: 0;
  }

  .spese-archive-icon {
    width: 42px;
    height: 42px;
  }

  .spese-archive-main .spese-archive-go {
    display: none;
  }

  .spese-archive-actions {
    width: 100%;
    justify-content: space-between;
    padding-left: 54px;
  }

  .spesa-status-toggle {
    min-height: 44px;
  }

  .spesa-row-delete-btn {
    width: 44px;
    height: 44px;
  }

  .spese-empty {
    padding: 42px 18px;
  }

  .spesa-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .spesa-form-actions {
    flex-direction: column-reverse;
  }

  .spesa-form-actions .outline,
  .spesa-form-actions .primary {
    width: 100%;
  }
}

/* Card Spese e acquisti nella Business Intelligence: sincronizzata con le spese reali,
   con evidenza del margine effettivo e accesso diretto al registro. */
.spese-shortcut {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: var(--ink);
}

.spese-shortcut .stat {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.spese-shortcut-status {
  color: var(--muted);
  font-size: 12px;
}

.spese-shortcut-margin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-top: 4px;
  border-radius: 10px;
  background: #f4f7f2;
  border: 1px solid #e2ebe0;
  font-size: 12px;
  color: #556052;
}

.spese-shortcut-margin-row strong {
  font-weight: 800;
  color: #173b18;
  font-variant-numeric: tabular-nums;
}

.spese-shortcut-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
