:root {
  color-scheme: light;
  --navy: #212b51;
  --ink: #212b51;
  --muted: rgba(33, 43, 81, 0.62);
  --line: rgba(33, 43, 81, 0.12);
  --bg: #ffffff;
  --card: #fefbf7;
  --terracotta: #d06e49;
  --accent: #7885d4;
  --accent-hover: #6673c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(120, 133, 212, 0.16);
  --danger: #c54a1b;
  --error-bg: #fde8e0;
  --ok-bg: #eef0fb;
  --info-bg: #f4f6fd;
  --mail-bg: #fff4ee;
  font-family: Montserrat, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }

body { margin: 0; }

.logo {
  display: block;
  width: 11.5rem;
  height: auto;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

body.app {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(208, 110, 73, 0.08), transparent 14rem),
    var(--bg);
}

body.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, var(--terracotta) 0 9.5rem, #fff7f3 9.5rem 100%);
}

body.auth main {
  width: min(28rem, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 6px solid var(--terracotta);
  border-radius: 0.9rem;
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(33, 43, 81, 0.1);
}

body.auth .logo { width: 13.5rem; margin: 0 auto 0.25rem; }

.workspace { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.9rem 1.75rem 0;
}

.account { display: flex; min-width: 0; max-width: 100%; }

.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.22rem 0.28rem 0.22rem 0.22rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.account-name {
  min-width: 0;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu { position: relative; flex: none; }

.account-toggle {
  list-style: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  cursor: pointer;
}

.account-toggle::-webkit-details-marker { display: none; }
.account-toggle::marker { content: none; }
.account-toggle:hover,
.account-menu[open] .account-toggle { background: rgba(33, 43, 81, 0.06); }
.account-toggle .icon { width: 1.05rem; height: 1.05rem; }

.account-pop {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 6;
  min-width: 11rem;
  padding: 0.35rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  box-shadow: 0 12px 28px rgba(33, 43, 81, 0.12);
}

.account-pop a,
.account-pop button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-pop a:hover,
.account-pop button:hover {
  background: rgba(33, 43, 81, 0.05);
  border-color: transparent;
  color: var(--navy);
}

.account-pop .icon { color: var(--accent); }

.account-pop .account-role {
  margin: 0 0 0.3rem;
  padding: 0.45rem 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

body.app main {
  width: 100%;
  padding: 1.15rem 1.75rem 3rem;
}

.brand {
  margin: 0 0 1.1rem;
}

.brand .logo { margin: 0; }

.sidebar {
  background: var(--card);
  border-right: 1px solid var(--line);
  border-top: 6px solid var(--terracotta);
  padding: 1.35rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 100vh;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 1.1rem 0;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar nav a {
  color: var(--navy);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  font-weight: 500;
}

.sidebar nav a .icon { color: var(--accent); }

.sidebar nav a:hover { background: rgba(33, 43, 81, 0.04); }

.sidebar nav a[aria-current="page"] {
  background: var(--accent-soft);
  font-weight: 600;
}

.muted, .hint, .lead { color: var(--muted); }

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
}

h2 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

button, .button {
  appearance: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 0.55rem;
  padding: 0.65rem 1.05rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

button:hover, .button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

.button-secondary, .ghost {
  background: transparent;
  color: var(--navy);
  border-color: rgba(33, 43, 81, 0.22);
  font-weight: 600;
}

.button-secondary:hover, .ghost:hover {
  background: rgba(33, 43, 81, 0.04);
  border-color: var(--navy);
  color: var(--navy);
}

.danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(197, 74, 27, 0.35);
}

.danger:hover {
  background: var(--error-bg);
  color: var(--danger);
  border-color: var(--danger);
}

button:focus-visible, a:focus-visible, .input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field { margin-bottom: 0.95rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

.label-line { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.35rem; }
.label-line > label { margin: 0; }
.heading-line { display: flex; align-items: center; gap: 0.4rem; margin: 1.5rem 0 0.75rem; }
.heading-line > h2,
.heading-line > h3 { margin: 0; }
.panel > .heading-line:first-child,
.panel > form > .heading-line:first-child,
.panel > fieldset > .heading-line:first-child { margin-top: 0; }

.info-tip { position: relative; display: inline-flex; flex: none; }
.info-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--accent);
  cursor: help;
  border-radius: 50%;
}
.info-i:hover,
.info-i:focus-visible { color: var(--accent-hover); outline: none; }
.info-i .icon { width: 1.15rem; height: 1.15rem; }
.info-pop {
  display: none;
  position: absolute;
  z-index: 6;
  left: 0;
  top: calc(100% + 0.35rem);
  width: max-content;
  max-width: min(18rem, 70vw);
  padding: 0.45rem 0.65rem;
  background: var(--navy);
  color: white;
  border-radius: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(33, 43, 81, 0.18);
}
.info-pop a { color: white; text-decoration: underline; }
.info-tip:hover .info-pop,
.info-tip:focus-within .info-pop { display: block; }

.input {
  width: 100%;
  border: 1px solid rgba(33, 43, 81, 0.18);
  background: white;
  color: var(--ink);
  border-radius: 0.55rem;
  padding: 0.6rem 0.75rem;
  font: inherit;
}

.input:hover { border-color: rgba(33, 43, 81, 0.35); }

.password-row { display: flex; gap: 0.5rem; align-items: center; }
.password-row .input { flex: 1; }
.password-row .ghost { flex: none; }

.field-error { color: var(--danger); margin: 0.3rem 0 0; font-size: 0.92rem; }
.hint { margin: 0.3rem 0 0; font-size: 0.92rem; }

.alert { padding: 0.75rem 0.9rem; border-radius: 0.55rem; margin: 0 0 0.7rem; }
.alert-error { background: var(--error-bg); color: var(--danger); }
.alert-success { background: var(--ok-bg); color: var(--navy); }
.alert-info { background: var(--info-bg); color: var(--navy); }
.alert-mail {
  background: var(--mail-bg);
  color: var(--navy);
  border: 1px solid rgba(208, 110, 73, 0.28);
  overflow-wrap: anywhere;
}

.after-form { margin-top: 1rem; }
.narrow { max-width: 32rem; }

.login-demos {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.login-demos h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-demos .demo {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.login-demos form { margin: 0; }

.login-demos button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.page-head, .row-actions, .actions-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.page-head { justify-content: space-between; margin-bottom: 1rem; }
.page-head h1, .page-head h2 { margin: 0; }
.section-gap { margin-top: 2rem; }
.actions-line { margin-top: 1rem; }

.search { display: flex; gap: 0.6rem; align-items: end; margin-bottom: 1rem; }
.search .field { flex: 1; margin: 0; }

.table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--card);
}

tr:last-child td { border-bottom: 0; }

.row-actions form { margin: 0; }

td.actions, td.status {
  vertical-align: middle;
}
td.actions {
  width: 1%;
  white-space: nowrap;
}
td.actions .row-actions {
  flex-wrap: nowrap;
  gap: 0.35rem;
}
td.actions .row-actions form { display: inline-flex; }

.entity-name {
  display: block;
  font-weight: 600;
}

.entity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.entity-meta .sep {
  margin: 0 0.4rem;
  color: rgba(33, 43, 81, 0.35);
}

.icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  flex: none;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(120, 133, 212, 0.45);
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.icon-pair { flex-wrap: nowrap; gap: 0.35rem; }

.icon-btn .icon { width: 1.05rem; height: 1.05rem; }

a.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--accent);
}

