@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  background: oklch(97% 0.006 85);
  color: oklch(24% 0.02 260);
  font-size: 14px;
  line-height: 1.5;
}
a { color: oklch(38% 0.09 255); text-decoration: none; }
a:hover { color: oklch(30% 0.09 255); }
h1 { font-size: 20px; font-weight: 700; margin: 0; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }

/* App bar (nav + program name + role, merged) */
.appbar {
  --appbar-bg: #C6D400;
  --appbar-border: oklch(20% 0.02 260 / 0.12);
  --appbar-text: oklch(20% 0.02 260);
  --appbar-text-secondary: oklch(30% 0.02 260 / 0.75);
  --appbar-nav-text: oklch(24% 0.02 260 / 0.85);
  --appbar-nav-text-hover: oklch(20% 0.02 260);
  --appbar-role-bg: oklch(20% 0.02 260 / 0.12);
  --appbar-outline-border: oklch(20% 0.02 260 / 0.45);
  --appbar-outline-hover-bg: oklch(20% 0.02 260 / 0.08);
  background: var(--appbar-bg); border-bottom: 1px solid var(--appbar-border);
}
.appbar-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 40px; min-height: 64px;
  max-width: 1440px; margin: 0 auto;
}
.appbar.appbar--blue {
  --appbar-bg: oklch(38% 0.09 255);
  --appbar-border: oklch(100% 0 0 / 0.18);
  --appbar-text: white;
  --appbar-text-secondary: oklch(100% 0 0 / 0.8);
  --appbar-nav-text: oklch(100% 0 0 / 0.9);
  --appbar-nav-text-hover: white;
  --appbar-role-bg: oklch(100% 0 0 / 0.18);
  --appbar-outline-border: oklch(100% 0 0 / 0.55);
  --appbar-outline-hover-bg: oklch(100% 0 0 / 0.14);
}
.appbar-brand { max-width: 640px; display: block; text-decoration: none; color: inherit; flex-shrink: 0; }
.appbar-brand-primary {
  font-weight: 700; font-size: 14px; line-height: 1.35;
  color: var(--appbar-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-brand-secondary {
  font-size: 14px; color: var(--appbar-text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-nav { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: nowrap; min-width: 0; }
.nav-link {
  display: inline-flex; align-items: center; height: 48px; padding: 0 12px;
  font-size: 18px; font-weight: 700; color: var(--appbar-nav-text);
  border-bottom: 3px solid transparent; border-radius: 0; white-space: nowrap;
}
.nav-link:hover { color: var(--appbar-nav-text-hover); }
.nav-link.active { color: var(--appbar-nav-text-hover); border-bottom-color: var(--appbar-nav-text-hover); }

.pf-dropdown { position: relative; }
.pf-trigger {
  background: none; border: none; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.pf-chev {
  width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -3px; opacity: .6;
}
.pf-panel {
  display: none; position: absolute; top: 100%; left: 0; width: 260px;
  background: white; border: 1px solid oklch(88% 0.01 260); border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 32px oklch(20% 0.02 260 / 0.18); padding: 10px; z-index: 30;
}
.pf-dropdown.open .pf-panel { display: block; }
.pf-dropdown--right .pf-panel { left: auto; right: 0; border-radius: 12px 0 12px 12px; }
.pf-section-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: oklch(45% 0.02 260 / 0.55);
  text-transform: uppercase; padding: 8px 12px 4px;
}
.pf-item {
  display: block; font-size: 13.5px; font-weight: 600; color: oklch(24% 0.02 260);
  padding: 8px 12px; border-radius: 8px;
}
.pf-item:hover { background: oklch(96% 0.006 85); }
.pf-item.active { background: oklch(95% 0.05 118); }
.pf-empty { font-size: 12.5px; color: oklch(45% 0.02 260 / 0.6); padding: 6px 12px 10px; }
body.theme-blue .pf-item.active { background: oklch(93% 0.05 255); }
.appbar-role {
  flex-shrink: 0; background: var(--appbar-role-bg); color: var(--appbar-text);
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 100px;
}
.appbar .btn-outline-dark {
  flex-shrink: 0; background: transparent; border: 1px solid var(--appbar-outline-border);
  color: var(--appbar-text); border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.appbar .btn-outline-dark:hover { background: var(--appbar-outline-hover-bg); }

/* Sticky header: keeps the topbar + tabbar visible while the content scrolls */
.sticky-header { position: sticky; top: 0; z-index: 20; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 16px 40px; border-bottom: 1px solid oklch(90% 0.006 85);
  background: white;
}
.brand {
  font-weight: 700; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase;
  color: oklch(38% 0.09 255); margin-bottom: 5px;
}
.pratica-title { font-size: 15px; font-weight: 600; }
.pratica-sub { font-size: 12px; color: oklch(50% 0.02 260); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 12px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.badge.progress { background: oklch(94% 0.03 70); color: oklch(45% 0.11 70); }
.badge.done { background: oklch(94% 0.05 155); color: oklch(45% 0.13 155); }
.badge.prep { background: oklch(93% 0.006 85); color: oklch(45% 0.01 260); }
.badge.stato-non-confermato { background: oklch(94% 0.05 25); color: oklch(45% 0.15 25); }
.badge.stato-confermato { background: oklch(94% 0.05 155); color: oklch(45% 0.13 155); }
.badge.stato-in-corso { background: oklch(93% 0.05 255); color: oklch(45% 0.13 255); }
.badge.stato-concluso { background: oklch(90% 0.006 85); color: oklch(20% 0.006 85); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.from-visura {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  color: oklch(45% 0.13 155); background: oklch(94% 0.05 155);
  padding: 2px 7px; border-radius: 5px; vertical-align: middle; margin-left: 6px;
}

/* Buttons */
.btn {
  display: inline-block; border-radius: 8px; padding: 9px 18px;
  font-size: 13.5px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; background: white;
  white-space: nowrap; flex-shrink: 0;
}
.btn-primary { background: oklch(38% 0.09 255); color: white; }
.btn-primary:hover { background: oklch(30% 0.09 255); }
.btn-outline { background: white; border-color: oklch(82% 0.01 260); color: oklch(30% 0.02 260); }
.btn-outline:hover { background: oklch(97% 0.006 85); }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; flex-shrink: 0;
}
.btn-icon { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon-danger { border-color: oklch(75% 0.1 25); color: oklch(48% 0.15 25); }
.btn-icon-danger:hover { background: oklch(96% 0.04 25); }

/* Elenco Partecipanti: righe bloccate finché non si preme "Modifica elenco" */
.plist-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.plist-input:disabled {
  background: transparent; border-color: transparent; padding: 3px 0;
  color: inherit; -webkit-text-fill-color: currentColor; opacity: 1;
}
.row-table.compact td { padding: 3px 4px 3px 0; vertical-align: middle; }
.row-table.compact input[type="text"] { padding: 6px 8px; }
form.inline { display: inline; }

/* Tab bar */
.tabbar {
  display: flex; gap: 2px; padding: 0 40px; background: white;
  border-bottom: 1px solid oklch(90% 0.006 85); overflow-x: auto;
}
.tab {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px;
  font-size: 16px; font-weight: 600; color: oklch(52% 0.02 260);
  border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none;
}
.tab.active { color: oklch(38% 0.09 255); border-bottom-color: oklch(38% 0.09 255); }
.tab.disabled { color: oklch(75% 0.006 85); }

/* Content layout */
.body-layout { display: flex; min-height: calc(100vh - 110px); }
.content { flex: 1; overflow: auto; padding: 28px 40px 60px; max-width: 1440px; margin: 0 auto; }
.sections-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }

@media (max-width: 1100px) {
  .sections-grid { grid-template-columns: 1fr; }
}
.sections-grid .section { margin-bottom: 0; }
.dichiarazioni-grid { display: flex; gap: 28px; align-items: flex-start; }
.dichiarazioni-column { flex: 1 1 0; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 1100px) {
  .dichiarazioni-grid { flex-direction: column; }
}
.content.narrow {
  max-width: 420px; width: 100%; margin: 0 auto;
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 24px;
}

/* Sections + fields */
.section {
  background: white; border: 1px solid oklch(90% 0.006 85); border-radius: 12px;
  padding: 24px 28px; margin-bottom: 20px; scroll-margin-top: 20px;
}
.section-title {
  font-size: 15px; font-weight: 700; margin: 0 0 18px; padding-bottom: 14px;
  border-bottom: 1px solid oklch(93% 0.006 85);
}
.section-desc { font-size: 12.5px; color: oklch(50% 0.02 260); margin: 0 0 16px; }
.field-row { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.field-row:last-child { margin-bottom: 0; }
.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
label { font-size: 12.5px; font-weight: 600; color: oklch(38% 0.02 260); }
input[type="text"], input[type="date"], input[type="email"], input[type="password"], select {
  font-family: inherit; font-size: 13.5px; padding: 10px 12px; border-radius: 7px;
  border: 1px solid oklch(85% 0.01 260); background: white; color: oklch(24% 0.02 260); width: 100%;
}
input:focus, select:focus { outline: 2px solid oklch(38% 0.09 255 / 0.3); border-color: oklch(38% 0.09 255); }
input:disabled, select:disabled { background: oklch(96% 0.008 260); color: oklch(45% 0.01 260); }
.radio-row { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.radio-opt { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; }
.radio-opt input { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; }
.checkbox-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; }
.checkbox-row .radio-opt { flex: 0 0 auto; }

/* Callout / info banners */
.callout { background: oklch(97% 0.02 255); border: 1px solid oklch(88% 0.03 255); border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; }
.callout-warn { color: oklch(40% 0.13 70); background: oklch(97% 0.05 70); border: 1px solid oklch(88% 0.08 70); border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; }
.callout-error { color: oklch(40% 0.15 25); background: oklch(96% 0.05 25); border: 1px solid oklch(85% 0.1 25); border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; }

/* Tables (Titolare Effettivo / Soci) */
.row-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.row-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: oklch(55% 0.01 260); padding: 6px 4px; }
.row-table td { padding: 4px 4px 4px 0; }
.row-table input { margin-right: 0; }

/* Upload form */
.upload-form {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: white; border: 1px solid oklch(90% 0.006 85); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 20px;
}
.upload-form input[type="file"] { font-size: 13px; }
.upload-form .plist-actions { margin-left: auto; margin-bottom: 0; }

/* Login card */
.login-card {
  background: white; border: 1px solid oklch(90% 0.006 85); border-radius: 12px;
  padding: 32px; box-shadow: 0 4px 16px oklch(0% 0 0 / 0.04);
}
.login-card h1 { margin-bottom: 20px; }
.field-stack { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.field-stack .field { flex: 0 0 auto; }
.dichiarazioni-column .field { flex: 0 0 auto; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn { flex: 1; text-align: center; }

/* Pratiche list */
.pratiche-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid oklch(90% 0.006 85); border-radius: 10px; overflow: hidden; }
.pratiche-table thead tr { background: oklch(95% 0.025 118); border-bottom: 2px solid oklch(72% 0.14 118); }
.pratiche-table th { text-align: left; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: oklch(35% 0.05 118); padding: 16px 18px; }
.pratiche-table td { padding: 18px; border-bottom: 1px solid oklch(94% 0.006 85); font-size: 15px; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; }
.row-actions .btn { flex-shrink: 0; }
.pratiche-table tr:last-child td { border-bottom: none; }
body.theme-blue .pratiche-table thead tr { background: oklch(95% 0.025 255); border-bottom: 2px solid oklch(58% 0.14 255); }
body.theme-blue .pratiche-table th { color: oklch(35% 0.08 255); }

@media (max-width: 720px) {
  .topbar, .tabbar, .content { padding-left: 16px; padding-right: 16px; }
}

.calendario-print-header h1 { margin-bottom: 6px; }

/* Calendario: elenco gruppi + dettaglio (layout B) */
.calendario-layout { display: flex; gap: 24px; align-items: flex-start; }
.calendario-sidebar {
  width: 300px; flex-shrink: 0; background: white; border: 1px solid oklch(90% 0.006 85);
  border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px;
}
.calendario-sidebar-header { padding: 4px 4px 10px; }
.calendario-sidebar-header .btn { width: 100%; text-align: center; }
.calendario-gruppo-item {
  display: block; padding: 12px; border-radius: 10px; text-decoration: none; color: inherit;
  border-left: 3px solid transparent;
}
.calendario-gruppo-item:hover { background: oklch(97% 0.006 85); }
.calendario-gruppo-item.active { background: oklch(96% 0.04 130); border-left-color: oklch(38% 0.09 255); }
.calendario-gruppo-item .cg-nome { font-size: 13.5px; font-weight: 700; }
.calendario-gruppo-item.active .cg-nome { color: oklch(38% 0.09 255); }
.calendario-gruppo-item .cg-meta { font-size: 11.5px; color: oklch(55% 0.01 260); margin-top: 3px; }
.calendario-gruppo-item .cg-docente { font-size: 11px; margin-top: 5px; }
.calendario-gruppo-item .cg-docente.assegnato { color: oklch(45% 0.13 155); }
.calendario-gruppo-item .cg-docente.non-assegnato { color: oklch(50% 0.1 40); }
.calendario-empty-sidebar { padding: 14px 10px; font-size: 12.5px; color: oklch(55% 0.01 260); }
.calendario-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* Sotto-tab Dettagli / Giornate formative dentro il pannello gruppo */
.calendario-subtabs { display: flex; gap: 4px; }
.calendario-subtab {
  padding: 9px 16px; font-size: 16px; font-weight: 700; color: oklch(52% 0.02 260);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.calendario-subtab.active { color: oklch(38% 0.09 255); border-bottom-color: oklch(38% 0.09 255); }

/* Scheda gruppo compatta: meno padding, titolo discreto */
.calendario-compact { padding: 16px 20px; }
.calendario-compact .section-title {
  margin: 0 0 12px; padding-bottom: 0; border-bottom: none;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: oklch(55% 0.01 260);
}

.calendario-add-giornata {
  background: oklch(97% 0.006 85); border: 1px solid oklch(90% 0.006 85); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.calendario-add-giornata-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: oklch(55% 0.01 260); margin-bottom: 10px;
}

.calendari-data-inizio {
  color: oklch(55% 0.19 25); font-weight: 600;
}

/* Modale di conferma personalizzato (sostituisce window.confirm nativo) */
.confirm-overlay {
  position: fixed; inset: 0; background: oklch(20% 0.02 260 / 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.confirm-box {
  background: white; border-radius: 12px; padding: 24px 28px;
  max-width: 420px; width: 100%; box-shadow: 0 12px 32px oklch(0% 0 0 / 0.18);
}
.confirm-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.confirm-message { font-size: 13.5px; color: oklch(30% 0.02 260); margin: 0 0 20px; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-conferma-danger { background: oklch(55% 0.18 25); color: white; border-color: oklch(55% 0.18 25); }
.confirm-conferma-danger:hover { background: oklch(48% 0.18 25); }

/* Calendari - vista a griglia mensile */
.calendario-mese-nav { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.calendario-mese-nav-label { font-size: 13.5px; color: oklch(50% 0.01 260); min-width: 130px; text-align: center; }
.calendario-griglia { background: white; border: 1px solid oklch(90% 0.006 85); border-radius: 10px; overflow: hidden; }
.calendario-griglia-intestazione {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: oklch(95% 0.025 118); border-bottom: 2px solid oklch(72% 0.14 118);
}
.calendario-griglia-intestazione div {
  padding: 10px 12px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; color: oklch(35% 0.05 118);
}
.calendario-griglia-body { display: grid; grid-template-columns: repeat(7, 1fr); align-items: stretch; }
.calendario-giorno {
  min-height: 110px; padding: 8px; border-right: 1px solid oklch(94% 0.006 85); border-bottom: 1px solid oklch(94% 0.006 85);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.calendario-giorno--fuori-mese { background: oklch(97% 0.006 85); }
.calendario-giorno--fuori-mese .calendario-giorno-numero { color: oklch(65% 0.01 260); }
.calendario-giorno-numero { font-size: 12.5px; font-weight: 700; color: oklch(35% 0.02 260); }
.calendario-giornata-chip {
  display: block; font-size: 11.5px; line-height: 1.35; padding: 4px 6px; border-radius: 6px;
  background: oklch(95% 0.025 118); color: oklch(24% 0.02 260);
  white-space: normal; overflow-wrap: break-word; word-break: break-word;
}
.calendario-giornata-chip:hover { background: oklch(90% 0.04 118); }
.calendario-giornata-chip--prima { background: oklch(55% 0.18 25); color: white; }
.calendario-giornata-chip--prima:hover { background: oklch(48% 0.18 25); }

/* Costi */
.costi-kpi-row { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.costi-kpi { flex: 1 1 180px; background: white; border: 1px solid oklch(90% 0.006 85); border-radius: 10px; padding: 14px 16px; }
.costi-kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: oklch(50% 0.02 260); }
.costi-kpi-value { font-size: 21px; font-weight: 700; margin-top: 4px; }
.costi-kpi-accent { color: oklch(38% 0.09 255); }
.costi-chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.costi-chip-caption { font-size: 12px; font-weight: 700; color: oklch(50% 0.02 260); margin-right: 4px; }
.costi-chip { border: 1px solid oklch(82% 0.01 260); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: oklch(24% 0.02 260); }
.costi-chip:hover { background: oklch(97% 0.006 85); }
.costi-chip.active { background: oklch(38% 0.09 255); border-color: oklch(38% 0.09 255); color: white; font-weight: 600; }
.costi-total-row td { font-weight: 700; border-top: 2px solid oklch(82% 0.01 260); background: oklch(97% 0.006 85); }
.costi-subtable { border-radius: 0; border-left: none; border-right: none; margin: 0; }
.costi-subtable thead tr { background: oklch(97% 0.006 85); border-bottom: 1px solid oklch(90% 0.006 85); }
.costi-subtable th { font-size: 11px; padding: 10px 18px; }
.costi-subtable td { padding: 10px 18px; font-size: 13.5px; }

/* Costi Finanziati (tab Costi sulla Pratica) — layout compatto */
.section.pratica-costi-compact { padding: 14px 18px; margin-bottom: 12px; }
.pratica-costi-compact .section-title { margin-bottom: 8px; padding-bottom: 8px; font-size: 13.5px; }
.pratica-costi-compact .section-desc { margin-bottom: 12px; }
.pratica-costi-inputrow { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.pratica-costi-inputrow .field { flex: 0 0 auto; gap: 4px; }
.pratica-costi-inputrow label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: oklch(45% 0.02 260); }
.pratica-costi-num {
  font-family: inherit; font-size: 14.5px; padding: 7px 9px; border-radius: 6px;
  border: 1px solid oklch(82% 0.01 260); background: white; color: oklch(20% 0.02 260); text-align: right;
}
.pratica-costi-num--money { width: 96px; }
.pratica-costi-num--int { width: 58px; }
.pratica-costi-num--pct { width: 58px; }
.pratica-costi-num--rate { width: 76px; }
.pratica-costi-num:disabled { background: oklch(95% 0.006 85); color: oklch(62% 0.01 260); cursor: not-allowed; }
.pratica-costi-title-row {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid oklch(93% 0.006 85); padding-bottom: 8px; margin-bottom: 8px;
}
.pratica-costi-title-row h2 { margin: 0; padding: 0; border: none; font-size: 13.5px; font-weight: 700; }
.pratica-costi-pill { background: oklch(93% 0.02 255); border-radius: 8px; padding: 8px 16px; display: flex; flex-direction: column; gap: 1px; }
.pratica-costi-pill .l { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: oklch(45% 0.02 260); }
.pratica-costi-pill .v { font-size: 19px; font-weight: 700; color: oklch(38% 0.09 255); }
.pratica-costi-cols { display: flex; gap: 14px; }
.pratica-costi-cols > .section { flex: 1; min-width: 0; }
.pratiche-table.pratica-costi-tbl td { padding: 7px 16px; font-size: 14.5px; }
.pratiche-table.pratica-costi-tbl td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pratiche-table.pratica-costi-tbl tr:last-child td { border-bottom: none; }
.pratiche-table.pratica-costi-tbl .final-row td { background: oklch(94% 0.05 155); color: oklch(38% 0.11 155); font-weight: 700; font-size: 15.5px; }
.pratiche-table.pratica-costi-tbl .subtotal-row td { border-top: 2px solid oklch(82% 0.01 260); font-weight: 700; }
.pratiche-table.pratica-costi-edizioni th { padding: 8px 12px; }
.pratiche-table.pratica-costi-edizioni td { padding: 7px 12px; font-size: 14.5px; }
.pratiche-table.pratica-costi-edizioni td:nth-child(3),
.pratiche-table.pratica-costi-edizioni td:nth-child(4),
.pratiche-table.pratica-costi-edizioni td:nth-child(6),
.pratiche-table.pratica-costi-edizioni td:nth-child(9),
.pratiche-table.pratica-costi-edizioni td:nth-child(10) { text-align: right; font-variant-numeric: tabular-nums; }

@media print {
  .appbar, .tabbar, .no-print { display: none !important; }
  body { background: white; }
  .content { max-width: none; padding: 0; }
  .section { border: none; padding: 0; margin-bottom: 24px; break-inside: avoid; }
}