button.icon-btn.danger { color: var(--danger); }

button.icon-btn.danger:hover {
  background: var(--error-bg);
  color: var(--danger);
  border-color: var(--danger);
}

.stats {
  display: flex;
  gap: 0.8rem;
  padding: 0;
  list-style: none;
  margin: 1rem 0;
}

.stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 0.75rem;
  padding: 0.95rem 1.15rem;
  min-width: 9rem;
  display: flex;
  flex-direction: column;
}

.stats strong { font-size: 1.6rem; color: var(--navy); }
.stats span { color: var(--muted); }

dl.facts { display: grid; grid-template-columns: 10rem 1fr; gap: 0.4rem 1rem; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.plain { padding-left: 1.1rem; }

@media (max-width: 800px) {
  body.app { grid-template-columns: 1fr; }
  .sidebar {
    min-height: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    gap: 0.75rem;
  }
  .sidebar .brand { margin: 0; }
  .sidebar .logo { width: 8.5rem; }
  .sidebar nav { flex-direction: row; margin: 0; }
  .topbar { padding: 0.75rem 1rem 0; }
  dl.facts { grid-template-columns: 1fr; }
  body.app main { padding: 1rem 1rem 2.5rem; }
}

/* ------------------------------------------------------------------ */
/* Censimento condomini: sezioni, filtri, chip, pannelli, form         */
/* ------------------------------------------------------------------ */

.breadcrumb { margin: 0 0 0.6rem; font-size: 0.92rem; }
.block { display: block; }
.num { text-align: right; white-space: nowrap; }
.uppercase input { text-transform: uppercase; }
.result-count { margin: 0 0 0.5rem; font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0; }

.chip {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  background: var(--info-bg);
  color: var(--navy);
  border: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.chip-ok { background: var(--accent-soft); border-color: rgba(120, 133, 212, 0.4); }
.chip-warn { background: var(--mail-bg); border-color: rgba(208, 110, 73, 0.4); color: #8f4423; }
.chip-muted { background: rgba(33, 43, 81, 0.05); color: var(--muted); }

.scheda-head .lead { margin: 0.5rem 0 0; }
.scheda-head { align-items: flex-start; }

.hint-list { margin: 1rem 0; }
.hint-list h2 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.hint-list .alert { margin-bottom: 0.4rem; border-left: 4px solid var(--terracotta); }

.archive-banner { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; justify-content: space-between; }
.archive-banner p { margin: 0; }
.archive-banner form { margin: 0; }

/* Navigazione a sezioni della scheda */
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin: 1.25rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.section-nav a {
  padding: 0.65rem 0.9rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  border-radius: 0.45rem 0.45rem 0 0;
}

.section-nav a:hover { background: rgba(33, 43, 81, 0.04); }

.section-nav a[aria-current="page"] {
  font-weight: 600;
  border-bottom-color: var(--terracotta);
  background: rgba(208, 110, 73, 0.07);
}

/* Barra dei filtri dell'elenco */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--terracotta);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem 0.6rem;
  margin-bottom: 0.5rem;
}

.filter-bar .field { margin: 0; }
.filter-bar .filter-q { grid-column: 1 / -1; }
.filter-actions { display: flex; gap: 0.5rem; margin-bottom: 0.95rem; }
.search-row { display: flex; align-items: stretch; gap: 0.5rem; }
.search-row .input { flex: 1; min-width: 0; width: auto; }
.search-line .filter-actions { margin: 0; flex: none; }
.filter-note { margin: 0 0 1rem; }

/* Pannelli e form */
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1.1rem;
}

.panel > h2:first-child, .panel > form > h2:first-child { margin-top: 0; }
.panel h3 { font-size: 0.95rem; margin: 1.25rem 0 0.6rem; color: var(--navy); }
.form-panel { max-width: 46rem; }

.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.plain-fieldset:disabled .panel { background: var(--card); }

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

.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
textarea.input { resize: vertical; }
select.input { appearance: auto; }

.checkbox-field { align-self: end; }
.filter-bar .checkbox-field { grid-column: 1 / -1; }
.filter-bar label.checkbox { white-space: nowrap; }
label.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; margin: 0; padding: 0.55rem 0; }
label.checkbox input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

.inline-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin: 0.5rem 0; }
.inline-form .form-grid { flex: 1 1 100%; }
.inline-label { margin: 0; align-self: center; font-weight: 500; }
.narrow-input { width: 7rem; }
.close-form { margin: 0.4rem 0; }
.close-form .input { width: auto; }
.propose-form { margin-top: 1rem; }
.delete-form { margin-top: 0.75rem; }

/* Voci di elenco (indirizzi, incarichi, contatti, esercizi, tabelle) */
.item-card, .address-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--card);
  padding: 0.8rem 1rem;
  margin-bottom: 0.7rem;
}

.item-head p, .address-head p { margin: 0 0 0.2rem; }
.item-label, .address-label { font-weight: 600; }

details.inline-edit { margin-top: 0.6rem; }
details.inline-edit > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-hover);
  padding: 0.25rem 0;
}
details.inline-edit[open] > summary { margin-bottom: 0.6rem; }
details.inline-edit > form, details.inline-edit > .field { margin-top: 0.4rem; }

.preview {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--mail-bg);
  border: 1px solid rgba(208, 110, 73, 0.28);
  border-radius: 0.75rem;
}
.preview h3 { margin-top: 0; }
.preview-list { margin: 0 0 0.8rem; line-height: 1.7; }

.archive-zone p { margin-top: 0; }

/* Impianti, spazi e servizi */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feature-card {
  background: white;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  scroll-margin-top: 1rem;
}

.feature-card[data-presenza="NON_DISPONIBILE"] { border-top-color: rgba(33, 43, 81, 0.2); }
.feature-card[data-presenza="NO"] { border-top-color: rgba(208, 110, 73, 0.55); }
.feature-card:target { box-shadow: 0 0 0 2px var(--accent-soft); }

.feature-head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: flex-start; }
.feature-head h3 { margin: 0 0 0.4rem; }
.feature-summary { margin: 0 0 0.6rem; font-size: 0.9rem; }
.feature-details { padding: 0.2rem 0 0.1rem; }
.feature-details[hidden] { display: none; }
.feature-form .field { margin-bottom: 0.7rem; }
.feature-form > button { margin-top: 0.4rem; }

[hidden] { display: none !important; }

@media (max-width: 800px) {
  .form-grid, .form-grid-4 { grid-template-columns: 1fr; }
  .section-nav { overflow-x: auto; flex-wrap: nowrap; }
  .section-nav a { white-space: nowrap; }
}
/* Flusso esercizio: gruppi di documenti e riquadri di stato */
.doc-group { margin-top: 1.1rem; }
.doc-group:first-of-type { margin-top: 0.6rem; }
.doc-group h3 { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: baseline; }
.alert-warn { background: #fff8e1; color: #6d5200; border-left: 3px solid #e0b100; }
.alert-error[data-bloccante] { border-left: 3px solid var(--danger); }
.alert a { margin-left: 0.35rem; font-weight: 600; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 1.5rem minmax(12rem, 1fr) 2fr; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.checklist li:last-child { border-bottom: 0; }
.checklist .ok .check-mark { color: var(--accent); font-weight: 700; }
.checklist .manca .check-mark { color: var(--terracotta); }
@media (max-width: 640px) { .checklist li { grid-template-columns: 1.5rem 1fr; } .checklist .check-docs { grid-column: 2; } }

/* Notifiche */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 999px; border: 1px solid var(--line); background: white; color: var(--navy); }
.bell:hover { background: rgba(33, 43, 81, 0.05); }
.bell .icon { width: 1.2rem; height: 1.2rem; }
.bell-count { position: absolute; top: -0.3rem; right: -0.3rem; min-width: 1.2rem; height: 1.2rem; padding: 0 0.3rem; border-radius: 999px; background: var(--terracotta); color: white; font-size: 0.7rem; font-weight: 700; line-height: 1.2rem; text-align: center; }
.notifiche { list-style: none; margin: 0; padding: 0; }
.notifiche li { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 0.6rem; margin-bottom: 0.55rem; background: white; }
.notifiche li.nuova { border-left: 3px solid var(--terracotta); }
.notifiche li.letta { opacity: 0.75; }
.notifiche p { margin: 0.2rem 0 0; }
.notifica-titolo { font-weight: 600; color: var(--navy); }
.small { font-size: 0.8rem; }

/* Stato dell'esercizio e invio all'analisi */
.stato-panel .motivi { margin: 0.3rem 0 0.8rem; padding-left: 1.2rem; }
.conferma-invio > summary { display: inline-flex; list-style: none; cursor: pointer; }
.conferma-invio > summary::-webkit-details-marker { display: none; }
.conferma-box { margin-top: 0.8rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--card); }
.conferma-box h3 { margin-top: 0; }
.conferma-box .mancanti li { color: #8f4423; }
button[disabled] { opacity: 0.55; cursor: not-allowed; }
.cronologia { list-style: none; margin: 0; padding: 0; }
.cronologia li { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.cronologia .motivazione { flex-basis: 100%; margin: 0.15rem 0 0; padding: 0.4rem 0.6rem; background: var(--info-bg); border-radius: 0.4rem; }

/* Area operatore */
.filtri-coda legend { font-weight: 600; margin-bottom: 0.4rem; }
.check-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-bottom: 0.8rem; }
.riepilogo { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 0.45rem 1rem; margin: 0; }
.riepilogo dt { color: var(--muted); }
.riepilogo dd { margin: 0; }
@media (max-width: 640px) { .riepilogo { grid-template-columns: 1fr; } .riepilogo dd { margin-bottom: 0.4rem; } }
.banner-integrazione p { margin: 0.2rem 0; }
.banner-integrazione ul { margin: 0.2rem 0 0.3rem; padding-left: 1.2rem; }
.stato-panel > .motivazione, .banner-integrazione .motivazione { padding: 0.4rem 0.6rem; background: var(--info-bg); border-radius: 0.4rem; color: var(--navy); }
.gruppo-dati { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; }
.gruppo-dati > summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.tabella-dati th[scope="row"] { font-weight: 500; min-width: 12rem; }
.tabella-dati .input { min-width: 6rem; }
.num-input { text-align: right; }
.tabella-kpi code { font-size: 0.78rem; color: var(--muted); white-space: normal; }
.tabella-kpi tr.non-calcolabile td.num { color: var(--muted); }
.evidenza { border-left: 3px solid var(--line); }
.evidenza.gravita-alta { border-left-color: var(--danger); }
.evidenza.gravita-media { border-left-color: #e0b100; }
.evidenza.gravita-bassa { border-left-color: var(--accent); }
.evidenza .chips { margin: 0.2rem 0 0.35rem; }
.evidenza-form { margin-top: 0.5rem; }

/* Report */
.report-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.8rem; }
.report { background: white; border: 1px solid var(--line); border-radius: 0.8rem; padding: 1.4rem 1.6rem; }
.report-head h1 { margin: 0.2rem 0; }
.report-section { margin-top: 1.4rem; }
.report-section h2 { font-size: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
.tabella-report { width: 100%; border-collapse: collapse; margin-bottom: 0.8rem; }
.tabella-report th, .tabella-report td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tabella-report th[scope="row"] { font-weight: 500; }
.evidenza-collegata { color: #8f4423; font-size: 0.85rem; }
.report-evidenza { border-left: 3px solid var(--line); padding: 0.2rem 0 0.2rem 0.8rem; margin-bottom: 0.7rem; }
.report-evidenza.gravita-alta { border-left-color: var(--danger); }
.report-evidenza.gravita-media { border-left-color: #e0b100; }
.report-evidenza p { margin: 0.15rem 0; }
.note-operatore { white-space: pre-line; }
.nota-metodologica { font-style: italic; }
.versioni-report { margin: 0; padding-left: 1.1rem; }
.azione-report { margin-bottom: 0.8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabella-registro td { font-size: 0.85rem; max-width: 18rem; overflow-wrap: anywhere; }

/* Dashboard del flusso */
.stati-esercizi { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.stati-esercizi strong { font-size: 1.25rem; color: var(--navy); margin-right: 0.25rem; }
