/* Civico+ v27.2 - geografia strutturata condominio */
:root {
  --bg: #f5f7f5;
  --surface: #ffffff;
  --surface-soft: #f0f3ef;
  --text: #162019;
  --muted: #6d786f;
  --line: #dfe5df;
  --accent: #176b45;
  --accent-dark: #0f5435;
  --accent-soft: #e0f1e8;
  --danger: #b62f3b;
  --shadow: 0 18px 60px rgba(18, 45, 31, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  height: 72px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245,247,245,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center; color: #fff; background: var(--accent);
}
nav { display:flex; align-items:center; gap:10px; }

.primary, .secondary, .link-btn {
  border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 750;
}
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); }
.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.link-btn { background: transparent; color: var(--text); }
.small { padding: 10px 15px; }
.full { width: 100%; }

.view { display: none; }
.view.active { display: block; }

.hero {
  max-width: 1180px; margin: 0 auto; min-height: calc(100vh - 72px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 80px; align-items:center;
  padding: 70px 32px;
}
.eyebrow { font-size: 12px; letter-spacing: .15em; font-weight: 850; color: var(--accent); }
h1 { font-size: clamp(54px, 7vw, 94px); line-height: .93; letter-spacing: -.065em; margin: 18px 0 26px; }
.hero-copy { font-size: 20px; line-height:1.6; color:var(--muted); max-width: 600px; }
.hero-actions { display:flex; gap:12px; margin-top:32px; }
.mini-features { display:flex; flex-wrap:wrap; gap:18px; margin-top:28px; color:var(--muted); font-size:14px; }

.preview-card {
  background:var(--surface); border:1px solid var(--line); border-radius:28px;
  padding:26px; box-shadow:var(--shadow); transform: rotate(1deg);
}
.preview-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:26px; }
.preview-head small, .panel-head small { display:block; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.1em; }
.preview-head strong { display:block; margin-top:5px; font-size:23px; }
.status { font-size:12px; background:var(--accent-soft); color:var(--accent-dark); padding:8px 10px; border-radius:999px; font-weight:750; }
.preview-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:22px; }
.preview-grid div { background:var(--surface-soft); border-radius:16px; padding:17px; }
.preview-grid b, .preview-grid span { display:block; }
.preview-grid b { font-size:20px; margin-bottom:5px; }
.preview-grid span { color:var(--muted); font-size:13px; }
.activity { display:flex; gap:12px; align-items:center; padding:14px 4px; border-top:1px solid var(--line); }
.activity small, .activity b { display:block; }
.activity small { color:var(--muted); margin-top:3px; }
.dot { width:10px; height:10px; border-radius:50%; background:var(--accent); }

.auth-page { min-height:calc(100vh - 72px); padding:60px 20px; }
.auth-page.active { display:grid; place-items:start center; }
.auth-card {
  width:min(460px, 100%); margin-top:20px; background:var(--surface);
  border:1px solid var(--line); border-radius:24px; padding:34px; box-shadow:var(--shadow);
}
.auth-card.wide { width:min(580px, 100%); }
.auth-card h2 { font-size:34px; margin:8px 0; letter-spacing:-.04em; }
.auth-card > p { color:var(--muted); margin-bottom:26px; }
form { display:grid; gap:17px; }
label { font-size:13px; font-weight:700; display:grid; gap:7px; }
label small { color:var(--muted); font-weight:500; }
input {
  width:100%; border:1px solid var(--line); border-radius:12px;
  background:#fff; padding:13px 14px; outline:none;
}
input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.two-cols { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.role-picker { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.role-card {
  grid-template-columns:auto auto 1fr; align-items:center; padding:15px;
  border:1px solid var(--line); border-radius:16px; cursor:pointer;
}
.role-card:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.role-card input { width:auto; }
.role-icon { font-size:22px; }
.role-card b, .role-card small { display:block; }
.role-card small { margin-top:3px; line-height:1.35; }
.switch { text-align:center; font-size:14px; margin:20px 0 0!important; }
.text-link { border:0; background:none; padding:0; color:var(--accent); font-weight:750; }

.dashboard-page.active { display:grid; grid-template-columns:250px 1fr; min-height:calc(100vh - 72px); }
.sidebar { background:#102b20; color:#fff; padding:26px 16px; }
.side-title { font-size:20px; font-weight:850; padding:0 12px 24px; }
.side-link {
  width:100%; display:flex; align-items:center; gap:11px; color:#d7e2dc; background:transparent;
  border:0; padding:12px; border-radius:11px; margin:3px 0; text-align:left;
}
.side-link.active { background:rgba(255,255,255,.1); color:#fff; }
.side-link em { margin-left:auto; font-style:normal; font-size:10px; opacity:.55; }
.side-link.disabled { opacity:.6; cursor:default; }

.dashboard-main { padding:42px; overflow:hidden; }
.dashboard-header { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.dashboard-header h2 { font-size:38px; letter-spacing:-.045em; margin:7px 0; }
.dashboard-header p { color:var(--muted); margin:0; }
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:34px 0 20px; }
.stat-grid article { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:20px; }
.stat-grid span { color:var(--muted); font-size:13px; }
.stat-grid b { display:block; font-size:32px; margin-top:7px; }
.content-grid { display:grid; grid-template-columns:1.2fr .8fr; gap:18px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:22px; min-height:300px; }
.panel-head h3 { margin:5px 0 0; font-size:22px; }
.empty-state { color:var(--muted); display:grid; place-items:center; min-height:220px; text-align:center; padding:20px; }
.condo-item { display:flex; justify-content:space-between; gap:18px; padding:16px 0; border-bottom:1px solid var(--line); }
.condo-item:last-child { border:0; }
.condo-item b, .condo-item small { display:block; }
.condo-item small { color:var(--muted); margin-top:4px; }
.badge { align-self:center; background:var(--surface-soft); padding:7px 9px; border-radius:999px; font-size:11px; font-weight:800; }
.feature-coming { min-height:230px; display:flex; flex-direction:column; justify-content:center; text-align:center; align-items:center; max-width:360px; margin:auto; }
.big-icon { width:58px; height:58px; border-radius:18px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent); font-size:28px; }
.feature-coming h4 { margin:16px 0 7px; font-size:19px; }
.feature-coming p { color:var(--muted); line-height:1.55; margin:0; }

dialog { border:0; border-radius:22px; width:min(520px, calc(100% - 30px)); padding:0; box-shadow:var(--shadow); }
dialog::backdrop { background:rgba(11,24,17,.5); backdrop-filter:blur(4px); }
dialog form { padding:26px; }
.dialog-head { display:flex; justify-content:space-between; align-items:flex-start; }
.dialog-head h3 { margin:5px 0 6px; font-size:26px; }
.icon-btn { border:0; background:var(--surface-soft); width:36px; height:36px; border-radius:10px; font-size:22px; }

.toast {
  position:fixed; right:24px; bottom:24px; z-index:100;
  background:#162019; color:#fff; padding:13px 16px; border-radius:12px;
  opacity:0; transform:translateY(10px); pointer-events:none; transition:.2s;
  max-width:380px;
}
.toast.show { opacity:1; transform:none; }
.toast.error { background:var(--danger); }

@media (max-width: 900px) {
  .hero { grid-template-columns:1fr; gap:35px; }
  .preview-card { transform:none; }
  .dashboard-page.active { grid-template-columns:78px 1fr; }
  .side-title { font-size:0; }
  .side-title:after { content:"P"; font-size:20px; }
  .side-link span, .side-link em { display:none; }
  .side-link { justify-content:center; font-size:19px; }
  .stat-grid { grid-template-columns:1fr 1fr; }
  .content-grid { grid-template-columns:1fr; }
}
@media (max-width: 620px) {
  .topbar { padding:0 18px; }
  h1 { font-size:54px; }
  .hero { padding:44px 20px; }
  .hero-actions, .mini-features { flex-direction:column; align-items:stretch; }
  .two-cols, .role-picker { grid-template-columns:1fr; }
  .dashboard-page.active { display:block; }
  .sidebar { display:none; }
  .dashboard-main { padding:24px 16px; }
  .dashboard-header { flex-direction:column; }
  .stat-grid { grid-template-columns:1fr 1fr; }
}


.dashboard-section { display:none; }
.dashboard-section.active { display:block; }

.section-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  margin:34px 0 20px;
}
.section-toolbar h3 {
  margin:6px 0 6px;
  font-size:30px;
  letter-spacing:-.035em;
}
.section-toolbar p {
  margin:0;
  color:var(--muted);
}
.condo-card {
  align-items:center;
  padding:18px 2px;
}
.condo-main {
  display:flex;
  align-items:center;
  gap:14px;
}
.condo-icon {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--accent-soft);
  font-size:21px;
}
@media (max-width:620px) {
  .section-toolbar { flex-direction:column; }
  .section-toolbar .primary { width:100%; }
}


/* =========================================================
   V5 - PAGINA CONDOMINI
   ========================================================= */

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
}

.condominiums-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.condominiums-page-head h2 {
  margin: 8px 0 7px;
  font-size: 40px;
  letter-spacing: -.045em;
}

.condominiums-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.condominium-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.management-condo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 26px rgba(18, 45, 31, .045);
  transition: transform .16s ease, box-shadow .16s ease;
}

.management-condo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(18, 45, 31, .08);
}

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

.building-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  font-size: 23px;
}

.management-card-content {
  padding: 22px 0;
  flex: 1;
}

.management-card-content h3 {
  margin: 0 0 10px;
  font-size: 23px;
  letter-spacing: -.025em;
}

.management-card-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.management-card-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  align-items: center;
}

.management-card-footer .secondary {
  flex: 1;
  padding: 10px 13px;
}

.icon-action {
  width: 41px;
  height: 41px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 19px;
  display: grid;
  place-items: center;
}

.icon-action.edit:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.icon-action.delete {
  color: #a72733;
}

.icon-action.delete:hover {
  border-color: #e0abb0;
  background: #fff0f1;
}

.empty-management {
  grid-column: 1 / -1;
  min-height: 340px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 35px;
  background: rgba(255,255,255,.45);
}

.empty-building {
  font-size: 42px;
  margin-bottom: 10px;
}

.empty-management h3 {
  margin: 0;
  font-size: 22px;
}

.empty-management p {
  margin: 7px 0 0;
  color: var(--muted);
}

.danger-dialog {
  width: min(470px, calc(100% - 30px));
}

.delete-dialog-body {
  padding: 34px;
  text-align: center;
}

.danger-symbol {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff0f1;
  color: #b62f3b;
  font-size: 28px;
  font-weight: 850;
  margin: 0 auto 16px;
}

.delete-dialog-body h3 {
  margin: 0 0 10px;
  font-size: 25px;
}

.delete-dialog-body p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin-top: 25px;
}

.danger-button {
  border: 0;
  border-radius: 12px;
  padding: 13px 15px;
  background: #b62f3b;
  color: white;
  font-weight: 750;
}

.danger-button:hover {
  background: #962531;
}

.danger-button:disabled {
  opacity: .65;
  cursor: wait;
}

@media (max-width: 1050px) {
  .condominium-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .condominiums-page-head {
    flex-direction: column;
  }

  .condominiums-page-head .primary {
    width: 100%;
  }

  .condominium-management-grid {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V6 - INVITI CONDOMINIO
   ========================================================= */

.invite-link-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 10px 12px;
  font-weight: 750;
  white-space: nowrap;
}

.invite-link-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.invite-link-dialog-body {
  padding: 26px;
}

.dialog-copy {
  color: var(--muted);
  line-height: 1.55;
  margin: 4px 0 18px;
}

.copy-link-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.copy-link-box input {
  min-width: 0;
  background: var(--surface-soft);
}

.invite-note {
  display: block;
  margin-top: 11px;
  color: var(--muted);
}

.invite-page.active {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding: 38px 18px;
}

.invite-shell {
  width: min(580px, 100%);
}

.invite-hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.invite-building-icon {
  width: 70px;
  height: 70px;
  border-radius: 21px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  margin: 0 auto 20px;
  font-size: 32px;
}

.invite-hero-card h2 {
  margin: 8px 0 8px;
  font-size: 34px;
  letter-spacing: -.04em;
}

.invite-hero-card > p {
  color: var(--muted);
  margin: 0;
}

.invite-actions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.invite-actions p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 17px;
}

.invite-actions .primary,
.invite-actions .secondary {
  margin: 4px;
}

.invite-success {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.success-check {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 27px;
  font-weight: 850;
  margin: 0 auto 12px;
}

.invite-success h3 {
  margin: 0 0 16px;
}

.invite-error {
  margin-top: 24px;
  background: #fff0f1;
  color: #9d2632;
  border: 1px solid #efc1c5;
  border-radius: 14px;
  padding: 14px;
}

@media (max-width: 680px) {
  .copy-link-box {
    grid-template-columns: 1fr;
  }

  .invite-hero-card {
    padding: 28px 20px;
  }

  .management-card-footer {
    flex-wrap: wrap;
  }

  .management-card-footer .secondary,
  .invite-link-button {
    flex: 1 1 100%;
  }
}


/* =========================================================
   V6.1 - CONFERMA ACCETTAZIONE INVITO
   ========================================================= */

.confirm-invite-dialog {
  width: min(500px, calc(100% - 30px));
}

.confirm-invite-body {
  padding: 34px;
  text-align: center;
}

.confirm-invite-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 29px;
  font-weight: 850;
}

.confirm-invite-body h3 {
  margin: 8px 0 12px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.confirm-invite-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-invite-body .dialog-actions {
  margin-top: 26px;
}

@media (max-width: 560px) {
  .confirm-invite-body {
    padding: 28px 20px;
  }
}


/* =========================================================
   V7 - GESTIONE INTERNA CONDOMINIO
   ========================================================= */

.condominium-manage-page.active {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 72px);
}

.condo-manage-main {
  padding: 42px;
  min-width: 0;
}

.condo-manage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 38px;
}

.condo-manage-header h2 {
  margin: 7px 0 6px;
  font-size: 42px;
  letter-spacing: -.05em;
}

.condo-manage-header p {
  margin: 0;
  color: var(--muted);
}

.condo-manage-section {
  display: none;
}

.condo-manage-section.active {
  display: block;
}

.members-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.members-section-head h3 {
  margin: 7px 0 5px;
  font-size: 29px;
  letter-spacing: -.035em;
}

.members-section-head p {
  margin: 0;
  color: var(--muted);
}

.members-count-box {
  min-width: 92px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 17px;
  text-align: center;
}

.members-count-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.members-count-box b {
  display: block;
  margin-top: 4px;
  font-size: 27px;
}

.members-panel {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.members-table-wrap {
  overflow-x: auto;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.members-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
  padding: 15px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.members-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
}

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

.member-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 850;
}

.member-person b,
.member-person small {
  display: block;
}

.member-person small {
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

.member-unit-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.member-unit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf6f1;
  border: 1px solid #d6e7de;
  color: #2f5d49;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
}

.member-role {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
}

.member-role.manager {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.remove-member-btn {
  border: 1px solid #efc1c5;
  background: #fff;
  color: #a72733;
  border-radius: 10px;
  padding: 8px 11px;
  font-weight: 750;
  font-size: 12px;
}

.remove-member-btn:hover {
  background: #fff0f1;
}

.protected-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.member-actions-cell {
  text-align: right;
}

.table-empty {
  text-align: center;
  padding: 45px !important;
  color: var(--muted);
}

@media (max-width: 900px) {
  .condominium-manage-page.active {
    grid-template-columns: 78px 1fr;
  }

  .condominium-manage-page .sidebar .side-link span,
  .condominium-manage-page .sidebar .side-link em {
    display: none;
  }

  .condominium-manage-page .sidebar .side-link {
    justify-content: center;
  }

  .condo-manage-main {
    padding: 28px;
  }
}

@media (max-width: 620px) {
  .condominium-manage-page.active {
    display: block;
  }

  .condominium-manage-page .sidebar {
    display: none;
  }

  .condo-manage-main {
    padding: 24px 16px;
  }

  .condo-manage-header,
  .members-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .condo-manage-header .primary {
    width: 100%;
  }

  .members-count-box {
    width: 100%;
  }
}


/* =========================================================
   V8 - VISIBILITÀ MEMBRI + ASSEGNAZIONE UNITÀ + PALAZZO
   ========================================================= */

.assign-unit-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 750;
  font-size: 12px;
  margin-right: 6px;
}

.assign-unit-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.assign-unit-btn.compact {
  margin: 0 0 0 auto;
  white-space: nowrap;
}

.building-section-head {
  margin-bottom: 24px;
}

.building-section-head h3 {
  margin: 7px 0 5px;
  font-size: 29px;
  letter-spacing: -.035em;
}

.building-section-head p {
  margin: 0;
  color: var(--muted);
}

.building-view {
  max-width: 1050px;
  margin: 0 auto;
}

.empty-building-view {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 24px;
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 35px;
}

.empty-building-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-building-view h4 {
  margin: 0;
  font-size: 22px;
}

.empty-building-view p {
  color: var(--muted);
  max-width: 480px;
  line-height: 1.55;
}

.building-roof {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  padding-top: 65px;
  text-align: center;
}

.roof-shape {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 410px solid transparent;
  border-right: 410px solid transparent;
  border-bottom: 90px solid #173c2d;
}

.building-title-small {
  position: relative;
  z-index: 2;
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 5px 18px rgba(18,45,31,.08);
}

.building-structure {
  max-width: 900px;
  margin: 0 auto 30px;
  border-left: 10px solid #244d3b;
  border-right: 10px solid #244d3b;
  background: #e9eee9;
  box-shadow: 0 22px 50px rgba(18,45,31,.11);
  position: relative;
}

.building-floor {
  display: grid;
  grid-template-columns: 105px 1fr;
  min-height: 175px;
  border-bottom: 8px solid #244d3b;
}

.floor-label-box {
  background: #173c2d;
  color: white;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 15px;
  text-align: center;
}

.floor-label-box span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .11em;
  opacity: .72;
}

.floor-label-box b {
  font-size: 32px;
  margin-top: 4px;
}

.floor-apartments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  padding: 18px;
  align-items: stretch;
}

.apartment-window {
  background: #fff;
  border: 5px solid #b8c5bd;
  border-radius: 5px;
  min-height: 135px;
  padding: 12px;
  box-shadow:
    inset 0 0 0 2px #eef2ef,
    0 5px 12px rgba(18,45,31,.08);
  position: relative;
}

.apartment-window::before,
.apartment-window::after {
  content: "";
  position: absolute;
  background: #d6dfd9;
}

.apartment-window::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  opacity: .55;
}

.apartment-window::after {
  top: 45px;
  left: 0;
  right: 0;
  height: 3px;
  opacity: .55;
}

.window-top,
.window-members {
  position: relative;
  z-index: 2;
}

.window-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.window-top span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
}

.window-top b {
  font-size: 20px;
}

.window-members {
  display: grid;
  gap: 7px;
}

.window-member {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.9);
  border-radius: 8px;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 700;
}

.window-avatar {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 850;
  flex: 0 0 auto;
}

.building-ground {
  height: 110px;
  background: #dce4de;
  display: grid;
  place-items: end center;
  padding-bottom: 0;
}

.building-door {
  width: 88px;
  height: 90px;
  background: #173c2d;
  color: #f1f5f2;
  border-radius: 7px 7px 0 0;
  display: grid;
  place-items: center;
  font-size: 38px;
  border: 5px solid #244d3b;
  border-bottom: 0;
}

.unassigned-wrap {
  max-width: 1050px;
  margin: 32px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
}

.unassigned-head h4 {
  margin: 0;
  font-size: 20px;
}

.unassigned-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.unassigned-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.unassigned-member-card {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.unassigned-member-card b,
.unassigned-member-card small {
  display: block;
}

.unassigned-member-card small {
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

@media (max-width: 900px) {
  .roof-shape {
    border-left-width: 320px;
    border-right-width: 320px;
  }

  .building-floor {
    grid-template-columns: 82px 1fr;
  }

  .floor-apartments {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 620px) {
  .building-roof {
    display: none;
  }

  .building-structure {
    border-left-width: 5px;
    border-right-width: 5px;
  }

  .building-floor {
    grid-template-columns: 1fr;
  }

  .floor-label-box {
    min-height: 62px;
    grid-auto-flow: column;
    gap: 8px;
  }

  .floor-label-box b {
    font-size: 24px;
  }

  .floor-apartments {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .unassigned-grid {
    grid-template-columns: 1fr;
  }

  .members-table {
    min-width: 1000px;
  }
}


/* =========================================================
   V9 - PALAZZO REALISTICO
   ========================================================= */

/* Nascondiamo completamente gli elementi grafici precedenti */
.building-roof,
.roof-shape,
.building-ground,
.building-door,
.building-title-small,
.building-structure,
.building-floor,
.floor-label-box,
.floor-apartments,
.apartment-window,
.window-top,
.window-members,
.window-member,
.window-avatar {
  display: none !important;
}

.real-building-shell {
  max-width: 1120px;
  margin: 0 auto 36px;
}

.real-building-nameplate {
  width: max-content;
  max-width: 90%;
  margin: 0 auto 14px;
  background: #ece7dd;
  color: #4a4338;
  border: 1px solid #cfc6b7;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(48, 42, 32, .08);
}

.real-building-facade {
  background:
    linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)),
    repeating-linear-gradient(
      0deg,
      #d8d0c4 0,
      #d8d0c4 34px,
      #d2c9bb 35px,
      #d2c9bb 36px
    );
  border: 1px solid #b8aea0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 28px 60px rgba(39, 36, 31, .16),
    inset 0 0 0 1px rgba(255,255,255,.25);
  position: relative;
}

.real-building-facade::before,
.real-building-facade::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background: rgba(120, 109, 94, .18);
  z-index: 0;
}

.real-building-facade::before {
  left: 0;
}

.real-building-facade::after {
  right: 0;
}

.real-building-floor {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: stretch;
  min-height: 210px;
  border-bottom: 12px solid #bcb2a5;
  box-shadow: inset 0 -1px 0 rgba(90,80,68,.12);
  z-index: 1;
}

.real-building-floor:last-child {
  border-bottom: 0;
}

.real-floor-badge {
  background: linear-gradient(180deg, #c1b6a7, #b2a696);
  color: #51493f;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-right: 1px solid #a99d8d;
  text-align: center;
  box-shadow: inset -4px 0 9px rgba(80,70,58,.06);
}

.real-floor-badge span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  opacity: .72;
}

.real-floor-badge b {
  margin-top: 5px;
  font-size: 30px;
  line-height: 1;
}

.real-apartment-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 20px;
  align-items: stretch;
  padding: 24px 26px 28px;
}

.real-apartment {
  position: relative;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.balcony-rail {
  height: 27px;
  margin: 0 10px -1px;
  border: 2px solid #72716c;
  border-bottom-width: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 14px,
      #72716c 14px,
      #72716c 16px
    );
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 7px rgba(0,0,0,.08);
}

.real-window-frame {
  position: relative;
  min-height: 138px;
  background: #8da7af;
  border: 10px solid #f0ede7;
  box-shadow:
    0 0 0 2px #a1988c,
    0 10px 18px rgba(71,62,51,.12),
    inset 0 0 20px rgba(46,67,74,.15);
  overflow: hidden;
}

.window-pane {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.42),
      rgba(189,210,218,.18) 45%,
      rgba(62,96,108,.14)
    );
}

.left-pane { left: 0; }
.right-pane { right: 0; }

.window-cross-v,
.window-cross-h {
  position: absolute;
  background: #f0ede7;
  z-index: 2;
}

.window-cross-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 5px;
  transform: translateX(-50%);
}

.window-cross-h {
  left: 0;
  right: 0;
  top: 48%;
  height: 5px;
}

.apartment-overlay {
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.apartment-unit-number {
  align-self: flex-start;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(107,100,91,.16);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  color: #5b554d;
  font-weight: 800;
  box-shadow: 0 2px 7px rgba(0,0,0,.06);
}

.apartment-unit-number strong {
  font-size: 13px;
  margin-left: 2px;
}

.apartment-residents {
  display: grid;
  gap: 5px;
  align-content: end;
}

.resident-chip {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(101,95,87,.14);
  border-radius: 9px;
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 750;
  color: #403c36;
  box-shadow: 0 2px 7px rgba(0,0,0,.07);
}

.resident-chip > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resident-dot {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dce9e2;
  color: #22563c;
  font-size: 10px;
  font-weight: 850;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .real-building-floor {
    grid-template-columns: 72px 1fr;
  }

  .real-apartment-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    padding: 18px;
  }
}

@media (max-width: 620px) {
  .real-building-floor {
    grid-template-columns: 1fr;
  }

  .real-floor-badge {
    min-height: 56px;
    flex-direction: row;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid #a99d8d;
  }

  .real-floor-badge b {
    margin-top: 0;
    font-size: 24px;
  }

  .real-apartment-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }

  .real-building-nameplate {
    font-size: 11px;
  }
}


/* =========================================================
   V10 - PALAZZO VERTICALE E MODULARE
   ========================================================= */

.real-building-shell,
.real-building-nameplate,
.real-building-facade,
.real-building-floor,
.real-floor-badge,
.real-apartment-row,
.real-apartment,
.balcony-rail,
.real-window-frame,
.window-pane,
.window-cross-v,
.window-cross-h,
.apartment-overlay,
.apartment-unit-number,
.apartment-residents,
.resident-chip,
.resident-dot {
  display: none !important;
}

.tower-building-shell {
  max-width: 820px;
  margin: 0 auto 40px;
}

.tower-building-nameplate {
  width: fit-content;
  max-width: 90%;
  margin: 0 auto 16px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #ece8df;
  border: 1px solid #cbc3b7;
  color: #403b34;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(40,36,31,.08);
}

.tower-building {
  background: #d9d1c5;
  border: 1px solid #b6ac9e;
  box-shadow: 0 24px 55px rgba(44,39,32,.14);
  border-radius: 4px;
  overflow: hidden;
}

.tower-floor {
  background:
    linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)),
    #d9d1c5;
  border-bottom: 10px solid #b8aea1;
}

.tower-floor:last-child {
  border-bottom: 0;
}

.tower-floor-header {
  height: 44px;
  background: #c2b7a8;
  border-bottom: 1px solid #a99e90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #4e473e;
}

.tower-floor-header span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  opacity: .72;
}

.tower-floor-header strong {
  font-size: 22px;
}

.tower-floor-units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 20px;
}

.tower-apartment {
  background: #f1ede7;
  border: 1px solid #b7ada0;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(64,56,45,.08);
  overflow: hidden;
}

.tower-apartment-label {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #4f493f;
  background: #e7e0d7;
  border-bottom: 1px solid #c7beb2;
}

.tower-apartment-label strong {
  font-size: 14px;
  margin-left: 3px;
}

.tower-apartment-facade {
  padding: 14px 14px 0;
  background: #d6cec2;
}

.tower-window-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tower-window {
  height: 76px;
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.38),
      rgba(151,181,191,.2) 50%,
      rgba(73,105,116,.18)
    ),
    #98aeb5;
  border: 7px solid #f0ece6;
  box-shadow:
    0 0 0 1px #a79d90,
    inset 0 0 12px rgba(48,74,84,.14);
  position: relative;
}

.tower-window::before,
.tower-window::after {
  content: "";
  position: absolute;
  background: #f0ece6;
}

.tower-window::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
}

.tower-window::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  transform: translateY(-50%);
}

.tower-balcony {
  height: 34px;
  margin-top: 10px;
  display: flex;
  align-items: end;
}

.tower-balcony-rail {
  width: 100%;
  height: 28px;
  border: 2px solid #74726d;
  border-bottom-width: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 16px,
      #74726d 16px,
      #74726d 18px
    );
}

.tower-residents {
  padding: 10px;
  display: grid;
  gap: 7px;
  background: #faf8f5;
  border-top: 1px solid #d7d0c7;
}

.tower-resident {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid #e0dad2;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #403b35;
}

.tower-resident-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dce8e2;
  color: #22553d;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
}

@media (max-width: 760px) {
  .tower-building-shell {
    max-width: 100%;
  }

  .tower-floor-units {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}


/* =========================================================
   V10.1 - SOLO PORTE PER GLI INTERNI
   ========================================================= */

.tower-window-group,
.tower-window,
.tower-window::before,
.tower-window::after,
.tower-balcony,
.tower-balcony-rail,
.tower-apartment-facade {
  display: none !important;
}

.door-apartment {
  background: #f2eee8;
}

.door-scene {
  padding: 18px 18px 8px;
  background:
    linear-gradient(180deg, #ddd5c9 0%, #d3cabc 100%);
  display: grid;
  place-items: center;
  min-height: 170px;
  border-bottom: 1px solid #d3ccc1;
}

.apartment-door {
  width: 98px;
  height: 132px;
  border-radius: 10px 10px 3px 3px;
  background:
    linear-gradient(180deg, #825635 0%, #714628 100%);
  border: 4px solid #5b381f;
  position: relative;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.10),
    0 10px 18px rgba(56, 39, 25, .16);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 12px 18px;
}

.door-panel {
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 6px;
  background: rgba(255,255,255,.05);
}

.door-number {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4efe7;
  color: #47382d;
  border: 1px solid #cfc3b3;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 2px 5px rgba(0,0,0,.08);
}

.door-handle {
  position: absolute;
  right: 12px;
  top: 58%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8b15e;
  box-shadow: inset 0 0 0 1px rgba(92,68,24,.22);
}

.tower-floor-units {
  align-items: stretch;
}

.tower-apartment-label {
  text-align: center;
}

@media (max-width: 760px) {
  .door-scene {
    min-height: 150px;
    padding: 16px 16px 6px;
  }

  .apartment-door {
    width: 92px;
    height: 124px;
  }
}


/* =========================================================
   V11 - ASSEMBLEE E CALENDARIO
   ========================================================= */

.assemblies-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.assemblies-section-head h3 {
  margin: 7px 0 5px;
  font-size: 29px;
  letter-spacing: -.035em;
}

.assemblies-section-head p {
  margin: 0;
  color: var(--muted);
}

.calendar-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.calendar-toolbar h4 {
  width: 230px;
  margin: 0;
  text-align: center;
  font-size: 21px;
  text-transform: capitalize;
}

.calendar-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 25px;
  display: grid;
  place-items: center;
}

.assembly-calendar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.calendar-weekdays span {
  padding: 11px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day {
  min-height: 112px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.empty {
  background: #fafbf9;
}

.calendar-day.has-event {
  background: #fbfdfb;
}

.calendar-day-number {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 7px;
}

.calendar-day-events {
  display: grid;
  gap: 5px;
}

.calendar-event {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 6px 7px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-align: left;
  overflow: hidden;
}

.calendar-event span {
  display: block;
  font-size: 9px;
  font-weight: 850;
  opacity: .75;
}

.calendar-event b {
  display: block;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.upcoming-assemblies {
  margin-top: 24px;
}

.upcoming-head h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.assembly-list {
  display: grid;
  gap: 9px;
}

.assembly-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  padding: 11px 14px;
  text-align: left;
}

.assembly-list-item:hover {
  border-color: #b8cbbf;
  background: #fbfdfb;
}

.assembly-list-date {
  height: 54px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  align-content: center;
}

.assembly-list-date strong {
  font-size: 20px;
  line-height: 1;
}

.assembly-list-date span {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.assembly-list-copy {
  min-width: 0;
}

.assembly-list-copy b,
.assembly-list-copy span {
  display: block;
}

.assembly-list-copy b {
  font-size: 14px;
}

.assembly-list-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.assembly-list-arrow {
  font-size: 24px;
  color: var(--muted);
}

.assembly-list-empty {
  padding: 25px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.assembly-create-dialog {
  width: min(720px, calc(100% - 30px));
}

.assembly-create-dialog form {
  max-height: 85vh;
  overflow-y: auto;
}

.topics-editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 12px;
}

.topics-editor-head h4 {
  margin: 4px 0 0;
  font-size: 20px;
}

.topics-editor {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.topic-editor-card {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 15px;
  padding: 14px;
}

.topic-editor-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.topic-number {
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.remove-topic-btn {
  width: 31px;
  height: 31px;
  border: 1px solid #e4c6c8;
  background: #fff;
  color: #a52934;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.topic-editor-card textarea {
  resize: vertical;
  min-height: 105px;
}

.assembly-detail-dialog {
  width: min(720px, calc(100% - 30px));
}

.assembly-detail-body {
  padding: 28px;
}

.assembly-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 10px 0 26px;
}

.assembly-detail-meta > div {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 11px;
}

.assembly-detail-meta span,
.assembly-detail-meta b {
  display: block;
}

.assembly-detail-meta span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.assembly-detail-meta b {
  margin-top: 4px;
  font-size: 13px;
}

.assembly-detail-topics h4 {
  margin: 0 0 12px;
  font-size: 19px;
}

.assembly-topic-detail {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.assembly-topic-index {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 850;
  font-size: 12px;
}

.assembly-topic-detail h5 {
  margin: 2px 0 6px;
  font-size: 15px;
}

.assembly-topic-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.assembly-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .assemblies-section-head,
  .topics-editor-head {
    flex-direction: column;
    align-items: stretch;
  }

  .assembly-calendar {
    overflow-x: auto;
  }

  .calendar-weekdays,
  .calendar-grid {
    min-width: 700px;
  }

  .assembly-detail-meta {
    grid-template-columns: 1fr;
  }

  .assembly-detail-actions {
    flex-direction: column;
  }

  .assembly-detail-actions button {
    width: 100%;
  }
}


/* =========================================================
   V11.2 - SCELTA CONDOMINIO PER ASSEMBLEE
   ========================================================= */

.assemblies-picker-head {
  margin-bottom: 28px;
}

.assemblies-picker-head h2 {
  margin: 7px 0 7px;
  font-size: 40px;
  letter-spacing: -.045em;
}

.assemblies-picker-head p {
  margin: 0;
  color: var(--muted);
}

.assembly-condo-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.assembly-condo-card {
  width: 100%;
  min-height: 190px;
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 8px 25px rgba(18,45,31,.04);
  transition: .16s ease;
}

.assembly-condo-card:hover {
  border-color: #b5c9bc;
  box-shadow: 0 13px 30px rgba(18,45,31,.075);
  transform: translateY(-1px);
}

.assembly-condo-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 27px;
}

.assembly-condo-role {
  display: inline-block;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
}

.assembly-condo-card-copy h3 {
  margin: 10px 0 6px;
  font-size: 21px;
}

.assembly-condo-card-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.assembly-condo-card-action {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.assembly-condo-card-action b {
  font-size: 23px;
}

.assembly-picker-empty {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .assembly-condo-picker {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V12 - BRAND CIVICO+
   ========================================================= */

.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 8px 18px;
  height: auto;
}

.brand-logo {
  display: block;
  width: 138px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.top-brand-logo {
  display: block;
  width: 138px;
  height: auto;
  object-fit: contain;
}

/* Il PNG è trasparente: nessun fondo aggiuntivo */
.brand-logo-wrap,
.brand-logo,
.top-brand-logo {
  background: transparent !important;
}

/* Sidebar compatta su tablet */
@media (max-width: 900px) {
  .brand-logo-wrap {
    padding: 4px 2px 16px;
    justify-content: center;
  }

  .brand-logo {
    width: 58px;
    max-height: 38px;
    object-fit: contain;
    object-position: left center;
  }
}

/* Su mobile la sidebar interna viene già nascosta dove previsto */
@media (max-width: 620px) {
  .top-brand-logo {
    width: 118px;
  }
}


/* =========================================================
   V12.1 - CIVICO+ NELLA TOPBAR
   ========================================================= */

.civico-top-brand {
  display: flex;
  align-items: center;
  padding: 0;
  text-decoration: none;
  background: transparent;
}

.civico-top-logo {
  display: block;
  width: 150px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  background: transparent;
}

/* Rimuove il vecchio branding dalla sidebar */
.sidebar-brand-spacer {
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0 0 8px;
}

.sidebar-brand-spacer::before,
.sidebar-brand-spacer::after {
  display: none !important;
}

@media (max-width: 620px) {
  .civico-top-logo {
    width: 126px;
    height: 42px;
  }
}


/* =========================================================
   V13 - APPLE STYLE ENTRY EXPERIENCE
   ========================================================= */

.apple-entry-view {
  background: #fff;
}

.apple-entry-view.active {
  display: block;
}

.apple-entry-shell {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 56px 24px;
  background: #fff;
}

.apple-entry-stage {
  width: min(680px, 100%);
  min-height: 520px;
  position: relative;
  display: grid;
  place-items: center;
}

.apple-step {
  display: none;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .36s ease, transform .36s ease;
}

.apple-step.active {
  display: block;
}

.apple-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.apple-welcome-logo {
  display: block;
  width: min(330px, 72vw);
  height: auto;
  margin: 0 auto 40px;
  object-fit: contain;
}

.apple-copy-block {
  max-width: 560px;
  margin: 0 auto 34px;
}

.apple-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  color: #86868b;
  font-weight: 600;
  letter-spacing: .04em;
}

.apple-copy-block h1,
.apple-copy-block h2 {
  margin: 0;
  color: #1d1d1f;
  letter-spacing: -.045em;
  font-weight: 650;
  line-height: 1.05;
}

.apple-copy-block h1 {
  font-size: clamp(48px, 8vw, 76px);
}

.apple-copy-block h2 {
  font-size: clamp(36px, 6vw, 58px);
}

.apple-copy-block p:last-child {
  margin: 18px auto 0;
  max-width: 500px;
  color: #6e6e73;
  font-size: 18px;
  line-height: 1.55;
}

.apple-primary-action {
  min-width: 160px;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  background: #1d1d1f;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: transform .16s ease, background .16s ease;
}

.apple-primary-action:hover {
  background: #000;
  transform: translateY(-1px);
}

.apple-primary-action.full {
  width: 100%;
  margin-top: 8px;
}

.apple-text-action {
  margin-top: 26px;
  border: 0;
  background: transparent;
  color: #6e6e73;
  font-size: 14px;
  font-weight: 500;
}

.apple-text-action:hover {
  color: #1d1d1f;
}

.apple-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 590px;
  margin: 0 auto;
}

.apple-choice-card {
  min-height: 150px;
  border: 1px solid #d2d2d7;
  border-radius: 24px;
  background: #fbfbfd;
  padding: 24px;
  color: #1d1d1f;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.apple-choice-card:hover {
  transform: translateY(-2px);
  border-color: #a1a1a6;
  background: #f5f5f7;
}

.apple-choice-title {
  display: block;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.apple-choice-copy {
  display: block;
  margin-top: 7px;
  color: #6e6e73;
  font-size: 13px;
  line-height: 1.45;
}

.apple-choice-icon {
  margin-bottom: auto;
  color: #6e6e73;
  font-size: 26px;
  line-height: 1;
}

.apple-form {
  width: min(460px, 100%);
  margin: 0 auto;
  text-align: left;
}

.apple-form label {
  display: block;
  margin-bottom: 16px;
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 500;
}

.apple-form input {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #d2d2d7;
  border-radius: 14px;
  background: #fff;
  color: #1d1d1f;
  padding: 14px 15px;
  font-size: 16px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.apple-form input:focus {
  border-color: #86868b;
  box-shadow: 0 0 0 4px rgba(0,0,0,.045);
}

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

body:has(.apple-entry-view.active) .topbar {
  background: #fff;
  border-bottom-color: transparent;
}

body:has(.apple-entry-view.active) .topbar .civico-top-brand {
  opacity: 0;
  pointer-events: none;
}

body:has(.apple-entry-view.active) #privateNav {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .apple-step,
  .apple-choice-card,
  .apple-primary-action {
    transition: none !important;
  }
}

@media (max-width: 620px) {
  .apple-entry-shell {
    min-height: calc(100vh - 64px);
    padding: 36px 18px;
  }

  .apple-entry-stage {
    min-height: 500px;
  }

  .apple-welcome-logo {
    width: min(270px, 78vw);
    margin-bottom: 30px;
  }

  .apple-copy-block p:last-child {
    font-size: 16px;
  }

  .apple-choice-grid,
  .apple-two-cols {
    grid-template-columns: 1fr;
  }

  .apple-choice-card {
    min-height: 120px;
  }
}


/* =========================================================
   V13.1 - HERO INIZIALE CON IMMAGINE E PANNELLO CENTRALE
   ========================================================= */

.apple-entry-view.active {
  display: block;
  min-height: 100vh;
}

.apple-hero-shell {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    #f7f5ef url('assets/login-bg-ultralight-desktop-v3799.webp') center center / cover no-repeat;
}

.apple-hero-shell::before {
  content: none;
}

.apple-entry-stage {
  width: min(760px, calc(100% - 32px));
  min-height: 560px;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.apple-step {
  width: 100%;
}

.apple-step.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.apple-step[data-entry-step="welcome"] {
  justify-content: center;
}

.apple-step:not([data-entry-step="welcome"]) {
  justify-content: center;
}

.apple-step.active::before {
  content: "";
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 100%);
  min-height: 410px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 30px;
  box-shadow: 0 22px 70px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
}

.apple-step[data-entry-step="login"].active::before,
.apple-step[data-entry-step="register"].active::before {
  min-height: 470px;
}

.apple-step[data-entry-step="role"].active::before,
.apple-step[data-entry-step="choice"].active::before {
  min-height: 390px;
}

.apple-welcome-logo {
  width: min(340px, 76vw);
  margin: 0 auto 26px;
}

.apple-copy-block {
  margin: 0 auto 28px;
}

.apple-copy-block h1,
.apple-copy-block h2 {
  color: #2d2d2f;
}

.apple-copy-block p:last-child,
.apple-welcome-tagline {
  margin: 16px auto 0;
  max-width: 520px;
  color: #4d4d52;
  font-size: 19px;
  line-height: 1.55;
}

.apple-kicker {
  color: #6a6a70;
}

.apple-form {
  background: transparent;
}

.apple-form input {
  background: rgba(255,255,255,.78);
}

body:has(.apple-entry-view.active) .topbar {
  display: none !important;
}

@media (max-width: 620px) {
  .apple-hero-shell {
    padding: 18px;
    background-image: url('assets/login-bg-ultralight-mobile-v3799.webp');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .apple-entry-stage {
    width: 100%;
    min-height: 100vh;
  }

  .apple-step.active::before {
    width: 100%;
    border-radius: 24px;
    min-height: 420px;
  }

  .apple-step[data-entry-step="login"].active::before,
  .apple-step[data-entry-step="register"].active::before {
    min-height: 500px;
  }

  .apple-welcome-logo {
    width: min(250px, 72vw);
    margin-bottom: 18px;
  }

  .apple-copy-block p:last-child,
  .apple-welcome-tagline {
    font-size: 16px;
  }
}


/* =========================================================
   V13.3 - CROSSFADE STABILE TRA LE SCHERMATE INIZIALI
   ========================================================= */

/*
 * Ogni step occupa ESATTAMENTE la stessa area.
 * In questo modo il nuovo contenuto non viene mai renderizzato
 * sotto al precedente e non può produrre salti verticali.
 */
.apple-entry-stage {
  position: relative;
  display: block;
}

.apple-step,
.apple-step.active {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* Solo dissolvenza: nessuna traslazione verticale. */
  transform: none !important;

  transition:
    opacity 1s cubic-bezier(.22,.61,.36,1),
    visibility 0s linear 1s;
}

.apple-step.active {
  visibility: visible;
  transition:
    opacity 1s cubic-bezier(.22,.61,.36,1),
    visibility 0s linear 0s;
}

.apple-step.visible {
  opacity: 1;
  transform: none !important;
  pointer-events: auto;
}

/*
 * Il pannello traslucido rimane centrato nella medesima posizione
 * per tutti gli step, indipendentemente dalla quantità di contenuto.
 */
.apple-step.active::before {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%) !important;
}

/* Il contenuto effettivo resta sempre sopra al pannello. */
.apple-step > * {
  position: relative;
  z-index: 1;
}

/* Login: niente etichetta superiore "Accedi"; più aria sopra Bentornato. */
.apple-step[data-entry-step="login"] .apple-copy-block {
  margin-top: 0;
}

/* Dissolvenza più lenta anche con preferenze standard del browser. */
@media (prefers-reduced-motion: no-preference) {
  .apple-step,
  .apple-step.active {
    transition-duration: 1s, 0s;
  }
}

@media (max-width: 620px) {
  .apple-entry-stage {
    min-height: 560px;
  }

  .apple-step,
  .apple-step.active {
    inset: 0;
  }
}


/* =========================================================
   V13.4 - SPAZIATURA PULSANTE INDIETRO
   ========================================================= */

/*
 * Il pulsante "Indietro" non deve mai risultare appoggiato
 * al bordo inferiore del pannello traslucido.
 */
.apple-text-action {
  margin-top: 28px;
  margin-bottom: 34px;
  padding: 8px 14px;
}

/* Più respiro nei form, che sono gli step più alti. */
.apple-step[data-entry-step="login"] .apple-text-action,
.apple-step[data-entry-step="register"] .apple-text-action {
  margin-bottom: 40px;
}

/* Anche la scelta ruolo mantiene un margine inferiore comodo. */
.apple-step[data-entry-step="role"] .apple-text-action,
.apple-step[data-entry-step="choice"] .apple-text-action {
  margin-bottom: 32px;
}

@media (max-width: 620px) {
  .apple-text-action {
    margin-bottom: 28px;
  }

  .apple-step[data-entry-step="login"] .apple-text-action,
  .apple-step[data-entry-step="register"] .apple-text-action {
    margin-bottom: 34px;
  }
}


/* =========================================================
   V13.5 - TITOLI PULITI E PANNELLI PIÙ ALTI
   ========================================================= */

/*
 * Più spazio verticale nel pannello centrale.
 * In particolare il login non deve mai far uscire "Bentornato."
 * dal bordo superiore.
 */
.apple-step.active::before {
  min-height: 440px;
}

.apple-step[data-entry-step="choice"].active::before {
  min-height: 420px;
}

.apple-step[data-entry-step="role"].active::before {
  min-height: 430px;
}

.apple-step[data-entry-step="login"].active::before {
  min-height: 540px;
}

.apple-step[data-entry-step="register"].active::before {
  min-height: 590px;
}

/*
 * Il contenuto viene leggermente spostato verso il centro
 * e riceve respiro superiore/inferiore.
 */
.apple-step {
  padding: 46px 36px;
  box-sizing: border-box;
}

.apple-step[data-entry-step="login"] {
  padding-top: 58px;
  padding-bottom: 58px;
}

.apple-step[data-entry-step="register"] {
  padding-top: 52px;
  padding-bottom: 56px;
}

.apple-step[data-entry-step="choice"],
.apple-step[data-entry-step="role"] {
  padding-top: 48px;
  padding-bottom: 48px;
}

.apple-step[data-entry-step="login"] .apple-copy-block,
.apple-step[data-entry-step="register"] .apple-copy-block {
  margin-bottom: 28px;
}

/* Titoli sempre dentro il pannello */
.apple-step .apple-copy-block h2 {
  margin-top: 0;
  line-height: 1.08;
}

/* Nessuna etichetta residua sopra i titoli di choice/role/login */
.apple-step[data-entry-step="choice"] .apple-kicker,
.apple-step[data-entry-step="role"] .apple-kicker,
.apple-step[data-entry-step="login"] .apple-kicker {
  display: none !important;
}

@media (max-width: 620px) {
  .apple-step {
    padding-left: 20px;
    padding-right: 20px;
  }

  .apple-step[data-entry-step="login"].active::before {
    min-height: 570px;
  }

  .apple-step[data-entry-step="register"].active::before {
    min-height: 650px;
  }

  .apple-step[data-entry-step="choice"].active::before,
  .apple-step[data-entry-step="role"].active::before {
    min-height: 460px;
  }
}


/* =========================================================
   V13.6 - REGISTRAZIONE SEMPRE CONTENUTA NEL PANNELLO
   ========================================================= */

/* Niente etichetta sopra il titolo nello step di registrazione. */
.apple-step[data-entry-step="register"] .apple-kicker {
  display: none !important;
}

/*
 * Nel form di registrazione il contenitore precedente era troppo rigido:
 * aumentiamo l'area utile e riduciamo leggermente gli spazi verticali
 * senza comprimere titolo, campi o pulsante Indietro.
 */
.apple-entry-stage {
  min-height: 650px;
}

.apple-step[data-entry-step="register"] {
  padding-top: 54px;
  padding-bottom: 54px;
  justify-content: center;
}

/* Pannello più ampio per accomodare titolo + form + Indietro. */
.apple-step[data-entry-step="register"].active::before {
  width: min(700px, 100%);
  min-height: 640px;
}

/* Titolo e sottotitolo sempre ben dentro il riquadro. */
.apple-step[data-entry-step="register"] .apple-copy-block {
  margin-bottom: 22px;
}

.apple-step[data-entry-step="register"] .apple-copy-block h2 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  margin-top: 0;
}

/* Form leggermente più compatto verticalmente, ma leggibile. */
.apple-step[data-entry-step="register"] .apple-form label {
  margin-bottom: 13px;
}

.apple-step[data-entry-step="register"] .apple-form input {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Il pulsante Indietro resta dentro il pannello e con margine sotto. */
.apple-step[data-entry-step="register"] .apple-text-action {
  margin-top: 22px;
  margin-bottom: 12px;
  padding: 8px 14px;
}

/* Anche login resta ben contenuto. */
.apple-step[data-entry-step="login"].active::before {
  min-height: 560px;
}

.apple-step[data-entry-step="login"] .apple-text-action {
  margin-bottom: 14px;
}

/* Desktop molto bassi: evitiamo overflow visivo. */
@media (max-height: 760px) and (min-width: 621px) {
  .apple-entry-stage {
    min-height: 610px;
  }

  .apple-step[data-entry-step="register"].active::before {
    min-height: 600px;
  }

  .apple-step[data-entry-step="register"] {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .apple-step[data-entry-step="register"] .apple-copy-block {
    margin-bottom: 16px;
  }

  .apple-step[data-entry-step="register"] .apple-form label {
    margin-bottom: 10px;
  }

  .apple-step[data-entry-step="register"] .apple-text-action {
    margin-top: 16px;
    margin-bottom: 8px;
  }
}

@media (max-width: 620px) {
  .apple-entry-stage {
    min-height: 720px;
  }

  .apple-step[data-entry-step="register"] {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .apple-step[data-entry-step="register"].active::before {
    width: 100%;
    min-height: 700px;
  }

  .apple-step[data-entry-step="register"] .apple-copy-block h2 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .apple-step[data-entry-step="register"] .apple-text-action {
    margin-bottom: 14px;
  }
}


/* =========================================================
   V13.7 - TESTI CENTRATI NEI RIQUADRI ACCEDI / REGISTRATI
   ========================================================= */

.apple-step[data-entry-step="choice"] .apple-choice-card {
  text-align: center;
  align-items: center;
  justify-content: center;
}

.apple-step[data-entry-step="choice"] .apple-choice-title,
.apple-step[data-entry-step="choice"] .apple-choice-copy {
  width: 100%;
  text-align: center;
}

.apple-step[data-entry-step="choice"] .apple-choice-copy {
  max-width: 210px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   V14 - CONDOMINIO COME CONTESTO PRINCIPALE POST-LOGIN
   ========================================================= */

.condo-selector-page {
  background: #f7f7f5;
  min-height: 100vh;
}

.condo-selector-page.active {
  display: block;
}

.condo-selector-shell {
  min-height: 100vh;
  padding: 28px 40px 56px;
  box-sizing: border-box;
}

.condo-selector-top {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.condo-selector-logo {
  width: 150px;
  height: auto;
  display: block;
}

.selector-logout {
  border: 0;
  background: transparent;
  color: #6e6e73;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 4px;
}

.selector-logout:hover {
  color: #1d1d1f;
}

.condo-selector-content {
  width: min(980px, 100%);
  margin: 90px auto 0;
}

.condo-selector-heading {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 48px;
}

.condo-selector-hero {
  position: relative;
  padding: 28px 34px 24px;
  border: 1px solid #e4ebe7;
  border-radius: 34px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfefd 100%);
  box-shadow: 0 20px 42px rgba(20, 63, 51, 0.055), 0 2px 10px rgba(20, 63, 51, 0.03);
}

.condo-selector-hero::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 26px;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(31, 143, 95, 0.08), transparent 42%), radial-gradient(circle at bottom left, rgba(23, 79, 66, 0.035), transparent 38%);
}

.condo-selector-heading .eyebrow,
.condo-selector-hero .eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f7f5;
  border: 1px solid #e0e9e5;
  color: #7d837f;
}

.condo-selector-heading h1,
.condo-selector-hero h1 {
  position: relative;
  z-index: 1;
  margin: 14px 0 14px;
  color: #242426;
  font-size: clamp(44px, 6vw, 66px);
  letter-spacing: -.05em;
  line-height: 1.02;
  font-weight: 650;
}

.condo-selector-heading p,
.condo-selector-hero p {
  position: relative;
  z-index: 1;
  max-width: 630px;
  margin: 0 auto;
  color: #6e6e73;
  font-size: 18px;
  line-height: 1.6;
}

.selector-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.selector-actions-row > span {
  color: #77777b;
  font-size: 14px;
}

.selector-condo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.selector-condo-card {
  min-height: 230px;
  padding: 26px;
  border: 1px solid #e1e1dc;
  border-radius: 26px;
  background: #fff;
  color: #222225;
  text-align: left;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 8px 28px rgba(0,0,0,.035);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.selector-condo-card:hover {
  transform: translateY(-3px);
  border-color: #c9c9c3;
  box-shadow: 0 14px 34px rgba(0,0,0,.065);
}

.selector-card-symbol {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef4f1;
  color: #174f43;
  font-size: 21px;
  margin-bottom: 28px;
}

.selector-card-role {
  display: block;
  color: #8a8a8f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 7px;
}

.selector-card-copy h3 {
  margin: 0;
  color: #242426;
  font-size: 25px;
  letter-spacing: -.025em;
}

.selector-card-copy p {
  margin: 9px 0 0;
  color: #77777b;
  font-size: 14px;
  line-height: 1.45;
}

.selector-card-enter {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #174f43;
  font-size: 14px;
  font-weight: 700;
}

.selector-card-enter b {
  font-size: 24px;
  font-weight: 400;
}

.selector-empty-state {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 48px 44px;
  border: 1px solid #e2e2dd;
  border-radius: 28px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 34px rgba(0,0,0,.04);
}

.selector-empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eef4f1;
  color: #174f43;
  font-size: 28px;
}

.selector-empty-state h2 {
  margin: 0;
  color: #262628;
  font-size: 32px;
  letter-spacing: -.035em;
}

.selector-empty-state p {
  max-width: 560px;
  margin: 16px auto 0;
  color: #717176;
  font-size: 16px;
  line-height: 1.6;
}

.selector-waiting-pill {
  width: fit-content;
  margin: 28px auto 0;
  padding: 10px 15px;
  border-radius: 999px;
  background: #f2f2ef;
  color: #6d6d70;
  font-size: 13px;
  font-weight: 600;
}

.selector-create-main {
  margin-top: 30px;
}

body:has(.condo-selector-page.active) .topbar {
  display: none !important;
}

@media (max-width: 760px) {
  .condo-selector-shell {
    padding: 22px 18px 40px;
  }

  .condo-selector-content {
    margin-top: 58px;
  }

  .condo-selector-logo {
    width: 126px;
  }

  .condo-selector-heading {
    max-width: 100%;
    margin-bottom: 34px;
  }

  .condo-selector-hero {
    padding: 22px 18px 20px;
    border-radius: 28px;
    box-shadow: 0 14px 28px rgba(20, 63, 51, 0.06), 0 1px 6px rgba(20, 63, 51, 0.03);
  }

  .condo-selector-hero::before {
    inset: 8px;
    border-radius: 21px;
  }

  .condo-selector-heading .eyebrow,
  .condo-selector-hero .eyebrow {
    padding: 6px 11px;
    font-size: 11px;
    letter-spacing: .08em;
  }

  .condo-selector-heading h1,
  .condo-selector-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(34px, 11vw, 48px);
    line-height: 1.04;
  }

  .condo-selector-heading p,
  .condo-selector-hero p {
    font-size: 15.5px;
    line-height: 1.55;
  }

  .selector-actions-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .selector-condo-grid {
    grid-template-columns: 1fr;
  }

  .selector-condo-card {
    min-height: 210px;
  }

  .selector-empty-state {
    padding: 38px 24px;
  }

  .selector-empty-state h2 {
    font-size: 28px;
  }
}


/* =========================================================
   V15 - MODIFICA ASSEMBLEE + MODIFICA RESIDENTI DAL PALAZZO
   ========================================================= */

/* Il residente del palazzo resta visivamente una scheda anche se è un button. */
.tower-resident {
  width: 100%;
  font-family: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.tower-resident:disabled {
  opacity: 1;
  cursor: default;
}

.tower-resident.editable {
  cursor: pointer;
  position: relative;
  padding-right: 58px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tower-resident.editable:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.tower-resident-edit {
  margin-left: auto;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: absolute;
  right: 8px;
}

#editAssemblyBtn {
  min-width: 105px;
}

@media (max-width: 720px) {
  .tower-resident.editable {
    padding-right: 54px;
  }
}

/* =========================================================
   V16 - LETTURE ACQUA
   ========================================================= */

.water-section-head,
.water-form-head,
.water-history-head,
.water-manager-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.water-section-head {
  margin-bottom: 24px;
}

.water-section-head h3,
.water-form-head h4,
.water-history-head h4,
.water-manager-toolbar h4 {
  margin: 4px 0 0;
}

.water-section-head p {
  margin: 8px 0 0;
  color: var(--muted, #6b746f);
}

.water-guide-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 22px;
  border: 1px solid rgba(19, 83, 68, .12);
  border-radius: 20px;
  background: rgba(235, 246, 241, .72);
}

.water-guide-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #174f42;
  color: #fff;
  font-weight: 700;
}

.water-guide-card h4 {
  margin: 0 0 6px;
}

.water-guide-card p {
  margin: 0;
  color: #53605b;
  line-height: 1.55;
}

.water-resident-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: start;
}

.water-reading-form,
.water-history-panel,
.water-manager-panel {
  padding: 24px;
}

.water-reading-form label {
  display: block;
  margin-top: 17px;
  color: #36403c;
  font-size: 13px;
  font-weight: 600;
}

.water-reading-form input[type="text"],
.water-reading-form input[type="date"],
.water-reading-form input[type="file"],
.water-manager-toolbar select {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #d8dfdc;
  border-radius: 13px;
  padding: 12px 13px;
  background: #fff;
  color: #1d2925;
  font: inherit;
  box-sizing: border-box;
}

.water-reading-form input:focus,
.water-manager-toolbar select:focus {
  outline: none;
  border-color: #7ca496;
  box-shadow: 0 0 0 4px rgba(23,79,66,.07);
}

.field-help {
  display: block;
  margin-top: 7px;
  color: #7b8580;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.optional-label {
  color: #89918d;
  font-weight: 400;
}

.water-unit-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf5f1;
  color: #174f42;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.water-unit-switcher {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #e0e9e5;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23, 79, 66, .04);
}

.water-unit-switcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.water-unit-switcher-head strong {
  display: block;
  margin-top: 3px;
  color: #24322d;
  font-size: 14px;
}

.water-unit-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf5f1;
  color: #2e6651;
  font-size: 10px;
  font-weight: 800;
}

.water-unit-switcher-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.water-unit-choice {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dde6e2;
  border-radius: 15px;
  background: #fbfcfb;
  color: #26342f;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.water-unit-choice:hover {
  border-color: #b9cec4;
  background: #f7fbf9;
}

.water-unit-choice.active {
  border-color: #78a995;
  background: #eef8f3;
  box-shadow: 0 0 0 3px rgba(23, 79, 66, .055);
}

.water-unit-choice-copy {
  min-width: 0;
}

.water-unit-choice-copy strong,
.water-unit-choice-copy small {
  display: block;
}

.water-unit-choice-copy strong {
  color: #27352f;
  font-size: 12px;
}

.water-unit-choice-copy small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
}

.water-unit-choice-copy small.submitted { color: #23704f; }
.water-unit-choice-copy small.missing { color: #a36a24; }
.water-unit-choice-copy small.idle { color: #7c8782; }

.water-unit-choice-check {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f4f2;
  color: #6e7d76;
  font-size: 13px;
  font-weight: 800;
}

.water-unit-choice.active .water-unit-choice-check {
  background: #d8eee4;
  color: #216348;
}

.water-history-unit-label {
  display: inline-block;
  margin-top: 5px;
  color: #6f7b76;
  font-size: 11px;
  font-weight: 650;
}

.water-last-reading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 14px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f6f7f6;
}

.water-last-reading span,
.water-last-reading small {
  color: #7b8580;
}

.water-last-reading strong {
  grid-row: span 2;
  align-self: center;
  color: #174f42;
  font-size: 22px;
}

.water-last-reading small {
  font-size: 12px;
}

.water-consumption-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.water-consumption-preview.success {
  background: #edf7f1;
  color: #205f45;
}

.water-consumption-preview.warning {
  background: #fff3df;
  color: #84550c;
}

.water-consumption-preview.neutral {
  background: #f0f2f2;
  color: #56615d;
}

.water-replacement-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #f7f8f7;
  cursor: pointer;
}

.water-replacement-check input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.water-history-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-height: 520px;
  overflow: auto;
  padding-right: 3px;
}

.water-history-item {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(150px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid #e5e9e7;
  border-radius: 15px;
  background: #fff;
}

.water-history-date,
.water-history-value {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.water-history-date span,
.water-history-value strong {
  color: #26332e;
  font-weight: 700;
}

.water-history-date small,
.water-history-value span {
  color: #87908c;
  font-size: 12px;
}

.water-history-empty,
.water-empty-card {
  padding: 28px;
  border: 1px dashed #cad4cf;
  border-radius: 18px;
  color: #69736f;
  text-align: center;
  background: #fafbfa;
}

.water-empty-card strong {
  display: block;
  margin-bottom: 6px;
  color: #34413c;
}

.water-empty-card p {
  margin: 0;
}

.water-photo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: #edf5f1;
  color: #174f42;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.water-photo-link:hover {
  background: #dfeee7;
}

.water-manager-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.water-manager-summary article {
  padding: 18px 20px;
  border: 1px solid #e0e6e3;
  border-radius: 17px;
  background: #fff;
}

.water-manager-summary span {
  display: block;
  color: #7a8580;
  font-size: 12px;
}

.water-manager-summary b {
  display: block;
  margin-top: 5px;
  color: #23332d;
  font-size: 23px;
}

.water-manager-toolbar {
  margin-bottom: 18px;
}

.water-manager-toolbar label {
  width: min(280px, 100%);
  color: #66716c;
  font-size: 12px;
  font-weight: 600;
}

.water-table td,
.water-table th {
  white-space: nowrap;
}

.water-table td small {
  color: #87908c;
}

.water-status {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f0f2f1;
  color: #69736f;
  font-size: 11px;
  font-weight: 700;
}

.water-status.replacement {
  background: #fff2dc;
  color: #895b16;
}

@media (max-width: 980px) {
  .water-resident-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .water-section-head,
  .water-form-head,
  .water-manager-toolbar {
    flex-direction: column;
  }

  .water-unit-pill {
    white-space: normal;
  }

  .water-manager-summary {
    grid-template-columns: 1fr;
  }

  .water-manager-toolbar label {
    width: 100%;
  }

  .water-history-item {
    grid-template-columns: 1fr;
  }

  .water-photo-link {
    justify-self: start;
  }
}


/* V16.1 - voce Letture acqua sempre accessibile */
.sidebar {
  overflow-y: auto;
}

.side-link[data-condo-manage-section="water"],
#dashboardWaterBtn {
  display: flex !important;
}

/* =========================================================
   V17 - LETTURE ACQUA A CAMPAGNE
   ========================================================= */
.water-campaign-focus,
.water-campaign-manager-card,
.water-general-card {
  padding: 24px;
  border-radius: 24px;
}

.water-campaign-focus {
  margin-bottom: 20px;
}

.water-campaign-focus h4,
.water-campaign-manager-card h4,
.water-general-card h4 {
  margin: 5px 0 8px;
  font-size: 23px;
  color: #1f2b27;
}

.water-submitted-banner {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef7f2;
  color: #315b49;
  font-weight: 700;
}

.water-lock-note {
  padding: 12px 14px;
  margin: 6px 0 16px;
  border-radius: 14px;
  background: #f5f5f7;
  color: #626267;
  font-size: 13px;
  line-height: 1.5;
}

.water-lock-badge {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 700;
}

.water-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.water-text-button {
  border: 0;
  background: transparent;
  color: #176c55;
  font-weight: 700;
  padding: 4px 0;
}

.water-original-value {
  display: block;
  color: #8b8b90;
  text-decoration: line-through;
  margin-bottom: 3px;
}

.water-anomaly {
  display: block;
  margin-top: 5px;
  color: #8b5a00;
  font-size: 12px;
  font-weight: 700;
}

.water-campaign-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  margin-bottom: 8px;
}

.water-campaign-tab {
  min-width: 180px;
  border: 1px solid #dfe4e1;
  border-radius: 18px;
  padding: 13px 16px;
  background: #fff;
  text-align: left;
  color: #27322e;
}

.water-campaign-tab span,
.water-campaign-tab small {
  display: block;
}

.water-campaign-tab span {
  font-weight: 800;
  margin-bottom: 4px;
}

.water-campaign-tab small {
  color: #808581;
}

.water-campaign-tab.active {
  border-color: #376d59;
  box-shadow: 0 0 0 2px rgba(55,109,89,.10);
  background: #f7fbf9;
}

.water-campaign-manager-card,
.water-general-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.water-manager-actions,
.water-general-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.water-general-form label {
  min-width: 150px;
  margin: 0;
}

.water-general-form input {
  margin-top: 6px;
}

.water-corrections-panel {
  margin-top: 18px;
  padding: 22px;
}

.water-corrections-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.water-correction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e3e6e4;
  border-radius: 16px;
}

.water-correction-item strong,
.water-correction-item span {
  display: block;
}

.water-correction-item span {
  color: #747876;
  font-size: 13px;
  margin-top: 3px;
}

.water-correction-item p {
  margin: 8px 0 0;
  color: #4d524f;
  font-size: 13px;
}

.water-correction-item > div:last-child {
  display: flex;
  gap: 8px;
  align-items: center;
}

.water-status.pending {
  background: #fff5dc;
  color: #805b00;
}

.water-status.approved {
  background: #eaf7ef;
  color: #24623f;
}

.water-status.rejected {
  background: #f5eded;
  color: #7b3d3d;
}

.water-status.missing {
  background: #f0f0f2;
  color: #69696e;
}

.water-status.warning {
  background: #fff3d8;
  color: #815700;
}

.water-row-anomaly td {
  background: #fffaf0;
}

#waterCorrectionDialog textarea {
  width: 100%;
  resize: vertical;
}

@media (max-width: 850px) {
  .water-campaign-manager-card,
  .water-general-card,
  .water-correction-item {
    align-items: stretch;
    flex-direction: column;
  }

  .water-manager-actions,
  .water-general-form {
    width: 100%;
  }

  .water-general-form label {
    flex: 1 1 180px;
  }

  .water-correction-item > div:last-child {
    justify-content: flex-start;
  }
}


/* =========================================================
   V17.6 - CONFERME CIVICO+ PER LETTURE ACQUA
   ========================================================= */

.water-confirm-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
}

.water-confirm-dialog::backdrop {
  background: rgba(18, 28, 25, .36);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.water-confirm-card {
  width: min(460px, calc(100vw - 32px));
  padding: 34px 34px 28px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow:
    0 26px 80px rgba(15, 38, 31, .22),
    0 4px 18px rgba(15, 38, 31, .08);
  text-align: center;
  animation: waterConfirmIn .28s cubic-bezier(.2,.8,.2,1);
}

.water-confirm-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eef5f2;
  color: #174c40;
  font-size: 25px;
  font-weight: 700;
}

.water-confirm-copy .eyebrow {
  display: block;
  margin-bottom: 8px;
}

.water-confirm-copy h3 {
  margin: 0;
  color: #1f2422;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.water-confirm-copy p {
  max-width: 380px;
  margin: 14px auto 0;
  color: #666b68;
  font-size: 15px;
  line-height: 1.55;
}

.water-confirm-actions {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.water-confirm-actions button {
  width: 100%;
  min-height: 44px;
}

.water-confirm-actions .danger-confirm {
  background: #8f2f2b;
  border-color: #8f2f2b;
  color: #fff;
}

.water-confirm-actions .danger-confirm:hover {
  background: #762621;
  border-color: #762621;
}

@keyframes waterConfirmIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .water-confirm-card {
    padding: 28px 22px 22px;
    border-radius: 24px;
  }

  .water-confirm-copy h3 {
    font-size: 24px;
  }

  .water-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   V18 - TURNI & RISORSE
   ========================================================= */

.resources-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.resources-section-head h3 {
  margin: 4px 0 6px;
}

.resources-section-head p {
  margin: 0;
  color: var(--muted, #6b746f);
}

.resource-empty {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
}

.resource-empty-icon,
.resource-detail-placeholder-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: #edf4f1;
  color: #174c40;
  font-size: 28px;
}

.resource-empty h4,
.resource-detail-placeholder h4 {
  margin: 0 0 8px;
}

.resource-empty p,
.resource-detail-placeholder p {
  margin: 0;
  color: #707773;
  max-width: 480px;
}

.resources-workspace {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.resource-list-panel,
.resource-detail {
  padding: 0;
  overflow: hidden;
}

.resource-list-panel {
  position: sticky;
  top: 92px;
}

.resource-list-head {
  padding: 20px 20px 14px;
  border-bottom: 1px solid #e7ece9;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.resource-list-head strong {
  color: #4e5753;
  font-size: 12px;
}

.resource-list {
  padding: 8px;
}

.resource-list-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  color: #27302c;
  transition: background .16s ease, transform .16s ease;
}

.resource-list-item:hover {
  background: #f4f7f5;
}

.resource-list-item.active {
  background: #eaf2ef;
}

.resource-list-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: inset 0 0 0 1px #dde6e1;
  font-size: 18px;
}

.resource-list-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.resource-list-copy small {
  color: #76807b;
  font-size: 11px;
}

.resource-list-arrow {
  color: #8a938f;
  font-size: 20px;
}

.resource-detail {
  min-height: 520px;
  padding: 28px;
}

.resource-detail-placeholder {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.resource-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e7ece9;
}

.resource-title-wrap {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.resource-big-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: #eaf2ef;
  color: #174c40;
  font-size: 24px;
}

.resource-title-wrap h4 {
  margin: 3px 0 6px;
  font-size: 24px;
  color: #26302c;
}

.resource-title-wrap p {
  margin: 0;
  color: #6f7874;
  line-height: 1.45;
}

.resource-delete-btn {
  border: 0;
  background: transparent;
  color: #9b4a46;
  font-size: 12px;
  padding: 8px 4px;
}

.rotation-summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.rotation-summary > div {
  border: 1px solid #e1e8e4;
  background: #fafcfb;
  border-radius: 15px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rotation-summary span {
  color: #78817d;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.rotation-summary strong {
  font-size: 14px;
  color: #2f3934;
}

.rotation-periods {
  display: grid;
  gap: 14px;
}

.rotation-period {
  border: 1px solid #e1e8e4;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.rotation-period.current {
  border-color: #aac5bb;
  box-shadow: 0 8px 24px rgba(28, 77, 63, .06);
}

.rotation-period-head {
  padding: 15px 17px;
  background: #f8faf9;
  border-bottom: 1px solid #e8edea;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.rotation-period-head h5,
.resource-subhead h5 {
  margin: 3px 0 0;
  font-size: 16px;
}

.resource-live-badge,
.resource-count-badge {
  border-radius: 999px;
  background: #dcece5;
  color: #235647;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.rotation-slots {
  padding: 7px 14px 10px;
}

.rotation-slot {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid #edf1ef;
}

.rotation-slot:last-child {
  border-bottom: 0;
}

.rotation-slot.mine {
  background: linear-gradient(90deg, rgba(226,241,235,.72), transparent);
  border-radius: 12px;
  padding-left: 10px;
  padding-right: 10px;
}

.rotation-slot-number {
  color: #67716d;
  font-size: 12px;
  font-weight: 700;
}

.rotation-slot-unit {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rotation-slot-unit strong {
  color: #28322e;
  font-size: 13px;
}

.rotation-slot-unit span {
  color: #7a837f;
  font-size: 11px;
}

.resource-residents-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resource-resident-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: #7a837f;
  font-size: 11px;
}

.resource-resident-name {
  color: inherit;
}

.resource-resident-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4f1;
  border: 1px solid #dbe8e2;
  color: #315f4b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.rotation-slot-actions,
.resource-inline-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.resource-swap-link,
.resource-cancel-booking {
  font-size: 11px;
  padding: 4px 6px;
}

.resource-waitlist,
.resource-request-box {
  margin-top: 18px;
  border-top: 1px solid #e7ece9;
  padding-top: 18px;
}

.resource-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.resource-waitlist-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-waitlist-chips span {
  border-radius: 999px;
  padding: 8px 11px;
  background: #f3f6f4;
  color: #58615d;
  font-size: 11px;
}

.resource-waitlist-chips b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  border-radius: 50%;
  background: #dfe9e4;
  color: #2b594c;
}

.resource-request-list {
  display: grid;
  gap: 8px;
}

.resource-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e0e8e4;
  border-radius: 15px;
  background: #fbfcfb;
  padding: 13px 14px;
}

.resource-request-item p {
  margin: 4px 0 0;
  color: #707975;
  font-size: 12px;
}

.resource-outgoing-note,
.resource-rule-note {
  margin: 14px 0;
  border-radius: 13px;
  padding: 11px 13px;
  background: #f2f6f4;
  color: #59635e;
  font-size: 12px;
  line-height: 1.45;
}

.resource-modal-card {
  width: min(680px, calc(100vw - 30px));
}

.resource-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.resource-form-full {
  grid-column: 1 / -1;
}

.resource-mode-fields {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e7ece9;
}

.resource-participants-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 8px 0 10px;
}

.resource-participants-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resource-participants-head small {
  color: #777f7b;
}

.resource-participants {
  max-height: 230px;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-right: 4px;
}

.resource-participant-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e7e3;
  border-radius: 13px;
  padding: 10px 11px;
  background: #fafcfb;
  margin: 0 !important;
}

.resource-participant-option input {
  width: auto !important;
  margin: 0 !important;
}

.resource-participant-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resource-participant-option strong {
  font-size: 12px;
}

.resource-participant-option small {
  font-size: 10px;
  color: #78817d;
}

.resource-approval-check {
  display: flex !important;
  align-items: center;
  gap: 9px;
}

.resource-approval-check input {
  width: auto !important;
  margin: 0 !important;
}

.booking-resource-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.resource-booking-form,
.resource-bookings-panel,
.resource-no-unit {
  border: 1px solid #e1e8e4;
  border-radius: 17px;
  padding: 17px;
  background: #fbfcfb;
}

.resource-booking-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.resource-booking-form label {
  display: block;
  margin-bottom: 11px;
  font-size: 12px;
  color: #4f5954;
}

.resource-booking-form input,
.resource-booking-form select {
  width: 100%;
  margin-top: 6px;
}

.resource-bookings-list {
  display: grid;
  gap: 8px;
}

.resource-booking-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #e8edea;
}

.resource-booking-item:last-child {
  border-bottom: 0;
}

.resource-booking-date,
.resource-booking-copy,
.resource-booking-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resource-booking-date strong,
.resource-booking-copy strong {
  font-size: 12px;
}

.resource-booking-date span,
.resource-booking-copy span,
.resource-booking-copy small {
  color: #78817d;
  font-size: 10px;
}

.resource-booking-status {
  align-items: flex-end;
  gap: 6px;
}

.resource-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.resource-status.approved { background: #dff0e8; color: #245a49; }
.resource-status.pending { background: #fff0c9; color: #7a5b0a; }
.resource-status.rejected,
.resource-status.cancelled { background: #f4e1df; color: #884540; }

.resource-list-empty,
.resource-no-unit {
  color: #757e79;
  font-size: 12px;
  text-align: center;
  padding: 30px 18px;
}

.resource-no-unit strong {
  display: block;
  color: #3d4742;
  margin-bottom: 5px;
}

.resource-no-unit p {
  margin: 0;
}

@media (max-width: 1050px) {
  .resources-workspace {
    grid-template-columns: 235px minmax(0, 1fr);
  }

  .rotation-slot {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .rotation-slot-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .booking-resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .resources-section-head {
    flex-direction: column;
  }

  .resources-workspace {
    grid-template-columns: 1fr;
  }

  .resource-list-panel {
    position: static;
  }

  .resource-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    overflow-x: visible;
    overflow-y: visible;
  }

  .resource-list-item {
    width: 100%;
    min-width: 0;
  }

  .resource-detail {
    padding: 20px 16px;
  }

  .rotation-summary,
  .resource-form-grid,
  .resource-participants,
  .resource-booking-fields {
    grid-template-columns: 1fr;
  }

  .resource-form-full {
    grid-column: auto;
  }

  .resource-detail-head,
  .resource-request-item {
    flex-direction: column;
    align-items: stretch;
  }

  .resource-delete-btn {
    align-self: flex-start;
  }

  .resource-booking-item {
    grid-template-columns: 1fr;
  }

  .resource-booking-status {
    align-items: flex-start;
  }
}

/* V18 - Turni & risorse sempre visibile nel menu */
.side-link[data-condo-manage-section="resources"],
#dashboardResourcesBtn {
  display: flex !important;
}


/* =========================================================
   V18.1 - MODAL NUOVA RISORSA + DROPDOWN CIVICO+
   ========================================================= */

/* Più largo: i campi principali entrano su una sola riga. */
#resourceDialog {
  padding: 18px;
  overflow: visible;
}

#resourceDialog::backdrop {
  background: rgba(19, 31, 27, .34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#resourceDialog .resource-modal-card {
  width: min(940px, calc(100vw - 48px));
  max-width: 940px;
  max-height: min(820px, calc(100vh - 48px));
  margin: auto;
  padding: 28px 30px 26px;
  overflow-x: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aebbb5 transparent;
}

/* Scrollbar pulita nel pannello, solo quando serve. */
#resourceDialog .resource-modal-card::-webkit-scrollbar {
  width: 9px;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 18px 0;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar-thumb {
  background: #c2ccc7;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 999px;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar-thumb:hover {
  background: #9eada6;
}

/* Il blocco iniziale usa 3 colonne: Tipo, Modalità, Quantità. */
#resourceDialog #resourceForm > .resource-form-grid:first-of-type {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.35fr) minmax(170px, .85fr);
  gap: 14px;
  align-items: end;
}

/* "Nome" continua a occupare tutta la larghezza. */
#resourceDialog #resourceForm > .resource-form-grid:first-of-type .resource-form-full {
  grid-column: 1 / -1;
}

/* Rotazione: data + durata con larghezze equilibrate. */
#resourceDialog #resourceRotationFields .resource-form-grid,
#resourceDialog #resourceBookingFields .resource-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

/* Evita qualsiasi overflow orizzontale dei controlli. */
#resourceDialog label,
#resourceDialog input,
#resourceDialog .civico-select {
  min-width: 0;
  box-sizing: border-box;
}

#resourceDialog input {
  width: 100%;
}

/* Select originale resta nel form per FormData, ma non viene mostrata. */
.resource-native-select-enhanced {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* ---------- Dropdown Civico+ ---------- */

.civico-select {
  position: relative;
  width: 100%;
  margin-top: 6px;
  z-index: 10;
}

.civico-select.open {
  z-index: 80;
}

.civico-select-trigger {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9e1dd;
  border-radius: 14px;
  padding: 0 13px 0 14px;
  background: #fff;
  color: #303936;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 1px rgba(20, 47, 38, .025);
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.civico-select-trigger:hover {
  border-color: #b7c5bf;
  background: #fcfdfc;
}

.civico-select.open .civico-select-trigger,
.civico-select-trigger:focus-visible {
  outline: none;
  border-color: #6f9185;
  box-shadow: 0 0 0 4px rgba(45, 94, 78, .10);
}

.civico-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.civico-select-chevron {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #71807a;
  transition:
    transform .22s ease,
    background .18s ease,
    color .18s ease;
}

.civico-select-trigger:hover .civico-select-chevron {
  background: #f0f5f2;
  color: #365b4f;
}

.civico-select.open .civico-select-chevron {
  transform: rotate(180deg);
  background: #edf4f1;
  color: #214d40;
}

.civico-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  display: grid;
  gap: 3px;
  max-height: 270px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid rgba(208, 220, 214, .95);
  border-radius: 16px;
  background: rgba(255,255,255,.985);
  box-shadow:
    0 20px 48px rgba(22, 47, 38, .16),
    0 3px 12px rgba(22, 47, 38, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(.985);
  transform-origin: top center;
  pointer-events: none;
  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility 0s linear .16s;
  scrollbar-width: thin;
  scrollbar-color: #bcc8c2 transparent;
}

.civico-select.open .civico-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility 0s;
}

.civico-select-menu::-webkit-scrollbar {
  width: 7px;
}

.civico-select-menu::-webkit-scrollbar-thumb {
  background: #c3cec9;
  border-radius: 999px;
}

.civico-select-option {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px 9px 11px;
  background: transparent;
  color: #39423e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

.civico-select-option:hover {
  background: #f1f5f3;
  color: #1f493d;
}

.civico-select-option.selected {
  background: #eaf2ee;
  color: #174b3c;
  font-weight: 650;
}

.civico-select-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #2d705c;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .12s ease, transform .12s ease;
}

.civico-select-option.selected .civico-select-check {
  opacity: 1;
  transform: scale(1);
}

/* Più spazio tra intestazione e contenuto del modal. */
#resourceDialog .modal-head {
  margin-bottom: 18px;
}

/* Partecipanti: 3 colonne sul desktop largo. */
#resourceDialog .resource-participants {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 250px;
  scrollbar-width: thin;
  scrollbar-color: #bcc8c2 transparent;
}

#resourceDialog .resource-participants::-webkit-scrollbar {
  width: 7px;
}

#resourceDialog .resource-participants::-webkit-scrollbar-thumb {
  background: #c3cec9;
  border-radius: 999px;
}

/* Tablet */
@media (max-width: 900px) {
  #resourceDialog .resource-modal-card {
    width: min(760px, calc(100vw - 32px));
    padding: 26px 24px 24px;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type label:last-child {
    grid-column: 1 / -1;
  }

  #resourceDialog .resource-participants {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 620px) {
  #resourceDialog {
    padding: 8px;
  }

  #resourceDialog .resource-modal-card {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 22px 18px 20px;
    border-radius: 22px;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type,
  #resourceDialog #resourceRotationFields .resource-form-grid,
  #resourceDialog #resourceBookingFields .resource-form-grid,
  #resourceDialog .resource-participants {
    grid-template-columns: 1fr;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type label:last-child {
    grid-column: auto;
  }

  .civico-select-menu {
    max-height: 220px;
  }
}


/* =========================================================
   V18.2 - FIX REALE DIMENSIONI MODAL NUOVA RISORSA
   ========================================================= */

/*
 * La regola globale `dialog` limita tutti i dialog a 520px.
 * Il form interno era stato portato a 940px, causando l'overflow
 * visibile nello screenshot. Qui allarghiamo il DIALOG stesso.
 */
#resourceDialog {
  width: min(1000px, calc(100vw - 48px)) !important;
  max-width: 1000px !important;
  max-height: calc(100vh - 40px);
  padding: 0 !important;
  margin: auto;
  border-radius: 28px;
  overflow: hidden !important;
  box-sizing: border-box;
}

/* Il form occupa esattamente il pannello, mai più largo. */
#resourceDialog .resource-modal-card {
  width: 100% !important;
  max-width: none !important;
  max-height: calc(100vh - 40px);
  margin: 0;
  padding: 30px 32px 28px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box;
}

/* Testata corretta: titolo a sinistra, X in alto a destra. */
#resourceDialog .modal-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

#resourceDialog .modal-head > div {
  min-width: 0;
}

#resourceDialog .modal-head .icon-btn {
  flex: 0 0 auto;
  margin: 0;
}

/*
 * Prima riga:
 * Nome = tutta larghezza
 * Tipo + Modalità + Quantità = tre colonne effettivamente interne al pannello.
 */
#resourceDialog #resourceForm > .resource-form-grid:first-of-type {
  width: 100%;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(150px, .72fr) !important;
  gap: 16px;
  box-sizing: border-box;
}

#resourceDialog #resourceForm > .resource-form-grid:first-of-type .resource-form-full {
  grid-column: 1 / -1;
}

/* Nessun elemento della griglia può imporre una larghezza oltre il pannello. */
#resourceDialog .resource-form-grid,
#resourceDialog .resource-mode-fields,
#resourceDialog .resource-participants-head,
#resourceDialog .resource-participants,
#resourceDialog label,
#resourceDialog input,
#resourceDialog select,
#resourceDialog .civico-select,
#resourceDialog .civico-select-trigger {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Rotazione e prenotazione rimangono perfettamente entro il pannello. */
#resourceDialog #resourceRotationFields .resource-form-grid,
#resourceDialog #resourceBookingFields .resource-form-grid {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Scrollbar del pannello: sottile e distante dai bordi. */
#resourceDialog .resource-modal-card {
  scrollbar-gutter: stable;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar {
  width: 10px;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 22px 0;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #b5c2bc;
}

#resourceDialog .resource-modal-card::-webkit-scrollbar-thumb:hover {
  background: #93a49c;
}

/* Laptop/tablet: scendiamo ordinatamente a due colonne. */
@media (max-width: 920px) {
  #resourceDialog {
    width: min(760px, calc(100vw - 32px)) !important;
  }

  #resourceDialog .resource-modal-card {
    padding: 26px 24px 24px;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type label:last-child {
    grid-column: 1 / -1;
  }
}

/* Smartphone: una sola colonna, nessun overflow orizzontale. */
@media (max-width: 620px) {
  #resourceDialog {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  #resourceDialog .resource-modal-card {
    max-height: calc(100vh - 16px);
    padding: 22px 18px 20px;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type,
  #resourceDialog #resourceRotationFields .resource-form-grid,
  #resourceDialog #resourceBookingFields .resource-form-grid {
    grid-template-columns: 1fr !important;
  }

  #resourceDialog #resourceForm > .resource-form-grid:first-of-type label:last-child {
    grid-column: auto;
  }

  #resourceDialog .modal-head {
    gap: 14px;
    margin-bottom: 20px;
  }
}


/* =========================================================
   V18.4 - MODAL "PROPONI SCAMBIO" RIFINITO
   ========================================================= */

/*
 * Lo scroll non deve appartenere al <dialog> del browser:
 * resta fermo il pannello, mentre eventualmente scorre solo
 * il contenuto interno.
 */
#resourceSwapDialog {
  width: min(620px, calc(100vw - 32px)) !important;
  max-width: 620px !important;
  max-height: calc(100vh - 36px);
  padding: 0 !important;
  margin: auto;
  border: 0;
  border-radius: 26px;
  overflow: hidden !important;
  box-sizing: border-box;
}

#resourceSwapDialog::backdrop {
  background: rgba(19, 31, 27, .38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/*
 * Il form diventa l'unico elemento scrollabile.
 * Se il contenuto entra nello schermo, non compare alcuna barra.
 */
#resourceSwapDialog #resourceSwapForm {
  width: 100%;
  max-width: none;
  max-height: calc(100vh - 36px);
  margin: 0;
  padding: 30px 30px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;

  scrollbar-width: thin;
  scrollbar-color: #aab8b1 transparent;
  scrollbar-gutter: stable;
}

/* X sempre in alto a destra. */
#resourceSwapDialog .modal-head {
  width: 100%;
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 28px;
}

#resourceSwapDialog .modal-head > div {
  min-width: 0;
}

#resourceSwapDialog .modal-head h3 {
  margin-bottom: 0;
}

#resourceSwapDialog .modal-head .icon-btn {
  flex: 0 0 auto;
  margin: 0;
  align-self: flex-start;
}

/* Testo descrittivo più ordinato. */
#resourceSwapDialog #resourceSwapForm > p {
  margin: 0 0 28px;
  max-width: 500px;
  color: #5f6864;
  line-height: 1.55;
}

/* Dropdown sempre confinata nel pannello. */
#resourceSwapDialog label,
#resourceSwapDialog .civico-select,
#resourceSwapDialog .civico-select-trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#resourceSwapDialog .modal-actions {
  margin-top: 20px;
}

/* Scrollbar Civico+ - Chrome / Safari / Edge */
#resourceSwapDialog #resourceSwapForm::-webkit-scrollbar {
  width: 9px;
}

#resourceSwapDialog #resourceSwapForm::-webkit-scrollbar-track {
  background: transparent;
  margin: 20px 0;
}

#resourceSwapDialog #resourceSwapForm::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b2beb8;
}

#resourceSwapDialog #resourceSwapForm::-webkit-scrollbar-thumb:hover {
  background: #8fa097;
}

/* Elimina le frecce native alle estremità della scrollbar. */
#resourceSwapDialog #resourceSwapForm::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/*
 * Anche il menu della dropdown Turno desiderato usa
 * lo stesso trattamento della scrollbar.
 */
#resourceSwapDialog .civico-select-menu::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 620px) {
  #resourceSwapDialog {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  #resourceSwapDialog #resourceSwapForm {
    max-height: calc(100vh - 16px);
    padding: 24px 20px 22px;
  }

  #resourceSwapDialog .modal-head {
    margin-bottom: 24px;
  }

  #resourceSwapDialog #resourceSwapForm > p {
    margin-bottom: 24px;
  }

  #resourceSwapDialog .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  #resourceSwapDialog .modal-actions button {
    width: 100%;
  }
}


/* =========================================================
   V18.5 - SIDEBAR FISSA, SCROLL SOLO CONTENUTO DESTRO
   ========================================================= */

/*
 * L'area applicativa occupa esattamente lo spazio disponibile
 * sotto la topbar. Il body non deve più essere il contenitore
 * di scroll delle pagine interne.
 */
@media (min-width: 621px) {
  .condominium-manage-page.active,
  .dashboard-page.active {
    height: calc(100dvh - 72px);
    min-height: 0 !important;
    overflow: hidden;
    align-items: stretch;
  }

  /*
   * Menu laterale: resta fermo per tutta la navigazione.
   * Non segue lo scroll del contenuto di destra.
   */
  .condominium-manage-page > .sidebar,
  .dashboard-page > .sidebar {
    position: relative;
    top: auto;
    height: 100%;
    min-height: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  /*
   * Unico vero contenitore scrollabile dell'app desktop.
   */
  .condo-manage-main,
  .dashboard-main {
    height: 100%;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b7c2bc transparent;
  }

  /* Scrollbar Civico+ nel contenuto di destra */
  .condo-manage-main::-webkit-scrollbar,
  .dashboard-main::-webkit-scrollbar {
    width: 10px;
  }

  .condo-manage-main::-webkit-scrollbar-track,
  .dashboard-main::-webkit-scrollbar-track {
    background: transparent;
    margin: 16px 0;
  }

  .condo-manage-main::-webkit-scrollbar-thumb,
  .dashboard-main::-webkit-scrollbar-thumb {
    min-height: 54px;
    border: 3px solid var(--bg);
    border-radius: 999px;
    background: #b7c2bc;
  }

  .condo-manage-main::-webkit-scrollbar-thumb:hover,
  .dashboard-main::-webkit-scrollbar-thumb:hover {
    background: #91a198;
  }

  .condo-manage-main::-webkit-scrollbar-button,
  .dashboard-main::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
}

/*
 * Su display molto bassi manteniamo il menu visivamente fermo,
 * ma gli elementi sono compattati per evitare che vengano tagliati.
 */
@media (min-width: 621px) and (max-height: 720px) {
  .condominium-manage-page > .sidebar,
  .dashboard-page > .sidebar {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .condominium-manage-page > .sidebar .side-link,
  .dashboard-page > .sidebar .side-link {
    padding-top: 9px;
    padding-bottom: 9px;
    margin-top: 2px;
    margin-bottom: 2px;
  }
}

/* Mobile: pagina normale, dato che il menu laterale non è presente. */
@media (max-width: 620px) {
  .condominium-manage-page.active,
  .dashboard-page.active {
    height: auto;
    min-height: calc(100vh - 72px);
    overflow: visible;
  }

  .condo-manage-main,
  .dashboard-main {
    height: auto;
    overflow: visible !important;
  }
}


/* =========================================================
   V19 - CONDIVISIONE LETTURE ACQUA CON LETTURISTA
   ========================================================= */

.water-section-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.water-share-dialog{width:min(690px,calc(100vw - 32px))!important;max-width:690px!important;max-height:calc(100vh - 32px);padding:0!important;border:0;border-radius:28px;overflow:hidden!important}
.water-share-dialog::backdrop{background:rgba(18,30,26,.38);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.water-share-card{width:100%!important;max-width:none!important;max-height:calc(100vh - 32px);margin:0;padding:30px 32px 28px;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#aebbb5 transparent}
.water-share-card::-webkit-scrollbar{width:9px}.water-share-card::-webkit-scrollbar-track{background:transparent;margin:20px 0}.water-share-card::-webkit-scrollbar-thumb{background:#b6c2bc;border:2px solid #fff;border-radius:999px}.water-share-card::-webkit-scrollbar-button{display:none;width:0;height:0}
.water-share-dialog .modal-head{display:flex!important;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.water-share-dialog .modal-head .icon-btn{flex:0 0 auto;margin:0}
.water-share-intro{margin:0 0 24px;color:#66706c;line-height:1.55;max-width:590px}.water-share-label{display:block;margin-bottom:10px;font-size:13px;font-weight:700;color:#323b37}
.water-share-expiry{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:18px}.water-share-expiry label{margin:0;cursor:pointer}.water-share-expiry input{position:absolute;opacity:0;pointer-events:none}.water-share-expiry span{min-height:44px;border:1px solid #dbe3df;border-radius:13px;background:#fff;display:flex;align-items:center;justify-content:center;padding:8px;color:#58635e;font-size:13px;font-weight:650;transition:.16s ease}.water-share-expiry input:checked+span{border-color:#6c9485;background:#edf5f1;color:#1e5a46;box-shadow:0 0 0 3px rgba(44,105,82,.09)}.water-share-expiry label:hover span{border-color:#aabbb3;background:#fafcfb}
.water-share-generated{margin-top:22px;padding:18px;border:1px solid #dce8e2;border-radius:18px;background:#f4f9f6}.water-share-url-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin:8px 0}.water-share-url-row input{width:100%;min-width:0;background:#fff;font-size:13px}.water-share-generated small{display:block;color:#68746f;line-height:1.45}
.water-share-existing{margin-top:28px;padding-top:24px;border-top:1px solid #e3e9e6}.water-share-existing-head h4{margin:4px 0 14px}.water-share-links-list{display:grid;gap:8px}.water-share-link-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 14px;border:1px solid #e0e7e3;border-radius:14px;background:#fff}.water-share-link-item.inactive{background:#fafbfa}.water-share-link-item>div{min-width:0;display:grid;gap:3px}.water-share-link-item strong{font-size:13px}.water-share-link-item span,.water-share-link-item small{color:#6c7672;font-size:12px}.water-share-empty{padding:18px;border:1px dashed #d7dfdb;border-radius:14px;text-align:center;color:#78817d;font-size:13px}
@media(max-width:700px){.water-section-head{align-items:flex-start}.water-section-actions{width:100%;justify-content:flex-start}.water-share-dialog{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px);border-radius:22px}.water-share-card{max-height:calc(100vh - 16px);padding:24px 20px 22px}.water-share-expiry{grid-template-columns:repeat(2,minmax(0,1fr))}.water-share-expiry label:last-child{grid-column:1/-1}.water-share-url-row{grid-template-columns:1fr}.water-share-link-item{align-items:flex-start}.water-share-link-item .water-text-button{flex:0 0 auto}}

/* =========================================================
   V20 - SEGNALAZIONI
   ========================================================= */

.reports-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.reports-section-head h3 {
  margin: 4px 0 7px;
  font-size: 30px;
  letter-spacing: -.035em;
}

.reports-section-head p {
  margin: 0;
  color: var(--muted, #6d7672);
}

.reports-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.reports-summary-grid article {
  min-height: 98px;
  padding: 18px 20px;
  border: 1px solid #dfe6e2;
  border-radius: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.reports-summary-grid span {
  color: #707975;
  font-size: 13px;
}

.reports-summary-grid b {
  color: #1d2723;
  font-size: 28px;
  line-height: 1;
}

.reports-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.reports-toolbar-copy h4 {
  margin: 4px 0 0;
  font-size: 20px;
}

.reports-filter-grid {
  width: min(650px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reports-filter-grid label {
  min-width: 0;
}

.reports-list {
  display: grid;
  gap: 16px;
}

.report-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid #dde5e1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(21, 49, 39, .025);
}

.report-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #b6c1bc;
}

.report-card.priority-low::before { background: #aebbb5; }
.report-card.priority-normal::before { background: #5f8f7e; }
.report-card.priority-high::before { background: #d58b31; }
.report-card.priority-urgent::before { background: #b43a32; }

.report-card.is-resolved {
  background: #fafcfb;
  opacity: .86;
}

.report-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.report-badges,
.report-owner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-priority,
.report-visibility,
.report-status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .015em;
}

.report-priority.priority-low {
  background: #f0f3f2;
  color: #63706a;
}

.report-priority.priority-normal {
  background: #eaf3ef;
  color: #2d6653;
}

.report-priority.priority-high {
  background: #fff3df;
  color: #8a581b;
}

.report-priority.priority-urgent {
  background: #fde9e7;
  color: #97342e;
}

.report-visibility.public {
  background: #eef4f1;
  color: #46665a;
}

.report-visibility.private {
  background: #f0edf7;
  color: #625376;
}

.report-status.open {
  background: #ecf4ff;
  color: #3a658a;
}

.report-status.resolved {
  background: #edf5e9;
  color: #496d3e;
}

.report-owner-actions .danger-text {
  color: #9b3934;
  border-color: #ead3d1;
}

.report-card-heading h4 {
  margin: 5px 0 0;
  color: #1d2723;
  font-size: 23px;
  letter-spacing: -.025em;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 16px 0;
  border-top: 1px solid #edf1ef;
  border-bottom: 1px solid #edf1ef;
}

.report-meta-grid span {
  min-width: 0;
  color: #5f6964;
  font-size: 13px;
  line-height: 1.4;
}

.report-meta-grid b {
  display: block;
  margin-bottom: 3px;
  color: #8a928f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.report-description {
  margin: 18px 0 0;
  color: #3e4743;
  font-size: 15px;
  line-height: 1.62;
}

.report-photo-strip {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: #bdc8c2 transparent;
}

.report-photo-thumb {
  flex: 0 0 118px;
  width: 118px;
  height: 88px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #dce4e0;
  background: #f3f6f4;
  appearance: none;
  -webkit-appearance: none;
  cursor: zoom-in;
}

.report-photo-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .2s ease;
}

.report-photo-thumb:hover img {
  transform: scale(1.035);
}


/* V36.97 - Visualizzatore interno foto segnalazioni */
.report-photo-viewer-dialog {
  width: min(1040px, calc(100vw - 40px)) !important;
  max-width: 1040px !important;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0 !important;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
}

.report-photo-viewer-dialog::backdrop {
  background: rgba(13, 24, 20, .62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.report-photo-viewer-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  background: #fff;
}

.report-photo-viewer-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.report-photo-viewer-head h3 {
  margin: 4px 0 0;
  max-width: 760px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-photo-viewer-head .icon-btn {
  flex: 0 0 auto;
  margin: 0;
}

.report-photo-viewer-stage {
  min-height: 260px;
  height: min(70vh, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e0e7e3;
  border-radius: 18px;
  background: #f4f7f5;
}

.report-photo-viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .report-photo-viewer-dialog {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .report-photo-viewer-card {
    padding: 18px;
  }

  .report-photo-viewer-head {
    margin-bottom: 14px;
  }

  .report-photo-viewer-head h3 {
    max-width: calc(100vw - 120px);
    font-size: 17px;
  }

  .report-photo-viewer-stage {
    height: min(72dvh, 680px);
    min-height: 220px;
    border-radius: 15px;
  }
}

.report-private-note {
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f5f2f9;
  color: #665979;
  font-size: 12px;
}

.reports-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed #cfd9d4;
  border-radius: 24px;
  background: rgba(255,255,255,.62);
}

.reports-empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 16px;
  background: #edf4f0;
  color: #285c4b;
  font-size: 22px;
}

.reports-empty h4 {
  margin: 0;
  font-size: 19px;
}

.reports-empty p {
  margin: 7px 0 0;
  color: #707a75;
}

/* Modal segnalazione */
.report-dialog {
  width: min(900px, calc(100vw - 40px)) !important;
  max-width: 900px !important;
  max-height: calc(100vh - 36px);
  margin: auto;
  padding: 0 !important;
  border: 0;
  border-radius: 28px;
  overflow: hidden !important;
}

.report-dialog::backdrop {
  background: rgba(18, 30, 26, .38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.report-modal-card {
  width: 100% !important;
  max-width: none !important;
  max-height: calc(100vh - 36px);
  margin: 0;
  padding: 30px 32px 28px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #aebbb5 transparent;
  scrollbar-gutter: stable;
}

.report-modal-card::-webkit-scrollbar {
  width: 9px;
}

.report-modal-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 20px 0;
}

.report-modal-card::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b5c2bc;
}

.report-modal-card::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.report-dialog .modal-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.report-dialog .modal-head .icon-btn {
  flex: 0 0 auto;
  margin: 0;
}

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

.report-form-grid label,
.report-dialog .civico-select,
.report-dialog input,
.report-dialog textarea {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-form-full {
  grid-column: 1 / -1;
}

.report-unit-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dfe8e3;
  border-radius: 16px;
  background: #f8fbf9;
}

.report-unit-field-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-unit-field-head > span {
  color: #26352e;
  font-size: 13px;
  font-weight: 800;
}

.report-unit-field-head .field-help {
  margin: 0;
}

.report-unit-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-unit-choice {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.report-unit-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.report-unit-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #d7e4dd;
  border-radius: 999px;
  background: #fff;
  color: #496057;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.report-unit-choice input:checked + span {
  border-color: #8fc7ad;
  background: #eaf5ef;
  color: #176b49;
  box-shadow: inset 0 0 0 1px rgba(23,107,73,.05);
}

.report-unit-choice input:focus-visible + span {
  outline: 3px solid rgba(47,143,97,.14);
  outline-offset: 2px;
}

.report-dialog textarea {
  width: 100%;
  min-height: 170px;
  padding: 16px 18px;
  border: 1px solid #d9e3de;
  border-radius: 18px;
  background: #fff;
  box-sizing: border-box;
  color: #20312a;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.report-dialog textarea::placeholder {
  color: #8a9791;
}

.report-dialog textarea:focus {
  outline: none;
  border-color: #2f8f61;
  box-shadow: 0 0 0 4px rgba(47,143,97,.11);
}

.report-existing-photos-wrap {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e4eae7;
}

.report-existing-photos-wrap > p {
  margin: 5px 0 13px;
  color: #717a76;
  font-size: 12px;
}

.report-existing-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.report-existing-photo {
  overflow: hidden;
  padding: 7px;
  border: 1px solid #dce5e0;
  border-radius: 14px;
  background: #fff;
  transition: opacity .16s ease, border-color .16s ease;
}

.report-existing-photo img {
  width: 100%;
  height: 90px;
  display: block;
  object-fit: cover;
  border-radius: 9px;
  margin-bottom: 7px;
}

.report-existing-photo button {
  width: 100%;
}

.report-existing-photo.marked-remove {
  opacity: .48;
  border-color: #dca8a4;
  background: #fff8f7;
}

.report-privacy-note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #f2f6f4;
  color: #5e6b65;
  font-size: 12px;
}

.report-privacy-note strong {
  color: #34443d;
  font-size: 13px;
}

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

  .reports-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-filter-grid {
    width: 100%;
  }

  .report-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .reports-section-head {
    flex-direction: column;
  }

  .reports-section-head #createReportBtn {
    width: 100%;
  }

  .reports-summary-grid,
  .reports-filter-grid,
  .report-form-grid,
  .report-meta-grid {
    grid-template-columns: 1fr;
  }

  .report-form-full {
    grid-column: auto;
  }

  .report-unit-choices {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-unit-choice span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .report-card {
    padding: 20px 18px;
  }

  .report-card-top {
    flex-direction: column;
  }

  .report-owner-actions {
    width: 100%;
  }

  .report-owner-actions button {
    flex: 1;
  }

  .report-dialog {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  .report-modal-card {
    max-height: calc(100vh - 16px);
    padding: 24px 20px 22px;
  }

  .report-existing-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   V21 - RACCOLTA RIFIUTI + REGOLE CONDOMINIALI
   ========================================================= */

.waste-section-head,
.rules-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.waste-section-head h3,
.rules-section-head h3 {
  margin: 4px 0 7px;
}

.waste-section-head p,
.rules-section-head p {
  margin: 0;
  color: var(--muted);
}

.waste-info-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #dce6e1;
  border-radius: 18px;
  background: #f7faf8;
}

.waste-info-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e7f0eb;
  color: #275847;
  font-size: 20px;
}

.waste-info-note strong {
  display: block;
  color: #24352f;
  margin-bottom: 3px;
}

.waste-info-note p {
  margin: 0;
  color: #66726d;
  font-size: 13px;
  line-height: 1.5;
}

.waste-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.waste-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border: 1px solid #dfe6e2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(18, 43, 34, .035);
}

.waste-card.waste-today {
  border-color: #9fb9ae;
  box-shadow: 0 8px 24px rgba(33, 81, 64, .075);
}

.waste-card-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #edf4f0;
  color: #315f50;
  font-size: 20px;
  font-weight: 700;
}

.waste-card-content {
  min-width: 0;
  flex: 1;
}

.waste-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.waste-card h4 {
  margin: 0;
  color: #26342f;
  font-size: 16px;
}

.waste-today-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #214f40;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.waste-card-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.waste-day-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f4f2;
  color: #46544e;
  font-size: 12px;
  font-weight: 600;
}

.waste-day-chip.today {
  background: #dcebe4;
  color: #1e5341;
}

.waste-not-configured {
  color: #929b97;
  font-size: 12px;
  font-style: italic;
}

.waste-card-note {
  margin: 11px 0 0;
  color: #68736e;
  font-size: 12px;
  line-height: 1.45;
}

/* Editor calendario */
#wasteScheduleDialog {
  width: min(980px, calc(100vw - 36px)) !important;
  max-width: 980px !important;
  max-height: calc(100vh - 32px);
  padding: 0 !important;
  border: 0;
  border-radius: 28px;
  overflow: hidden !important;
}

#wasteScheduleDialog::backdrop,
#ruleDialog::backdrop {
  background: rgba(18, 29, 25, .38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.waste-modal-card {
  width: 100% !important;
  max-width: none !important;
  max-height: calc(100vh - 32px);
  padding: 30px 30px 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #aebcb5 transparent;
}

.waste-modal-card::-webkit-scrollbar {
  width: 9px;
}

.waste-modal-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 18px 0;
}

.waste-modal-card::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b6c2bc;
}

.waste-modal-card::-webkit-scrollbar-button {
  display: none;
}

.waste-modal-card .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.waste-modal-card .modal-head p {
  margin: 7px 0 0;
  color: #6b7570;
  font-size: 13px;
}

.waste-days-legend {
  display: grid;
  grid-template-columns: repeat(7, 42px);
  justify-content: end;
  gap: 5px;
  padding: 0 2px 7px;
  color: #8a9490;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.waste-editor-list {
  display: grid;
  gap: 10px;
}

.waste-editor-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(210px, 1.15fr);
  align-items: center;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid #e0e7e3;
  border-radius: 17px;
  background: #fbfcfb;
}

.waste-editor-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.waste-editor-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eaf2ee;
  color: #315f50;
}

.waste-editor-head strong {
  font-size: 13px;
  color: #34413c;
}

.waste-day-picker {
  display: grid;
  grid-template-columns: repeat(7, 42px);
  gap: 5px;
}

.waste-day-option {
  margin: 0 !important;
  cursor: pointer;
}

.waste-day-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.waste-day-option span {
  width: 42px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e0dc;
  border-radius: 10px;
  background: #fff;
  color: #66736d;
  font-size: 11px;
  font-weight: 650;
  transition: .15s ease;
}

.waste-day-option:hover span {
  border-color: #9db1a8;
  background: #f4f7f5;
}

.waste-day-option input:checked + span {
  border-color: #346553;
  background: #285b49;
  color: #fff;
  box-shadow: 0 3px 10px rgba(40,91,73,.15);
}

.waste-notes-label {
  margin: 0 !important;
  color: #68736e;
  font-size: 11px;
}

.waste-notes-label input {
  width: 100%;
  margin-top: 5px;
}

.sticky-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 18px -30px 0;
  padding: 16px 30px 24px;
  border-top: 1px solid #e7ece9;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
}

/* Regole condominiali */
.condominium-rules-list {
  display: grid;
  gap: 12px;
}

.condo-rule-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 20px 20px 20px 18px;
  border: 1px solid #dfe6e2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(18,43,34,.03);
}

.condo-rule-card.important {
  border-color: #b3c8be;
  background: linear-gradient(90deg, #f6faf8 0, #fff 18%);
}

.rule-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eff4f1;
  color: #547066;
  font-size: 12px;
  font-weight: 750;
}

.condo-rule-card.important .rule-number {
  background: #dfece6;
  color: #245342;
}

.rule-content {
  min-width: 0;
}

.rule-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.rule-title-row h4 {
  margin: 0;
  color: #2a3732;
  font-size: 16px;
}

.rule-important-badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e4efe9;
  color: #285744;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.rule-content p {
  margin: 0;
  color: #616d67;
  font-size: 13px;
  line-height: 1.6;
}

.rule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.icon-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e1dd;
  border-radius: 10px;
  background: #fff;
  color: #53615b;
  font-size: 15px;
}

.icon-action:hover:not(:disabled) {
  background: #eff4f1;
  color: #245240;
}

.icon-action:disabled {
  opacity: .32;
  cursor: default;
}

.rules-empty {
  padding: 56px 24px;
  border: 1px dashed #d5dfda;
  border-radius: 22px;
  text-align: center;
  background: #fafcfb;
}

.rules-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eaf1ed;
  color: #4a665b;
  font-size: 24px;
}

.rules-empty h4 {
  margin: 0 0 6px;
}

.rules-empty p {
  margin: 0;
  color: var(--muted);
}

#ruleDialog {
  width: min(650px, calc(100vw - 32px)) !important;
  max-width: 650px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
}

.rule-modal-card {
  width: 100% !important;
  max-width: none !important;
  padding: 30px;
  box-sizing: border-box;
}

.rule-modal-card .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.rule-modal-card > label {
  display: block;
  margin-bottom: 15px;
}

.rule-modal-card textarea {
  width: 100%;
  min-height: 150px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 13px 14px;
  outline: none;
  font: inherit;
  line-height: 1.5;
  color: var(--text);
}

.rule-modal-card textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.rule-modal-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.civico-toggle-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dee6e2;
  border-radius: 15px;
  background: #f8faf9;
  cursor: pointer;
}

.civico-toggle-row > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.civico-toggle-ui {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbd5d0;
  transition: .18s ease;
}

.civico-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: .18s ease;
}

.civico-toggle-row > input:checked + .civico-toggle-ui {
  background: #285b49;
}

.civico-toggle-row > input:checked + .civico-toggle-ui::after {
  transform: translateX(18px);
}

.civico-toggle-row strong,
.civico-toggle-row small {
  display: block;
}

.civico-toggle-row strong {
  color: #35423d;
  font-size: 13px;
}

.civico-toggle-row small {
  margin-top: 2px;
  color: #7b8581;
  font-size: 11px;
}

/* Sidebar: con due voci in più resta compatta senza diventare scrollabile. */
@media (min-width: 621px) {
  .condominium-manage-page > .sidebar .side-link {
    margin-top: 2px;
    margin-bottom: 2px;
  }
}

@media (max-width: 860px) {
  .waste-schedule-grid {
    grid-template-columns: 1fr;
  }

  .waste-editor-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .waste-days-legend {
    display: none;
  }

  .waste-day-picker {
    justify-content: start;
  }

  .condo-rule-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rule-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .waste-section-head,
  .rules-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .waste-section-head > button,
  .rules-section-head > button {
    width: 100%;
  }

  #wasteScheduleDialog,
  #ruleDialog {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  .waste-modal-card {
    max-height: calc(100vh - 16px);
    padding: 22px 18px 0;
  }

  .sticky-modal-actions {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .waste-day-picker {
    grid-template-columns: repeat(4, 42px);
  }

  .rule-modal-card {
    padding: 24px 20px 22px;
  }

  .condo-rule-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .rule-number {
    width: 38px;
    height: 38px;
  }

  .rule-actions {
    grid-column: 1;
  }
}


/* =========================================================
   V22 - PAGINA CHI SIAMO / PRESENTAZIONE
   ========================================================= */

.about-page {
  background: #f5f7f6;
  color: #1f2b27;
}

.about-shell {
  min-height: 100vh;
}

.about-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 32px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(20, 41, 34, .08);
}

.about-brand img {
  height: 36px;
  width: auto;
  display: block;
}

.about-link-btn,
.about-primary-btn,
.about-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.about-link-btn,
.about-secondary-btn {
  border: 1px solid #d6e0db;
  background: #fff;
  color: #24453b;
}

.about-primary-btn {
  background: #163f34;
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 63, 52, .16);
}

.about-primary-btn:hover,
.about-secondary-btn:hover,
.about-link-btn:hover {
  transform: translateY(-1px);
}

.about-hero,
.about-section,
.about-showcase-section,
.about-final-cta {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.about-hero {
  padding: 64px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 34px;
  align-items: center;
}

.about-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: .12em;
  color: #5d766d;
  font-weight: 700;
}

.about-hero h1,
.about-section-head h2,
.about-showcase-copy h2,
.about-final-cta h2 {
  margin: 0;
  color: #1d2925;
  letter-spacing: -.04em;
  line-height: 1.03;
  font-weight: 700;
}

.about-hero h1 {
  font-size: clamp(40px, 5vw, 64px);
}

.about-section-head h2,
.about-showcase-copy h2,
.about-final-cta h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.about-hero p,
.about-section-head p,
.about-showcase-copy p,
.about-final-cta p,
.about-info-card p,
.about-feature-tile span,
.about-showcase-copy li {
  color: #53625d;
  line-height: 1.65;
  font-size: 17px;
}

.about-hero p {
  margin: 20px 0 0;
  max-width: 640px;
}

.about-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.about-hero-actions.centered {
  justify-content: center;
}

.about-section {
  padding: 56px 0 12px;
}

.about-section-head {
  max-width: 840px;
  margin-bottom: 26px;
}

.about-section-head.centered,
.about-final-cta {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.about-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.about-info-card,
.about-feature-tile,
.about-browser,
.about-final-cta {
  border: 1px solid rgba(24, 52, 43, .08);
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 50px rgba(25, 52, 45, .07);
}

.about-info-card {
  border-radius: 26px;
  padding: 28px;
}

.about-card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: 16px;
  background: #eef5f2;
  font-size: 26px;
}

.about-info-card h3,
.about-feature-tile strong,
.about-mini-header h3,
.about-quick-panels h4,
.about-assembly-detail h4,
.about-water-summary h4,
.about-report-head strong,
.about-resource-split h4,
.about-info-panel h4,
.about-rule-item strong,
.about-building-floor > span,
.about-door-card strong {
  color: #20312b;
}

.about-info-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.about-feature-tile {
  border-radius: 22px;
  padding: 22px 20px;
}

.about-feature-tile strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.about-feature-tile span {
  display: block;
  font-size: 14px;
}

.about-showcase-section {
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: center;
}

.about-showcase-section.reverse {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}

.about-showcase-section.reverse .about-showcase-copy {
  order: 2;
}

.about-showcase-section.reverse .about-browser {
  order: 1;
}

.about-showcase-copy ul {
  padding-left: 18px;
  margin: 18px 0 0;
}

.about-showcase-copy li + li {
  margin-top: 6px;
}

.about-browser {
  border-radius: 30px;
  overflow: hidden;
}

.about-browser-bar {
  display: flex;
  gap: 7px;
  padding: 14px 16px;
  background: #f2f5f4;
  border-bottom: 1px solid rgba(20, 41, 34, .08);
}

.about-browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c5d3cd;
}

.about-browser-content {
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
}

.about-browser-dashboard {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 16px;
}

.about-mini-sidebar {
  border-radius: 22px;
  background: #18372e;
  color: rgba(255,255,255,.92);
  padding: 16px 14px;
}

.about-mini-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: rgba(255,255,255,.12);
  font-weight: 700;
}

.about-mini-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-mini-sidebar li {
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255,255,255,.72);
}

.about-mini-sidebar li.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.about-mini-main {
  display: grid;
  gap: 16px;
}

.about-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.about-mini-header small,
.about-water-top small {
  display: block;
  color: #6a7b75;
  margin-bottom: 4px;
}

.about-mini-header h3,
.about-water-top h4 {
  margin: 0;
  font-size: 20px;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4f1;
  color: #325447;
  font-size: 12px;
  font-weight: 700;
}

.about-badge.success {
  background: #e6f5ee;
  color: #15754c;
}

.about-badge.warning {
  background: #fff5dd;
  color: #8c6a09;
}

.about-badge.danger {
  background: #fde8e7;
  color: #a1332c;
}

.about-badge.muted {
  background: #eff2f1;
  color: #61706a;
}

.about-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.about-stat-grid article,
.about-quick-panels article,
.about-assembly-card,
.about-water-summary,
.about-report-card,
.about-resource-split article,
.about-info-panel {
  border-radius: 20px;
  background: #f7faf8;
  border: 1px solid #e4ece8;
}

.about-stat-grid article {
  padding: 16px;
}

.about-stat-grid strong {
  display: block;
  font-size: 26px;
  color: #163f34;
  margin-bottom: 6px;
}

.about-stat-grid span {
  color: #64726d;
  font-size: 13px;
}

.about-quick-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-quick-panels article,
.about-resource-split article,
.about-info-panel,
.about-assembly-card,
.about-water-summary,
.about-report-card {
  padding: 18px;
}

.about-quick-panels h4,
.about-resource-split h4,
.about-info-panel h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.about-quick-panels p,
.about-resource-split p,
.about-info-panel small,
.about-report-card p,
.about-building-floor > span {
  margin: 0;
  color: #61706a;
}

.about-quick-panels ul,
.about-resource-split ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #3a4944;
}

.about-building-demo {
  display: grid;
  gap: 12px;
}

.about-building-floor {
  border-radius: 18px;
  border: 1px solid #e3ece7;
  background: #f8fbf9;
  padding: 12px;
}

.about-building-floor > span {
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

.about-door-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.about-door-card {
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2ece7;
  padding: 16px 12px;
  text-align: center;
}

.about-door-card strong {
  display: block;
  margin-bottom: 4px;
}

.about-door-card small {
  color: #687772;
}

.about-assembly-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.about-assembly-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 12px;
  color: #63746d;
}

.about-assembly-calendar span,
.about-assembly-calendar div {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.about-assembly-calendar span {
  background: #fff;
  border: 1px solid #e2ebe7;
}

.about-assembly-calendar span.active {
  background: #173f34;
  border-color: #173f34;
  color: #fff;
}

.about-assembly-detail ol {
  margin: 12px 0 14px;
  padding-left: 18px;
  color: #465550;
}

.about-water-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.about-progress {
  height: 10px;
  border-radius: 999px;
  background: #e9f0ed;
  overflow: hidden;
  margin-bottom: 14px;
}

.about-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5ea286, #1d6a50);
}

.about-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.about-mini-table th,
.about-mini-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid #e2ece7;
}

.about-mini-table th {
  color: #6a7b75;
  font-weight: 600;
}

.about-reports-demo {
  display: grid;
  gap: 14px;
}

.about-report-card.urgent {
  border-left: 6px solid #cb574c;
}

.about-report-card.private {
  border-left: 6px solid #667770;
}

.about-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.about-report-photo-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.about-report-photo-row span {
  flex: 1;
  min-height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dce7e2, #eef4f1);
  border: 1px solid #d9e4df;
}

.about-resource-split,
.about-info-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.about-resource-split small {
  display: block;
  margin-top: 12px;
  color: #687772;
}

.about-waste-item,
.about-rule-item {
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e3ece7;
  padding: 12px 13px;
}

.about-waste-item + .about-waste-item,
.about-rule-item + .about-rule-item {
  margin-top: 10px;
}

.about-waste-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.about-waste-item span {
  color: #5f7069;
  font-weight: 600;
}

.about-rule-item p {
  margin: 6px 0 0;
  color: #61706a;
  font-size: 14px;
  line-height: 1.55;
}

.about-rule-item.important {
  border-color: #cde2d7;
  background: #f2faf6;
}

.about-final-cta {
  margin-top: 24px;
  margin-bottom: 72px;
  border-radius: 30px;
  padding: 42px 28px;
}

@media (max-width: 1100px) {
  .about-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-showcase-section,
  .about-showcase-section.reverse,
  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-showcase-section.reverse .about-showcase-copy,
  .about-showcase-section.reverse .about-browser {
    order: initial;
  }
}

@media (max-width: 820px) {
  .about-topbar {
    padding: 16px 18px;
  }

  .about-two-cols,
  .about-resource-split,
  .about-info-split,
  .about-quick-panels,
  .about-stat-grid,
  .about-assembly-card,
  .about-browser-dashboard {
    grid-template-columns: 1fr;
  }

  .about-door-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .about-hero,
  .about-section,
  .about-showcase-section,
  .about-final-cta {
    width: min(100%, calc(100% - 24px));
  }

  .about-feature-grid,
  .about-two-cols,
  .about-resource-split,
  .about-info-split,
  .about-door-grid {
    grid-template-columns: 1fr;
  }

  .about-browser-content,
  .about-info-card,
  .about-feature-tile,
  .about-final-cta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .about-hero {
    padding-top: 38px;
  }

  .about-hero h1 {
    font-size: 36px;
  }

  .about-topbar-actions {
    display: none;
  }
}


/* =========================================================
   V23 - AVVISI CONDOMINIALI
   ========================================================= */

.notices-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.notices-section-head h3 {
  margin: 2px 0 7px;
  font-size: 30px;
  color: #21312b;
}

.notices-section-head p {
  margin: 0;
  color: #69766f;
  line-height: 1.55;
}

.notice-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.notice-summary-strip > span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #dfe8e3;
  border-radius: 999px;
  background: #f7faf8;
  color: #64716b;
  font-size: 13px;
}

.notice-summary-strip strong {
  color: #224a3d;
}

.notice-summary-strip .notice-summary-urgent {
  background: #fff1ef;
  border-color: #f0d2ce;
  color: #9d433c;
}

.condominium-notices-list {
  display: grid;
  gap: 14px;
}

.notice-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid #e0e8e4;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 53, 45, .045);
}

.notice-card.pinned {
  border-color: #bdd5ca;
  background: linear-gradient(135deg, #fbfefc, #f3f9f6);
}

.notice-card.priority-urgent {
  border-left: 5px solid #c94f46;
}

.notice-card.priority-important:not(.priority-urgent) {
  border-left: 5px solid #d9a32d;
}

.notice-card.inactive {
  opacity: .68;
  background: #f8f9f8;
}

.notice-card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #edf5f1;
  font-size: 24px;
}

.notice-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.notice-badges,
.notice-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.notice-category-badge,
.notice-priority-badge,
.notice-pin-badge,
.notice-visibility-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.notice-category-badge {
  background: #edf4f1;
  color: #376055;
}

.notice-priority-badge.important {
  background: #fff4d9;
  color: #906d13;
}

.notice-priority-badge.urgent {
  background: #fde9e7;
  color: #a13d35;
}

.notice-pin-badge {
  background: #eaf3ff;
  color: #376489;
}

.notice-visibility-badge {
  background: #eef0f0;
  color: #68726e;
}

.notice-card h4 {
  margin: 12px 0 8px;
  font-size: 21px;
  color: #22332c;
}

.notice-card-body > p {
  margin: 0;
  color: #53615c;
  line-height: 1.62;
}

.notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #edf1ef;
  color: #7a8580;
  font-size: 12px;
}

.danger-text {
  color: #9d423b !important;
}

.notices-empty {
  margin-top: 18px;
  padding: 42px 24px;
  border: 1px dashed #d5e0da;
  border-radius: 24px;
  text-align: center;
  background: #fafcfb;
}

.notices-empty-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.notices-empty h4 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #2d4038;
}

.notices-empty p {
  margin: 0;
  color: #748079;
}

.notice-dialog {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: 760px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.notice-modal-card {
  width: 100% !important;
  max-width: none !important;
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #b4c1bb transparent;
}

.notice-modal-card::-webkit-scrollbar { width: 9px; }
.notice-modal-card::-webkit-scrollbar-track { background: transparent; margin: 20px 0; }
.notice-modal-card::-webkit-scrollbar-thumb { background: #b9c5bf; border: 2px solid #fff; border-radius: 999px; }
.notice-modal-card::-webkit-scrollbar-button { display:none; width:0; height:0; }

.notice-dialog .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.notice-form-block {
  margin-top: 17px;
}

.notice-field-title {
  display: block;
  margin-bottom: 8px;
  color: #3f4e48;
  font-size: 13px;
  font-weight: 600;
}

.notice-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notice-choice {
  min-height: 40px;
  border: 1px solid #d8e2dd;
  border-radius: 12px;
  padding: 0 13px;
  background: #fff;
  color: #4b5b54;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.notice-choice:hover {
  border-color: #aebfb7;
  transform: translateY(-1px);
}

.notice-choice.active {
  border-color: #2d6a57;
  background: #eaf4f0;
  color: #1d5645;
  font-weight: 650;
}

.notice-choice-row.compact .notice-choice {
  min-width: 112px;
  justify-content: center;
}

.notice-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 17px;
}

.notice-form-hint {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f2f6f4;
  color: #586760;
  font-size: 12px;
}

.notice-form-hint strong { color: #355247; }

@media (max-width: 680px) {
  .notices-section-head,
  .notice-card-topline {
    flex-direction: column;
  }

  .notice-card {
    grid-template-columns: 1fr;
  }

  .notice-date-grid {
    grid-template-columns: 1fr;
  }

  .notice-modal-card {
    padding: 24px 20px 22px;
  }
}


/* =========================================================
   V25 - PALAZZO MINIMAL / APPLE-LIKE
   ========================================================= */

.apple-building-shell {
  width: min(1040px, 100%);
  margin: 0 auto 42px;
}

.apple-building-manager-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #e6e6e9;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.045);
  box-sizing: border-box;
}

.apple-building-manager-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #f3f3f5;
  color: #75757b;
}

.apple-building-manager-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apple-building-manager-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.apple-building-manager-copy > span {
  color: #8a8a90;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
}

.apple-building-manager-copy strong {
  color: #1d1d1f;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.018em;
}

.apple-building-manager-copy small {
  color: #98989d;
  font-size: 12px;
}

.apple-building-manager-status {
  margin-left: auto;
  max-width: 35%;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #68686d;
  font-size: 11px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apple-building-frame {
  overflow: hidden;
  border: 1px solid #e5e5e7;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,.055);
}

.apple-building-frame-head {
  min-height: 74px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #ededf0;
  background: #fbfbfd;
  box-sizing: border-box;
}

.apple-building-frame-head > div {
  display: grid;
  gap: 2px;
}

.apple-building-frame-head span {
  color: #929297;
  font-size: 11px;
  font-weight: 600;
}

.apple-building-frame-head strong {
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.015em;
}

.apple-building-frame-head small {
  color: #85858a;
  font-size: 12px;
}

.apple-building-floors {
  display: grid;
}

.apple-building-floor {
  min-height: 230px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  border-bottom: 1px solid #ededf0;
  background: #fff;
}

.apple-building-floor:last-child {
  border-bottom: 0;
}

.apple-floor-label {
  padding: 24px 16px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-right: 1px solid #ededf0;
  background: #fcfcfd;
  box-sizing: border-box;
}

.apple-floor-label::before {
  content: "";
  width: 28px;
  height: 1px;
  margin-bottom: 7px;
  background: #c9c9ce;
}

.apple-floor-label span {
  color: #2c2c2e;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.apple-floor-label small {
  color: #a0a0a5;
  font-size: 11px;
}

.apple-floor-units {
  min-width: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: stretch;
  background: #fafafa;
}

.apple-apartment-card {
  min-width: 0;
  min-height: 192px;
  padding: 14px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 15px;
  border: 1px solid #e6e6e9;
  border-radius: 20px;
  background: rgba(255,255,255,.98);
  box-sizing: border-box;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.apple-apartment-card:hover {
  border-color: #d9d9dd;
  box-shadow: 0 12px 28px rgba(0,0,0,.055);
  transform: translateY(-1px);
}

.apple-apartment-topline {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 11px;
  color: #8d8d92;
  font-size: 11px;
}

.apple-apartment-topline strong {
  color: #343438;
  font-size: 13px;
  font-weight: 650;
}

.apple-apartment-door-wrap {
  display: grid;
  place-items: center;
  min-height: 134px;
  border-radius: 16px;
  background: #f6f6f7;
}

.apple-apartment-door {
  position: relative;
  width: 68px;
  height: 105px;
  border: 1px solid #d8d8dc;
  border-radius: 10px 10px 5px 5px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f2 100%);
  box-shadow: 0 7px 14px rgba(0,0,0,.045), inset 0 0 0 3px rgba(255,255,255,.65);
}

.apple-door-peephole {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 999px;
  background: #b2b2b7;
}

.apple-door-handle {
  position: absolute;
  right: 10px;
  top: 57px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #9f9fa5;
  box-shadow: -2px 2px 0 #c4c4c8;
}

.apple-apartment-residents {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.apple-resident-row {
  width: 100%;
  min-width: 0;
  padding: 8px 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #242426;
  text-align: left;
  box-sizing: border-box;
}

.apple-resident-row:disabled {
  opacity: 1;
  cursor: default;
}

.apple-resident-row.editable {
  cursor: pointer;
  transition: background .16s ease;
}

.apple-resident-row.editable:hover {
  background: #f5f5f7;
}

.apple-resident-avatar {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ededf0;
  color: #66666b;
  font-size: 11px;
  font-weight: 700;
}

.apple-resident-name {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
}

.apple-resident-name strong {
  overflow: hidden;
  color: #2c2c2e;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apple-resident-name small {
  color: #9a9a9f;
  font-size: 10px;
}

.apple-resident-edit {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #8c8c91;
}

.apple-resident-row.editable:hover .apple-resident-edit {
  background: #e9e9ec;
  color: #545459;
}

.apple-resident-edit svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apple-building-empty {
  padding: 54px 28px;
  display: grid;
  justify-items: center;
  text-align: center;
  border: 1px solid #e5e5e7;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(0,0,0,.04);
}

.apple-building-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 17px;
  background: #f2f2f4;
  color: #77777c;
  font-size: 23px;
}

.apple-building-empty h4 {
  margin: 0 0 7px;
  color: #252527;
  font-size: 20px;
}

.apple-building-empty p {
  max-width: 480px;
  margin: 0;
  color: #8a8a8f;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .apple-building-floor {
    grid-template-columns: 1fr;
  }

  .apple-floor-label {
    min-height: 64px;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid #ededf0;
  }

  .apple-floor-label::before {
    display: none;
  }
}

@media (max-width: 620px) {
  .apple-building-manager-card {
    align-items: flex-start;
    padding: 15px;
    border-radius: 19px;
  }

  .apple-building-manager-status {
    display: none;
  }

  .apple-building-frame {
    border-radius: 22px;
  }

  .apple-building-frame-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px 17px;
  }

  .apple-floor-units {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .apple-apartment-card {
    grid-template-columns: 90px minmax(0, 1fr);
    border-radius: 17px;
  }

  .apple-apartment-door-wrap {
    min-height: 120px;
  }

  .apple-apartment-door {
    width: 60px;
    height: 94px;
  }
}


/* =========================================================
   V25.1 - AMMINISTRATORE VISIBILE ANCHE NEL PALAZZO
   ========================================================= */

.apple-resident-name-line {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.apple-resident-name-line > strong {
  min-width: 0;
  max-width: 100%;
}

.apple-resident-manager-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 7px 2px 5px;
  border: 1px solid #d9e7e1;
  border-radius: 999px;
  background: #f2f8f5;
  color: #376456;
  font-size: 8.5px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.apple-resident-manager-badge svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Un amministratore residente riceve un avatar appena più riconoscibile,
   senza rompere la palette minimal della vista Palazzo. */
.apple-resident-row:has(.apple-resident-manager-badge) .apple-resident-avatar {
  background: #eaf3ef;
  color: #356253;
}

/* Manteniamo leggibile il badge anche negli appartamenti più stretti. */
@media (max-width: 760px) {
  .apple-resident-manager-badge span {
    display: none;
  }

  .apple-resident-manager-badge {
    width: 20px;
    height: 20px;
    padding: 0;
    justify-content: center;
  }
}


/* =========================================================
   V25.2 - DETTAGLIO PIANI / INTERNI DEL PALAZZO
   ========================================================= */

.apple-floor-info-trigger {
  appearance: none;
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.apple-floor-info-trigger:hover {
  background: #f7f8f7;
}

.apple-floor-info-trigger:focus-visible {
  outline: 2px solid rgba(63, 101, 88, .26);
  outline-offset: -2px;
}

.apple-building-info-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 17px;
  line-height: .8;
  color: #9aa49f;
  transition: transform .18s ease, color .18s ease;
}

.apple-floor-info-trigger:hover .apple-building-info-arrow {
  transform: translateX(2px);
  color: #586a63;
}

.apple-apartment-info-trigger {
  cursor: pointer;
  position: relative;
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.apple-apartment-info-trigger:hover {
  transform: translateY(-1px);
  border-color: #d2dad6;
  background: #fff;
  box-shadow: 0 9px 24px rgba(31, 44, 39, .055);
}

.apple-apartment-info-trigger:focus-visible {
  outline: 2px solid rgba(63, 101, 88, .25);
  outline-offset: 2px;
}

.apple-apartment-info-hint {
  position: absolute;
  top: 13px;
  right: 14px;
  color: #a4ada9;
  font-size: 18px;
  line-height: 1;
  transition: transform .18s ease, color .18s ease;
}

.apple-apartment-info-trigger:hover .apple-apartment-info-hint {
  transform: translateX(2px);
  color: #5d6e67;
}

/* Il click sull'autore resta riservato alla modifica del capo condominio. */
.apple-resident-row.editable {
  position: relative;
  z-index: 2;
}

/* ---------- Pannello dettagli ---------- */

.building-info-dialog {
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: 560px !important;
  max-height: calc(100vh - 32px);
  padding: 0 !important;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: transparent;
}

.building-info-dialog::backdrop {
  background: rgba(25, 32, 29, .30);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.building-info-card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 28px;
  background: rgba(255,255,255,.985);
  box-shadow:
    0 28px 80px rgba(22, 31, 27, .18),
    0 4px 18px rgba(22, 31, 27, .06);
  scrollbar-width: thin;
  scrollbar-color: #b9c2be transparent;
}

.building-info-card::-webkit-scrollbar {
  width: 8px;
}

.building-info-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 20px 0;
}

.building-info-card::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b8c2bd;
}

.building-info-card::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.building-info-head {
  align-items: flex-start;
  margin-bottom: 24px;
}

.building-info-head h3 {
  margin-bottom: 5px;
  font-size: 30px;
  letter-spacing: -.035em;
}

.building-info-subtitle {
  margin: 0;
  color: #78817d;
  font-size: 14px;
  line-height: 1.5;
}

.building-info-content {
  display: grid;
  gap: 14px;
}

.building-info-unit-summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border-radius: 18px;
  background: #f6f8f7;
  border: 1px solid #e7ebe9;
}

.building-info-unit-summary span {
  color: #69736f;
  font-size: 13px;
}

.building-info-unit-summary strong {
  font-size: 24px;
  color: #27332e;
}

.building-info-residents {
  display: grid;
  gap: 9px;
}

.building-info-resident {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #e6ebe8;
  border-radius: 17px;
  background: #fff;
}

.building-info-residents.compact .building-info-resident {
  background: #fafbfa;
}

.building-info-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2ef;
  color: #4a5f57;
  font-size: 13px;
  font-weight: 700;
}

.building-info-resident-copy {
  min-width: 0;
  flex: 1;
}

.building-info-name-line {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.building-info-name-line strong {
  color: #26322d;
  font-size: 14px;

  /* Qui NON tagliamo mai il nome. */
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.building-info-resident-copy small {
  display: block;
  margin-top: 3px;
  color: #7b8581;
  font-size: 11px;
}

.building-info-manager-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 7px 2px 5px;
  border: 1px solid #d8e6e0;
  border-radius: 999px;
  background: #f1f7f4;
  color: #386455;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.building-info-manager-badge svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.building-info-floor-list {
  display: grid;
  gap: 12px;
}

.building-info-floor-unit {
  overflow: hidden;
  border: 1px solid #e4eae7;
  border-radius: 20px;
  background: #fff;
}

.building-info-floor-unit-head {
  appearance: none;
  width: 100%;
  min-height: 55px;
  padding: 0 16px;
  border: 0;
  background: #f6f8f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #2a3731;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.building-info-floor-unit-head:hover {
  background: #f1f4f2;
}

.building-info-floor-unit-head span {
  font-size: 14px;
  font-weight: 700;
}

.building-info-floor-unit-head small {
  color: #747e79;
  font-size: 11px;
  font-weight: 500;
}

.building-info-floor-unit-head b {
  margin-left: 4px;
  color: #9ba49f;
  font-size: 17px;
}

.building-info-floor-unit .building-info-residents {
  padding: 10px;
}

.building-info-empty {
  padding: 28px 18px;
  border: 1px solid #e5eae8;
  border-radius: 18px;
  background: #f8faf9;
  color: #79827e;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 620px) {
  .building-info-dialog {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  .building-info-card {
    max-height: calc(100vh - 16px);
    padding: 24px 18px 20px;
    border-radius: 22px;
  }

  .building-info-head h3 {
    font-size: 27px;
  }

  .building-info-name-line {
    align-items: flex-start;
  }
}

/* =========================================================
   V26 - INQUILINI, PROFILO E PERMESSI
   ========================================================= */
.registration-role-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:820px}
.account-menu-wrap{position:relative}.account-menu-trigger{border:0;background:transparent;color:#303936;display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border-radius:12px;font:inherit;font-size:14px;font-weight:600;cursor:pointer}.account-menu-trigger:hover,.account-menu-trigger[aria-expanded="true"]{background:#f3f6f4}.account-menu-chevron{color:#7a8782;transition:transform .18s ease}.account-menu-trigger[aria-expanded="true"] .account-menu-chevron{transform:rotate(180deg)}.account-menu{position:absolute;top:calc(100% + 8px);right:0;width:285px;z-index:200;padding:8px;border:1px solid #e0e7e3;border-radius:18px;background:rgba(255,255,255,.985);box-shadow:0 18px 50px rgba(25,44,36,.16)}.account-menu-profile{padding:11px 12px 13px;border-bottom:1px solid #edf0ee;margin-bottom:6px}.account-menu-profile strong,.account-menu-profile small{display:block}.account-menu-profile strong{color:#26322d;font-size:14px}.account-menu-profile small{margin-top:3px;color:#7a8580;font-size:11px}.account-menu-item{width:100%;border:0;background:transparent;border-radius:13px;padding:11px 10px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer}.account-menu-item:hover{background:#f3f7f5}.account-menu-item>span:last-child{min-width:0}.account-menu-item strong,.account-menu-item small{display:block}.account-menu-item strong{color:#294238;font-size:13px}.account-menu-item small{color:#78857f;font-size:10px;margin-top:2px}.account-menu-icon{flex:0 0 auto;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#edf5f1;color:#2f6351}
.apple-resident-tenant-badge{width:20px;height:20px;display:inline-grid;place-items:center;flex:0 0 auto;border-radius:999px;background:#f0f3f7;border:1px solid #dce2e8;color:#556575;font-size:9px;font-weight:800}.building-info-tenant-badge{display:inline-flex;align-items:center;gap:5px;min-height:20px;padding:2px 7px 2px 5px;border:1px solid #dce3e8;border-radius:999px;background:#f4f6f8;color:#566572;font-size:8.5px;font-weight:700}.building-info-tenant-badge b{width:14px;height:14px;display:inline-grid;place-items:center;border-radius:50%;background:#e7ebef;font-size:8px}.tenant-section-hidden{display:none!important}
.tenant-manager-dialog,.tenant-permissions-dialog{width:min(760px,calc(100vw - 32px))!important;max-width:760px!important;padding:0!important;border:0;border-radius:28px;overflow:hidden;background:transparent}.tenant-manager-dialog::backdrop,.tenant-permissions-dialog::backdrop{background:rgba(22,31,27,.34);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.tenant-manager-card,.tenant-permissions-card{max-height:calc(100vh - 32px);overflow-y:auto;padding:30px;border-radius:28px;background:#fff;box-shadow:0 26px 80px rgba(19,39,31,.18);scrollbar-width:thin;scrollbar-color:#b7c2bd transparent}.tenant-manager-card::-webkit-scrollbar,.tenant-permissions-card::-webkit-scrollbar{width:8px}.tenant-manager-card::-webkit-scrollbar-thumb,.tenant-permissions-card::-webkit-scrollbar-thumb{border:2px solid #fff;border-radius:999px;background:#b7c2bd}.tenant-manager-head{align-items:flex-start}.tenant-manager-subtitle{margin:4px 0 0;color:#7a8580;font-size:13px}.tenant-add-mode{display:grid;grid-template-columns:1fr 1fr;padding:4px;margin:22px 0 20px;border-radius:15px;background:#f2f5f3}.tenant-mode-btn{border:0;border-radius:11px;min-height:40px;background:transparent;color:#68756f;font:inherit;font-size:12px;font-weight:650;cursor:pointer}.tenant-mode-btn.active{background:#fff;color:#244a3d;box-shadow:0 2px 8px rgba(24,51,42,.08)}.tenant-add-form{padding:20px;border:1px solid #e6ebe8;border-radius:20px;background:#fbfcfb}.tenant-permission-editor{margin:16px 0 18px}.tenant-permission-head,.tenant-existing-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.tenant-permission-head strong,.tenant-permission-head small{display:block}.tenant-permission-head small{margin-top:3px;color:#7b8581;font-size:10px}.tenant-select-all{border:0;background:transparent;color:#356556;font-size:11px;font-weight:700;cursor:pointer}.tenant-permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}.tenant-permission-grid label{margin:0;cursor:pointer}.tenant-permission-grid input{position:absolute;opacity:0;pointer-events:none}.tenant-permission-grid span{min-height:42px;display:flex;align-items:center;padding:0 11px;border:1px solid #e0e6e3;border-radius:12px;background:#fff;color:#68756f;font-size:11px;font-weight:600;transition:all .14s ease}.tenant-permission-grid input:checked+span{border-color:#b6d0c5;background:#eef7f3;color:#285d4b;box-shadow:inset 0 0 0 1px #d6e8e0}.tenant-invite-result{margin-top:14px;padding:16px;border:1px solid #cfe3da;border-radius:17px;background:#f3faf7}.tenant-invite-result strong,.tenant-invite-result small{display:block}.tenant-invite-result small{margin-top:3px;color:#6f7d77;font-size:10px}.tenant-invite-copy-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:12px}.tenant-invite-copy-row input{min-width:0}.tenant-existing-head{margin:28px 0 12px}.tenant-existing-head h4{margin:1px 0 0;color:#26342e;font-size:20px}.tenant-count-badge{min-width:34px;height:34px;display:grid;place-items:center;border-radius:12px;background:#f0f4f2;color:#52625b;font-size:12px;font-weight:700}.tenant-manager-list{display:grid;gap:9px}.tenant-person-card,.tenant-pending-card{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid #e5eae7;border-radius:17px;background:#fff}.tenant-person-avatar{width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:#eef2f5;color:#556471;font-size:11px;font-weight:800}.tenant-person-copy{min-width:0;flex:1}.tenant-person-copy strong,.tenant-person-copy small{display:block}.tenant-person-copy strong{color:#28352f;font-size:13px}.tenant-person-copy small{margin-top:3px;color:#7a8580;font-size:10px}.tenant-person-actions{flex:0 0 auto;display:flex;gap:6px}.tenant-pending-card{justify-content:space-between;background:#fafbfa;color:#68746e;font-size:12px}.tenant-empty{padding:26px 18px;border:1px dashed #dce4e0;border-radius:16px;text-align:center;color:#7c8782;font-size:12px}
@media(max-width:760px){.registration-role-grid,.tenant-permission-grid{grid-template-columns:1fr}.tenant-manager-dialog,.tenant-permissions-dialog{width:calc(100vw - 16px)!important}.tenant-manager-card,.tenant-permissions-card{padding:22px 18px}.tenant-person-card{align-items:flex-start;flex-wrap:wrap}.tenant-person-actions{width:100%;padding-left:49px}}


/* =========================================================
   V26.1 - MENU ACCOUNT / INQUILINI, FIX APERTURA
   ========================================================= */

/* La topbar non deve mai ritagliare il menu a discesa. */
.topbar,
#privateNav,
.account-menu-wrap {
  overflow: visible !important;
}

#privateNav {
  position: relative;
  z-index: 1001;
}

.account-menu-wrap {
  position: relative;
  z-index: 1002;
}

.account-menu-trigger {
  min-height: 48px;
  padding: 5px 8px 5px 6px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #28342f;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.account-menu-trigger:hover {
  background: #f4f7f5;
}

.account-menu-wrap.is-open .account-menu-trigger {
  background: #fff;
  border-color: #dfe6e2;
  box-shadow: 0 5px 18px rgba(25, 47, 38, .07);
}

.account-trigger-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf3ef;
  color: #356454;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.account-trigger-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.08;
}

.account-trigger-copy #navUser {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.account-trigger-copy small {
  display: block;
  margin-top: 4px;
  color: #8a938f;
  font-size: 9px;
  font-weight: 600;
}

.account-menu-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-left: 1px;
  color: #89948f;
  font-size: 13px;
  transition: transform .18s ease;
}

.account-menu-wrap.is-open .account-menu-chevron {
  transform: rotate(180deg);
}

/* Non usiamo più display:none: il pannello viene animato in modo
   coerente con gli altri controlli Civico+. */
.account-menu {
  display: block !important;
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 306px;
  z-index: 9999;
  padding: 8px;
  border: 1px solid rgba(219, 227, 223, .95);
  border-radius: 20px;
  background: rgba(255, 255, 255, .985);
  box-shadow:
    0 24px 60px rgba(24, 43, 35, .16),
    0 4px 12px rgba(24, 43, 35, .05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px) scale(.985);
  transform-origin: top right;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.account-menu-wrap.is-open .account-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.account-menu-profile {
  margin: 0 0 6px;
  padding: 13px 13px 12px;
  border-bottom: 1px solid #edf1ef;
}

.account-menu-profile strong {
  color: #23312b;
  font-size: 13px;
  font-weight: 750;
}

.account-menu-profile small {
  margin-top: 4px;
  color: #89938f;
  font-size: 10px;
}

.account-menu-item {
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 14px;
  transition: background .15s ease, transform .15s ease;
}

.account-menu-item:hover {
  background: #f2f7f4;
  transform: translateY(-1px);
}

.account-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #eaf4ef;
  color: #32614f;
  font-size: 17px;
}

.account-menu-item strong {
  color: #294538;
  font-size: 12px;
  font-weight: 750;
}

.account-menu-item small {
  margin-top: 3px;
  color: #7e8984;
  font-size: 9.5px;
  line-height: 1.35;
}

@media (max-width: 620px) {
  .account-trigger-copy small {
    display: none;
  }

  .account-trigger-copy #navUser {
    max-width: 118px;
  }

  .account-menu {
    position: fixed;
    top: 68px;
    right: 10px;
    width: min(306px, calc(100vw - 20px));
    transform-origin: top right;
  }
}


/* =========================================================
   V26.2 - MENU ACCOUNT / GESTIONE INQUILINI
   ========================================================= */

.account-menu-section {
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid #edf1ef;
}

.account-menu-section-label {
  padding: 6px 12px 5px;
  color: #9aa39f;
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: .085em;
}

.account-menu-section .account-menu-item {
  position: relative;
  width: 100%;
  min-height: 60px;
  padding: 10px 36px 10px 9px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.account-menu-section .account-menu-item:hover {
  background: #f4f8f6;
  transform: translateY(-1px);
}

.account-menu-section .account-menu-item + .account-menu-item {
  margin-top: 2px;
}

.account-menu-section .account-menu-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.account-menu-section .account-menu-item strong,
.account-menu-section .account-menu-item small {
  display: block;
}

.account-menu-section .account-menu-item strong {
  color: #293b34;
  font-size: 12.5px;
  line-height: 1.25;
}

.account-menu-section .account-menu-item small {
  margin-top: 3px;
  color: #7b8782;
  font-size: 9.5px;
  line-height: 1.35;
}

.account-menu-item-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #abb3af;
  font-size: 18px;
  transition: transform .15s ease, color .15s ease;
}

.account-menu-item:hover .account-menu-item-arrow {
  color: #5f756c;
  transform: translate(2px, -50%);
}

.tenant-manual-icon,
.tenant-invite-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dce8e2;
  border-radius: 11px;
  background: #f0f7f4;
  color: #346553;
  font-size: 11px;
  font-weight: 800;
}

.tenant-invite-icon {
  background: #f5f7f6;
  color: #52645d;
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 620px) {
  .account-menu {
    width: min(310px, calc(100vw - 24px));
  }
}


/* =========================================================
   V26.4 - CONFERMA RIMOZIONE INQUILINO
   ========================================================= */

.tenant-confirm-dialog {
  width: min(430px, calc(100vw - 28px)) !important;
  max-width: 430px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
}

.tenant-confirm-dialog::backdrop {
  background: rgba(22, 31, 27, .34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tenant-confirm-card {
  padding: 28px;
  border: 1px solid rgba(219, 227, 223, .9);
  border-radius: 26px;
  background: rgba(255, 255, 255, .99);
  box-shadow:
    0 28px 80px rgba(22, 35, 29, .18),
    0 4px 16px rgba(22, 35, 29, .05);
}

.tenant-confirm-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid #dce6e1;
  border-radius: 14px;
  background: #f1f6f3;
  color: #436457;
  font-size: 13px;
  font-weight: 800;
}

.tenant-confirm-copy h3 {
  margin: 4px 0 8px;
  color: #26332d;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.tenant-confirm-copy p {
  margin: 0;
  color: #727e78;
  font-size: 13px;
  line-height: 1.55;
}

.tenant-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 24px;
}

.tenant-confirm-actions button {
  min-height: 42px;
}

.tenant-confirm-danger {
  background: #9f3c3c !important;
  border-color: #9f3c3c !important;
  color: #fff !important;
}

.tenant-confirm-danger:hover {
  background: #8d3434 !important;
  border-color: #8d3434 !important;
}

@media (max-width: 500px) {
  .tenant-confirm-card {
    padding: 23px 20px 20px;
  }

  .tenant-confirm-actions {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V26.16 - PERMESSI INQUILINO: OVERRIDE VOCI SEMPRE VISIBILI
   ========================================================= */

/*
 * Le vecchie versioni di Civico+ rendevano esplicitamente:
 * - Turni & risorse
 * - Letture acqua
 * sempre visibili con display:flex!important.
 *
 * Per un inquilino il permesso configurato dal proprietario deve
 * avere priorità anche su quelle regole storiche.
 */
.side-link.tenant-section-hidden,
.side-link[data-condo-manage-section="resources"].tenant-section-hidden,
.side-link[data-condo-manage-section="water"].tenant-section-hidden {
  display: none !important;
}

/* Sicurezza anche per eventuali shortcut/card della dashboard. */
#dashboardResourcesBtn.tenant-section-hidden,
#dashboardWaterBtn.tenant-section-hidden {
  display: none !important;
}


/* =========================================================
   V27 - GEOGRAFIA STRUTTURATA CONDOMINIO
   ========================================================= */

.geo-condo-dialog {
  width: min(760px, calc(100vw - 28px));
  max-width: 760px;
}

.geo-condo-dialog form {
  width: 100%;
}

.geo-dialog-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.geo-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 2px 0 14px;
}

.geo-picker {
  position: relative;
  min-width: 0;
}

.geo-picker > label {
  display: block;
  margin-bottom: 7px;
}

.geo-input-wrap {
  position: relative;
}

.geo-search-input {
  width: 100%;
  padding-right: 38px !important;
}

.geo-search-input:disabled {
  background: #f3f5f4;
  color: #8c9892;
  cursor: not-allowed;
}

.geo-input-status {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #236047;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.geo-suggestions {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #dfe6e2;
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 45px rgba(21,48,37,.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scrollbar-width: thin;
  scrollbar-color: #bec9c3 transparent;
}

.geo-suggestions[hidden] {
  display: none !important;
}

.geo-suggestion-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.geo-suggestion-item:hover,
.geo-suggestion-item:focus-visible {
  background: #f1f6f3;
  outline: none;
}

.geo-suggestion-item span {
  min-width: 0;
}

.geo-suggestion-item b,
.geo-suggestion-item small {
  display: block;
}

.geo-suggestion-item b {
  font-size: 13px;
}

.geo-suggestion-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.geo-suggestion-item em {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf3f0;
  color: #466156;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.geo-suggestion-empty {
  padding: 13px 12px;
  color: var(--muted);
  font-size: 12px;
}

.geo-selected-place {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed #d9e2dd;
  border-radius: 13px;
  background: #f7f9f8;
  color: #728079;
  font-size: 12px;
}

.geo-selected-place.is-selected {
  border-style: solid;
  border-color: #cfe2d8;
  background: #f0f7f3;
  color: #355a49;
}

.geo-summary-check {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dfeee6;
  color: #20553d;
  font-weight: 900;
}

@media (max-width: 680px) {
  .geo-picker-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V28 - AZIENDA O DITTA
   ========================================================= */

.registration-role-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1080px;
}

.apple-form:has(.company-registration-fields:not(.hidden)) {
  width: min(720px, 100%);
}

.company-registration-fields {
  margin-top: 22px;
  padding-top: 4px;
}

.company-registration-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
  color: #77777d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.company-registration-divider::before,
.company-registration-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e1e1e6;
}

.field-optional {
  margin-left: 4px;
  color: #929299;
  font-size: 10px;
  font-weight: 500;
}

.company-location-title {
  margin: 22px 0 12px;
}

.company-location-title strong,
.company-location-title span {
  display: block;
}

.company-location-title strong {
  color: #242426;
  font-size: 14px;
}

.company-location-title span {
  margin-top: 4px;
  color: #77777d;
  font-size: 11px;
  line-height: 1.45;
}

/* L'autocomplete geografico deve restare visibile anche all'interno
   del form Apple della registrazione. */
.company-registration-fields .geo-picker {
  z-index: 20;
}

.company-registration-fields .geo-suggestions {
  z-index: 120;
}

/* Area aziendale */
.company-area-page {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at top right, rgba(31, 87, 62, .06), transparent 30%),
    #f6f8f7;
}

.company-area-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.company-area-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 58px;
}

.company-area-heading {
  margin-bottom: 28px;
}

.company-area-heading h1 {
  margin: 7px 0 8px;
  color: #1e2824;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -.05em;
}

.company-area-heading p {
  margin: 0;
  color: #78837e;
}

.company-profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid #e0e7e3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(22, 48, 37, .06);
}

.company-profile-symbol {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #143c2c;
  color: #fff;
  font-size: 30px;
}

.company-profile-main {
  min-width: 0;
}

.company-profile-label {
  color: #6f7c76;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}

.company-profile-main h2 {
  margin: 6px 0 5px;
  color: #25312c;
  font-size: 27px;
  letter-spacing: -.025em;
}

.company-profile-main p {
  margin: 0;
  color: #6e7b75;
}

.company-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.company-profile-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f4f2;
  color: #56645e;
  font-size: 10px;
  font-weight: 750;
}

.company-profile-meta .company-ready-pill {
  background: #eaf5ef;
  color: #2d6048;
}

.company-coming-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 18px;
  padding: 24px 26px;
  border: 1px dashed #d5dfda;
  border-radius: 22px;
  background: rgba(255,255,255,.62);
}

.company-coming-icon {
  font-size: 25px;
}

.company-coming-card h3 {
  margin: 5px 0 5px;
  color: #29342f;
  font-size: 20px;
}

.company-coming-card p {
  margin: 0;
  max-width: 680px;
  color: #738079;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .registration-role-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    max-width: 650px;
  }
}

@media (max-width: 620px) {
  .registration-role-grid {
    grid-template-columns: 1fr;
  }

  .company-area-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 20px;
  }

  .company-area-top {
    margin-bottom: 36px;
  }

  .company-profile-card {
    align-items: flex-start;
    padding: 22px;
  }

  .company-profile-symbol {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    font-size: 23px;
  }
}


/* =========================================================
   V28.2 - SCELTA PROFILO APPLE POLISH
   ========================================================= */

.apple-step.role-step-redesign {
  width: min(860px, calc(100vw - 44px));
  padding: 34px 34px 26px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 28px 90px rgba(32, 32, 36, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.role-step-copy {
  max-width: 620px;
  margin: 0 auto 20px;
  text-align: center;
}

.role-step-copy h2 {
  margin: 0;
  font-size: clamp(42px, 4.8vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.role-step-copy p {
  margin-top: 10px;
  font-size: 17px;
  color: #6b6b72;
  line-height: 1.45;
}

.role-choice-top-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.role-choice-compact,
.role-choice-company {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 26px;
  border: 1px solid #d9d9df;
  background: rgba(250, 250, 252, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.role-choice-compact:hover,
.role-choice-company:hover,
.role-choice-compact:focus-visible,
.role-choice-company:focus-visible {
  transform: translateY(-1px);
  border-color: #c7c7cf;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 34px rgba(28, 28, 32, 0.09);
  outline: none;
}

.role-choice-compact[aria-pressed="true"],
.role-choice-company[aria-pressed="true"],
.role-choice-compact.is-active,
.role-choice-company.is-active,
.role-choice-compact.selected,
.role-choice-company.selected {
  border-color: #17171c;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(25,25,28,.12);
}

.role-choice-compact {
  min-height: 156px;
  padding: 22px 18px;
}

.role-choice-compact .apple-choice-title {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.role-choice-compact .apple-choice-copy {
  margin-top: 10px;
  max-width: 190px;
  color: #6f6f76;
  font-size: 13px;
  line-height: 1.45;
}

.role-choice-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 500px;
  margin: 20px auto 18px;
  color: #818188;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.role-choice-separator::before,
.role-choice-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, rgba(210,210,218,0), rgba(210,210,218,1), rgba(210,210,218,0));
}

.role-choice-bottom-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.role-choice-company {
  width: min(290px, 100%);
  min-height: 142px;
  padding: 22px 22px;
}

.role-choice-company .apple-choice-title {
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.role-choice-company .apple-choice-copy {
  margin-top: 10px;
  max-width: 210px;
  color: #6f6f76;
  font-size: 13px;
  line-height: 1.45;
}

.role-step-back {
  display: block;
  margin: 20px auto 0;
  color: #76767d;
}

@media (max-width: 920px) {
  .apple-step.role-step-redesign {
    width: min(760px, calc(100vw - 32px));
    padding: 30px 26px 24px;
  }

  .role-step-copy h2 {
    font-size: clamp(36px, 6vw, 52px);
  }

  .role-choice-top-row {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .apple-step.role-step-redesign {
    width: min(92vw, 92vw);
    padding: 26px 18px 22px;
    border-radius: 28px;
  }

  .role-choice-top-row {
    grid-template-columns: 1fr;
  }

  .role-choice-compact,
  .role-choice-company {
    min-height: 134px;
  }

  .role-choice-company {
    width: 100%;
    max-width: 100%;
  }

  .role-choice-separator {
    max-width: 100%;
    margin: 16px auto;
  }
}

/* =========================================================
   V28.3 - ROLE PANEL: UN SOLO LIVELLO, PIU COMPATTO
   ========================================================= */

/* Elimina il vecchio pannello automatico V13 dietro allo step ruoli. */
.apple-step.role-step-redesign.active::before {
  content: none !important;
  display: none !important;
}

/* Lo step ruoli diventa esso stesso l'unico pannello. */
.apple-step.role-step-redesign,
.apple-step.role-step-redesign.active,
.apple-step.role-step-redesign.visible {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(820px, calc(100vw - 42px));
  height: auto;
  min-height: 0;
  padding: 30px 32px 24px;
  transform: translate(-50%, -50%) !important;
  border-radius: 32px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.76);
  box-shadow: 0 24px 72px rgba(20,20,24,.13);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

.role-step-copy {
  margin: 0 auto 20px;
}

.role-step-copy h2 {
  font-size: clamp(38px, 4vw, 50px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.role-step-copy p {
  margin-top: 9px;
  font-size: 16px;
}

.role-choice-top-row {
  max-width: 730px;
  gap: 12px;
}

.role-choice-compact {
  min-height: 138px;
  padding: 20px 16px;
  border-radius: 22px;
}

.role-choice-compact .apple-choice-title {
  font-size: 17px;
}

.role-choice-compact .apple-choice-copy {
  margin-top: 8px;
  font-size: 12px;
  max-width: 180px;
}

.role-choice-separator {
  max-width: 430px;
  margin: 16px auto 14px;
  font-size: 10px;
}

.role-choice-company {
  width: min(270px, 100%);
  min-height: 122px;
  padding: 18px 22px;
  border-radius: 22px;
}

.role-choice-company .apple-choice-title {
  font-size: 19px;
}

.role-choice-company .apple-choice-copy {
  margin-top: 7px;
  font-size: 12px;
}

.role-step-back {
  margin-top: 17px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .apple-step.role-step-redesign,
  .apple-step.role-step-redesign.active,
  .apple-step.role-step-redesign.visible {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 24px 16px 20px;
    border-radius: 26px;
  }

  .role-step-copy h2 {
    font-size: 34px;
  }

  .role-choice-top-row {
    grid-template-columns: 1fr;
  }

  .role-choice-compact,
  .role-choice-company {
    min-height: 112px;
  }
}


/* =========================================================
   V28.4 - REGISTRAZIONE CONTENUTA + SCROLL INTERNO
   ========================================================= */

/*
 * Il vecchio pannello era un ::before con altezza fissa.
 * Nella registrazione aziendale il form è più lungo e quindi
 * usciva visivamente dal riquadro. Da questa versione lo step
 * di registrazione È il pannello vero e proprio.
 */
.apple-step[data-entry-step="register"].active::before {
  content: none !important;
  display: none !important;
}

.apple-step[data-entry-step="register"],
.apple-step[data-entry-step="register"].active,
.apple-step[data-entry-step="register"].visible {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 44px));
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 36px);
  padding: 30px 34px 26px;
  box-sizing: border-box;
  transform: translate(-50%, -50%) !important;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;

  border: 1px solid rgba(255,255,255,.76);
  border-radius: 30px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 24px 72px rgba(20,20,24,.14);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);

  scrollbar-width: thin;
  scrollbar-color: rgba(82,89,86,.42) transparent;
}

.apple-step[data-entry-step="register"]::-webkit-scrollbar {
  width: 7px;
}

.apple-step[data-entry-step="register"]::-webkit-scrollbar-track {
  background: transparent;
  margin: 18px 0;
}

.apple-step[data-entry-step="register"]::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(78,84,81,.38);
  background-clip: padding-box;
}

.apple-step[data-entry-step="register"]::-webkit-scrollbar-thumb:hover {
  background: rgba(65,71,68,.55);
  background-clip: padding-box;
}

/* Il titolo appartiene al pannello e non deve mai uscire sopra. */
.apple-step[data-entry-step="register"] .apple-copy-block {
  flex: 0 0 auto;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 20px;
  padding: 0 4px;
}

.apple-step[data-entry-step="register"] .apple-copy-block h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.apple-step[data-entry-step="register"] .apple-copy-block p:last-child {
  margin-top: 9px;
  font-size: 15px;
  line-height: 1.45;
}

/* L'intero form rimane dentro il pannello. */
.apple-step[data-entry-step="register"] .apple-form {
  flex: 0 0 auto;
  width: min(660px, 100%);
  margin: 0 auto;
}

.apple-step[data-entry-step="register"] .apple-form:has(.company-registration-fields:not(.hidden)) {
  width: min(660px, 100%);
}

.apple-step[data-entry-step="register"] .apple-form label {
  margin-bottom: 12px;
}

.apple-step[data-entry-step="register"] .apple-form input {
  padding: 12px 14px;
}

/* Azienda: spazi più compatti senza sacrificare leggibilità. */
.apple-step[data-entry-step="register"] .company-registration-fields {
  margin-top: 18px;
  padding-top: 0;
}

.apple-step[data-entry-step="register"] .company-registration-divider {
  margin: 6px 0 17px;
}

.apple-step[data-entry-step="register"] .company-location-title {
  margin: 17px 0 10px;
}

.apple-step[data-entry-step="register"] .geo-picker-grid {
  margin-bottom: 11px;
}

.apple-step[data-entry-step="register"] .geo-selected-place {
  margin-bottom: 12px;
}

/* Il pulsante e Indietro fanno parte del contenuto scrollabile. */
.apple-step[data-entry-step="register"] .apple-primary-action.full {
  margin-top: 9px;
}

.apple-step[data-entry-step="register"] .apple-text-action {
  flex: 0 0 auto;
  margin: 15px auto 0;
  padding: 8px 14px;
}

/* Evita che la lista Province/Comuni venga tagliata dal form. */
.apple-step[data-entry-step="register"] .geo-picker {
  z-index: 30;
}

.apple-step[data-entry-step="register"] .geo-suggestions {
  z-index: 250;
}

/* Desktop bassi: pannello quasi a tutta altezza, ma sempre con margine. */
@media (max-height: 820px) and (min-width: 621px) {
  .apple-step[data-entry-step="register"],
  .apple-step[data-entry-step="register"].active,
  .apple-step[data-entry-step="register"].visible {
    max-height: calc(100vh - 22px);
    padding-top: 24px;
    padding-bottom: 22px;
    border-radius: 26px;
  }

  .apple-step[data-entry-step="register"] .apple-copy-block {
    margin-bottom: 15px;
  }
}

@media (max-width: 620px) {
  .apple-step[data-entry-step="register"],
  .apple-step[data-entry-step="register"].active,
  .apple-step[data-entry-step="register"].visible {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 24px 16px 20px;
    border-radius: 25px;
  }

  .apple-step[data-entry-step="register"] .apple-copy-block h2 {
    font-size: 32px;
  }

  .apple-step[data-entry-step="register"] .apple-two-cols,
  .apple-step[data-entry-step="register"] .geo-picker-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V29 - BANDI LAVORI AMMINISTRATORE
   ========================================================= */

.tenders-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.tenders-section-head h3 {
  margin: 5px 0 5px;
  color: var(--text);
  font-size: 30px;
  letter-spacing: -.035em;
}

.tenders-section-head p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
}

.tender-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tender-summary-card {
  min-height: 96px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.tender-summary-card span,
.tender-summary-card b {
  display: block;
}

.tender-summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tender-summary-card b {
  margin-top: 8px;
  color: var(--text);
  font-size: 27px;
  letter-spacing: -.04em;
}

.tenders-list {
  display: grid;
  gap: 14px;
}

.tender-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(25, 45, 37, .045);
}

.tender-card.is-closed {
  background: #f8f9f8;
}

.tender-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid #edf0ee;
}

.tender-card-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.tender-status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tender-status.open {
  background: #eaf5ef;
  color: #255a42;
}

.tender-status.closed {
  background: #ecefed;
  color: #69736e;
}

.tender-date {
  color: #7a8680;
  font-size: 11px;
}

.tender-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.tender-close-btn {
  color: #365f4e;
}

.tender-card-body {
  padding: 23px 22px 24px;
}

.tender-card-body h4 {
  margin: 7px 0 10px;
  color: #26312d;
  font-size: 23px;
  letter-spacing: -.025em;
}

.tender-description {
  margin: 0;
  max-width: 900px;
  color: #5d6b64;
  line-height: 1.68;
  font-size: 14px;
}

.tender-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.tender-photo-thumb {
  width: 112px;
  height: 84px;
  overflow: hidden;
  display: block;
  border: 1px solid #e0e5e2;
  border-radius: 14px;
  background: #f3f5f4;
}

.tender-photo-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tender-closed-note {
  margin-top: 17px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0f2f1;
  color: #707b76;
  font-size: 11px;
  font-weight: 650;
}

.tenders-empty {
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 36px;
  border: 1px dashed #d8dfdb;
  border-radius: 24px;
  background: rgba(255,255,255,.55);
}

.tenders-empty-symbol {
  margin-bottom: 10px;
  font-size: 31px;
}

.tenders-empty h4 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
}

.tenders-empty p {
  margin: 7px 0 17px;
  color: var(--muted);
}

.tender-dialog {
  width: min(720px, calc(100vw - 28px));
  position: relative;
}

.tender-modal-card {
  max-height: min(88vh, 820px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c6d0cb transparent;
}

.tender-modal-card::-webkit-scrollbar {
  width: 8px;
}

.tender-modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.tender-modal-card::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #c6d0cb;
  background-clip: padding-box;
}

.tender-modal-card label {
  display: block;
  margin-bottom: 15px;
}

.tender-modal-card textarea {
  min-height: 190px;
  resize: vertical;
}

.tender-photo-upload small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.tender-existing-photos-wrap {
  margin: 22px 0 8px;
}

.tender-existing-photos-wrap > p {
  margin: 5px 0 11px;
  color: var(--muted);
  font-size: 11px;
}

.tender-existing-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tender-existing-photo {
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8faf9;
  transition: opacity .16s ease, background .16s ease;
}

.tender-existing-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.tender-existing-photo button {
  width: 100%;
  margin-top: 7px;
}

.tender-existing-photo.marked-remove {
  opacity: .5;
  background: #fff0f1;
}

.tender-form-note {
  display: grid;
  gap: 3px;
  margin: 18px 0 4px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f3f6f4;
  color: #68766f;
  font-size: 11px;
  line-height: 1.5;
}

.tender-form-note strong {
  color: #35483f;
}

@media (max-width: 760px) {
  .tenders-section-head,
  .tender-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .tender-summary-grid {
    grid-template-columns: 1fr;
  }

  .tender-card-actions {
    justify-content: flex-start;
  }

  .tender-existing-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* =========================================================
   V29.1 - POLISH FORM BANDO
   ========================================================= */

.tender-modal-card label {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.tender-field-label {
  color: #24302b;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.tender-modal-card textarea {
  width: 100%;
  min-height: 190px;
  padding: 16px 18px;
  border: 1px solid #d9e3de;
  border-radius: 18px;
  background: #fff;
  box-sizing: border-box;
  color: #20312a;
  font: inherit;
  line-height: 1.62;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tender-modal-card textarea::placeholder {
  color: #8a9791;
}

.tender-modal-card textarea:focus {
  outline: none;
  border-color: #2f8f61;
  box-shadow: 0 0 0 4px rgba(47,143,97,.11);
}

.tender-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tender-photo-upload {
  position: relative;
}

.tender-file-picker {
  width: 100%;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #d9e3de;
  border-radius: 20px;
  background: #fff;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tender-photo-upload:focus-within .tender-file-picker,
.tender-file-picker:hover {
  border-color: #cbd8d1;
}

.tender-file-picker.has-files {
  border-color: #bfd7c8;
  background: #fbfefd;
}

.tender-photo-upload:focus-within .tender-file-picker {
  border-color: #2f8f61;
  box-shadow: 0 0 0 4px rgba(47,143,97,.11);
}

.tender-file-picker-btn {
  flex: 0 0 auto;
  min-width: 132px;
}

.tender-file-picker-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tender-file-picker-copy strong {
  display: block;
  color: #27332e;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.tender-file-picker-copy small {
  display: block;
  margin: 0;
  color: #7b8983;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .tender-file-picker {
    align-items: flex-start;
    flex-direction: column;
  }

  .tender-file-picker-btn {
    width: 100%;
  }
}


/* =========================================================
   V29.2 - CONFERMA BANDI INDIPENDENTE
   ========================================================= */

.tender-confirm-dialog {
  width: min(470px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: transparent;
  overflow: visible;
}

.tender-confirm-dialog::backdrop {
  background: rgba(21, 31, 27, .38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.tender-confirm-card {
  position: relative;
  padding: 34px 30px 28px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 26px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 24px 70px rgba(20, 37, 30, .18);
  text-align: center;
}

.tender-confirm-x {
  position: absolute;
  top: 14px;
  right: 14px;
}

.tender-confirm-symbol {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: #edf6f1;
  color: #286048;
  font-size: 24px;
  font-weight: 850;
}

.tender-confirm-card h3 {
  margin: 7px 0 9px;
  color: #26312d;
  font-size: 24px;
  letter-spacing: -.03em;
}

.tender-confirm-card p {
  margin: 0 auto;
  max-width: 360px;
  color: #6c7973;
  line-height: 1.55;
  font-size: 13px;
}

.tender-confirm-card .dialog-actions {
  margin-top: 24px;
}


/* =========================================================
   V30 - RICERCA BANDI LATO AZIENDA
   ========================================================= */

.company-tenders-browser {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid #e0e7e3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(22, 48, 37, .05);
}

.company-tenders-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.company-tenders-head h2 {
  margin: 6px 0 6px;
  color: #23302a;
  font-size: clamp(27px, 3vw, 36px);
  letter-spacing: -.04em;
}

.company-tenders-head p {
  margin: 0;
  color: #74817a;
  font-size: 13px;
}

.company-tender-count {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 13px 16px;
  border-radius: 18px;
  background: #f2f6f4;
  text-align: center;
}

.company-tender-count b,
.company-tender-count span {
  display: block;
}

.company-tender-count b {
  color: #193e2e;
  font-size: 27px;
  line-height: 1;
}

.company-tender-count span {
  margin-top: 5px;
  color: #76827c;
  font-size: 10px;
  font-weight: 700;
}

.company-tender-filters {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(440px, 1.4fr);
  gap: 22px;
  margin-top: 25px;
  padding: 20px;
  border-radius: 21px;
  background: #f7f9f8;
  border: 1px solid #e6ebe8;
}

.company-tender-search-field {
  display: grid;
  gap: 8px;
}

.company-tender-search-field > span,
.company-filter-label {
  color: #56645e;
  font-size: 11px;
  font-weight: 750;
}

.company-tender-search-field input {
  width: 100%;
  min-height: 47px;
  padding: 11px 14px;
  border: 1px solid #d8e0dc;
  border-radius: 14px;
  background: #fff;
  color: #25312c;
  font: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.company-tender-search-field input:focus {
  border-color: #4c8b6e;
  box-shadow: 0 0 0 4px rgba(50, 115, 82, .08);
}

.company-radius-filter {
  display: grid;
  gap: 8px;
}

.company-radius-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.company-radius-options button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #d9e1dd;
  border-radius: 999px;
  background: #fff;
  color: #56635d;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.company-radius-options button:hover {
  transform: translateY(-1px);
  border-color: #b8c9c0;
}

.company-radius-options button.active {
  border-color: #153d2d;
  background: #153d2d;
  color: #fff;
}

.company-tender-filter-summary {
  margin: 12px 2px 18px;
  color: #7a8680;
  font-size: 11px;
  font-weight: 650;
}

.company-tenders-loading {
  padding: 28px;
  border-radius: 18px;
  background: #f7f9f8;
  color: #718079;
  text-align: center;
  font-size: 12px;
}

.company-tenders-list {
  display: grid;
  gap: 14px;
  transition: opacity .16s ease;
}

.company-tenders-list.is-loading {
  opacity: .45;
}

.company-tender-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e0e6e2;
  border-radius: 22px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.company-tender-card:hover {
  transform: translateY(-1px);
  border-color: #ced9d3;
  box-shadow: 0 14px 34px rgba(25, 47, 38, .07);
}

.company-tender-cover {
  position: relative;
  min-height: 180px;
  background: #eef2f0;
}

.company-tender-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.company-tender-cover > span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(22, 31, 27, .78);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.company-tender-no-photo {
  display: grid;
  place-items: center;
  color: #8a958f;
  font-size: 11px;
  font-weight: 700;
}

.company-tender-no-photo > span {
  position: static;
  padding: 0;
  background: transparent;
  color: inherit;
}

.company-tender-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 21px;
}

.company-tender-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.company-tender-location,
.company-tender-distance {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.company-tender-location {
  background: #f0f4f2;
  color: #55635c;
}

.company-tender-distance {
  background: #eaf5ef;
  color: #285d44;
}

.company-tender-card h3 {
  margin: 12px 0 7px;
  color: #27332e;
  font-size: 21px;
  letter-spacing: -.025em;
}

.company-tender-card p {
  margin: 0;
  color: #69766f;
  font-size: 13px;
  line-height: 1.58;
}

.company-tender-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
}

.company-tender-card-footer > span {
  color: #8a948f;
  font-size: 10px;
}

.company-tender-card-footer .secondary {
  flex: 0 0 auto;
}

.company-tenders-empty {
  margin-top: 6px;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 30px;
  border: 1px dashed #d8dfdb;
  border-radius: 20px;
  background: #fafbfa;
  text-align: center;
}

.company-tenders-empty h3 {
  margin: 0;
  color: #34423c;
  font-size: 19px;
}

.company-tenders-empty p {
  margin: 7px 0 0;
  max-width: 480px;
  color: #78847e;
  font-size: 12px;
  line-height: 1.55;
}

.company-tender-detail-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 27px;
  background: transparent;
  overflow: hidden;
}

.company-tender-detail-dialog::backdrop {
  background: rgba(20, 30, 26, .38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.company-tender-detail-card {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 37, 30, .18);
  scrollbar-width: thin;
  scrollbar-color: #b8c5bf transparent;
}

.company-tender-detail-card::-webkit-scrollbar {
  width: 8px;
}

.company-tender-detail-card::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #b8c5bf;
  background-clip: padding-box;
}

.company-tender-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 18px;
}

.company-tender-detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f4f2;
  color: #5d6a64;
  font-size: 10px;
  font-weight: 700;
}

.company-tender-detail-description {
  margin: 0;
  color: #56645e;
  font-size: 14px;
  line-height: 1.7;
}

.company-tender-detail-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.company-tender-detail-photo {
  overflow: hidden;
  border-radius: 14px;
  background: #edf1ef;
  aspect-ratio: 4 / 3;
}

.company-tender-detail-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.company-tender-detail-note {
  margin-top: 22px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f3f6f4;
  color: #68766f;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .company-tender-filters {
    grid-template-columns: 1fr;
  }

  .company-tender-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }
}

@media (max-width: 650px) {
  .company-tenders-browser {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .company-tenders-head,
  .company-tender-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .company-tender-count {
    width: 100%;
  }

  .company-tender-card {
    grid-template-columns: 1fr;
  }

  .company-tender-cover {
    min-height: 180px;
    max-height: 220px;
  }

  .company-tender-card-footer .secondary {
    width: 100%;
  }

  .company-tender-detail-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   V31 - PREVENTIVI BANDI
   ========================================================= */

/* --- lato azienda --- */

.company-offer-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #dfe6e2;
  border-radius: 20px;
  background: #f8faf9;
}

.company-offer-panel-head h4 {
  margin: 5px 0 5px;
  color: #26322d;
  font-size: 20px;
  letter-spacing: -.025em;
}

.company-offer-panel-head p {
  margin: 0 0 18px;
  color: #74817b;
  font-size: 11px;
  line-height: 1.55;
}

#companyTenderOfferForm {
  display: grid;
  gap: 15px;
}

#companyTenderOfferForm label {
  display: grid;
  gap: 8px;
  color: #34423c;
  font-size: 12px;
  font-weight: 700;
}

.company-offer-amount-wrap {
  display: flex;
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid #d7e0dc;
  border-radius: 15px;
  background: #fff;
}

.company-offer-amount-wrap > span {
  padding: 0 14px;
  color: #557065;
  font-size: 16px;
  font-weight: 750;
}

.company-offer-amount-wrap input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 14px 0 0;
  border: 0;
  background: transparent;
  color: #27332e;
  font: inherit;
  font-size: 16px;
  outline: none;
}

#companyTenderOfferForm textarea {
  width: 100%;
  min-height: 145px;
  padding: 14px 15px;
  border: 1px solid #d7e0dc;
  border-radius: 15px;
  background: #fff;
  box-sizing: border-box;
  color: #27332e;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.company-offer-amount-wrap:focus-within,
#companyTenderOfferForm textarea:focus {
  border-color: #47866a;
  box-shadow: 0 0 0 4px rgba(50,115,82,.08);
}

.company-offer-document-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
}

.company-offer-file-picker {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid #d7e0dc;
  border-radius: 16px;
  background: #fff;
}

.company-offer-file-picker.has-file {
  border-color: #bed6c8;
  background: #fbfefd;
}

.company-offer-file-picker > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.company-offer-file-picker strong {
  color: #394740;
  font-size: 12px;
  word-break: break-word;
}

.company-offer-file-picker small {
  color: #829089;
  font-size: 10px;
  font-weight: 500;
}

.company-offer-existing-document {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #eef4f1;
}

.company-offer-existing-document > div:first-child {
  min-width: 0;
}

.company-offer-existing-document span,
.company-offer-existing-document strong {
  display: block;
}

.company-offer-existing-document span {
  color: #7a8781;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.company-offer-existing-document strong {
  margin-top: 3px;
  color: #35463e;
  font-size: 11px;
  word-break: break-word;
}

.company-offer-existing-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.company-offer-remove-doc {
  display: inline-flex !important;
  align-items: center;
  gap: 5px !important;
  font-size: 10px !important;
  font-weight: 650 !important;
}

.company-offer-remove-doc input {
  width: auto;
  margin: 0;
}

.company-offer-actions {
  display: flex;
  justify-content: flex-end;
}

/* --- lato amministratore --- */

.tender-offers-admin {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e8ecea;
}

.tender-offers-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.tender-offers-admin-head h5 {
  margin: 4px 0 0;
  color: #33423b;
  font-size: 16px;
  letter-spacing: -.02em;
}

.tender-offers-admin-list {
  display: grid;
  gap: 9px;
}

.tender-offer-admin-card {
  padding: 15px 16px;
  border: 1px solid #e0e6e2;
  border-radius: 16px;
  background: #f9faf9;
}

.tender-offer-admin-company {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tender-offer-admin-company strong,
.tender-offer-admin-company span {
  display: block;
}

.tender-offer-admin-company strong {
  color: #2e3b35;
  font-size: 14px;
}

.tender-offer-admin-company span {
  margin-top: 3px;
  color: #819089;
  font-size: 10px;
}

.tender-offer-admin-company > b {
  flex: 0 0 auto;
  color: #1f5b40;
  font-size: 17px;
}

.tender-offer-admin-card > p {
  margin: 12px 0 0;
  color: #64716b;
  font-size: 12px;
  line-height: 1.6;
}

.tender-offer-admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.tender-offer-admin-footer > span {
  color: #8b9691;
  font-size: 9px;
}

.tender-offers-admin-empty {
  padding: 14px;
  border: 1px dashed #d8dfdb;
  border-radius: 14px;
  background: #fafbfa;
  color: #88938e;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 650px) {
  .company-offer-file-picker,
  .company-offer-existing-document,
  .tender-offer-admin-company,
  .tender-offer-admin-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .company-offer-existing-actions {
    width: 100%;
  }

  .company-offer-actions .primary,
  .company-offer-file-picker .secondary {
    width: 100%;
  }

  .tender-offer-admin-company > b {
    flex: auto;
  }
}


/* =========================================================
   V31.1 - CTA PREVENTIVO VISIBILE NELLA LISTA BANDI
   ========================================================= */

.company-tender-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.company-tender-card-actions .secondary,
.company-tender-card-actions .primary {
  min-height: 40px;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .company-tender-card-actions {
    width: 100%;
    flex-direction: column;
  }

  .company-tender-card-actions .secondary,
  .company-tender-card-actions .primary {
    width: 100%;
  }
}


/* =========================================================
   V31.2 - STATO PREVENTIVO SULLA CARD AZIENDA
   ========================================================= */

.company-tender-offer-sent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e6f5ec;
  color: #1f6344;
  font-size: 10px;
  font-weight: 800;
}

.company-tender-offer-check {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #2d7a56;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.company-offer-delete-btn {
  color: #a83a43 !important;
  border-color: #ead2d4 !important;
}

.company-offer-delete-btn:hover {
  background: #fff4f5 !important;
  border-color: #ddb9bc !important;
}


/* =========================================================
   V34 - CIVICO+ MOBILE EXPERIENCE
   Desktop invariato: tutto il blocco seguente è <= 760px.
   ========================================================= */

.mobile-condo-nav,
.mobile-condo-more-sheet,
.mobile-condo-more-backdrop {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-topbar-h: 60px;
    --mobile-nav-h: 72px;
    --mobile-page-x: 14px;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overscroll-behavior-y: none;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
  }

  body.mobile-sheet-open {
    overflow: hidden;
  }

  /* ---------- topbar ---------- */

  .topbar {
    height: var(--mobile-topbar-h);
    min-height: var(--mobile-topbar-h);
    padding:
      0
      max(12px, env(safe-area-inset-right))
      0
      max(12px, env(safe-area-inset-left));
    background: rgba(247,249,247,.93);
    backdrop-filter: blur(20px) saturate(135%);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    z-index: 80;
  }

  .civico-top-logo {
    width: 105px;
    height: 38px;
  }

  #privateNav {
    gap: 4px;
  }

  .account-menu-trigger {
    min-width: 42px;
    min-height: 42px;
    padding: 4px !important;
    border-radius: 13px !important;
  }

  .account-trigger-avatar {
    width: 34px !important;
    height: 34px !important;
  }

  .account-trigger-copy,
  .account-menu-chevron {
    display: none !important;
  }

  #logoutBtn {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .account-menu {
    top: calc(var(--mobile-topbar-h) + 7px) !important;
    right: 8px !important;
    width: min(320px, calc(100vw - 16px)) !important;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    border-radius: 20px !important;
  }

  /* ---------- authenticated pages ---------- */

  .condominium-manage-page.active,
  .dashboard-page.active {
    display: block !important;
    min-height: calc(100dvh - var(--mobile-topbar-h));
    height: auto !important;
    overflow: visible !important;
  }

  .condominium-manage-page > .sidebar,
  .dashboard-page > .sidebar {
    display: none !important;
  }

  .condo-manage-main,
  .dashboard-main {
    width: 100%;
    min-width: 0;
    height: auto !important;
    overflow: visible !important;
    padding:
      20px
      var(--mobile-page-x)
      calc(26px + env(safe-area-inset-bottom));
  }

  body.mobile-condo-nav-active .condo-manage-main {
    padding-bottom:
      calc(
        var(--mobile-nav-h) +
        32px +
        env(safe-area-inset-bottom)
      );
  }

  .condo-manage-header,
  .dashboard-header,
  .members-section-head,
  .building-section-head,
  .resources-section-head,
  .assembly-section-head,
  .water-section-head,
  .reports-section-head,
  .notices-section-head,
  .waste-section-head,
  .rules-section-head,
  .tenders-section-head {
    gap: 14px !important;
  }

  .condo-manage-header h2,
  .dashboard-header h2 {
    font-size: clamp(29px, 9vw, 38px) !important;
    line-height: 1.02;
  }

  .condo-manage-header p,
  .dashboard-header p {
    line-height: 1.45;
  }

  .condo-manage-header > button,
  .members-section-head > button,
  .building-section-head > button,
  .resources-section-head > button,
  .assembly-section-head > button,
  .water-section-head > button,
  .reports-section-head > button,
  .notices-section-head > button,
  .waste-section-head > button,
  .rules-section-head > button,
  .tenders-section-head > button {
    width: 100%;
  }

  .condo-manage-section {
    min-width: 0;
  }

  .panel {
    min-width: 0;
    padding: 17px;
    border-radius: 18px;
  }

  /* ---------- buttons / touch ---------- */

  button,
  .primary,
  .secondary,
  .danger-button,
  .link-btn {
    min-height: 44px;
  }

  .primary,
  .secondary,
  .danger-button {
    border-radius: 13px;
  }

  .small {
    min-height: 38px !important;
  }

  /* ---------- forms ---------- */

  .two-cols,
  .report-form-grid,
  .company-tender-filters,
  .resource-booking-form,
  .water-reading-grid,
  .notice-form-grid {
    grid-template-columns: 1fr !important;
  }

  label {
    min-width: 0;
  }

  input,
  textarea,
  select,
  .resource-native-select {
    min-height: 46px;
    max-width: 100%;
    font-size: 16px !important;
  }

  textarea {
    line-height: 1.5;
  }

  input[type="date"],
  input[type="time"],
  input[type="datetime-local"] {
    min-width: 0;
  }

  /* ---------- tables ---------- */

  .members-table-wrap,
  .water-table-wrap,
  .resource-table-wrap,
  .table-wrap,
  .responsive-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .members-table {
    min-width: 760px;
  }

  table {
    max-width: none;
  }

  /* ---------- Palazzo ---------- */

  .building-view {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .building-shell,
  .building {
    margin-left: auto;
    margin-right: auto;
  }

  /* ---------- dashboard / selector ---------- */

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .stat-grid article {
    min-width: 0;
    padding: 15px;
  }

  .stat-grid b {
    font-size: 27px;
  }

  .content-grid {
    grid-template-columns: 1fr !important;
  }

  .condominium-selector-page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .selector-shell {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 0 36px !important;
  }

  .selector-header {
    padding-left: 4px;
    padding-right: 4px;
  }

  .selector-header h1,
  .selector-header h2 {
    font-size: clamp(31px, 10vw, 43px) !important;
  }

  .selector-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .selector-condo-card {
    min-height: 0 !important;
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .selector-card-enter {
    margin-top: 14px;
  }

  /* ---------- landing / auth ---------- */

  .apple-entry-shell {
    min-height: calc(100dvh - var(--mobile-topbar-h)) !important;
    padding:
      28px
      16px
      max(32px, env(safe-area-inset-bottom)) !important;
  }

  .apple-entry-stage {
    width: 100% !important;
    max-width: 520px !important;
  }

  .apple-step {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .apple-welcome-logo {
    max-width: 190px !important;
  }

  .role-step-redesign {
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .company-registration-fields {
    max-width: 100%;
  }

  /* ---------- company area ---------- */

  .company-area-page.active {
    padding:
      24px
      var(--mobile-page-x)
      max(32px, env(safe-area-inset-bottom)) !important;
  }

  .company-area-shell {
    width: 100% !important;
    max-width: 100% !important;
  }

  .company-area-hero {
    padding: 0 !important;
  }

  .company-area-hero h1 {
    font-size: clamp(34px, 10vw, 46px) !important;
  }

  .company-location-card,
  .company-tenders-browser {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  .company-tenders-head {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .company-tender-count {
    width: 100% !important;
    min-width: 0 !important;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    text-align: left !important;
  }

  .company-tender-count span {
    margin-top: 0 !important;
  }

  .company-tender-filters {
    padding: 14px !important;
    gap: 15px !important;
  }

  .company-radius-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px !important;
  }

  .company-radius-options button {
    min-width: 0;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .company-tender-card {
    grid-template-columns: 1fr !important;
    border-radius: 20px !important;
  }

  .company-tender-cover {
    min-height: 190px !important;
    max-height: 230px;
  }

  .company-tender-card-content {
    padding: 17px !important;
  }

  .company-tender-card-footer {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .company-tender-card-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .company-tender-card-actions button {
    width: 100%;
  }

  .company-tender-detail-dialog {
    width: calc(100vw - 12px) !important;
    max-width: none !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 24px !important;
  }

  .company-tender-detail-card {
    max-height: calc(100dvh - 12px) !important;
    padding: 21px 17px 26px !important;
    border-radius: 24px !important;
  }

  .company-tender-detail-photos {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }

  .company-offer-panel {
    padding: 16px !important;
  }

  /* ---------- bandi amministratore ---------- */

  .tender-summary-grid {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: 7px !important;
  }

  .tender-summary-card {
    min-height: 76px !important;
    padding: 13px 10px !important;
    border-radius: 16px !important;
    text-align: center;
  }

  .tender-summary-card b {
    font-size: 23px !important;
  }

  .tender-card {
    border-radius: 20px !important;
  }

  .tender-card-top {
    padding: 14px !important;
  }

  .tender-card-body {
    padding: 18px 15px 19px !important;
  }

  .tender-card-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .tender-card-actions button {
    width: 100%;
  }

  .tender-photo-thumb {
    width: calc(33.333% - 7px) !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .tender-offer-admin-company,
  .tender-offer-admin-footer {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  /* ---------- resources / water / notices / reports ---------- */

  .resource-grid,
  .resource-cards,
  .water-campaign-grid,
  .notices-grid,
  .reports-grid,
  .waste-grid,
  .rules-grid {
    grid-template-columns: 1fr !important;
  }

  .report-card,
  .notice-card,
  .rule-card,
  .resource-card {
    border-radius: 18px !important;
  }

  /* ---------- dialogs ---------- */

  dialog:not(.mobile-condo-more-sheet) {
    width: calc(100vw - 12px) !important;
    max-width: none !important;
    max-height: calc(100dvh - 12px) !important;
    margin: auto !important;
    border-radius: 24px !important;
    overflow: hidden !important;
  }

  dialog:not(.mobile-condo-more-sheet) form,
  .modal-card,
  .assembly-detail-body,
  .report-modal-card,
  .rule-modal-card,
  .tender-modal-card,
  .water-share-modal-card,
  .tenant-confirm-card,
  .tender-confirm-card {
    max-height: calc(100dvh - 12px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding:
      22px
      17px
      max(24px, env(safe-area-inset-bottom)) !important;
  }

  .modal-head,
  .dialog-head {
    gap: 12px;
  }

  .modal-head h3,
  .dialog-head h3 {
    font-size: 23px !important;
    line-height: 1.08;
  }

  .icon-btn,
  .mobile-sheet-close {
    width: 40px !important;
    min-width: 40px;
    height: 40px !important;
    min-height: 40px;
    border-radius: 12px !important;
  }

  .modal-actions,
  .dialog-actions,
  .assembly-detail-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .modal-actions button,
  .dialog-actions button,
  .assembly-detail-actions button {
    width: 100%;
  }

  /* ---------- toast ---------- */

  .toast {
    left: 12px !important;
    right: 12px !important;
    bottom:
      calc(
        14px +
        env(safe-area-inset-bottom)
      ) !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 14px !important;
    text-align: center;
  }

  body.mobile-condo-nav-active .toast {
    bottom:
      calc(
        var(--mobile-nav-h) +
        24px +
        env(safe-area-inset-bottom)
      ) !important;
  }

  /* =======================================================
     BOTTOM NAV
     ======================================================= */

  .mobile-condo-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom:
      max(
        8px,
        env(safe-area-inset-bottom)
      );
    z-index: 150;
    height: var(--mobile-nav-h);
    padding: 6px 4px;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    border: 1px solid rgba(255,255,255,.80);
    border-radius: 23px;
    background: rgba(250,252,251,.92);
    box-shadow:
      0 18px 42px rgba(20, 42, 32, .16),
      inset 0 1px rgba(255,255,255,.75);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
  }

  .mobile-condo-nav.visible {
    display: grid;
  }

  .mobile-condo-nav-item {
    position: relative;
    min-width: 0;
    min-height: 58px;
    padding: 6px 2px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: #7a8781;
    font: inherit;
    transition:
      color .16s ease,
      background .16s ease,
      transform .16s ease;
  }

  .mobile-condo-nav-item:active {
    transform: scale(.96);
  }

  .mobile-condo-nav-item svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-condo-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    font-size: 9px;
    line-height: 1;
    font-weight: 720;
    white-space: nowrap;
  }

  .mobile-condo-nav-item.active {
    background: #e8f3ed;
    color: #165f40;
  }

  .mobile-condo-nav-item.hidden {
    display: none !important;
  }

  /* =======================================================
     MORE SHEET
     ======================================================= */

  .mobile-condo-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 158;
    display: block;
    background: rgba(16, 29, 23, .28);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity .22s ease;
  }

  .mobile-condo-more-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-condo-more-sheet {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom:
      max(
        8px,
        env(safe-area-inset-bottom)
      );
    z-index: 160;
    max-height: min(78dvh, 690px);
    padding:
      8px
      14px
      max(16px, env(safe-area-inset-bottom));
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255,255,255,.88);
    border-radius: 28px;
    background: rgba(251,252,251,.985);
    box-shadow: 0 28px 80px rgba(17, 38, 28, .24);
    transform: translateY(calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
    transition:
      transform .28s cubic-bezier(.2,.76,.25,1),
      opacity .2s ease;
  }

  .mobile-condo-more-sheet.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-condo-sheet-handle {
    width: 36px;
    height: 4px;
    margin: 1px auto 12px;
    border-radius: 999px;
    background: #d4dcd8;
  }

  .mobile-condo-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 1px 3px 13px;
  }

  .mobile-condo-sheet-head h3 {
    margin: 4px 0 0;
    font-size: 25px;
    letter-spacing: -.035em;
  }

  .mobile-sheet-close {
    border: 0;
    background: #eef2f0;
    color: #526059;
    font-size: 23px;
  }

  .mobile-condo-more-grid {
    display: grid;
    gap: 7px;
  }

  .mobile-more-item {
    position: relative;
    width: 100%;
    min-height: 68px;
    padding: 10px 11px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 20px;
    align-items: center;
    gap: 10px;
    border: 1px solid #e4e9e6;
    border-radius: 17px;
    background: #fff;
    color: #2a3731;
    text-align: left;
  }

  .mobile-more-item.active {
    border-color: #c8ddd1;
    background: #edf6f1;
  }

  .mobile-more-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #f0f4f2;
    color: #2c6950;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-more-item > span:nth-child(2) {
    min-width: 0;
  }

  .mobile-more-item strong,
  .mobile-more-item small {
    display: block;
  }

  .mobile-more-item strong {
    font-size: 13px;
    line-height: 1.25;
  }

  .mobile-more-item small {
    margin-top: 3px;
    color: #839089;
    font-size: 10px;
    line-height: 1.3;
  }

  .mobile-more-item > b {
    color: #a5afaa;
    font-size: 18px;
    font-weight: 500;
  }

  .mobile-more-item .mobile-more-notification-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0 4px;
    border-color: #fff;
    font-size: 8px !important;
  }

  .mobile-change-condo {
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #e1e7e4;
    border-radius: 16px;
    background: #f4f6f5;
    color: #56645d;
    font-size: 12px;
    font-weight: 700;
  }

  /* ---------- accessibility ---------- */

  @media (prefers-reduced-motion: reduce) {
    .mobile-condo-nav-item,
    .mobile-condo-more-sheet,
    .mobile-condo-more-backdrop {
      transition: none !important;
    }
  }
}

@media (max-width: 390px) {
  .mobile-condo-nav {
    left: 6px;
    right: 6px;
  }

  .mobile-condo-nav-item span {
    font-size: 8px;
  }

  .company-radius-options {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }

  .tender-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .tender-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .tender-summary-card b {
    margin-top: 0 !important;
  }
}


/* =========================================================
   V35 - REGISTRAZIONE + VERIFICA EMAIL
   ========================================================= */

.registration-password-grid {
  align-items: start;
}

.email-verification-step {
  text-align: center;
}

.email-verification-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #eaf4ef;
  color: #1b6b49;
  font-size: 28px;
  box-shadow:
    inset 0 1px rgba(255,255,255,.8);
}

.email-verification-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #257a56;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.email-verification-step
.apple-copy-block p strong {
  color: #32433b;
  word-break: break-word;
}

.email-verification-invite-note,
.email-verification-warning {
  margin: 18px 0;
  padding: 13px 14px;
  border-radius: 15px;
  font-size: 11px;
  line-height: 1.55;
  text-align: left;
}

.email-verification-invite-note {
  border: 1px solid #d8e9df;
  background: #edf6f1;
  color: #426453;
}

.email-verification-warning {
  border: 1px solid #ecd9b8;
  background: #fff7e9;
  color: #806126;
}

@media (max-width: 760px) {
  .registration-password-grid {
    grid-template-columns: 1fr !important;
  }

  .email-verification-step {
    width: 100%;
  }

  .email-verification-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }
}


/* =========================================================
   V36 - ACCOUNT PERSONALE MULTIRUOLO
   ========================================================= */

#personalManagementActions .account-menu-icon {
  background: #eaf4ef;
  color: #176745;
}

#enableCondoManagementDialog p {
  margin: 2px 0 22px;
  color: #65736c;
  font-size: 13px;
  line-height: 1.6;
}

#enableCondoManagementDialog p strong {
  color: #28372f;
}

@media (max-width: 760px) {
  #enableCondoManagementDialog {
    width: calc(100vw - 12px) !important;
    max-width: none !important;
  }
}


/* =========================================================
   V36.1 - SCELTA TIPO ACCOUNT COERENTE CON MULTIRUOLO
   ========================================================= */

.role-choice-person-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 650px;
}

.role-choice-person-row .role-choice-compact {
  min-height: 176px;
  padding: 25px 24px;
}

.apple-choice-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 13px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f0;
  color: #6e7973;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1;
}

.role-choice-company .apple-choice-badge {
  background: #e8f3ed;
  color: #266448;
}

.role-choice-person-row .apple-choice-copy {
  max-width: 245px;
}

.role-choice-company {
  width: min(390px, 100%);
  min-height: 155px;
}

.role-choice-company .apple-choice-copy {
  max-width: 310px;
}

.role-choice-note {
  max-width: 590px;
  margin: 17px auto 0;
  color: #85858c;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 760px) {
  .role-choice-person-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .role-choice-person-row .role-choice-compact {
    min-height: 132px;
    padding: 18px 17px;
  }

  .role-choice-person-row .apple-choice-copy,
  .role-choice-company .apple-choice-copy {
    max-width: 100%;
  }

  .role-choice-company {
    min-height: 128px;
  }

  .apple-choice-badge {
    margin-bottom: 9px;
  }

  .role-choice-note {
    margin-top: 14px;
    padding: 0 4px;
  }
}


/* =========================================================
   V36.5 - FILTRI SEGNALAZIONI COMPATTI
   ========================================================= */

/*
 * .panel ha globalmente min-height:300px.
 * Per la toolbar delle segnalazioni non deve valere:
 * è una semplice barra filtri.
 */
.reports-toolbar.panel {
  min-height: 0;
  padding: 14px 16px;
}

.reports-toolbar {
  align-items: center;
  gap: 22px;
}

.reports-toolbar-copy {
  flex: 0 0 auto;
  min-width: 190px;
}

.reports-toolbar-copy .eyebrow {
  line-height: 1;
}

.reports-toolbar-copy h4 {
  margin: 5px 0 0;
  font-size: 17px;
  line-height: 1.15;
}

.reports-filter-grid {
  width: min(540px, 100%);
  margin-left: auto;
  gap: 10px;
}

.reports-filter-grid label {
  gap: 5px;
  font-size: 11px;
  line-height: 1.1;
}

.reports-filter-grid .resource-native-select {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Tablet: resta compatta ma va su due righe se serve. */
@media (max-width: 900px) {
  .reports-toolbar.panel {
    padding: 15px 16px;
  }

  .reports-toolbar {
    gap: 14px;
  }

  .reports-toolbar-copy {
    min-width: 0;
  }

  .reports-filter-grid {
    width: 100%;
    margin-left: 0;
  }
}

/* Smartphone: titolo sopra e filtri a colonna, senza min-height. */
@media (max-width: 620px) {
  .reports-toolbar.panel {
    min-height: 0 !important;
    padding: 15px !important;
  }

  .reports-toolbar-copy h4 {
    font-size: 16px;
  }

  .reports-filter-grid {
    gap: 9px;
  }

  .reports-filter-grid .resource-native-select {
    min-height: 44px;
  }
}


/* V36.6 - RECUPERO PASSWORD */
.login-forgot-password{margin-top:4px;color:#315f4b}.forgot-password-step{text-align:center}.forgot-password-icon{width:66px;height:66px;margin:0 auto 18px;display:grid;place-items:center;border-radius:22px;background:#eaf4ef;color:#1b6b49;font-size:29px;font-weight:650}.forgot-password-eyebrow{display:block;margin-bottom:8px;color:#257a56;font-size:10px;font-weight:800;letter-spacing:.1em}.forgot-password-form{margin-top:20px;text-align:left}.forgot-password-result{margin-top:18px;padding:15px;border:1px solid #d8e9df;border-radius:16px;background:#edf6f1;color:#426453;text-align:left}.forgot-password-result strong,.forgot-password-result span{display:block}.forgot-password-result strong{color:#28533f;font-size:13px}.forgot-password-result span{margin-top:4px;font-size:11px;line-height:1.5}@media(max-width:760px){.forgot-password-icon{width:60px;height:60px;border-radius:19px}.forgot-password-form input{font-size:16px!important}}


/* =========================================================
   V36.8 - POPUP INSTALLAZIONE MOBILE
   ========================================================= */

.mobile-install-prompt,
.ios-install-sheet,
.ios-install-sheet-backdrop {
  display: none;
}

@media (max-width: 760px) {
  body.ios-install-sheet-open {
    overflow: hidden;
  }

  .mobile-install-prompt {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom:
      max(
        12px,
        env(safe-area-inset-bottom)
      );
    z-index: 210;
    min-height: 74px;
    padding: 11px 42px 11px 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 19px;
    background: rgba(96, 101, 98, .94);
    color: #fff;
    box-shadow:
      0 16px 38px rgba(20, 29, 24, .22),
      inset 0 1px rgba(255,255,255,.10);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    transform: translateY(22px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity .22s ease,
      transform .26s cubic-bezier(.2,.75,.25,1);
  }

  body.mobile-condo-nav-active
  .mobile-install-prompt {
    bottom:
      calc(
        var(--mobile-nav-h) +
        19px +
        env(safe-area-inset-bottom)
      );
  }

  .mobile-install-prompt.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-install-prompt-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: 25px;
    font-weight: 350;
  }

  .mobile-install-prompt-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns:
      minmax(0,1fr)
      auto;
    column-gap: 10px;
    align-items: center;
  }

  .mobile-install-prompt-copy strong,
  .mobile-install-prompt-copy span {
    grid-column: 1;
    min-width: 0;
  }

  .mobile-install-prompt-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 760;
    white-space: nowrap;
  }

  .mobile-install-prompt-copy span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.72);
    font-size: 9.5px;
    line-height: 1.3;
  }

  .mobile-install-prompt-action {
    grid-column: 2;
    grid-row: 1 / 3;
    min-height: 36px;
    padding: 0 11px;
    border: 0;
    border-radius: 11px;
    background: rgba(255,255,255,.94);
    color: #415049;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-install-prompt-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.78);
    font: inherit;
    font-size: 18px;
    line-height: 1;
  }

  .ios-install-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 218;
    display: block;
    background: rgba(15, 24, 19, .30);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity .2s ease;
  }

  .ios-install-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .ios-install-sheet {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom:
      max(
        8px,
        env(safe-area-inset-bottom)
      );
    z-index: 220;
    max-height: min(78dvh, 620px);
    padding:
      8px
      16px
      max(
        17px,
        env(safe-area-inset-bottom)
      );
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255,255,255,.88);
    border-radius: 27px;
    background: rgba(250,251,250,.985);
    box-shadow:
      0 28px 80px rgba(16,34,25,.25);
    transform:
      translateY(
        calc(100% + 30px)
      );
    opacity: 0;
    pointer-events: none;
    transition:
      transform .28s cubic-bezier(.2,.76,.25,1),
      opacity .2s ease;
  }

  .ios-install-sheet.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .ios-install-sheet-handle {
    width: 36px;
    height: 4px;
    margin: 1px auto 13px;
    border-radius: 999px;
    background: #d3dad6;
  }

  .ios-install-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
  }

  .ios-install-sheet-head h3 {
    margin: 4px 0 0;
    font-size: 25px;
    line-height: 1.05;
    letter-spacing: -.035em;
  }

  .ios-install-sheet-close {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border: 0;
    border-radius: 13px;
    background: #edf1ef;
    color: #536159;
    font: inherit;
    font-size: 23px;
  }

  .ios-install-steps {
    display: grid;
    gap: 8px;
  }

  .ios-install-step {
    min-height: 60px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns:
      34px
      minmax(0,1fr);
    align-items: center;
    gap: 11px;
    border: 1px solid #e3e8e5;
    border-radius: 16px;
    background: #fff;
  }

  .ios-install-step b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #edf5f0;
    color: #266548;
    font-size: 11px;
    font-weight: 850;
  }

  .ios-install-step span {
    color: #56645d;
    font-size: 12px;
    line-height: 1.45;
  }

  .ios-install-step strong {
    color: #2d3933;
  }

  .ios-share-symbol {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    margin-left: 3px;
    border: 1px solid #d8dfdb;
    border-radius: 7px;
    color: #397254 !important;
    font-size: 15px !important;
    line-height: 1;
  }

  .ios-install-sheet-done {
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    border: 0;
    border-radius: 15px;
    background: #14563a;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 760;
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-install-prompt,
    .ios-install-sheet,
    .ios-install-sheet-backdrop {
      transition: none !important;
    }
  }
}

@media (max-width: 390px) {
  .mobile-install-prompt {
    left: 7px;
    right: 7px;
    padding-left: 9px;
  }

  .mobile-install-prompt-icon {
    width: 38px;
    height: 38px;
  }

  .mobile-install-prompt-copy strong {
    font-size: 11px;
  }

  .mobile-install-prompt-copy span {
    font-size: 9px;
  }

  .mobile-install-prompt-action {
    padding: 0 8px;
    font-size: 9px;
  }
}


/* =========================================================
   V36.9 - BADGE NOTIFICHE MENU
   ========================================================= */

.side-link {
  position: relative;
}

.menu-notification-badge {
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #102b20;
  border-radius: 999px;
  background: #e12b3f;
  color: #fff !important;
  font-size: 9px !important;
  line-height: 1;
  font-weight: 850 !important;
  font-style: normal;
  letter-spacing: -.01em;
  box-shadow: 0 2px 7px rgba(114, 9, 25, .27);
  flex: 0 0 auto;
}

.menu-notification-badge.hidden {
  display: none !important;
}

@media (max-width: 900px) and (min-width: 761px) {
  .side-link .menu-notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 17px;
    height: 17px;
    margin: 0;
    padding: 0 4px;
    display: inline-flex;
    border-width: 2px;
    font-size: 8px !important;
  }

  .side-link .menu-notification-badge.hidden {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .mobile-condo-nav-item
  .mobile-menu-notification-badge {
    position: absolute;
    top: 3px;
    left: calc(50% + 7px);
    z-index: 3;
    min-width: 17px;
    height: 17px;
    margin: 0;
    padding: 0 4px;
    display: inline-flex;
    border: 2px solid rgba(250, 251, 250, .98);
    background: #e12b3f;
    color: #fff !important;
    font-size: 8px !important;
    line-height: 1;
    font-weight: 850 !important;
    box-shadow: 0 2px 6px rgba(114, 9, 25, .24);
    overflow: visible;
  }

  .mobile-condo-nav-item
  .mobile-menu-notification-badge.hidden {
    display: none !important;
  }

  /*
   * La regola generale della nav assegna font e overflow
   * a tutti gli span. Il badge deve invece mantenere
   * forma circolare e contenuto visibile.
   */
  .mobile-condo-nav-item
  span.mobile-menu-notification-badge {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }
}


/* =========================================================
   V36.10 - CAMBIO PASSWORD
   ========================================================= */

.account-security-section {
  border-top: 0;
}

.account-security-icon {
  background: #f1f3f2;
  color: #526158;
  font-size: 15px;
  font-weight: 750;
}

.change-password-dialog {
  width: min(500px, calc(100vw - 32px)) !important;
  max-width: 500px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 27px;
  overflow: hidden !important;
  background: transparent;
}

.change-password-dialog::backdrop {
  background: rgba(20, 30, 25, .38);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.change-password-card {
  width: 100%;
  margin: 0;
  padding: 29px !important;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(18, 39, 29, .20);
}

.change-password-head {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}

.change-password-head h3 {
  margin: 5px 0 6px;
  color: #2a3731;
  font-size: 27px;
  line-height: 1.06;
  letter-spacing: -.035em;
}

.change-password-head p {
  max-width: 350px;
  margin: 0;
  color: #7a8680;
  font-size: 12px;
  line-height: 1.5;
}

.change-password-fields {
  display: grid;
  gap: 14px;
}

.change-password-fields label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #45544c;
  font-size: 12px;
  font-weight: 690;
}

.change-password-fields input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dce4df;
  border-radius: 14px;
  background: #fbfcfb;
  color: #28352f;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.change-password-fields input:focus {
  border-color: #7da691;
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(40, 111, 77, .08);
}

.change-password-fields label small {
  margin-top: -2px;
  color: #909b95;
  font-size: 10px;
  font-weight: 520;
}

.change-password-separator {
  height: 1px;
  margin: 2px 0;
  background: #edf0ee;
}

.change-password-inline-error {
  margin-top: 15px;
  padding: 11px 13px;
  border: 1px solid #f1d7da;
  border-radius: 13px;
  background: #fcf1f2;
  color: #9b4149;
  font-size: 11px;
  line-height: 1.45;
}

.change-password-inline-error.hidden {
  display: none !important;
}

.change-password-actions {
  display: grid;
  grid-template-columns:
    minmax(0, .72fr)
    minmax(0, 1.28fr);
  gap: 9px;
  margin-top: 22px;
}

.change-password-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.change-password-actions .secondary-btn {
  background: #eef2f0;
  color: #5e6b64;
}

.change-password-actions .primary-btn {
  background: #14563a;
  color: #fff;
}

.change-password-actions button:disabled {
  opacity: .58;
  cursor: default;
}

@media (max-width: 760px) {
  .change-password-dialog {
    width: calc(100vw - 16px) !important;
    max-width: none !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 25px;
  }

  .change-password-card {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    padding:
      23px
      17px
      max(22px, env(safe-area-inset-bottom))
      !important;
    border-radius: 25px;
  }

  .change-password-head h3 {
    font-size: 24px;
  }

  .change-password-fields input {
    min-height: 50px;
    font-size: 16px;
  }

  .change-password-actions {
    grid-template-columns: 1fr;
  }

  .change-password-actions .primary-btn {
    grid-row: 1;
  }

  .change-password-actions .secondary-btn {
    grid-row: 2;
  }
}


/* =========================================================
   V36.11 - ORDINE ASSEMBLEE
   ========================================================= */

#manageAssembliesSection .upcoming-assemblies {
  margin-top: 0;
  margin-bottom: 28px;
}

#manageAssembliesSection .assembly-calendar-block {
  padding-top: 4px;
}

#manageAssembliesSection .assembly-calendar-block
.calendar-toolbar {
  margin-top: 0;
}

@media (max-width: 760px) {
  #manageAssembliesSection .upcoming-assemblies {
    margin-bottom: 22px;
  }
}


/* =========================================================
   V36.12 - INFORMAZIONI PERSONALI
   ========================================================= */

.account-personal-info-section {
  border-top: 0;
}

.account-personal-info-icon {
  background: #edf5f1;
  color: #2f6950;
  font-size: 17px;
  font-weight: 700;
}

.personal-info-dialog {
  width: min(540px, calc(100vw - 32px)) !important;
  max-width: 540px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 28px;
  overflow: hidden !important;
  background: transparent;
}

.personal-info-dialog::backdrop {
  background: rgba(20, 30, 25, .38);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.personal-info-card {
  width: 100%;
  margin: 0;
  padding: 29px !important;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(18, 39, 29, .20);
}

.personal-info-head {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.personal-info-head h3 {
  margin: 5px 0 6px;
  color: #2a3731;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.personal-info-head p {
  max-width: 370px;
  margin: 0;
  color: #7a8680;
  font-size: 12px;
  line-height: 1.5;
}

.personal-info-loading {
  margin-bottom: 15px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f1f5f3;
  color: #69766f;
  font-size: 11px;
}

.personal-info-loading.hidden {
  display: none !important;
}

.personal-info-fields {
  display: grid;
  gap: 15px;
  transition: opacity .15s ease;
}

.personal-info-fields-loading {
  opacity: .45;
  pointer-events: none;
}

.personal-info-two-cols {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 11px;
}

.personal-info-fields label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #45544c;
  font-size: 12px;
  font-weight: 690;
}

.personal-info-fields input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dce4df;
  border-radius: 14px;
  background: #fbfcfb;
  color: #28352f;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.personal-info-fields input:focus {
  border-color: #7da691;
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(40, 111, 77, .08);
}

.personal-info-fields input[readonly] {
  background: #f1f3f2;
  border-color: #e3e7e5;
  color: #7a8580;
  cursor: default;
}

.personal-info-fields label > small {
  margin-top: -2px;
  color: #909b95;
  font-size: 10px;
  font-weight: 520;
  line-height: 1.4;
}

.personal-info-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.personal-info-label-row em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1ef;
  color: #839089;
  font-size: 8px;
  font-style: normal;
  font-weight: 760;
  letter-spacing: .02em;
}

.personal-info-inline-error {
  margin-top: 15px;
  padding: 11px 13px;
  border: 1px solid #f1d7da;
  border-radius: 13px;
  background: #fcf1f2;
  color: #9b4149;
  font-size: 11px;
  line-height: 1.45;
}

.personal-info-inline-error.hidden {
  display: none !important;
}

.personal-info-actions {
  display: grid;
  grid-template-columns:
    minmax(0, .72fr)
    minmax(0, 1.28fr);
  gap: 9px;
  margin-top: 23px;
}

.personal-info-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.personal-info-actions .secondary-btn {
  background: #eef2f0;
  color: #5e6b64;
}

.personal-info-actions .primary-btn {
  background: #14563a;
  color: #fff;
}

.personal-info-actions button:disabled {
  opacity: .58;
  cursor: default;
}

@media (max-width: 760px) {
  .personal-info-dialog {
    width: calc(100vw - 16px) !important;
    max-width: none !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 25px;
  }

  .personal-info-card {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    padding:
      23px
      17px
      max(22px, env(safe-area-inset-bottom))
      !important;
    border-radius: 25px;
  }

  .personal-info-head h3 {
    font-size: 24px;
  }

  .personal-info-two-cols {
    grid-template-columns: 1fr;
  }

  .personal-info-fields input {
    min-height: 50px;
    font-size: 16px;
  }

  .personal-info-actions {
    grid-template-columns: 1fr;
  }

  .personal-info-actions .primary-btn {
    grid-row: 1;
  }

  .personal-info-actions .secondary-btn {
    grid-row: 2;
  }
}


/* =========================================================
   V36.13 - PRIVACY TELEFONO + CONTATTO DAL PALAZZO
   ========================================================= */

.personal-info-phone-privacy {
  position: relative;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px !important;
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid #e0e7e3;
  border-radius: 16px;
  background: #f8faf9;
  cursor: pointer;
  transition:
    opacity .15s ease,
    border-color .15s ease,
    background .15s ease;
}

.personal-info-phone-privacy > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.personal-info-phone-switch {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: #cbd3cf;
  transition: background .17s ease;
}

.personal-info-phone-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(24, 45, 35, .20);
  transition: transform .17s ease;
}

.personal-info-phone-privacy
input:checked
+ .personal-info-phone-switch {
  background: #257551;
}

.personal-info-phone-privacy
input:checked
+ .personal-info-phone-switch::after {
  transform: translateX(16px);
}

.personal-info-phone-privacy-copy {
  min-width: 0;
}

.personal-info-phone-privacy-copy strong,
.personal-info-phone-privacy-copy small {
  display: block;
}

.personal-info-phone-privacy-copy strong {
  color: #33463d;
  font-size: 11px;
  line-height: 1.3;
}

.personal-info-phone-privacy-copy small {
  margin-top: 3px !important;
  color: #7b8982 !important;
  font-size: 9px !important;
  line-height: 1.35 !important;
}

.personal-info-phone-privacy.is-disabled {
  opacity: .48;
  cursor: default;
}

.building-phone-trigger {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  margin-left: 3px;
  border: 1px solid #dbe5df;
  border-radius: 9px;
  background: #f0f6f3;
  color: #2e6b50;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform .12s ease,
    background .12s ease,
    border-color .12s ease;
}

.building-phone-trigger:hover {
  border-color: #bbd1c5;
  background: #e7f2ec;
  transform: translateY(-1px);
}

.resident-phone-dialog {
  width: min(420px, calc(100vw - 32px)) !important;
  max-width: 420px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 27px;
  overflow: hidden !important;
  background: transparent;
}

.resident-phone-dialog::backdrop {
  background: rgba(18, 28, 23, .40);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.resident-phone-card {
  padding: 27px;
  border-radius: 27px;
  background: #fff;
  text-align: center;
  box-shadow: 0 28px 80px rgba(18, 39, 29, .21);
}

.resident-phone-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: #edf6f1;
  font-size: 27px;
}

.resident-phone-copy h3 {
  margin: 5px 0 9px;
  color: #27372f;
  font-size: 24px;
  letter-spacing: -.035em;
}

.resident-phone-number {
  display: block;
  color: #185c3d;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-decoration: none;
}

.resident-phone-copy p {
  max-width: 330px;
  margin: 12px auto 0;
  color: #7a8780;
  font-size: 10px;
  line-height: 1.5;
}

.resident-phone-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 21px;
}

.resident-phone-actions > * {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 770;
  text-decoration: none;
}

.resident-phone-actions .secondary {
  background: #edf1ef;
  color: #59675f;
}

.resident-phone-actions .primary {
  background: #14563a;
  color: #fff;
}

.resident-phone-call.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .building-phone-trigger {
    width: 29px;
    height: 29px;
    border-radius: 10px;
    font-size: 13px;
  }

  .resident-phone-dialog {
    width: calc(100vw - 16px) !important;
    max-width: none !important;
    border-radius: 25px;
  }

  .resident-phone-card {
    padding:
      25px
      18px
      max(20px, env(safe-area-inset-bottom));
    border-radius: 25px;
  }

  .resident-phone-actions:has(
    .resident-phone-call:not(.hidden)
  ) {
    grid-template-columns: .8fr 1.2fr;
  }

  .resident-phone-call:not(.hidden) {
    display: flex !important;
  }

  .personal-info-phone-privacy {
    min-height: 70px;
  }
}


/* =========================================================
   V36.15 - ICONA SOLA CORNETTA TELEFONICA
   ========================================================= */

.phone-handset-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.building-phone-trigger .phone-handset-icon {
  width: 14px;
  height: 14px;
}

.resident-phone-symbol .phone-handset-icon {
  width: 28px;
  height: 28px;
}

@media (max-width: 760px) {
  .building-phone-trigger .phone-handset-icon {
    width: 15px;
    height: 15px;
  }

  .resident-phone-symbol .phone-handset-icon {
    width: 30px;
    height: 30px;
  }
}


/* =========================================================
   V36.17 - TARGHETTA IDENTITÀ CONDOMINIO
   ========================================================= */

.condo-manage-header {
  display: block;
  margin-bottom: 36px;
}

.condo-identity-plaque {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 164px;
  padding: 23px 24px;
  overflow: hidden;
  border: 1px solid #dce5df;
  border-radius: 26px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, .98),
      rgba(246, 249, 247, .97)
    );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .92) inset,
    0 14px 34px rgba(23, 61, 44, .075);
}

.condo-identity-plaque::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -72px;
  right: 14%;
  width: 270px;
  height: 150px;
  border-radius: 50%;
  background: rgba(38, 117, 82, .055);
  filter: blur(2px);
}

.condo-identity-plaque::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #1f6f4b;
}

.condo-plaque-emblem {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e5de;
  border-radius: 20px;
  color: #1b6746;
  background:
    linear-gradient(
      145deg,
      #f2f8f5,
      #e7f1eb
    );
  box-shadow:
    0 8px 20px rgba(31, 111, 75, .09),
    0 1px 0 #fff inset;
}

.condo-plaque-emblem svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.condo-plaque-copy {
  min-width: 0;
}

.condo-plaque-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #1f6f4b;
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .16em;
}

.condo-plaque-kicker em {
  padding-left: 8px;
  border-left: 1px solid #ccd9d2;
  color: #8a9690;
  font-size: 9px;
  font-style: normal;
  font-weight: 720;
  letter-spacing: .06em;
}

.condo-plaque-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d7d57;
  box-shadow: 0 0 0 4px rgba(45, 125, 87, .09);
}

.condo-manage-header .condo-identity-plaque h2 {
  max-width: 820px;
  margin: 0;
  color: #17221c;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.03;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.condo-plaque-location {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: #6f7d76;
  font-size: 12px;
  line-height: 1.4;
}

.condo-plaque-location svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: #52816b;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.condo-plaque-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.condo-plaque-meta span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #e0e7e3;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #6f7e76;
  font-size: 8.5px;
  line-height: 1;
  font-weight: 720;
}

.condo-plaque-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.condo-plaque-actions button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    border-color .12s ease,
    background .12s ease;
}

.condo-plaque-actions button:hover {
  transform: translateY(-1px);
}

.condo-plaque-actions button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.condo-plaque-secondary {
  border: 1px solid #d8e1dc;
  background: rgba(255, 255, 255, .84);
  color: #47564e;
}

.condo-plaque-secondary:hover {
  border-color: #c6d4cc;
  background: #fff;
  box-shadow: 0 7px 18px rgba(28, 62, 46, .07);
}

.condo-plaque-primary {
  border: 1px solid #176342;
  background: #176d48;
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 109, 72, .15);
}

.condo-plaque-primary:hover {
  background: #125f3e;
  box-shadow: 0 10px 23px rgba(23, 109, 72, .20);
}


/* =========================================================
   V36.17 - MODIFICA COMPLETA DATI CONDOMINIO
   ========================================================= */

.condo-details-dialog {
  width: min(720px, calc(100vw - 28px));
  max-width: 720px;
  padding: 0 !important;
  border: 0;
  border-radius: 27px;
  overflow: hidden;
  background: transparent;
}

.condo-details-dialog::backdrop {
  background: rgba(19, 31, 25, .42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.condo-details-form {
  width: 100%;
  max-height: min(860px, calc(100vh - 36px));
  overflow-y: auto;
  padding: 0 25px 24px;
  border: 1px solid #e2e8e4;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(19, 42, 31, .23);
}

.condo-details-head {
  position: sticky;
  z-index: 5;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 -25px 20px;
  padding: 22px 25px 17px;
  border-bottom: 1px solid #edf1ef;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.condo-details-head-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #edf5f1;
  color: #246c4b;
}

.condo-details-head-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.condo-details-head-copy h3 {
  margin: 4px 0 3px;
  font-size: 23px;
  letter-spacing: -.035em;
}

.condo-details-head-copy p {
  margin: 0;
  color: #859089;
  font-size: 10px;
}

.condo-details-close {
  align-self: start;
}

.condo-details-section {
  margin-top: 13px;
  padding: 17px;
  border: 1px solid #e5ebe7;
  border-radius: 19px;
  background: #fafcfb;
}

.condo-details-section + .condo-details-section {
  margin-top: 11px;
}

.condo-details-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.condo-details-section-title > span {
  width: 29px;
  height: 29px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #eaf3ee;
  color: #226846;
  font-size: 8px;
  font-weight: 850;
}

.condo-details-section-title b,
.condo-details-section-title small {
  display: block;
}

.condo-details-section-title b {
  color: #314039;
  font-size: 11px;
}

.condo-details-section-title small {
  margin-top: 2px;
  color: #8b9690;
  font-size: 8.5px;
  line-height: 1.35;
}

.condo-details-form label {
  color: #536159;
  font-size: 9.5px;
  font-weight: 760;
}

.condo-details-form input {
  margin-top: 6px;
}

.condo-address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(120px, .55fr);
  gap: 12px;
}

.condo-details-actions {
  position: sticky;
  bottom: -24px;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 17px -25px -24px;
  padding: 14px 25px max(17px, env(safe-area-inset-bottom));
  border-top: 1px solid #edf1ef;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.condo-details-actions button {
  min-height: 43px;
  min-width: 122px;
  border-radius: 13px;
}


/* Existing generic mobile rule is too broad for the new plaque. */
@media (max-width: 980px) {
  .condo-identity-plaque {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .condo-plaque-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 2px;
  }
}

@media (max-width: 760px) {
  .condo-manage-header {
    margin-bottom: 25px;
  }

  .condo-identity-plaque {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 13px;
    min-height: 0;
    padding: 17px 16px 16px;
    border-radius: 22px;
  }

  .condo-identity-plaque::after {
    top: 17px;
    bottom: 17px;
    width: 3px;
  }

  .condo-plaque-emblem {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .condo-plaque-emblem svg {
    width: 26px;
    height: 26px;
  }

  .condo-manage-header
  .condo-identity-plaque h2 {
    font-size: clamp(25px, 7.8vw, 32px) !important;
    line-height: 1.02;
  }

  .condo-plaque-location {
    align-items: flex-start;
    margin-top: 8px;
    font-size: 10px;
  }

  .condo-plaque-meta {
    gap: 5px;
    margin-top: 9px;
  }

  .condo-plaque-meta span {
    min-height: 23px;
    padding: 4px 8px;
    font-size: 7.5px;
  }

  .condo-plaque-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    width: 100%;
    gap: 7px;
    padding-top: 4px;
  }

  .condo-plaque-actions button {
    width: 100% !important;
    min-height: 44px;
    padding: 0 10px;
    font-size: 9.5px;
  }

  .condo-details-dialog {
    width: calc(100vw - 12px);
    max-width: none;
    border-radius: 23px;
  }

  .condo-details-form {
    max-height: calc(100dvh - 12px);
    padding: 0 15px 20px;
    border-radius: 23px;
  }

  .condo-details-head {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 -15px 16px;
    padding:
      max(15px, env(safe-area-inset-top))
      15px
      14px;
  }

  .condo-details-head-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .condo-details-head-copy h3 {
    font-size: 20px;
  }

  .condo-details-section {
    padding: 14px;
    border-radius: 17px;
  }

  .condo-address-grid,
  .geo-picker-grid {
    grid-template-columns: 1fr;
  }

  .condo-details-actions {
    margin: 15px -15px -20px;
    padding:
      12px
      15px
      max(15px, env(safe-area-inset-bottom));
  }

  .condo-details-actions button {
    flex: 1;
    min-width: 0;
  }
}


/* =========================================================
   V36.18 - TARGHETTA CONDOMINIO ESPLICITA SU MOBILE
   ========================================================= */

/*
 * La targhetta mobile è un blocco autonomo: in questo modo non dipende
 * dalle vecchie regole responsive applicate a .condo-manage-header.
 */
.mobile-condo-identity-wrap {
  display: none;
}

@media (min-width: 761px) {
  .mobile-condo-identity-wrap {
    display: none !important;
  }

  .condo-manage-header {
    display: block !important;
  }
}

@media (max-width: 760px) {
  /*
   * Su smartphone usiamo la variante dedicata e nascondiamo soltanto
   * la copia desktop, evitando qualunque conflitto con le regole V34.
   */
  .condo-manage-header {
    display: none !important;
  }

  .mobile-condo-identity-wrap {
    display: block !important;
    width: 100%;
    margin: 0 0 22px;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-condo-identity-plaque {
    display: grid !important;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-copy {
    min-width: 0;
  }

  .mobile-condo-identity-plaque h2 {
    display: block !important;
    margin: 0 !important;
    font-size: clamp(24px, 7.7vw, 31px) !important;
    line-height: 1.04 !important;
    overflow-wrap: anywhere;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-location,
  .mobile-condo-identity-plaque
  .condo-plaque-meta {
    display: flex !important;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-actions {
    display: grid;
    grid-template-columns:
      minmax(0, .82fr)
      minmax(0, 1.18fr);
    width: 100%;
  }

  /*
   * .hidden continua ad avere la precedenza: i due pulsanti compaiono
   * soltanto quando loadManagedMembers conferma che l'utente è MANAGER.
   */
  .mobile-condo-identity-plaque
  .condo-plaque-actions
  button:not(.hidden) {
    display: inline-flex !important;
    width: 100% !important;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-secondary,
  .mobile-condo-identity-plaque
  .condo-plaque-primary {
    min-width: 0;
    min-height: 46px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-primary {
    padding-left: 8px;
    padding-right: 8px;
  }

  .condo-details-dialog {
    display: none;
  }

  .condo-details-dialog[open] {
    display: block !important;
  }

  .condo-details-form {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 390px) {
  .mobile-condo-identity-plaque {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding: 15px 13px 14px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-emblem {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-emblem svg {
    width: 23px;
    height: 23px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-actions {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-actions button {
    font-size: 9px;
    gap: 5px;
  }
}


/* =========================================================
   V36.21 - CAPO CONDOMINIO IN TARGHETTA + TELEFONO ELENCO
   ========================================================= */

.condo-plaque-manager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 11px;
  padding: 7px 10px 7px 8px;
  border: 1px solid #dfe8e3;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

.condo-plaque-manager-icon {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #eaf4ee;
  color: #276d4d;
}

.condo-plaque-manager-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.condo-plaque-manager > span:last-child {
  min-width: 0;
}

.condo-plaque-manager small,
.condo-plaque-manager strong {
  display: block;
}

.condo-plaque-manager small {
  color: #829087;
  font-size: 7px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .11em;
}

.condo-plaque-manager strong {
  margin-top: 3px;
  color: #33433a;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.member-person-copy {
  min-width: 0;
}

.member-person-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.member-person-name-line > b {
  min-width: 0;
}

.member-person-name-line .building-phone-trigger {
  margin-left: 1px;
}

@media (max-width: 760px) {
  .mobile-condo-identity-plaque
  .condo-plaque-manager {
    margin-top: 9px;
    padding: 6px 8px 6px 7px;
    border-radius: 11px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager-icon {
    width: 25px;
    height: 25px;
    border-radius: 8px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager strong {
    font-size: 9.5px;
  }

  .members-table
  .member-person-name-line {
    align-items: center;
    flex-wrap: wrap;
  }
}


/* =========================================================
   V36.22 - CAPO CONDOMINIO PIÙ EVIDENTE NELLA TARGHETTA
   ========================================================= */

.condo-plaque-manager {
  gap: 11px;
  margin-top: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 15px;
}

.condo-plaque-manager-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.condo-plaque-manager-icon svg {
  width: 20px;
  height: 20px;
}

.condo-plaque-manager small {
  font-size: 8px;
  letter-spacing: .12em;
}

.condo-plaque-manager strong {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .mobile-condo-identity-plaque
  .condo-plaque-manager {
    gap: 9px;
    margin-top: 11px;
    padding: 8px 10px 8px 8px;
    border-radius: 13px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager-icon svg {
    width: 18px;
    height: 18px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager small {
    font-size: 7.5px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager strong {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.25;
  }
}


/* =========================================================
   V36.23 - TELEFONO CAPO CONDOMINIO NELLA TARGHETTA
   ========================================================= */

.condo-plaque-manager-copy {
  min-width: 0;
}

.condo-plaque-manager-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 4px;
}

.condo-plaque-manager-name-line
> strong {
  min-width: 0;
  margin-top: 0;
}

.condo-plaque-manager-phone:empty {
  display: none;
}

.condo-plaque-manager-phone {
  display: inline-flex;
  align-items: center;
}

.condo-plaque-manager-phone
.building-phone-trigger {
  width: 29px;
  height: 29px;
  margin: 0;
  border-radius: 10px;
}

.condo-plaque-manager-phone
.building-phone-trigger
.phone-handset-icon {
  width: 15px;
  height: 15px;
}

@media (max-width: 760px) {
  .mobile-condo-identity-plaque
  .condo-plaque-manager-name-line {
    gap: 6px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager-phone
  .building-phone-trigger {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-manager-phone
  .phone-handset-icon {
    width: 16px;
    height: 16px;
  }
}


/* =========================================================
   V36.25 - ICONE MENU LATERALE CIVICO+
   ========================================================= */

.condominium-manage-page
.sidebar
.side-link {
  min-height: 48px;
  gap: 10px;
  padding: 6px 9px;
}

.sidebar-menu-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(128, 177, 151, .24);
  border-radius: 10px;
  background:
    linear-gradient(
      145deg,
      rgba(247, 252, 249, .98),
      rgba(232, 246, 238, .96)
    );
  color: #20704d;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .88) inset,
    0 3px 10px rgba(8, 51, 34, .08);
  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .15s ease,
    box-shadow .15s ease;
}

.sidebar-menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.condominium-manage-page
.sidebar
.side-link:hover
.sidebar-menu-icon {
  transform: translateY(-1px);
  border-color: rgba(117, 175, 143, .36);
  background: #f7fcf9;
  color: #175e40;
  box-shadow:
    0 1px 0 #fff inset,
    0 5px 13px rgba(8, 51, 34, .10);
}

.condominium-manage-page
.sidebar
.side-link.active
.sidebar-menu-icon {
  border-color: rgba(164, 205, 182, .32);
  background: rgba(249, 253, 251, .98);
  color: #176844;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .95) inset,
    0 5px 14px rgba(5, 40, 27, .12);
}

.condominium-manage-page
.sidebar
.side-link > span:not(
  .sidebar-menu-icon
):not(
  .menu-notification-badge
) {
  min-width: 0;
}

@media (max-width: 900px) and (min-width: 761px) {
  .condominium-manage-page
  .sidebar
  .side-link {
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
  }

  .sidebar-menu-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .condominium-manage-page
  .sidebar
  .side-link
  > span:not(
    .sidebar-menu-icon
  ):not(
    .menu-notification-badge
  ) {
    display: none;
  }
}

@media (min-width: 761px) and (max-height: 720px) {
  .condominium-manage-page
  > .sidebar
  .side-link {
    min-height: 43px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .sidebar-menu-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 9px;
  }

  .sidebar-menu-icon svg {
    width: 17px;
    height: 17px;
  }
}


/* =========================================================
   V36.26 - AREA DITTE: PROFILO + RICERCA PREVENTIVI
   ========================================================= */

.company-area-page {
  min-height: calc(100vh - 72px);
  background: #f6f8f7;
}

.company-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.company-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  padding: 28px 16px;
  border-right: 1px solid rgba(222, 231, 226, .9);
  background:
    linear-gradient(
      180deg,
      #0e3023,
      #0b291e
    );
}

.company-sidebar-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.company-sidebar-head > span:last-child {
  min-width: 0;
}

.company-sidebar-head small,
.company-sidebar-head strong {
  display: block;
}

.company-sidebar-head small {
  color: rgba(224, 239, 230, .56);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .13em;
}

.company-sidebar-head strong {
  max-width: 145px;
  margin-top: 3px;
  color: #f4faf6;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-sidebar-mark,
.company-sidebar-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(130, 185, 154, .24);
  background:
    linear-gradient(
      145deg,
      rgba(249,253,251,.98),
      rgba(230,246,237,.96)
    );
  color: #20704d;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 3px 10px rgba(5,39,25,.10);
}

.company-sidebar-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.company-sidebar-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.company-sidebar-mark svg {
  width: 20px;
  height: 20px;
}

.company-sidebar-icon svg {
  width: 18px;
  height: 18px;
}

.company-sidebar-mark svg,
.company-sidebar-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-sidebar-nav {
  display: grid;
  gap: 6px;
}

.company-side-link {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d6e3dc;
  font: inherit;
  font-size: 12px;
  font-weight: 690;
  text-align: left;
  cursor: pointer;
  transition:
    background .15s ease,
    color .15s ease;
}

.company-side-link:hover,
.company-side-link.active {
  background: rgba(255,255,255,.09);
  color: #fff;
}

.company-side-link.active
.company-sidebar-icon {
  background: #fbfefc;
  color: #176844;
}

.company-area-main {
  min-width: 0;
  padding: 40px 44px 70px;
  overflow-x: hidden;
}

.company-area-section {
  display: none;
  width: min(1040px, 100%);
  margin: 0 auto;
}

.company-area-section.active {
  display: block;
}

.company-area-main
.company-area-heading {
  margin-bottom: 25px;
}

.company-area-main
.company-area-heading h1 {
  margin: 7px 0 8px;
  font-size: clamp(37px, 4.4vw, 54px);
}

.company-profile-card {
  width: 100%;
}

.company-profile-symbol svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-description-card {
  margin-top: 16px;
  padding: 25px 27px;
  border: 1px solid #e0e7e3;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(22,48,37,.045);
}

.company-description-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.company-description-head h2 {
  margin: 5px 0 5px;
  color: #28352f;
  font-size: 23px;
  letter-spacing: -.025em;
}

.company-description-head p {
  max-width: 650px;
  margin: 0;
  color: #7b8781;
  font-size: 12px;
  line-height: 1.5;
}

.company-description-edit {
  min-height: 42px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.company-description-edit svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-description-text {
  margin-top: 20px;
  padding-top: 19px;
  border-top: 1px solid #edf1ef;
  color: #46544d;
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.company-description-text.is-empty {
  color: #909a95;
  font-style: italic;
}

.company-tender-page-heading {
  margin-bottom: 20px !important;
}

#companyTendersSection
.company-tenders-browser {
  margin-top: 0;
}

.company-description-dialog {
  width: min(650px, calc(100vw - 30px));
  max-width: 650px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
}

.company-description-dialog::backdrop {
  background: rgba(18,30,24,.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.company-description-form {
  padding: 27px;
  border: 1px solid #e1e7e3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 85px rgba(14,42,29,.23);
}

.company-description-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.company-description-dialog-head h3 {
  margin: 5px 0 5px;
  color: #28352f;
  font-size: 26px;
  letter-spacing: -.035em;
}

.company-description-dialog-head p {
  margin: 0;
  color: #7f8a84;
  font-size: 11px;
}

.company-description-form label {
  display: grid;
  gap: 8px;
  color: #4c5a53;
  font-size: 11px;
  font-weight: 750;
}

.company-description-form textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 14px 15px;
  border: 1px solid #dce4df;
  border-radius: 15px;
  background: #fbfcfb;
  color: #29362f;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
}

.company-description-form textarea:focus {
  border-color: #79a28d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(39,108,76,.08);
}

.company-description-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  color: #919c96;
  font-size: 9px;
}

.company-description-counter b {
  color: #68766e;
  font-size: 9px;
}

.company-description-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.company-description-actions button {
  min-height: 43px;
}

.company-mobile-nav {
  display: none;
}

@media (max-width: 900px) and (min-width: 761px) {
  .company-workspace {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .company-sidebar {
    padding-left: 11px;
    padding-right: 11px;
  }

  .company-sidebar-head {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .company-sidebar-head
  > span:last-child {
    display: none;
  }

  .company-side-link {
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
  }

  .company-side-link
  > span:last-child {
    display: none;
  }

  .company-area-main {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 760px) {
  .company-area-page.active {
    padding: 0 !important;
  }

  .company-workspace {
    display: block;
    min-height: 0;
  }

  .company-sidebar {
    display: none;
  }

  .company-area-main {
    padding:
      22px
      var(--mobile-page-x)
      calc(
        92px +
        env(safe-area-inset-bottom)
      );
  }

  .company-area-main
  .company-area-heading h1 {
    font-size: clamp(32px, 9.5vw, 43px);
  }

  .company-profile-card {
    gap: 15px;
    padding: 19px;
    border-radius: 21px;
  }

  .company-profile-symbol {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .company-profile-symbol svg {
    width: 28px;
    height: 28px;
  }

  .company-description-card {
    padding: 19px;
    border-radius: 20px;
  }

  .company-description-head {
    display: grid;
    gap: 15px;
  }

  .company-description-edit {
    width: 100%;
  }

  .company-description-text {
    font-size: 13px;
  }

  .company-mobile-nav {
    position: fixed;
    z-index: 120;
    left: 8px;
    right: 8px;
    bottom:
      max(
        8px,
        env(safe-area-inset-bottom)
      );
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(213,224,218,.92);
    border-radius: 20px;
    background: rgba(250,252,251,.96);
    box-shadow: 0 13px 35px rgba(22,49,36,.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .company-mobile-nav-item {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: #6f7c75;
    font: inherit;
    font-size: 10px;
    font-weight: 760;
  }

  .company-mobile-nav-item.active {
    background: #edf6f1;
    color: #1f6848;
  }

  .company-mobile-nav-item
  .company-sidebar-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  .company-description-dialog {
    width: calc(100vw - 12px);
    max-width: none;
    border-radius: 23px;
  }

  .company-description-form {
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    padding: 21px 16px 18px;
    border-radius: 23px;
  }

  .company-description-dialog-head h3 {
    font-size: 22px;
  }

  .company-description-form textarea {
    min-height: 220px;
  }

  .company-description-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}


/* =========================================================
   V36.27 - SPECIALIZZAZIONI DITTA
   ========================================================= */

.company-specializations-card {
  margin-top: 16px;
  padding: 25px 27px;
  border: 1px solid #e0e7e3;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(22,48,37,.045);
}

.company-specializations-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.company-specializations-head h2 {
  margin: 5px 0 5px;
  color: #28352f;
  font-size: 23px;
  letter-spacing: -.025em;
}

.company-specializations-head p {
  max-width: 650px;
  margin: 0;
  color: #7b8781;
  font-size: 12px;
  line-height: 1.5;
}

.company-specializations-edit {
  min-height: 42px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.company-specializations-edit svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-specializations-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 19px;
  border-top: 1px solid #edf1ef;
}

.company-specialization-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid #d8e6de;
  border-radius: 999px;
  background: #f2f9f5;
  color: #2f624b;
  font-size: 10px;
  font-weight: 760;
}

.company-specialization-check {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #dcefe4;
  color: #1f704c;
  font-size: 9px;
  font-weight: 900;
}

.company-specializations-display.is-empty {
  color: #909a95;
}

.company-specializations-empty {
  font-size: 12px;
  font-style: italic;
}

.company-specializations-dialog {
  width: min(720px, calc(100vw - 30px));
  max-width: 720px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
}

.company-specializations-dialog::backdrop {
  background: rgba(18,30,24,.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.company-specializations-form {
  max-height: calc(100vh - 34px);
  overflow-y: auto;
  padding: 27px;
  border: 1px solid #e1e7e3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 85px rgba(14,42,29,.23);
}

.company-specializations-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.company-specializations-dialog-head h3 {
  margin: 5px 0 5px;
  color: #28352f;
  font-size: 26px;
  letter-spacing: -.035em;
}

.company-specializations-dialog-head p {
  max-width: 540px;
  margin: 0;
  color: #7f8a84;
  font-size: 11px;
  line-height: 1.5;
}

.company-specializations-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.company-specialization-option {
  display: block;
  cursor: pointer;
}

.company-specialization-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.company-specialization-option-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #dfe6e2;
  border-radius: 14px;
  background: #fafcfb;
  color: #4d5c54;
  font-size: 11px;
  font-weight: 690;
  transition:
    border-color .14s ease,
    background .14s ease,
    color .14s ease,
    box-shadow .14s ease;
}

.company-specialization-option:hover
.company-specialization-option-box {
  border-color: #bfd5c8;
  background: #f6fbf8;
}

.company-specialization-option-check {
  width: 24px;
  height: 24px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d8e0dc;
  border-radius: 8px;
  background: #fff;
  color: transparent;
  font-size: 11px;
  font-weight: 900;
}

.company-specialization-option
input:checked
+ .company-specialization-option-box {
  border-color: #9dc6b0;
  background: #edf7f1;
  color: #285d45;
  box-shadow: 0 0 0 3px rgba(57,126,91,.055);
}

.company-specialization-option
input:checked
+ .company-specialization-option-box
.company-specialization-option-check {
  border-color: #77af91;
  background: #dcefe4;
  color: #176b48;
}

.company-specializations-actions {
  position: sticky;
  bottom: -27px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 21px -27px -27px;
  padding: 14px 27px 20px;
  border-top: 1px solid #edf1ef;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.company-specializations-actions button {
  min-height: 43px;
}

@media (max-width: 760px) {
  .company-specializations-card {
    padding: 19px;
    border-radius: 20px;
  }

  .company-specializations-head {
    display: grid;
    gap: 15px;
  }

  .company-specializations-edit {
    width: 100%;
  }

  .company-specialization-chip {
    min-height: 31px;
    padding: 6px 10px;
  }

  .company-specializations-dialog {
    width: calc(100vw - 12px);
    max-width: none;
    border-radius: 23px;
  }

  .company-specializations-form {
    max-height: calc(100dvh - 12px);
    padding: 21px 16px 18px;
    border-radius: 23px;
  }

  .company-specializations-options {
    grid-template-columns: 1fr;
  }

  .company-specializations-actions {
    grid-template-columns: 1fr 1fr;
    display: grid;
    margin:
      18px
      -16px
      -18px;
    padding:
      12px
      16px
      max(
        15px,
        env(safe-area-inset-bottom)
      );
  }
}


/* =========================================================
   V36.28 - SIDEBAR DESKTOP COMPATTA / CARD FLOTTANTE
   ========================================================= */

/*
 * Solo desktop:
 * - niente più colonna verde a tutta altezza;
 * - il menu è alto quanto il contenuto;
 * - card smussata, staccata dai bordi;
 * - mobile invariato.
 */
@media (min-width: 761px) {

  /* ---------------- CONDOMINIO ---------------- */

  .condominium-manage-page {
    grid-template-columns: 270px minmax(0, 1fr);
    column-gap: 0;
    align-items: start;
  }

  .condominium-manage-page > .sidebar {
    position: sticky !important;
    top: 92px !important;

    width: calc(100% - 28px);
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    align-self: start;
    overflow: visible !important;

    margin:
      20px
      0
      20px
      14px;

    padding:
      18px
      14px
      16px;

    border:
      1px solid
      rgba(39, 96, 69, .18);

    border-radius: 24px;

    background:
      linear-gradient(
        180deg,
        #0d3425 0%,
        #0b2c20 100%
      );

    box-shadow:
      0 18px 44px
      rgba(13, 48, 34, .16);

    box-sizing: border-box;
  }

  .condominium-manage-page
  > .sidebar
  .sidebar-brand-spacer {
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .condominium-manage-page
  > .sidebar
  .side-link {
    min-height: 48px;
  }

  .condominium-manage-page
  .condo-manage-main {
    padding-left: 34px;
  }

  /* ---------------- DITTA ---------------- */

  .company-workspace {
    grid-template-columns:
      270px
      minmax(0, 1fr);
    align-items: start;
  }

  .company-sidebar {
    position: sticky !important;
    top: 92px !important;

    width: calc(100% - 28px);
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    align-self: start;
    overflow: visible !important;

    margin:
      20px
      0
      20px
      14px;

    padding:
      18px
      14px
      16px;

    border:
      1px solid
      rgba(39, 96, 69, .18);

    border-radius: 24px;

    background:
      linear-gradient(
        180deg,
        #0d3425 0%,
        #0b2c20 100%
      );

    box-shadow:
      0 18px 44px
      rgba(13, 48, 34, .16);

    box-sizing: border-box;
  }

  .company-sidebar-head {
    padding:
      2px
      5px
      17px;
    margin-bottom: 8px;
  }

  .company-area-main {
    padding-left: 34px;
  }
}


/*
 * Tablet orizzontale / desktop stretto:
 * manteniamo la card compatta ma più stretta.
 */
@media (min-width: 761px) and (max-width: 1000px) {

  .condominium-manage-page,
  .company-workspace {
    grid-template-columns:
      98px
      minmax(0, 1fr);
  }

  .condominium-manage-page
  > .sidebar,
  .company-sidebar {
    width: calc(100% - 16px);
    margin-left: 8px;
    padding:
      14px
      9px;
    border-radius: 20px;
  }

  .condominium-manage-page
  .condo-manage-main,
  .company-area-main {
    padding-left: 24px;
  }
}


/*
 * Desktop molto basso:
 * il menu resta compatto e non viene forzato a tutta altezza.
 */
@media (min-width: 761px) and (max-height: 720px) {

  .condominium-manage-page
  > .sidebar,
  .company-sidebar {
    top: 82px !important;
    margin-top: 10px;
    margin-bottom: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .condominium-manage-page
  > .sidebar
  .side-link,
  .company-side-link {
    min-height: 43px;
  }
}


/* Mobile: protezione esplicita, nessuna variazione */
@media (max-width: 760px) {

  .condominium-manage-page {
    display: block;
  }

  .condominium-manage-page
  > .sidebar,
  .company-sidebar {
    display: none !important;
  }

  .company-workspace {
    display: block;
  }
}


/* =========================================================
   V36.30 - FIX SIDEBAR CONDOMINIO + ALLINEAMENTO IN ALTO
   ========================================================= */

/*
 * IMPORTANTE:
 * la sidebar resta dentro la griglia.
 * Nessun position:fixed, quindi il contenuto principale
 * mantiene sempre la propria colonna e larghezza.
 */
@media (min-width: 761px) {

  .condominium-manage-page > .sidebar {
    position: sticky !important;
    top: 82px !important;

    /* La precedente v36.28 aveva 20px sopra.
       Qui la portiamo quasi a filo come la card azienda. */
    margin-top: 8px !important;
    margin-bottom: 20px !important;
  }

  .company-sidebar {
    position: sticky !important;
    top: 82px !important;
    margin-top: 8px !important;
  }
}

/* Desktop basso: manteniamo comunque un piccolo distacco */
@media (min-width: 761px) and (max-height: 720px) {
  .condominium-manage-page > .sidebar,
  .company-sidebar {
    top: 76px !important;
    margin-top: 5px !important;
  }
}

/* Mobile invariato */
@media (max-width: 760px) {
  .condominium-manage-page > .sidebar,
  .company-sidebar {
    position: static !important;
  }
}


/* =========================================================
   V36.31 - ALLINEAMENTO REALE MENU CONDOMINIO IN ALTO
   ========================================================= */

/*
 * La pagina condominio è un contenitore con overflow:
 * per questo top:82px veniva sommato alla quota della pagina e
 * spingeva visivamente la card verso il basso.
 *
 * Il menu resta STICKY e dentro la griglia, ma per il condominio
 * usiamo un offset interno minimo. La sidebar azienda conserva
 * invece il proprio offset rispetto alla pagina.
 */
@media (min-width: 761px) {
  .condominium-manage-page > .sidebar {
    position: sticky !important;
    top: 8px !important;
    margin-top: 8px !important;
  }

  .company-sidebar {
    position: sticky !important;
    top: 82px !important;
    margin-top: 8px !important;
  }
}

@media (min-width: 761px) and (max-height: 720px) {
  .condominium-manage-page > .sidebar {
    top: 5px !important;
    margin-top: 5px !important;
  }

  .company-sidebar {
    top: 76px !important;
    margin-top: 5px !important;
  }
}

@media (max-width: 760px) {
  .condominium-manage-page > .sidebar,
  .company-sidebar {
    position: static !important;
  }
}


/* =========================================================
   V36.32 - PROFILO DITTA DAL PREVENTIVO
   ========================================================= */

.tender-offer-company-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f3329;
  font: inherit;
  font-size: 13px;
  font-weight: 830;
  text-align: left;
  cursor: pointer;
  transition: color .14s ease;
}

.tender-offer-company-link:hover {
  color: #157149;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tender-offer-company-link svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer-company-profile-dialog {
  width: min(880px, calc(100vw - 34px));
  max-width: 880px;
  max-height: calc(100dvh - 34px);
  padding: 0;
  border: 0;
  border-radius: 30px;
  overflow: hidden;
  background: transparent;
}

.offer-company-profile-dialog::backdrop {
  background: rgba(15, 29, 22, .46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.offer-company-profile-shell {
  max-height: calc(100dvh - 34px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid #dfe7e2;
  border-radius: 30px;
  background:
    radial-gradient(
      circle at 88% 0%,
      rgba(223, 241, 231, .74),
      transparent 26%
    ),
    #f9fbfa;
  box-shadow:
    0 30px 95px
    rgba(10, 39, 25, .26);
}

.offer-company-profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 24px;
}

.offer-company-profile-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.offer-company-profile-symbol {
  width: 66px;
  height: 66px;
  display: grid;
  flex: 0 0 66px;
  place-items: center;
  border-radius: 20px;
  background: #10452f;
  color: #fff;
  box-shadow:
    0 10px 25px
    rgba(15, 68, 46, .16);
}

.offer-company-profile-symbol svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer-company-profile-top h2 {
  margin: 6px 0 5px;
  color: #1d2d25;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.offer-company-profile-top p {
  margin: 0;
  color: #7b8881;
  font-size: 12px;
}

.offer-company-profile-loading {
  min-height: 230px;
  display: grid;
  place-items: center;
  color: #78877f;
  font-size: 13px;
}

.offer-company-profile-content {
  display: grid;
  gap: 16px;
}

.offer-company-profile-content.hidden {
  display: none !important;
}

.offer-company-profile-registered,
.offer-company-profile-section {
  border: 1px solid #dfe7e2;
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  box-shadow:
    0 10px 30px
    rgba(20, 48, 35, .045);
}

.offer-company-profile-registered {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px;
}

.offer-company-profile-label {
  display: block;
  margin-bottom: 5px;
  color: #75847c;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .13em;
}

.offer-company-profile-registered strong {
  display: block;
  color: #26372e;
  font-size: 20px;
}

.offer-company-profile-registered p {
  margin: 5px 0 0;
  color: #79867f;
  font-size: 12px;
}

.offer-company-profile-vat {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #e0e6e3;
  border-radius: 999px;
  background: #f3f6f4;
  color: #536259;
  font-size: 10px;
  font-weight: 760;
}

.offer-company-profile-section {
  padding: 23px 24px;
}

.offer-company-profile-section h3 {
  margin: 5px 0 16px;
  color: #28372f;
  font-size: 21px;
  letter-spacing: -.025em;
}

.offer-company-profile-specializations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offer-company-specialization-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid #d8e6de;
  border-radius: 999px;
  background: #f1f8f4;
  color: #2d6249;
  font-size: 10px;
  font-weight: 760;
}

.offer-company-specialization-chip > span {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #dcefe4;
  color: #1d704b;
  font-size: 9px;
}

.offer-company-profile-description {
  color: #45544c;
  font-size: 13px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.offer-company-profile-description.is-empty,
.offer-company-profile-empty {
  color: #929d97;
  font-style: italic;
  font-size: 12px;
}

@media (max-width: 760px) {
  .offer-company-profile-dialog {
    width: calc(100vw - 12px);
    max-width: none;
    max-height: calc(100dvh - 12px);
    border-radius: 24px;
  }

  .offer-company-profile-shell {
    max-height: calc(100dvh - 12px);
    padding: 20px 16px;
    border-radius: 24px;
  }

  .offer-company-profile-top {
    gap: 12px;
    padding-bottom: 18px;
  }

  .offer-company-profile-title-wrap {
    align-items: flex-start;
    gap: 11px;
  }

  .offer-company-profile-symbol {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 16px;
  }

  .offer-company-profile-symbol svg {
    width: 26px;
    height: 26px;
  }

  .offer-company-profile-top h2 {
    font-size: clamp(25px, 8vw, 34px);
  }

  .offer-company-profile-registered {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 18px;
  }

  .offer-company-profile-section {
    padding: 18px;
  }
}


/* =========================================================
   V36.33 - TARGHETTA CLICCABILE PROFILO DITTA
   ========================================================= */

.tender-offer-company-link {
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 7px 10px 7px 8px;
  border: 1px solid #cfe2d8;
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      #f8fcfa,
      #edf7f2
    );
  color: #255c43;
  text-decoration: none !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 4px 14px rgba(23,78,52,.07);
  cursor: pointer;
  transition:
    transform .14s ease,
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}

.tender-offer-company-link:hover {
  transform: translateY(-1px);
  border-color: #9fc8b3;
  background:
    linear-gradient(
      145deg,
      #fbfefc,
      #e8f5ee
    );
  color: #175d3d;
  text-decoration: none !important;
  box-shadow:
    0 1px 0 #fff inset,
    0 7px 18px rgba(23,78,52,.11);
}

.tender-offer-company-link:focus-visible {
  outline: 0;
  border-color: #79ad90;
  box-shadow:
    0 0 0 4px rgba(40,111,77,.10),
    0 7px 18px rgba(23,78,52,.10);
}

.tender-offer-company-badge-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #d1e5da;
  border-radius: 11px;
  background: #e5f3eb;
  color: #1e704b;
}

.tender-offer-company-badge-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tender-offer-company-badge-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.tender-offer-company-badge-copy small {
  color: #7b8f84;
  font-size: 7px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .12em;
}

.tender-offer-company-badge-copy strong {
  min-width: 0;
  color: #254d3a;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.tender-offer-company-badge-arrow {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  flex: 0 0 22px;
  place-items: center;
  margin-left: 2px;
  border-radius: 8px;
  background: #dceee4;
  color: #176844;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  transition:
    transform .14s ease,
    background .14s ease;
}

.tender-offer-company-link:hover
.tender-offer-company-badge-arrow {
  transform: translateX(2px);
  background: #cfe7da;
}

@media (max-width: 760px) {
  .tender-offer-company-link {
    width: 100%;
    min-height: 52px;
  }

  .tender-offer-company-badge-copy {
    flex: 1 1 auto;
  }
}


/* =========================================================
   V36.34 - TARGHETTA PROFILO DITTA PULITA
   ========================================================= */

.tender-offer-company-link {
  justify-content: flex-start;
  padding-right: 13px;
}

.tender-offer-company-badge-icon {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 0 !important;
  overflow: hidden;
}

.tender-offer-company-badge-icon svg {
  position: static !important;
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  flex: 0 0 auto;
}

.tender-offer-company-badge-arrow {
  display: none !important;
}


/* =========================================================
   V36.35 - TELEFONO OBBLIGATORIO DITTE
   ========================================================= */

.company-phone-registration-field
.company-phone-required-note,
#personalInfoPhoneNote {
  color: #68786f;
  line-height: 1.45;
}

.company-phone-registration-field
.company-phone-required-note {
  display: block;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid #dce9e1;
  border-radius: 11px;
  background: #f3f9f5;
  color: #346149;
  font-size: 10px;
  font-weight: 630;
}

.personal-info-phone-field
#personalInfoPhoneNote {
  margin-top: 2px;
}

.offer-company-profile-contact {
  display: grid;
  justify-items: end;
  gap: 9px;
  flex: 0 0 auto;
}

.offer-company-profile-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #d7e5dd;
  border-radius: 13px;
  background: #f3f9f5;
}

.offer-company-profile-phone.hidden {
  display: none !important;
}

.offer-company-profile-phone-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e1f0e7;
  color: #1d6b48;
}

.offer-company-profile-phone-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.offer-company-profile-phone-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.offer-company-profile-phone-copy small {
  color: #7c8c83;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .11em;
}

.offer-company-profile-phone-copy strong {
  color: #294d3b;
  font-size: 11px;
  line-height: 1.15;
}

.offer-company-profile-call {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 9px;
  background: #176b48;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.offer-company-profile-call.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .offer-company-profile-contact {
    width: 100%;
    justify-items: stretch;
  }

  .offer-company-profile-vat {
    width: fit-content;
  }

  .offer-company-profile-phone {
    width: 100%;
  }

  .offer-company-profile-phone-copy {
    flex: 1 1 auto;
  }

  .offer-company-profile-call {
    min-height: 36px;
    padding: 0 12px;
  }
}


/* =========================================================
   V36.36 - DITTE: NASCONDI CONDIVISIONE TELEFONO
   ========================================================= */

#personalInfoPhonePrivacy.hidden {
  display: none !important;
}


/* =========================================================
   V36.37 - MODIFICA DATI AZIENDA + TELEFONO PREVENTIVI
   ========================================================= */

.company-profile-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.company-profile-page-heading > div {
  min-width: 0;
}

.company-profile-edit-btn {
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.company-profile-edit-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-profile-phone-pill {
  padding: 7px 10px;
  border: 1px solid #d9e7df;
  border-radius: 999px;
  background: #f0f7f3;
  color: #37634d;
  font-size: 9px;
  font-weight: 760;
}

.company-profile-edit-dialog {
  width: min(760px, calc(100vw - 30px));
  max-width: 760px;
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: 27px;
  overflow: hidden;
  background: transparent;
}

.company-profile-edit-dialog::backdrop {
  background: rgba(18,30,24,.44);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.company-profile-edit-form {
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 27px;
  border: 1px solid #e0e7e3;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 28px 85px rgba(14,42,29,.23);
}

.company-profile-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
}

.company-profile-edit-head h3 {
  margin: 5px 0;
  color: #28352f;
  font-size: 27px;
  letter-spacing: -.035em;
}

.company-profile-edit-head p {
  margin: 0;
  color: #7d8983;
  font-size: 11px;
}

.company-profile-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.company-profile-edit-grid label {
  display: grid;
  align-content: start;
  gap: 7px;
  color: #4c5952;
  font-size: 11px;
  font-weight: 730;
}

.company-profile-edit-grid label small {
  color: #78877f;
  font-size: 9px;
  line-height: 1.4;
  font-weight: 550;
}

.company-profile-edit-grid input {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #dce4df;
  border-radius: 13px;
  background: #fbfcfb;
  color: #29362f;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.company-profile-edit-grid input:focus {
  border-color: #79a28d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(39,108,76,.08);
}

.company-profile-edit-wide {
  grid-column: 1 / -1;
}

.company-profile-edit-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin: 24px 0 11px;
  padding-top: 18px;
  border-top: 1px solid #edf1ef;
}

.company-profile-edit-section-title strong {
  color: #34433b;
  font-size: 12px;
}

.company-profile-edit-section-title span {
  color: #89948e;
  font-size: 9px;
}

.company-profile-address-grid {
  margin-top: 14px;
}

.company-profile-edit-actions {
  position: sticky;
  bottom: -27px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 22px -27px -27px;
  padding: 14px 27px 20px;
  border-top: 1px solid #edf1ef;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tender-offer-company-profile-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
}

.tender-offer-company-profile-row
.building-phone-trigger {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin: 0;
  border: 1px solid #cfe2d8;
  border-radius: 13px;
  background: #eef7f2;
  color: #1d6b48;
  box-shadow: 0 3px 10px rgba(23,78,52,.07);
}

.tender-offer-company-profile-row
.building-phone-trigger:hover {
  border-color: #9fc8b3;
  background: #e6f3eb;
}

.tender-offer-company-profile-row
.phone-handset-icon {
  width: 17px;
  height: 17px;
}

@media (max-width: 760px) {
  .company-profile-page-heading {
    display: grid;
    align-items: stretch;
    gap: 14px;
  }

  .company-profile-edit-btn {
    width: 100%;
  }

  .company-profile-edit-dialog {
    width: calc(100vw - 12px);
    max-width: none;
    max-height: calc(100dvh - 12px);
    border-radius: 23px;
  }

  .company-profile-edit-form {
    max-height: calc(100dvh - 12px);
    padding: 21px 16px 18px;
    border-radius: 23px;
  }

  .company-profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .company-profile-edit-wide {
    grid-column: auto;
  }

  .company-profile-edit-section-title {
    display: grid;
    gap: 4px;
  }

  .company-profile-edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin:
      18px
      -16px
      -18px;
    padding:
      12px
      16px
      max(
        15px,
        env(safe-area-inset-bottom)
      );
  }

  .tender-offer-company-profile-row {
    width: 100%;
  }

  .tender-offer-company-profile-row
  .tender-offer-company-link {
    width: auto;
    flex: 1 1 auto;
  }

  .tender-offer-company-profile-row
  .building-phone-trigger {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}


/* =========================================================
   V36.39 - CENTRATURA FORZATA CORNETTA PREVENTIVI
   ========================================================= */

.tender-offer-admin-company
.tender-offer-company-profile-row
> .building-phone-trigger {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  place-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.tender-offer-admin-company
.tender-offer-company-profile-row
> .building-phone-trigger
> .phone-handset-icon {
  position: static !important;
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  inset: auto !important;
  flex: 0 0 17px !important;
}

@media (max-width: 760px) {
  .tender-offer-admin-company
  .tender-offer-company-profile-row
  > .building-phone-trigger
  > .phone-handset-icon {
    width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
  }
}
\n\n/* =========================================================\n   V36.40 - ASSEMBLEE: AZIONI SOLO CAPO CONDOMINIO\n   ========================================================= */\n\n/*\n * Alcune regole mobile precedenti impostano display:grid !important\n * sulla barra azioni. Questa regola, più specifica e posta per ultima,\n * garantisce che .hidden abbia sempre la precedenza.\n */\n#assemblyDetailDialog\n.assembly-detail-actions.hidden {\n  display: none !important;\n}\n\n#assemblyDetailDialog\n#editAssemblyBtn.hidden,\n#assemblyDetailDialog\n#downloadAssemblyPdfBtn.hidden,\n#assemblyDetailDialog\n#deleteAssemblyBtn.hidden {\n  display: none !important;\n}\n

/* =========================================================
   V36.42 - LOGIN MOBILE DAVVERO A SCHERMO INTERO
   ========================================================= */

/*
 * Quando è attiva la schermata iniziale, nessuna pagina privata
 * deve poter comparire sotto o essere raggiunta con lo scroll.
 */
body.entry-mode {
  overflow: hidden !important;
}

body.entry-mode main > .view:not(#landing) {
  display: none !important;
}

@media (max-width: 760px) {
  body.entry-mode {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body.entry-mode #landing.apple-entry-view.active {
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
  }

  body.entry-mode #landing .apple-hero-shell {
    width: 100%;
    min-height: 100dvh !important;
    height: 100dvh;
    box-sizing: border-box;
  }

  body.entry-mode #landing .apple-entry-stage {
    min-height: 100% !important;
    height: 100%;
  }

  /* Evita che un'altra view venga resa visibile da regole mobile più specifiche. */
  body.entry-mode .condominium-manage-page,
  body.entry-mode .condominium-selector-page,
  body.entry-mode .company-area-page,
  body.entry-mode .dashboard-page {
    display: none !important;
  }
}


/* =========================================================
   V36.43 - SELEZIONE CONDOMINIO ISOLATA SU MOBILE
   ========================================================= */

/*
 * La schermata di scelta del condominio deve essere una vera vista
 * autonoma: nessuna sezione del condominio già aperto può apparire
 * sotto o essere raggiunta con lo scroll.
 */
body.condo-selector-mode {
  overflow: hidden !important;
}

body.condo-selector-mode main > .view:not(#condominiumSelector) {
  display: none !important;
}

body.condo-selector-mode #condominiumSelector.active {
  display: block !important;
}

@media (max-width: 760px) {
  body.condo-selector-mode {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden !important;
    overscroll-behavior: none;
    background: #f7f7f5;
  }

  body.condo-selector-mode #condominiumSelector.active {
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f7f7f5;
    -webkit-overflow-scrolling: touch;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-shell {
    min-height: 100dvh !important;
    box-sizing: border-box;
  }

  /* Protezione dalle regole responsive più specifiche delle altre view. */
  body.condo-selector-mode .condominium-manage-page,
  body.condo-selector-mode .company-area-page,
  body.condo-selector-mode .dashboard-page,
  body.condo-selector-mode #landing,
  body.condo-selector-mode #invite {
    display: none !important;
  }
}


/* =========================================================
   V36.44 - FIX DEFINITIVO VISIBILITÀ VISTE SU MOBILE
   ========================================================= */

/*
 * Una vecchia regola responsive forzava .condominium-manage-page
 * a display:block anche quando la view non era attiva.
 * Questa regola finale ristabilisce il comportamento corretto:
 * su smartphone può essere visibile una sola view alla volta.
 */
@media (max-width: 760px) {
  main > .view:not(.active) {
    display: none !important;
    visibility: hidden !important;
  }

  main > .view.active {
    visibility: visible !important;
  }

  /* Protezione specifica contro la vecchia regola V36.28. */
  #condominiumManage:not(.active) {
    display: none !important;
  }

  /* Nell'Area Ditta non deve mai riaffiorare contenuto condominiale. */
  #companyArea.active ~ #condominiumManage,
  body:has(#companyArea.active) #condominiumManage:not(.active) {
    display: none !important;
  }
}
\n\n/* =========================================================\n   V36.45 - ASSEMBLEE: PROPRIETARIO SOLO PDF\n   ========================================================= */\n\n/*\n * La barra azioni non è più manager-only: per un OWNER contiene\n * esclusivamente Scarica PDF. Modifica/Elimina restano manager-only.\n */\n#assemblyDetailDialog\n.assembly-detail-actions.hidden {\n  display: none !important;\n}\n\n#assemblyDetailDialog\n#editAssemblyBtn.hidden,\n#assemblyDetailDialog\n#downloadAssemblyPdfBtn.hidden,\n#assemblyDetailDialog\n#deleteAssemblyBtn.hidden {\n  display: none !important;\n}\n

/* =========================================================
   V36.46 - VOTAZIONI CONDOMINIALI
   ========================================================= */

.polls-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.polls-section-head h3 {
  margin: 5px 0 6px;
  color: #23342b;
  font-size: 30px;
  letter-spacing: -.035em;
}

.polls-section-head p {
  margin: 0;
  color: #7a8780;
  font-size: 12px;
}

.polls-privacy-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
  padding: 12px 14px;
  border: 1px solid #dbe8e0;
  border-radius: 16px;
  background: #f4faf6;
}

.polls-privacy-icon {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
  background: #e2f1e8;
  color: #1b704a;
}

.polls-privacy-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.polls-privacy-note strong,
.polls-privacy-note small {
  display: block;
}

.polls-privacy-note strong {
  color: #315342;
  font-size: 11px;
}

.polls-privacy-note small {
  margin-top: 2px;
  color: #75857c;
  font-size: 9px;
  line-height: 1.45;
}

.poll-list {
  display: grid;
  gap: 14px;
}

.poll-card {
  padding: 22px;
  border: 1px solid #dde6e1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17,49,33,.045);
}

.poll-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.poll-card-title-wrap {
  min-width: 0;
}

.poll-card-title-wrap h4 {
  margin: 9px 0 0;
  color: #26372e;
  font-size: 20px;
  line-height: 1.28;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.poll-card-description {
  max-width: 760px;
  margin: 9px 0 0;
  color: #6f7d75;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.poll-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.poll-status-active {
  background: #e0f2e7;
  color: #176844;
}

.poll-status-upcoming {
  background: #eef2f0;
  color: #64746b;
}

.poll-status-closed {
  background: #f2f3f2;
  color: #7b8580;
}

.poll-delete-button {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #eadcdd;
  border-radius: 11px;
  background: #fffafa;
  color: #a44c52;
  cursor: pointer;
}

.poll-delete-button:hover {
  border-color: #ddb9bc;
  background: #fff4f4;
}

.poll-delete-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.poll-period-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid #edf0ee;
  border-radius: 14px;
  background: #fafcfa;
}

.poll-period-row > div:not(.poll-turnout-chip) {
  display: grid;
  gap: 2px;
}

.poll-period-row span {
  color: #8a958f;
  font-size: 8px;
  font-weight: 700;
}

.poll-period-row strong {
  color: #536159;
  font-size: 9px;
}

.poll-period-arrow {
  margin: 0 2px;
  color: #9aa49e !important;
}

.poll-turnout-chip {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf6f1;
  color: #3a654f;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.poll-options-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.poll-vote-option {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dce5e0;
  border-radius: 14px;
  background: #fff;
  color: #34453c;
  font: inherit;
  font-size: 11px;
  font-weight: 680;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.poll-vote-option:not(.is-disabled):hover {
  transform: translateY(-1px);
  border-color: #9ec7b1;
  background: #f4faf6;
}

.poll-vote-option.is-disabled {
  cursor: default;
  opacity: .68;
}

.poll-vote-radio {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid #bfd1c7;
  border-radius: 50%;
  background: #f7faf8;
  box-shadow: 0 0 0 4px #fff inset;
}

.poll-live-option-body {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 7px;
}

.poll-live-option-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.poll-live-option-head strong {
  min-width: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.poll-live-option-head small {
  flex: 0 0 auto;
  color: #718078;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.poll-vote-option .poll-result-track {
  width: 100%;
  margin-top: 0;
}

.poll-state-message {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f6f5;
  color: #68766f;
  font-size: 9px;
  line-height: 1.5;
}

.poll-state-message.is-success {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ecf7f1;
  color: #2f654a;
}

.poll-state-message.is-success > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 50%;
  background: #d8eee2;
  color: #176844;
  font-weight: 900;
}

.poll-state-message.is-success strong,
.poll-state-message.is-success small {
  display: block;
}

.poll-state-message.is-success small {
  margin-top: 2px;
  color: #668172;
}

.poll-result-row {
  padding: 11px 12px;
  border: 1px solid #e1e8e4;
  border-radius: 14px;
  background: #fbfcfb;
}

.poll-result-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
}

.poll-result-copy strong {
  color: #33463c;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.poll-result-copy span {
  flex: 0 0 auto;
  color: #718078;
  font-size: 8px;
  font-weight: 700;
}

.poll-result-track {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9efec;
}

.poll-result-track > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b8058, #61a67f);
}

.poll-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  border: 1px dashed #d9e3de;
  border-radius: 20px;
  background: #fafcfa;
  color: #7c8982;
  text-align: center;
  font-size: 11px;
}

.poll-empty-state strong {
  color: #47574f;
  font-size: 14px;
}

.poll-empty-state p {
  margin: 0;
  font-size: 9px;
}

.poll-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e9f5ee;
  color: #1c704b;
  font-size: 18px;
  font-weight: 900;
}

.poll-empty-state.is-error {
  color: #9b4e53;
  border-color: #ead7d9;
  background: #fffafa;
}

.poll-create-dialog {
  width: min(680px, calc(100vw - 30px));
  max-width: 680px;
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 0;
  border-radius: 27px;
  overflow: hidden;
  background: transparent;
}

.poll-create-dialog::backdrop {
  background: rgba(18,30,24,.44);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.poll-create-form {
  max-height: calc(100dvh - 30px);
  overflow-y: auto;
  padding: 27px;
  border: 1px solid #e0e7e3;
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 28px 85px rgba(14,42,29,.23);
}

.poll-dialog-head p {
  margin: 4px 0 0;
  color: #7d8983;
  font-size: 10px;
}

.poll-create-form > label,
.poll-dates-grid label {
  display: grid;
  gap: 7px;
  color: #4c5952;
  font-size: 11px;
  font-weight: 730;
}

.poll-create-form > label + label {
  margin-top: 14px;
}

.poll-create-form .field-optional {
  color: #8a958f;
  font-size: 9px;
  font-weight: 600;
}

.poll-create-form textarea,
.poll-create-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dce4df;
  border-radius: 13px;
  background: #fbfcfb;
  color: #29362f;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.poll-create-form textarea {
  min-height: 92px;
  resize: vertical;
}

.poll-create-form textarea:focus,
.poll-create-form input:focus {
  border-color: #79a28d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(39,108,76,.08);
}

.poll-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.poll-options-editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid #edf1ef;
}

.poll-options-editor-head h4 {
  margin: 4px 0 3px;
  color: #38483f;
  font-size: 17px;
}

.poll-options-editor-head p {
  max-width: 430px;
  margin: 0;
  color: #839089;
  font-size: 9px;
  line-height: 1.45;
}

.poll-options-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.poll-option-editor-row {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) 34px;
  align-items: center;
  gap: 8px;
}

.poll-option-editor-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #edf6f1;
  color: #28664a;
  font-size: 9px;
  font-weight: 850;
}

.poll-option-editor-row .poll-option-input {
  min-height: 43px;
}

.poll-option-remove {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e4dedf;
  border-radius: 10px;
  background: #fff;
  color: #916269;
  font-size: 18px;
  cursor: pointer;
}

.poll-immutable-warning {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #eadfcb;
  border-radius: 12px;
  background: #fffaf0;
  color: #806a42;
  font-size: 9px;
  line-height: 1.45;
}

.poll-immutable-warning strong {
  flex: 0 0 auto;
}

.poll-create-actions {
  position: sticky;
  bottom: -27px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 20px -27px -27px;
  padding: 14px 27px 20px;
  border-top: 1px solid #edf1ef;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 760px) {
  .polls-section-head {
    display: grid;
    align-items: stretch;
    gap: 13px;
  }

  .polls-section-head h3 {
    font-size: 26px;
  }

  .polls-section-head .primary {
    width: 100%;
  }

  .poll-card {
    padding: 17px;
    border-radius: 19px;
  }

  .poll-card-title-wrap h4 {
    font-size: 18px;
  }

  .poll-period-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .poll-turnout-chip {
    grid-column: 1 / -1;
    width: fit-content;
    margin: 3px 0 0;
  }

  .poll-result-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .poll-create-dialog {
    width: calc(100vw - 12px);
    max-width: none;
    max-height: calc(100dvh - 12px);
    border-radius: 23px;
  }

  .poll-create-form {
    max-height: calc(100dvh - 12px);
    padding: 21px 16px 18px;
    border-radius: 23px;
  }

  .poll-dates-grid {
    grid-template-columns: 1fr;
  }

  .poll-options-editor-head {
    display: grid;
    align-items: stretch;
  }

  .poll-options-editor-head .secondary {
    width: 100%;
  }

  .poll-create-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 18px -16px -18px;
    padding: 12px 16px max(15px, env(safe-area-inset-bottom));
  }
}


/* =========================================================
   V36.48 - CONFERMA DEDICATA VOTAZIONI
   ========================================================= */

.poll-confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  max-width: 460px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: visible;
  background: transparent;
}

.poll-confirm-dialog::backdrop {
  background: rgba(18, 28, 25, .36);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.poll-confirm-card {
  width: 100%;
  padding: 34px 34px 28px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 26px 80px rgba(15,38,31,.22), 0 4px 18px rgba(15,38,31,.08);
  text-align: center;
  animation: pollConfirmIn .24s cubic-bezier(.2,.8,.2,1);
}

.poll-confirm-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eef5f2;
  color: #174c40;
  font-size: 25px;
  font-weight: 700;
}

.poll-confirm-copy .eyebrow {
  display: block;
  margin-bottom: 8px;
}

.poll-confirm-copy h3 {
  margin: 0;
  color: #1f2422;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.poll-confirm-copy p {
  max-width: 380px;
  margin: 14px auto 0;
  color: #666b68;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.poll-confirm-actions {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.poll-confirm-actions button {
  width: 100%;
  min-height: 44px;
}

.poll-confirm-actions .danger-confirm {
  background: #8f2f2b;
  border-color: #8f2f2b;
  color: #fff;
}

@keyframes pollConfirmIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .poll-confirm-card {
    padding: 28px 22px 22px;
    border-radius: 24px;
  }

  .poll-confirm-copy h3 {
    font-size: 24px;
  }

  .poll-confirm-actions {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V36.49 - VOTAZIONI: OVERLAY DI CONFERMA NON-NATIVE
   ========================================================= */

.poll-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(18, 28, 25, .36);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.poll-confirm-overlay.hidden {
  display: none !important;
}

body.poll-confirm-active {
  overflow: hidden;
}

.poll-confirm-overlay .poll-confirm-card {
  width: min(460px, 100%);
  max-width: 460px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .poll-confirm-overlay {
    padding: 10px;
    align-items: center;
  }

  .poll-confirm-overlay .poll-confirm-card {
    width: 100%;
  }
}

/* =========================================================
   V36.53 - SELETTORE CONDOMINIO A RIGHE COMPATTE
   Solo schermata #condominiumSelector: nessun impatto sulle altre view.
   ========================================================= */

#condominiumSelector #selectorCondoArea {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

#condominiumSelector .selector-condo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 6px 2px 2px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b9c9c3 transparent;
}

#condominiumSelector .selector-condo-grid::-webkit-scrollbar {
  width: 7px;
}

#condominiumSelector .selector-condo-grid::-webkit-scrollbar-track {
  background: transparent;
}

#condominiumSelector .selector-condo-grid::-webkit-scrollbar-thumb {
  background: #b9c9c3;
  border-radius: 999px;
}

#condominiumSelector .selector-condo-card {
  width: 100%;
  min-height: 0 !important;
  padding: 12px 14px !important;
  border-radius: 16px !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  box-shadow: 0 3px 14px rgba(0,0,0,.025);
  transform: none;
}

#condominiumSelector .selector-condo-card:hover {
  transform: none;
  border-color: #c8d3cf;
  background: #fdfefd;
  box-shadow: 0 5px 18px rgba(0,0,0,.045);
}

#condominiumSelector .selector-card-symbol {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 12px;
  font-size: 18px;
}

#condominiumSelector .selector-card-copy {
  flex: 1 1 auto;
  min-width: 0;
}

#condominiumSelector .selector-card-role {
  margin: 0 0 3px;
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: .075em;
}

#condominiumSelector .selector-card-copy h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#condominiumSelector .selector-card-copy p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#condominiumSelector .selector-card-enter {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 2px 0 12px;
  gap: 7px;
  justify-content: flex-end;
  white-space: nowrap;
  font-size: 12.5px;
}

#condominiumSelector .selector-card-enter b {
  font-size: 21px;
  line-height: 1;
}

@media (max-width: 760px) {
  #condominiumSelector #selectorCondoArea {
    width: 100%;
  }

  #condominiumSelector .selector-condo-grid {
    gap: 7px !important;
    max-height: min(38dvh, 300px);
    padding-right: 4px;
  }

  #condominiumSelector .selector-condo-card {
    padding: 11px 12px !important;
    border-radius: 15px !important;
    gap: 11px;
  }

  #condominiumSelector .selector-card-symbol {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 17px;
  }

  #condominiumSelector .selector-card-copy h3 {
    font-size: 16px;
  }

  #condominiumSelector .selector-card-copy p {
    font-size: 12px;
  }

  #condominiumSelector .selector-card-enter {
    margin: 0 !important;
    padding-left: 6px;
    font-size: 0;
    gap: 0;
  }

  #condominiumSelector .selector-card-enter b {
    font-size: 24px;
  }
}

/* =========================================================
   V36.54 - NOTIFICHE PUSH
   ========================================================= */
.account-push-icon {
  color: var(--green, #1f8f5f);
  background: rgba(31, 143, 95, 0.10);
}

.push-notification-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 14px;
  box-sizing: border-box;
  background: rgba(18, 25, 23, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: auto;
}

.push-notification-overlay.hidden {
  display: none !important;
}

body.push-notification-open {
  overflow: hidden;
}

.push-notification-card {
  width: min(560px, calc(100vw - 28px));
  max-width: 560px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(24, 70, 53, 0.09);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 26px 70px rgba(18, 45, 35, 0.18);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.push-notification-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.push-notification-head p {
  margin: 6px 0 0;
  max-width: 430px;
  color: #68736e;
  line-height: 1.45;
}

.push-notification-loading {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: #738079;
  font-size: 14px;
}

.push-notification-content {
  display: grid;
  gap: 15px;
}

.push-status-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 16px;
  border-radius: 18px;
  background: #f6f8f7;
  border: 1px solid rgba(31, 74, 58, 0.08);
}

.push-status-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #a9b0ad;
  box-shadow: 0 0 0 5px rgba(169, 176, 173, 0.13);
}

.push-status-card.is-active .push-status-dot {
  background: #28a66a;
  box-shadow: 0 0 0 5px rgba(40, 166, 106, 0.13);
}

.push-status-card.is-warning .push-status-dot {
  background: #d99a24;
  box-shadow: 0 0 0 5px rgba(217, 154, 36, 0.14);
}

.push-status-card.is-error .push-status-dot {
  background: #d75656;
  box-shadow: 0 0 0 5px rgba(215, 86, 86, 0.13);
}

.push-status-card strong {
  display: block;
  font-size: 15px;
  color: #26322d;
}

.push-status-card p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6f7974;
}

.push-ios-note {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-radius: 16px;
  background: #f2f8f5;
  color: #496058;
  font-size: 13px;
  line-height: 1.45;
}

.push-ios-note strong {
  color: #24724e;
}

.push-preferences {
  border: 1px solid rgba(31, 74, 58, 0.09);
  border-radius: 19px;
  overflow: hidden;
  background: #fff;
}

.push-preferences-title {
  padding: 13px 16px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #708079;
  text-transform: uppercase;
}

.push-preference-row {
  min-height: 62px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(31, 74, 58, 0.07);
  cursor: pointer;
}

.push-preference-row > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.push-preference-row strong {
  font-size: 14px;
  color: #2d3833;
}

.push-preference-row small {
  font-size: 12px;
  color: #7b8580;
  line-height: 1.35;
}

.push-preference-row input[type="checkbox"] {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  accent-color: #24885b;
}

.push-device-note {
  display: block;
  min-height: 17px;
  text-align: center;
  color: #7c8581;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .push-notification-overlay {
    padding: 9px;
    align-items: center;
  }

  .push-notification-card {
    width: 100%;
    max-width: 560px;
    padding: 18px;
    border-radius: 22px;
    max-height: calc(100dvh - 18px);
  }

  .push-notification-head {
    gap: 12px;
  }

  .push-notification-head h3 {
    font-size: 21px;
  }

  .push-preference-row {
    min-height: 58px;
    padding: 10px 13px;
  }

  .push-preference-row small {
    font-size: 11px;
  }
}


/* =========================================================
   V36.55 - PROPOSTA NOTIFICHE DOPO LOGIN
   ========================================================= */
.push-login-benefits {
  display: grid;
  gap: 9px;
  padding: 14px 15px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(242, 249, 246, .92), rgba(249, 252, 250, .96));
  border: 1px solid rgba(31, 143, 95, .10);
}

.push-login-benefits-title {
  margin-bottom: 1px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5f746a;
}

.push-login-benefit {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 9px;
  align-items: start;
}

.push-login-benefit > span {
  color: #2a9665;
  font-size: 9px;
  line-height: 20px;
}

.push-login-benefit > div {
  display: grid;
  gap: 1px;
}

.push-login-benefit strong {
  font-size: 13px;
  color: #2e3c35;
}

.push-login-benefit small {
  font-size: 11px;
  line-height: 1.4;
  color: #78837e;
}

.push-not-now-button {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #66736d;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 12px;
}

.push-not-now-button:hover {
  background: rgba(31, 143, 95, .06);
  color: #24724e;
}

@media (max-width: 640px) {
  .push-login-benefits {
    padding: 12px 13px;
  }

  .push-login-benefit strong {
    font-size: 12px;
  }
}


/* =========================================================
   V36.56 - PUSH POST LOGIN: OVERLAY ROBUSTO
   ========================================================= */
.push-notification-overlay .push-notification-card {
  animation: civicoPushOverlayIn .22s ease-out both;
}

@keyframes civicoPushOverlayIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


/* =========================================================
   V36.57 - X CHIUSURA PUSH IN ALTO A DESTRA
   ========================================================= */
.push-notification-card {
  position: relative;
}

.push-notification-head {
  position: relative;
  padding-right: 72px;
}

#closePushNotificationDialog {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

@media (max-width: 640px) {
  .push-notification-head {
    padding-right: 64px;
  }

  #closePushNotificationDialog {
    top: 0;
    right: 0;
  }
}


/* =========================================================
   V36.59 - ACCOUNT NEL SELETTORE CONDOMINIO
   ========================================================= */
.selector-account-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.selector-account-menu-wrap {
  position: relative;
}

.selector-account-menu-trigger {
  min-height: 44px;
  padding: 5px 9px 5px 6px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(29,61,48,.09);
  box-shadow: 0 4px 16px rgba(20,50,38,.035);
}

.selector-account-menu-trigger:hover,
.selector-account-menu-wrap.is-open .selector-account-menu-trigger {
  background: #fff;
  border-color: rgba(29,61,48,.14);
}

.selector-account-trigger-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 190px;
  line-height: 1.15;
}

.selector-account-trigger-copy > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #26322d;
  font-size: 13px;
  font-weight: 750;
}

.selector-account-trigger-copy small {
  margin-top: 2px;
  color: #84908a;
  font-size: 9px;
  font-weight: 650;
}

.selector-account-menu {
  right: 0;
  width: 300px;
  max-width: calc(100vw - 28px);
  z-index: 12000;
}

.selector-account-menu .account-menu-section:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .condo-selector-top {
    gap: 12px;
  }

  .selector-account-tools {
    gap: 7px;
    min-width: 0;
  }

  .selector-account-menu-trigger {
    min-height: 42px;
    max-width: min(185px, 48vw);
    padding: 4px 7px 4px 4px !important;
    gap: 6px;
  }

  /* Nella scelta condominio il nome deve restare visibile anche su telefono. */
  .selector-account-menu-trigger .account-trigger-copy {
    display: flex !important;
  }

  .selector-account-menu-trigger .account-menu-chevron {
    display: inline-block !important;
  }

  .selector-account-menu-trigger .account-trigger-avatar {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px;
    font-size: 10px;
  }

  .selector-account-trigger-copy {
    max-width: 104px;
  }

  .selector-account-trigger-copy > span {
    font-size: 11px;
  }

  .selector-account-trigger-copy small {
    display: none;
  }

  .selector-account-menu {
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: min(310px, calc(100vw - 24px)) !important;
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
  }

  .selector-logout {
    padding: 8px 2px;
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  .condo-selector-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .condo-selector-logo {
    width: 112px;
  }

  .selector-account-menu-trigger {
    max-width: 158px;
  }

  .selector-account-trigger-copy {
    max-width: 82px;
  }
}


/* =========================================================
   V36.60 - FIX MENU ACCOUNT SELETTORE SU MOBILE / SAFARI
   ========================================================= */
@media (max-width: 760px) {
  /* Il menu account del selettore deve stare sopra la view scrollabile. */
  .condo-selector-top,
  .selector-account-tools,
  .selector-account-menu-wrap {
    position: relative;
    z-index: 20050;
    overflow: visible !important;
  }

  /* Su Safari/iOS l'absolute dentro la view fixed/scrollabile può essere
     ritagliato o composto dietro la pagina. Lo rendiamo viewport-fixed. */
  .selector-account-menu {
    position: fixed !important;
    top: 72px !important;
    right: 12px !important;
    left: auto !important;
    width: min(310px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 88px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 30000 !important;
  }

  .selector-account-menu-wrap.is-open .selector-account-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }
}


/* =========================================================
   V36.61 - ACCOUNT SEMPRE VISIBILE NEL SELETTORE CONDOMINIO
   ========================================================= */
/* La vista di selezione è accessibile solo dopo autenticazione.
   Rendiamo quindi il blocco Account indipendente da eventuali stati
   .hidden transitori introdotti durante il ripristino della sessione. */
body.condo-selector-mode #condominiumSelector.active #selectorAccountTools {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 760px) {
  body.condo-selector-mode #condominiumSelector.active #selectorAccountTools {
    display: flex !important;
  }
}


/* =========================================================
   V36.62 - AUTOLETTURA PERSONALE DEL CAPO CONDOMINIO
   ========================================================= */
#waterResidentArea.is-manager-personal {
  margin: 0 0 32px;
  padding: 20px;
  border: 1px solid rgba(31, 143, 95, .14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 4%, rgba(71, 170, 117, .10), transparent 30%),
    linear-gradient(180deg, rgba(245, 251, 248, .98), rgba(250, 252, 251, .96));
  box-shadow: 0 16px 42px rgba(28, 80, 57, .07);
}

.water-manager-personal-intro,
.water-manager-zone-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.water-manager-personal-intro {
  margin: 0 0 18px;
  padding: 2px 2px 0;
}

.water-manager-personal-icon,
.water-manager-zone-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 21px;
}

.water-manager-personal-icon {
  background: #e7f5ed;
  color: #1c774f;
  box-shadow: inset 0 0 0 1px rgba(31, 143, 95, .08);
}

.water-manager-personal-intro h4,
.water-manager-zone-head h4 {
  margin: 3px 0 5px;
  color: #22332c;
  font-size: 20px;
}

.water-manager-personal-intro p,
.water-manager-zone-head p {
  margin: 0;
  max-width: 720px;
  color: #6d7973;
  font-size: 13px;
  line-height: 1.5;
}

#waterResidentArea.is-manager-personal .water-campaign-focus {
  border-color: rgba(31, 143, 95, .11);
  box-shadow: 0 8px 24px rgba(28, 80, 57, .045);
}

.water-manager-zone-head {
  margin: 2px 0 20px;
  padding: 18px 20px;
  border: 1px solid rgba(35, 54, 45, .08);
  border-radius: 20px;
  background: #f7f8f7;
}

.water-manager-zone-icon {
  background: #edf1ef;
  color: #52635b;
  font-weight: 800;
  font-size: 18px;
}

@media (max-width: 700px) {
  #waterResidentArea.is-manager-personal {
    margin-bottom: 24px;
    padding: 15px;
    border-radius: 22px;
  }

  .water-manager-personal-intro,
  .water-manager-zone-head {
    gap: 11px;
  }

  .water-manager-personal-icon,
  .water-manager-zone-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 18px;
  }

  .water-manager-personal-intro h4,
  .water-manager-zone-head h4 {
    font-size: 18px;
  }

  .water-manager-zone-head {
    padding: 15px;
    border-radius: 18px;
  }
}


/* =========================================================
   V36.66 - AUTOLETTURA MANAGER DENTRO L'AREA AMMINISTRATIVA
   ========================================================= */
#waterManagerArea > #waterResidentArea.is-manager-personal {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 0 28px !important;
  position: relative;
  z-index: 1;
}

#waterManagerArea > #waterResidentArea.is-manager-personal::after {
  content: "";
  display: block;
  height: 1px;
  margin: 24px -2px 0;
  background: linear-gradient(90deg, transparent, rgba(38, 88, 65, .14), transparent);
}

#waterManagerArea > #waterResidentArea.is-manager-personal + .water-manager-zone-head {
  margin-top: 0;
}

@media (max-width: 700px) {
  #waterManagerArea > #waterResidentArea.is-manager-personal {
    margin-bottom: 22px !important;
  }
}


/* =========================================================
   V36.67 - AUTOLETTURA MANAGER: MARKUP FISICO + FALLBACK CSS
   ========================================================= */
/* La card personale è fisicamente il primo figlio dell'area manager.
   Se una vecchia istruzione JS dovesse aggiungere .hidden a waterResidentArea,
   quando l'area amministrativa è visibile questa regola ha priorità e impedisce
   che la card personale scompaia. */
#waterManagerArea:not(.hidden) > #waterResidentArea,
#waterManagerArea:not(.hidden) > #waterResidentArea.hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
}

#waterManagerArea:not(.hidden) > #waterResidentArea > #waterManagerPersonalIntro,
#waterManagerArea:not(.hidden) > #waterResidentArea > #waterManagerPersonalIntro.hidden {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* =========================================================
   V36.68 - INPUT LETTURA STILE CONTATORE
   ========================================================= */
.meter-widget-label-host {
  display: block;
}

.meter-widget {
  position: relative;
  margin-top: 8px;
  cursor: text;
}

.meter-widget-ring {
  position: absolute;
  inset: 12px 14px 10px;
  border-radius: 28px;
  border: 1px solid rgba(36, 136, 91, 0.16);
  pointer-events: none;
  transform: scale(1.01);
}

.meter-widget-panel {
  position: relative;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f7fbf9 0%, #eef6f2 100%);
  border: 1px solid #dbe6e0;
  box-shadow: 0 16px 36px rgba(23, 79, 66, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.meter-widget-panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -48px;
  top: -74px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(36, 136, 91, 0.10) 0%, rgba(36, 136, 91, 0.04) 48%, rgba(36, 136, 91, 0) 70%);
  pointer-events: none;
}

.meter-widget-top {
  position: relative;
  display: grid;
  gap: 10px;
}

.meter-widget-caption {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b7167;
}

.meter-widget-digits {
  display: grid;
  grid-template-columns: repeat(var(--meter-digit-count, 6), minmax(0, 1fr));
  gap: 7px;
}

.meter-widget-digit {
  min-height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #edf2ef 100%);
  border: 1px solid #d7dfdb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(19, 34, 28, 0.04);
  color: #1f2c27;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.meter-widget-digit.is-leading-zero {
  color: #aab4af;
}

.meter-widget-digit.is-user-value {
  color: #20302a;
}

.meter-widget-bottom {
  position: relative;
  margin-top: 14px;
}

.meter-widget-input-holder {
  position: relative;
}

.meter-widget-input {
  width: 100%;
  margin-top: 0 !important;
  padding: 14px 58px 14px 18px !important;
  border-radius: 999px !important;
  border: 1px solid #cfd9d4 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #1c2924 !important;
  font: inherit;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 2px rgba(16, 36, 28, 0.05);
}

.meter-widget-input::placeholder {
  color: #b3bbb7;
  letter-spacing: normal;
  font-size: 15px;
  font-weight: 600;
}

.meter-widget-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf5f1;
  color: #2a6f52;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.meter-widget.is-focused .meter-widget-ring,
.meter-widget:hover .meter-widget-ring {
  border-color: rgba(36, 136, 91, 0.32);
}

.meter-widget.is-focused .meter-widget-panel {
  border-color: #b9d0c6;
  box-shadow: 0 18px 42px rgba(23, 79, 66, 0.10), 0 0 0 4px rgba(23, 79, 66, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.meter-widget.is-focused .meter-widget-input {
  border-color: #7ca496 !important;
}

.meter-widget.has-value .meter-widget-caption {
  color: #2e7657;
}

.water-general-form .meter-widget-label-host {
  flex: 1 1 360px;
  min-width: min(360px, 100%);
}

.water-general-form .meter-widget {
  min-width: 320px;
}

@media (max-width: 768px) {
  .meter-widget-panel {
    padding: 14px;
    border-radius: 22px;
  }

  .meter-widget-digits {
    gap: 5px;
  }

  .meter-widget-digit {
    min-height: 42px;
    font-size: 23px;
    border-radius: 12px;
  }

  .meter-widget-input {
    font-size: 19px !important;
    letter-spacing: 0.14em;
    padding: 13px 54px 13px 14px !important;
  }

  .water-general-form .meter-widget,
  .water-general-form .meter-widget-label-host {
    min-width: 100%;
  }
}


/* =========================================================
   V36.71 - LETTURE ACQUA: AMMINISTRAZIONE COMPATTA
   ========================================================= */
/* Il manager senza interno vede esclusivamente l'amministrazione. */
#waterManagerArea.water-manager-without-unit > #waterResidentArea,
#waterManagerArea.water-manager-without-unit > #waterResidentArea.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#waterManagerArea.water-manager-without-unit > .water-manager-zone-head {
  margin-top: 0 !important;
}

.water-manager-zone-head-compact {
  margin: 0 0 12px;
  padding: 6px 2px 12px;
  border: 0;
  border-bottom: 1px solid #e5eae7;
  border-radius: 0;
  background: transparent;
}

.water-manager-zone-head-compact .water-manager-zone-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
}

.water-manager-zone-head-compact h4 {
  margin: 1px 0 3px;
  font-size: 18px;
}

.water-manager-zone-head-compact p {
  font-size: 12px;
}

.water-manager-campaign-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid #e2e8e5;
  border-radius: 18px;
  background: #fff;
}

.water-campaign-select-field,
.water-manager-filters label {
  display: grid;
  gap: 6px;
  color: #67736d;
  font-size: 11px;
  font-weight: 700;
}

.water-campaign-select-field > span {
  text-transform: uppercase;
  letter-spacing: .06em;
}

#waterCampaignSelect,
#waterUnitFilter,
#waterStatusFilter {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d7dfdb;
  border-radius: 12px;
  padding: 9px 34px 9px 11px;
  background: #fff;
  color: #25332d;
  font: inherit;
  font-size: 13px;
}

#waterCampaignSelect:focus,
#waterUnitFilter:focus,
#waterStatusFilter:focus {
  outline: none;
  border-color: #7ca496;
  box-shadow: 0 0 0 4px rgba(23,79,66,.06);
}

.water-campaign-selection-meta {
  min-width: 165px;
  padding: 0 2px 10px;
  color: #7a8580;
  font-size: 12px;
  white-space: nowrap;
}

.water-manager-summary-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.water-manager-summary-compact article {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbfcfb;
}

.water-manager-summary-compact span {
  font-size: 11px;
}

.water-manager-summary-compact b {
  margin-top: 3px;
  font-size: 19px;
}

.water-general-card-compact {
  padding: 16px 18px;
  border-radius: 18px;
  gap: 16px;
  margin-bottom: 12px;
}

.water-general-card-compact h4 {
  margin: 3px 0 5px;
  font-size: 18px;
}

.water-general-card-compact p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

/* Il contatore generale mantiene l'aspetto strumentale, ma in forma compatta. */
.water-general-card-compact .meter-widget {
  min-width: 280px;
}

.water-general-card-compact .meter-widget-panel {
  padding: 10px 12px;
  border-radius: 18px;
}

.water-general-card-compact .meter-widget-caption {
  font-size: 9px;
}

.water-general-card-compact .meter-widget-digits {
  gap: 4px;
}

.water-general-card-compact .meter-widget-digit {
  min-height: 34px;
  border-radius: 9px;
  font-size: 19px;
}

.water-general-card-compact .meter-widget-bottom {
  margin-top: 8px;
}

.water-general-card-compact .meter-widget-input {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
  font-size: 16px !important;
}

.water-manager-panel-compact {
  padding: 16px 18px;
}

.water-manager-panel-compact .water-manager-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.water-manager-panel-compact .water-manager-toolbar h4 {
  margin: 3px 0 0;
  font-size: 18px;
}

.water-manager-filters {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(130px, 170px);
  gap: 10px;
  align-items: end;
}

.water-manager-filters label {
  width: auto;
}

.water-corrections-panel {
  margin-top: 12px;
  padding: 16px 18px;
}

.water-corrections-panel .water-history-head h4 {
  font-size: 18px;
}

@media (max-width: 900px) {
  .water-manager-campaign-controls {
    grid-template-columns: 1fr auto;
  }

  .water-campaign-selection-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0 2px;
  }

  .water-manager-summary-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .water-general-card-compact {
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .water-manager-zone-head-compact {
    padding-bottom: 10px;
  }

  .water-manager-campaign-controls {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
    border-radius: 16px;
  }

  .water-manager-campaign-controls > button {
    width: 100%;
  }

  .water-campaign-selection-meta {
    grid-column: auto;
    grid-row: auto;
    padding: 0;
    white-space: normal;
  }

  .water-manager-summary-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .water-manager-summary-compact article {
    padding: 10px 11px;
  }

  .water-general-card-compact {
    padding: 14px;
    border-radius: 16px;
  }

  .water-general-card-compact .water-general-form {
    width: 100%;
  }

  .water-general-card-compact .meter-widget,
  .water-general-card-compact .meter-widget-label-host {
    min-width: 100%;
  }

  .water-manager-panel-compact {
    padding: 14px;
  }

  .water-manager-panel-compact .water-manager-toolbar {
    align-items: stretch;
    gap: 10px;
  }

  .water-manager-filters {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .water-corrections-panel {
    padding: 14px;
  }
}

@media (max-width: 470px) {
  .water-manager-filters {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V36.72 - DROPDOWN CAMPAGNE CIVICO+ + LIVE REFRESH
   ========================================================= */
.water-campaign-select-field .water-campaign-civico-select {
  margin-top: 0;
}

.water-campaign-civico-select .civico-select-trigger {
  min-height: 42px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
}

.water-campaign-civico-select .civico-select-menu {
  z-index: 120;
  max-height: 300px;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(22, 47, 38, .15), 0 4px 12px rgba(22, 47, 38, .06);
}

.water-campaign-civico-select .civico-select-option {
  min-height: 48px;
  padding: 8px 10px 8px 12px;
  border-radius: 12px;
}

.water-campaign-option-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.water-campaign-option-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #27342f;
  font-size: 13px;
  font-weight: 750;
}

.water-campaign-option-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.water-campaign-option-status.is-open {
  background: #e7f5ed;
  color: #217047;
}

.water-campaign-option-status.is-closed {
  background: #f0f2f1;
  color: #78817d;
}

.water-campaign-civico-select .civico-select-option.selected .water-campaign-option-copy strong {
  color: #174b3c;
}

@media (max-width: 640px) {
  .water-campaign-civico-select .civico-select-menu {
    max-height: 250px;
  }

  .water-campaign-option-copy {
    gap: 7px;
  }
}


/* =========================================================
   V36.73 - CAMBIA CONDOMINIO SEMPRE VISIBILE NELLA APP
   ========================================================= */
.civico-top-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-top-change-condo {
  display: none;
}

@media (max-width: 760px) {
  .mobile-top-change-condo:not(.hidden) {
    min-height: 34px;
    padding: 0 11px 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(23, 95, 64, .12);
    border-radius: 999px;
    background: rgba(232, 243, 237, .92);
    color: #185f42;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: inset 0 1px rgba(255,255,255,.75);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-top-change-condo svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-top-change-condo:active {
    transform: scale(.96);
    background: #deeee5;
  }
}

@media (max-width: 360px) {
  .mobile-top-change-condo:not(.hidden) {
    padding-inline: 8px;
  }
  .mobile-top-change-condo span {
    display: none;
  }
}


/* =========================================================
   V36.74 - CAMBIA CONDOMINIO MOBILE: VISIBILITA' DETERMINISTICA
   ========================================================= */
@media (max-width: 760px) {
  /* La vista attiva decide la visibilita': niente dipendenza dallo stato JS. */
  body:has(#condominiumManage.active) .mobile-top-change-condo,
  body:has(#condominiumManage.active) .mobile-top-change-condo.hidden {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    flex: 0 0 auto;
  }

  .civico-top-brand-group {
    flex: 1 1 auto;
    max-width: calc(100% - 52px);
    overflow: visible;
  }

  body:has(#condominiumManage.active) .mobile-top-change-condo {
    min-height: 34px;
    max-width: 86px;
  }
}

@media (max-width: 390px) {
  body:has(#condominiumManage.active) .mobile-top-change-condo {
    max-width: 42px;
    width: 38px;
    padding: 0 !important;
    border-radius: 12px;
  }

  body:has(#condominiumManage.active) .mobile-top-change-condo span {
    display: none !important;
  }
}


/* =========================================================
   V36.75 - CAMBIA CONDOMINIO SOLO MOBILE
   La voce tecnica resta nel DOM per il routing interno, ma
   non viene più mostrata nella sidebar desktop.
   ========================================================= */
@media (min-width: 769px) {
  #condominiumManage > .sidebar #backToCondominiums {
    display: none !important;
  }
}


/* =========================================================
   V36.76 - CAMBIA CONDOMINIO VICINO AL LOGO ANCHE SU DESKTOP
   La vecchia voce resta nascosta nella sidebar desktop.
   ========================================================= */
@media (min-width: 761px) {
  body:has(#condominiumManage.active) .mobile-top-change-condo,
  body:has(#condominiumManage.active) .mobile-top-change-condo.hidden {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px 0 11px;
    border: 1px solid rgba(23, 95, 64, .12);
    border-radius: 999px;
    background: rgba(232, 243, 237, .92);
    color: #185f42;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: inset 0 1px rgba(255,255,255,.78);
    transition: background .16s ease, transform .16s ease, border-color .16s ease;
  }

  body:has(#condominiumManage.active) .mobile-top-change-condo svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body:has(#condominiumManage.active) .mobile-top-change-condo:hover {
    background: #e0efe7;
    border-color: rgba(23, 95, 64, .18);
  }

  body:has(#condominiumManage.active) .mobile-top-change-condo:active {
    transform: scale(.98);
  }
}


/* =========================================================
   V36.77 - FIX MOBILE CAMPO DATA LETTURA ACQUA
   Safari/iOS può assegnare agli input date una larghezza
   intrinseca superiore al contenitore. Forziamo il campo
   a rispettare sempre la card senza alterare il desktop.
   ========================================================= */
@media (max-width: 760px) {
  .water-reading-form,
  .water-reading-form label,
  .water-general-form,
  .water-general-form label {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .water-reading-form input[type="date"],
  .water-general-form input[type="date"] {
    display: block;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }
}


/* =========================================================
   V36.78 - FIX STRUTTURALE INPUT DATE SU SAFARI MOBILE
   Il wrapper limita anche il rendering intrinseco del controllo
   nativo iOS, non solo la sua width CSS.
   ========================================================= */
.water-date-label {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.water-date-control {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 7px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 13px;
  contain: inline-size;
}

.water-date-control input[type="date"] {
  display: block;
  width: 100% !important;
  inline-size: 100% !important;
  min-width: 0 !important;
  min-inline-size: 0 !important;
  max-width: 100% !important;
  max-inline-size: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-family: inherit;
}

@media (max-width: 760px) {
  .water-reading-form,
  .water-reading-form > label,
  .water-general-form,
  .water-general-form > label,
  .water-date-label,
  .water-date-control {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .water-date-control {
    overflow: clip;
  }

  .water-date-control input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    width: calc(100% - 2px) !important;
    inline-size: calc(100% - 2px) !important;
    max-width: calc(100% - 2px) !important;
    margin-inline: 1px !important;
    padding: 12px 13px !important;
    border: 1px solid #d8dfdc !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #1d2925 !important;
    text-align: left;
  }

  .water-date-control input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    min-width: 0;
  }
}


/* =========================================================
   V36.79 - DATA LETTURA EDITABILE SU DESKTOP
   ========================================================= */
@media (min-width: 761px) {
  .water-date-control {
    position: relative;
    overflow: visible;
    contain: none;
  }

  .water-date-control input[type="date"] {
    position: relative;
    z-index: 1;
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 52px !important;
    -webkit-appearance: auto;
    appearance: auto;
    pointer-events: auto !important;
    cursor: text;
    user-select: auto;
  }

  .water-date-control input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
  }

  .water-date-picker-btn {
    position: absolute;
    z-index: 3;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: #edf5f1;
    color: #24724e;
    font: inherit;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
  }

  .water-date-picker-btn:hover {
    background: #e1eee8;
  }

  .water-date-picker-btn:active {
    transform: translateY(-50%) scale(.96);
  }

  .water-date-control:focus-within {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .water-date-picker-btn {
    display: none !important;
  }
}


/* =========================================================
   V36.81 - SIDEBAR DESKTOP FLUIDA ANCHE CON ZOOM BROWSER
   Lo zoom modifica la viewport CSS: le misure in vw + clamp()
   compensano progressivamente Ctrl +/- senza salti bruschi.
   ========================================================= */
@media (min-width: 761px) {
  .condominium-manage-page {
    grid-template-columns:
      clamp(188px, 18vw, 270px)
      minmax(0, 1fr) !important;
  }

  .condominium-manage-page > .sidebar {
    width: calc(100% - clamp(12px, 1.9vw, 28px)) !important;
    margin-left: clamp(6px, .95vw, 14px) !important;
    padding:
      clamp(11px, 1.2vw, 18px)
      clamp(8px, .95vw, 14px)
      clamp(10px, 1.05vw, 16px) !important;
    border-radius: clamp(18px, 1.7vw, 24px) !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: clamp(40px, 3.2vw, 48px) !important;
    gap: clamp(7px, .7vw, 10px) !important;
    padding:
      clamp(4px, .45vw, 6px)
      clamp(6px, .65vw, 9px) !important;
    border-radius: clamp(10px, .9vw, 13px);
    font-size: clamp(11px, .82vw, 13px);
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: clamp(28px, 2.35vw, 34px) !important;
    height: clamp(28px, 2.35vw, 34px) !important;
    flex: 0 0 clamp(28px, 2.35vw, 34px) !important;
    border-radius: clamp(8px, .7vw, 10px) !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: clamp(15px, 1.25vw, 18px) !important;
    height: clamp(15px, 1.25vw, 18px) !important;
  }

  .condominium-manage-page > .sidebar .side-link > span:not(.sidebar-menu-icon):not(.menu-notification-badge),
  .condominium-manage-page > .sidebar .side-link > em {
    display: inline !important;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .condominium-manage-page .condo-manage-main {
    padding-left: clamp(18px, 2.35vw, 34px) !important;
  }
}

/*
 * Sovrascrive la vecchia modalità 98px/sole icone tra 761 e 1000px.
 * In questo intervallo (raggiunto spesso con Ctrl +) il menu resta
 * leggibile, ma si comprime fluidamente.
 */
@media (min-width: 761px) and (max-width: 1000px) {
  .condominium-manage-page {
    grid-template-columns:
      clamp(168px, 23vw, 220px)
      minmax(0, 1fr) !important;
  }

  .condominium-manage-page > .sidebar {
    width: calc(100% - 12px) !important;
    margin-left: 6px !important;
    padding: 11px 8px !important;
    border-radius: 18px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    justify-content: flex-start !important;
    min-height: 40px !important;
    padding: 4px 6px !important;
    font-size: clamp(10.5px, 1.35vw, 12px) !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  .condominium-manage-page > .sidebar .side-link > span:not(.sidebar-menu-icon):not(.menu-notification-badge),
  .condominium-manage-page > .sidebar .side-link > em {
    display: inline !important;
  }

  .condominium-manage-page .condo-manage-main {
    padding-left: clamp(14px, 2vw, 22px) !important;
  }
}

/* A zoom molto elevato, prima del breakpoint mobile, conserviamo
   comunque il testo riducendo ulteriormente gli ingombri. */
@media (min-width: 761px) and (max-width: 840px) {
  .condominium-manage-page {
    grid-template-columns: 164px minmax(0, 1fr) !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    font-size: 10.5px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 26px !important;
    height: 26px !important;
    flex-basis: 26px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 14px !important;
    height: 14px !important;
  }
}


/* =========================================================
   V36.82 - SIDEBAR: ADATTAMENTO VERTICALE ALLO ZOOM
   Ctrl +/- modifica anche l'altezza della viewport CSS.
   Riduciamo progressivamente altezza, margini, icone e testo
   per mantenere tutte le voci visibili senza alterare mobile.
   ========================================================= */
@media (min-width: 761px) {
  .condominium-manage-page > .sidebar {
    /* Failsafe per zoom estremi: normalmente non entra in gioco,
       ma evita che la card superi l'area utile sotto la topbar. */
    max-height: calc(100dvh - 88px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
  }

  .condominium-manage-page > .sidebar .side-link {
    /* Anche a viewport normali eliminiamo parte dello spazio morto. */
    margin-top: clamp(1px, .22vh, 3px) !important;
    margin-bottom: clamp(1px, .22vh, 3px) !important;
  }
}

/* Zoom elevato / finestra desktop bassa */
@media (min-width: 761px) and (max-height: 820px) {
  .condominium-manage-page > .sidebar {
    padding: 8px 8px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    border-radius: 18px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 33px !important;
    height: 33px !important;
    margin: 1px 0 !important;
    padding: 2px 5px !important;
    gap: 6px !important;
    border-radius: 9px !important;
    font-size: 10.5px !important;
    line-height: 1.05 !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 23px !important;
    height: 23px !important;
    flex: 0 0 23px !important;
    border-radius: 7px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  .condominium-manage-page > .sidebar .menu-notification-badge {
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 7px !important;
    border-width: 1px;
  }
}

/* Zoom molto elevato: il menu rimane completo e leggibile. */
@media (min-width: 761px) and (max-height: 660px) {
  .condominium-manage-page > .sidebar {
    padding: 6px 6px !important;
    border-radius: 15px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 29px !important;
    height: 29px !important;
    margin: 0 !important;
    padding: 1px 4px !important;
    gap: 5px !important;
    border-radius: 8px !important;
    font-size: 9.5px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 20px !important;
    height: 20px !important;
    flex-basis: 20px !important;
    border-radius: 6px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 11px !important;
    height: 11px !important;
  }

  .condominium-manage-page > .sidebar .menu-notification-badge {
    min-width: 13px;
    height: 13px;
    padding: 0 2px;
    font-size: 6.5px !important;
  }
}

/* Ultimo livello prima del breakpoint mobile. */
@media (min-width: 761px) and (max-height: 540px) {
  .condominium-manage-page > .sidebar {
    padding: 4px 5px !important;
    border-radius: 13px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 25px !important;
    height: 25px !important;
    padding: 0 3px !important;
    gap: 4px !important;
    font-size: 8.7px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 10px !important;
    height: 10px !important;
  }
}


/* =========================================================
   V36.83 - SIDEBAR: DIMENSIONE NORMALE A 100%,
   COMPRESSIONE SOLO QUANDO LO ZOOM RIDUCE DAVVERO LA VIEWPORT
   ========================================================= */
@media (min-width: 1100px) and (min-height: 701px) {
  .condominium-manage-page > .sidebar {
    padding: 15px 12px 14px !important;
    border-radius: 22px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 47px !important;
    height: auto !important;
    margin: 2px 0 !important;
    padding: 5px 8px !important;
    gap: 9px !important;
    border-radius: 12px !important;
    font-size: 13.5px !important;
    line-height: 1.15 !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 33px !important;
    height: 33px !important;
    flex: 0 0 33px !important;
    border-radius: 9px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  .condominium-manage-page > .sidebar .menu-notification-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 8px !important;
  }
}

/*
 * La prima compressione della v36.82 scattava già a 820px di altezza,
 * quindi anche molti desktop al 100% risultavano troppo piccoli.
 * La annulliamo tra 701 e 820px: la sidebar resta in modalità normale.
 */
@media (min-width: 761px) and (min-height: 701px) and (max-height: 820px) {
  .condominium-manage-page > .sidebar {
    padding: 13px 10px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    border-radius: 20px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 43px !important;
    height: auto !important;
    margin: 1px 0 !important;
    padding: 4px 7px !important;
    gap: 8px !important;
    border-radius: 11px !important;
    font-size: 12.5px !important;
    line-height: 1.12 !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    border-radius: 8px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Zoom realmente elevato / viewport bassa: compatta ma non minuscola. */
@media (min-width: 761px) and (max-height: 700px) {
  .condominium-manage-page > .sidebar {
    padding: 7px 7px !important;
    border-radius: 17px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 31px !important;
    height: 31px !important;
    margin: 0 !important;
    padding: 2px 5px !important;
    gap: 5px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 21px !important;
    height: 21px !important;
    flex: 0 0 21px !important;
    border-radius: 6px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* Zoom estremo: ultimo livello prima del breakpoint mobile. */
@media (min-width: 761px) and (max-height: 560px) {
  .condominium-manage-page > .sidebar {
    padding: 5px !important;
    border-radius: 14px !important;
  }

  .condominium-manage-page > .sidebar .side-link {
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 4px !important;
    gap: 4px !important;
    font-size: 9px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
  }

  .condominium-manage-page > .sidebar .sidebar-menu-icon svg {
    width: 10px !important;
    height: 10px !important;
  }
}


/* =========================================================
   V36.84 - SIDEBAR: OVERRIDE DINAMICO CALCOLATO DA JS
   Queste regole sono intenzionalmente in fondo al CSS e
   sostituiscono le soglie verticali v36.82/v36.83.
   ========================================================= */
@media (min-width: 761px) {
  #condominiumManage > .sidebar.civico-sidebar-autofit {
    padding-top: var(--civico-sidebar-pad-y, 14px) !important;
    padding-bottom: var(--civico-sidebar-pad-y, 14px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-height: var(--civico-sidebar-max-h, calc(100dvh - 88px)) !important;
    border-radius: var(--civico-sidebar-radius, 22px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
  }

  #condominiumManage > .sidebar.civico-sidebar-autofit .side-link {
    min-height: var(--civico-sidebar-row-h, 50px) !important;
    height: var(--civico-sidebar-row-h, 50px) !important;
    margin-top: calc(var(--civico-sidebar-gap, 2px) / 2) !important;
    margin-bottom: calc(var(--civico-sidebar-gap, 2px) / 2) !important;
    padding: 4px 8px !important;
    gap: 9px !important;
    border-radius: var(--civico-sidebar-link-radius, 12px) !important;
    font-size: var(--civico-sidebar-font, 14.2px) !important;
    line-height: 1.1 !important;
  }

  #condominiumManage > .sidebar.civico-sidebar-autofit .sidebar-menu-icon {
    width: var(--civico-sidebar-icon, 34px) !important;
    height: var(--civico-sidebar-icon, 34px) !important;
    flex: 0 0 var(--civico-sidebar-icon, 34px) !important;
    border-radius: 9px !important;
  }

  #condominiumManage > .sidebar.civico-sidebar-autofit .sidebar-menu-icon svg {
    width: var(--civico-sidebar-svg, 18px) !important;
    height: var(--civico-sidebar-svg, 18px) !important;
  }

  #condominiumManage > .sidebar.civico-sidebar-autofit .side-link > span:not(.sidebar-menu-icon):not(.menu-notification-badge),
  #condominiumManage > .sidebar.civico-sidebar-autofit .side-link > em {
    display: inline !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* =========================================================
   V36.86 - PULSANTE ELIMINA RISORSA
   ========================================================= */
.resource-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(176, 59, 53, 0.22);
  border-radius: 12px;
  background: rgba(176, 59, 53, 0.07);
  color: #a83c37;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.resource-delete-btn:hover {
  background: rgba(176, 59, 53, 0.12);
  border-color: rgba(176, 59, 53, 0.34);
  box-shadow: 0 6px 16px rgba(123, 43, 39, 0.08);
}

.resource-delete-btn:active {
  transform: translateY(1px);
}

.resource-delete-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(176, 59, 53, 0.10);
}

@media (max-width: 640px) {
  .resource-delete-btn {
    min-height: 44px;
    padding: 11px 15px;
    border-radius: 13px;
    font-size: 13px;
  }
}


/* =========================================================
   V36.87 - STATO ISCRIZIONI DAL PANNELLO AMMINISTRATIVO
   ========================================================= */
.role-choice.registration-closed {
  position: relative;
  opacity: .58;
  cursor: not-allowed;
  filter: saturate(.55);
  box-shadow: none !important;
}

.role-choice.registration-closed:hover,
.role-choice.registration-closed:focus-visible {
  transform: none !important;
  border-color: rgba(74, 91, 83, .18) !important;
  box-shadow: none !important;
}

.registration-availability-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f7e9eb;
  color: #a43b49;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}


/* =========================================================
   V36.90 - FLOW IOS PUSH PIU CHIARO
   Le istruzioni Home non sono più un pulsante.
   ========================================================= */
.push-ios-setup {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 19px;
  border: 1px solid rgba(34, 127, 87, .14);
  background: linear-gradient(180deg, #f4faf7 0%, #fbfdfc 100%);
}

.push-ios-setup-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.push-ios-setup-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e3f3eb;
  color: #19704d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.push-ios-setup-head strong {
  display: block;
  color: #24332d;
  font-size: 14px;
  line-height: 1.35;
}

.push-ios-setup-head small {
  display: block;
  margin-top: 4px;
  color: #718079;
  font-size: 12px;
  line-height: 1.45;
}

.push-ios-steps {
  display: grid;
  gap: 8px;
}

.push-ios-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(31, 74, 58, .07);
  color: #4e5d56;
  font-size: 12px;
  line-height: 1.4;
}

.push-ios-step b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf6f1;
  color: #217552;
  font-size: 11px;
}

.push-ios-step strong {
  color: #2f3c36;
}

.push-activation-hint {
  display: block;
  margin-top: -8px;
  padding: 0 10px;
  text-align: center;
  color: #77837d;
  font-size: 11px;
  line-height: 1.45;
}

#pushToggleBtn.is-waiting-install:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: #557067;
  background: #eaf1ee;
  border-color: #dce7e2;
  box-shadow: none;
}

@media (max-width: 640px) {
  .push-ios-setup {
    padding: 13px;
    gap: 11px;
  }

  .push-ios-setup-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .push-ios-setup-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .push-ios-step {
    padding: 6px 8px;
  }
}


/* =========================================================
   V36.91 - ACCESSO RAPIDO PANNELLO ADMIN
   ========================================================= */
.admin-home-button {
  width: min(390px, 100%);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(31, 143, 95, 0.14);
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(247, 252, 249, 0.98), rgba(240, 248, 244, 0.98));
  color: #1f4f3d;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 79, 66, 0.07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.admin-home-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 143, 95, 0.28);
  box-shadow: 0 14px 30px rgba(23, 79, 66, 0.10);
}

.admin-home-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 143, 95, 0.10), 0 14px 30px rgba(23, 79, 66, 0.10);
}

.admin-home-button-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(31, 143, 95, 0.10);
  color: #1f8f5f;
  font-size: 18px;
  font-weight: 800;
}

.admin-home-button strong,
.admin-home-button small {
  display: block;
}

.admin-home-button strong {
  font-size: 13px;
  line-height: 1.25;
}

.admin-home-button small {
  margin-top: 2px;
  color: #6e7c75;
  font-size: 11px;
  line-height: 1.3;
}

.admin-home-button-arrow {
  color: #3f765f;
  font-size: 21px;
  line-height: 1;
}

@media (max-width: 640px) {
  .admin-home-button {
    margin-top: 14px;
    grid-template-columns: 38px 1fr auto;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .admin-home-button-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}


/* =========================================================
   V36.92 - BONUS & AGEVOLAZIONI NEI BANDI
   ========================================================= */

.tender-bonus-panel {
  margin: 4px 0 18px;
  border: 1px solid #dbe8e1;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfefd 0%, #f5faf7 100%);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(31, 78, 58, .045);
}

.tender-bonus-panel[open] {
  border-color: #cfe0d6;
  box-shadow: 0 12px 34px rgba(31, 78, 58, .07);
}

.tender-bonus-summary {
  position: relative;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.tender-bonus-summary::-webkit-details-marker {
  display: none;
}

.tender-bonus-summary-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.tender-bonus-summary-chevron {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e6de;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 3px 10px rgba(31, 78, 58, .06);
  transition: transform .2s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.tender-bonus-summary-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #3f6f5a;
  border-bottom: 2px solid #3f6f5a;
  transform: translateY(-2px) rotate(45deg);
}

.tender-bonus-summary:hover .tender-bonus-summary-chevron {
  border-color: #bcd7c8;
  background: #f1faf5;
  box-shadow: 0 5px 14px rgba(31, 78, 58, .09);
}

.tender-bonus-panel[open] .tender-bonus-summary-chevron {
  transform: rotate(180deg);
}

.tender-bonus-summary-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e8f6ee;
  color: #176b46;
  font-size: 20px;
  font-weight: 800;
}

.tender-bonus-summary-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tender-bonus-summary-copy strong {
  color: #23352d;
  font-size: 14px;
  line-height: 1.3;
}

.tender-bonus-summary-copy small {
  color: #718179;
  font-size: 11px;
  line-height: 1.35;
}

.tender-bonus-summary-badge {
  padding: 6px 9px;
  border: 1px solid #d8e7df;
  border-radius: 999px;
  background: #fff;
  color: #547064;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.tender-bonus-body {
  padding: 0 16px 16px;
  border-top: 1px solid #e1ebe6;
}

.tender-bonus-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 12px;
}

.tender-bonus-intro h4 {
  margin: 4px 0 4px;
  color: #20362c;
  font-size: 16px;
  letter-spacing: -.015em;
}

.tender-bonus-intro p {
  max-width: 500px;
  margin: 0;
  color: #697c72;
  font-size: 11px;
  line-height: 1.55;
}

.tender-bonus-source-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #dce8e2;
  border-radius: 999px;
  background: rgba(255,255,255,.84);
  color: #5b7166;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.tender-bonus-source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24a269;
  box-shadow: 0 0 0 3px rgba(36,162,105,.1);
}

.tender-bonus-source-dot.warning {
  background: #d59029;
  box-shadow: 0 0 0 3px rgba(213,144,41,.12);
}

.tender-bonus-alert {
  display: grid;
  gap: 3px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #f0d9a9;
  border-radius: 13px;
  background: #fff9ed;
  color: #82642e;
  font-size: 10px;
  line-height: 1.5;
}

.tender-bonus-alert strong {
  color: #624817;
}

.tender-bonus-loading,
.tender-bonus-empty {
  padding: 18px;
  border: 1px dashed #d9e5df;
  border-radius: 15px;
  background: rgba(255,255,255,.72);
  color: #73837b;
  font-size: 11px;
  text-align: center;
}

.tender-bonus-empty.warning {
  border-color: #efd8ab;
  background: #fffaf0;
  color: #7b6232;
}

.tender-bonus-list {
  display: grid;
  gap: 9px;
}

.tender-bonus-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0;
  border: 1px solid #dfe9e4;
  border-radius: 16px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.tender-bonus-card:hover {
  border-color: #cadbd2;
}

.tender-bonus-card.selected {
  border-color: #79ba98;
  background: #f7fcf9;
  box-shadow: 0 0 0 3px rgba(47,143,97,.08);
}

.tender-bonus-card.needs-review {
  border-style: dashed;
}

.tender-bonus-pick {
  min-width: 0;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 12px 6px 12px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tender-bonus-card-check {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e5dd;
  border-radius: 10px;
  background: #edf8f2;
  color: #1d754e;
  font-size: 16px;
  font-weight: 800;
}

.tender-bonus-card.selected .tender-bonus-card-check {
  border-color: #2f8f61;
  background: #2f8f61;
  color: #fff;
}

.tender-bonus-card-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tender-bonus-card-main > strong {
  color: #263a31;
  font-size: 13px;
  line-height: 1.35;
}

.tender-bonus-card-description {
  color: #6e7f77;
  font-size: 10.5px;
  line-height: 1.5;
}

.tender-bonus-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tender-bonus-suggested,
.tender-bonus-review-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
}

.tender-bonus-suggested {
  background: #e8f6ee;
  color: #1b714a;
}

.tender-bonus-review-state.ok {
  background: #f0f4f2;
  color: #65776e;
}

.tender-bonus-review-state.warning {
  background: #fff2d9;
  color: #8a6421;
}

.tender-bonus-source-link {
  align-self: center;
  margin-right: 12px;
  padding: 7px 9px;
  border-radius: 10px;
  color: #2b7251;
  font-size: 9.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tender-bonus-source-link:hover {
  background: #edf8f2;
}

.tender-bonus-disclaimer {
  display: grid;
  gap: 2px;
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #f1f5f3;
  color: #6e7d76;
  font-size: 9.5px;
  line-height: 1.45;
}

.tender-bonus-disclaimer strong {
  color: #42564c;
}

.tender-incentive-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}

.tender-incentive-chips.compact {
  margin: 7px 0 2px;
}

.tender-incentive-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #cfe4d8;
  border-radius: 999px;
  background: #edf8f2;
  color: #286a4b;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

.tender-incentive-chip > span {
  font-weight: 900;
}

.tender-incentive-chip.needs-review {
  border-color: #efd9ad;
  background: #fff8e9;
  color: #876426;
}

.company-tender-card .tender-incentive-chips.compact {
  margin-top: 2px;
}

.company-tender-detail-meta .tender-incentive-chips {
  flex-basis: 100%;
}

@media (max-width: 760px) {
  .tender-bonus-summary {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .tender-bonus-summary-badge {
    display: none;
  }

  .tender-bonus-summary-actions {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
  }

  .tender-bonus-summary-chevron {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .tender-bonus-summary-copy {
    padding-right: 38px;
  }

  .tender-bonus-body {
    padding: 0 12px 13px;
  }

  .tender-bonus-intro {
    flex-direction: column;
    gap: 9px;
  }

  .tender-bonus-source-status {
    white-space: normal;
  }

  .tender-bonus-card {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tender-bonus-pick {
    padding: 11px;
  }

  .tender-bonus-source-link {
    margin: 0 11px 10px 52px;
    justify-self: start;
  }

  .tender-incentive-chip {
    white-space: normal;
  }
}


/* =========================================================
   V36.99 - VOCE ASSISTENZA / MALFUNZIONAMENTI APP
   Evidenziata volutamente in rosso/rosa per distinguerla
   dalle sezioni funzionali del condominio.
   ========================================================= */
.app-issue-side-link,
.company-app-support-link,
.mobile-app-support-item {
  text-decoration: none;
}

.condominium-manage-page .sidebar .app-issue-side-link {
  color: #ffd7dd;
}

.condominium-manage-page .sidebar .app-issue-side-link .app-issue-menu-icon {
  border-color: rgba(255, 171, 185, .58);
  background: linear-gradient(145deg, #fff5f6, #ffe1e6);
  color: #b92f45;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 4px 12px rgba(120, 21, 40, .12);
}

.condominium-manage-page .sidebar .app-issue-side-link:hover {
  background: rgba(255, 124, 146, .10);
  color: #ffe8ec;
}

.condominium-manage-page .sidebar .app-issue-side-link:hover .app-issue-menu-icon {
  border-color: #efabb6;
  background: #fff0f2;
  color: #a7253a;
}

.company-app-support-link {
  margin-top: 8px;
  color: #ffd6dd;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 9px;
}

.company-app-support-link .company-app-support-icon {
  border-color: rgba(255, 173, 188, .40);
  background: rgba(255, 218, 225, .13);
  color: #ffb8c4;
}

.company-app-support-link:hover {
  color: #fff0f3;
  background: rgba(255, 91, 119, .09);
}

@media (max-width: 760px) {
  .mobile-app-support-item {
    border-color: #f0c5cd;
    background: linear-gradient(135deg, #fff7f8, #fff0f2);
    color: #7f2837;
  }

  .mobile-app-support-item .mobile-app-support-icon {
    background: #ffe2e7;
    color: #b52c42;
    border: 1px solid #f1c1ca;
    font-size: 18px;
    font-weight: 900;
  }

  .mobile-app-support-item strong {
    color: #982c3e;
  }

  .mobile-app-support-item small {
    color: #a66a74;
  }

  .mobile-app-support-item > b {
    color: #c76a7a;
  }
}

/* =========================================================
   V37.01 - ASSEMBLEE: AGGIUNGI AL CALENDARIO SOLO MOBILE
   ========================================================= */
.assembly-mobile-calendar-action {
  display: none;
  margin: -8px 0 24px;
  padding: 14px;
  border: 1px solid #dce9e3;
  border-radius: 14px;
  background: #f7fbf9;
}

.assembly-mobile-calendar-action.is-visible {
  display: grid;
  gap: 8px;
}

.assembly-mobile-calendar-action button {
  width: 100%;
  min-height: 46px;
}

.assembly-mobile-calendar-action small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}


/* =========================================================
   V37.02 - HERO TARGHETTA SCELTA CONDOMINIO
   ========================================================= */


/* =========================================================
   V37.06 - LINK PUBBLICO "COS'È CIVICO+?"
   ========================================================= */
.apple-about-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 17px auto 0;
  padding: 8px 5px;
  color: #53665f;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 79, 66, .22);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.apple-about-link:hover {
  color: #174f43;
  border-color: rgba(23, 79, 66, .55);
  transform: translateY(-1px);
}
.apple-about-link:focus-visible {
  outline: 3px solid rgba(31,143,95,.14);
  outline-offset: 3px;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .apple-about-link { margin-top: 14px; font-size: 13.5px; }
}

/* =========================================================
   V37.07 - PROPRIETARI NON REGISTRATI
   ========================================================= */
.condo-plaque-invite-stack {
  display: grid;
  gap: 6px;
  min-width: 178px;
}

.condo-plaque-invite-stack > button {
  width: 100%;
}

.condo-plaque-manual-owner {
  min-height: 36px !important;
  border: 1px solid #d7e5de;
  background: #f7fbf9;
  color: #315f4d;
  box-shadow: none;
  font-size: 9.5px !important;
}

.condo-plaque-manual-owner:hover {
  border-color: #bdd4c9;
  background: #f0f8f4;
  box-shadow: 0 7px 18px rgba(28, 62, 46, .06);
}

.manual-owners-dialog {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: 760px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: transparent;
}

.manual-owners-dialog::backdrop {
  background: rgba(22, 31, 27, .34);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.manual-owners-card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(19, 39, 31, .18);
  scrollbar-width: thin;
  scrollbar-color: #b7c2bd transparent;
}

.manual-owners-card::-webkit-scrollbar {
  width: 8px;
}

.manual-owners-card::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b7c2bd;
}

.manual-owners-head {
  align-items: flex-start;
}

.manual-owners-subtitle {
  margin: 4px 0 0;
  color: #7a8580;
  font-size: 13px;
}

.manual-owner-info {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  margin: 20px 0 16px;
  padding: 13px 14px;
  border: 1px solid #e4ebe7;
  border-radius: 16px;
  background: #f7faf8;
}

.manual-owner-info > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e9f4ee;
  color: #216347;
  font-size: 13px;
  font-weight: 800;
}

.manual-owner-info p {
  margin: 1px 0 0;
  color: #66736d;
  font-size: 11px;
  line-height: 1.55;
}

.manual-owner-info strong {
  color: #33483f;
}

.manual-owner-form {
  padding: 20px;
  border: 1px solid #e6ebe8;
  border-radius: 20px;
  background: #fbfcfb;
}

.manual-owner-form .primary.full {
  margin-top: 4px;
}

.manual-owner-privacy-box {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 14px;
  border: 1px solid #dce7e1;
  border-radius: 16px;
  background: #f6faf8;
}

.manual-owner-form label.manual-owner-privacy-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  color: #4f6058;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.55;
  cursor: pointer;
}

.manual-owner-privacy-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #2f6e52;
  cursor: pointer;
}

.manual-owner-privacy-link {
  width: fit-content;
  color: #276247;
  font-size: 10.5px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.manual-owner-privacy-link:hover {
  color: #174f36;
}

.manual-owner-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 12px;
}

.manual-owner-list-head h4 {
  margin: 1px 0 0;
  color: #26342e;
  font-size: 20px;
}

.manual-owners-list {
  display: grid;
  gap: 9px;
}

.manual-owner-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #e5eae7;
  border-radius: 17px;
  background: #fff;
}

.manual-owner-card-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef6f2;
  color: #326650;
  font-size: 12px;
  font-weight: 800;
}

.manual-owner-card-copy {
  min-width: 0;
}

.manual-owner-card-copy strong,
.manual-owner-card-copy small {
  display: block;
}

.manual-owner-card-copy strong {
  color: #28352f;
  font-size: 13px;
}

.manual-owner-card-copy small {
  margin-top: 3px;
  color: #7a8580;
  font-size: 10px;
  line-height: 1.4;
}

.manual-owner-row {
  background: linear-gradient(90deg, rgba(246, 250, 248, .8), rgba(255, 255, 255, 0));
}

.manual-owner-avatar {
  background: #eef6f2 !important;
  color: #326650 !important;
}

.manual-owner-role {
  background: #edf6f1 !important;
  color: #2b654c !important;
}

.manual-owner-status {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 4px 7px;
  border: 1px solid #eadccf;
  border-radius: 999px;
  background: #fff7f0;
  color: #8b6042;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
}

.building-info-manual-owner-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #e5d8ca;
  border-radius: 999px;
  background: #fff7ef;
  color: #8b6042;
  font-size: 9px;
  font-weight: 750;
}

@media (max-width: 760px) {
  .condo-plaque-invite-stack {
    width: 100%;
    min-width: 0;
  }

  .condo-plaque-manual-owner {
    min-height: 39px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
    font-size: 8.6px !important;
    white-space: normal !important;
    line-height: 1.15;
  }

  .manual-owners-dialog {
    width: calc(100vw - 16px) !important;
  }

  .manual-owners-card {
    max-height: calc(100dvh - 16px);
    padding: 22px 18px;
    border-radius: 24px;
  }

  .manual-owner-form .two-cols {
    grid-template-columns: 1fr;
  }

  .manual-owner-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .manual-owner-card > button {
    grid-column: 2;
    justify-self: start;
  }
}


/* =========================================================
   V37.08 - RIASSIGNAMENTO AMMINISTRATIVO TURNI
   ========================================================= */
.resource-admin-swap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: rgba(31, 143, 95, 0.28);
  background: #eef7f2;
  color: #176b4b;
  font-weight: 750;
}

.resource-admin-swap:hover {
  border-color: rgba(31, 143, 95, 0.46);
  background: #e5f3eb;
  color: #0f5a3e;
}

.resource-admin-swap span {
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 760px) {
  .resource-admin-swap {
    min-height: 34px;
    padding-inline: 10px;
  }
}

/* V37.13 - inserimento manuale letture per proprietari non registrati */
.water-manual-reading-add {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(36, 104, 70, .24);
  border-radius: 9px;
  background: #eef7f1;
  color: #236947;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.water-manual-reading-add:hover {
  background: #e3f2e8;
  border-color: rgba(36, 104, 70, .38);
  transform: translateY(-1px);
}
.water-manual-reading-add:focus-visible {
  outline: 3px solid rgba(36, 104, 70, .18);
  outline-offset: 2px;
}
.water-manual-reading-dialog .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.water-manual-reading-unit {
  margin: 0 0 4px;
  font-weight: 700;
}
.water-manual-reading-previous {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 700px) {
  .water-manual-reading-add { width: 32px; height: 32px; }
}

/* ======================================================================
   v37.15 - Turni & risorse: layout anti-overflow a qualsiasi zoom
   I pannelli reagiscono alla larghezza reale disponibile, non soltanto
   alla larghezza della viewport. In questo modo date, orari e altri campi
   non possono invadere il pannello adiacente quando aumenta lo zoom.
   ====================================================================== */
.resources-workspace,
.resource-detail,
.resource-detail-head,
.resource-title-wrap,
.resource-title-wrap > div,
.booking-resource-grid,
.resource-booking-form,
.resource-bookings-panel,
.resource-booking-fields,
.resource-booking-fields > label,
.resource-bookings-list,
.resource-booking-item,
.resource-booking-date,
.resource-booking-copy,
.resource-booking-status {
  min-width: 0;
}

/* La larghezza del dettaglio diventa il riferimento responsive della sezione. */
.resource-detail {
  container-type: inline-size;
}

/* Evita che il contenuto intrinseco di date/time allarghi le colonne grid. */
.booking-resource-grid {
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  width: 100%;
  max-width: 100%;
}

.resource-booking-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
}

.resource-booking-form,
.resource-bookings-panel,
.resource-no-unit {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.resource-booking-form label,
.resource-booking-form input,
.resource-booking-form select {
  min-width: 0;
  max-width: 100%;
}

.resource-booking-form input[type="date"],
.resource-booking-form input[type="time"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.resource-title-wrap p,
.resource-booking-copy,
.resource-booking-copy strong,
.resource-booking-copy span,
.resource-booking-copy small {
  overflow-wrap: anywhere;
}

/* Fallback per browser senza container queries e per viewport ridotte/zoomate. */
@media (max-width: 1280px) {
  .booking-resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .resource-booking-fields {
    grid-template-columns: 1fr;
  }
}

/* Responsive sulla larghezza REALE del pannello: funziona anche con zoom elevato. */
@container (max-width: 760px) {
  .booking-resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-booking-item {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .resource-booking-status {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
}

@container (max-width: 500px) {
  .resource-booking-fields,
  .resource-booking-item {
    grid-template-columns: 1fr;
  }

  .resource-booking-status {
    grid-column: auto;
  }

  .resource-detail-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================================================
   V37.16 - SELETTORE CONDOMINIO: FIT VERTICALE ANTI-ZOOM
   ========================================================= */
/*
 * In modalità selettore il body resta volutamente bloccato per impedire
 * che altre view risultino raggiungibili sotto la schermata corrente.
 * Il contenuto del selettore viene quindi organizzato come una colonna
 * alta esattamente quanto il viewport: l'elenco condomini occupa tutto
 * lo spazio residuo e diventa l'unica area a scorrimento.
 */
@media (min-width: 761px) {
  body.condo-selector-mode #condominiumSelector.active {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: clamp(14px, 3vh, 28px) 40px clamp(12px, 2.6vh, 24px);
    overflow: hidden;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-top {
    flex: 0 0 auto;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-content {
    width: min(980px, 100%);
    flex: 1 1 auto;
    min-height: 0;
    margin: clamp(14px, 4vh, 42px) auto 0;
    display: flex;
    flex-direction: column;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-heading {
    flex: 0 1 auto;
    min-height: 0;
    margin: 0 auto clamp(12px, 2.5vh, 26px);
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero {
    padding: clamp(14px, 2.7vh, 28px) 34px clamp(13px, 2.3vh, 24px);
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero h1 {
    margin: clamp(7px, 1.5vh, 14px) 0 clamp(6px, 1.2vh, 14px);
    font-size: clamp(34px, min(6vw, 8vh), 66px);
    line-height: 1;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero p {
    font-size: clamp(14px, 2vh, 18px);
    line-height: 1.45;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button {
    margin-top: clamp(8px, 1.7vh, 18px);
  }

  body.condo-selector-mode #condominiumSelector #selectorCondoArea:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    flex: 0 0 auto;
    margin-bottom: clamp(7px, 1.5vh, 16px);
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-grid {
    flex: 1 1 auto;
    min-height: 64px;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

/* Quando lo zoom riduce molto l'altezza CSS del viewport, compattiamo
 * progressivamente gli elementi non essenziali senza toccare la leggibilità
 * delle righe dei condomini. */
@media (min-width: 761px) and (max-height: 700px) {
  body.condo-selector-mode #condominiumSelector .condo-selector-shell {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-logo {
    width: 132px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-content {
    margin-top: 12px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-heading {
    margin-bottom: 10px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero {
    padding: 11px 28px 10px;
    border-radius: 24px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero::before {
    inset: 7px;
    border-radius: 18px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero .eyebrow {
    padding: 4px 10px;
    font-size: 10px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero h1 {
    margin: 6px 0 5px;
    font-size: clamp(32px, 7.2vh, 46px);
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero p {
    font-size: 13px;
    line-height: 1.3;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button {
    margin-top: 7px;
    grid-template-columns: 34px 1fr auto;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 14px;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 15px;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button strong {
    font-size: 12px;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button small {
    font-size: 10px;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    margin-bottom: 7px;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-grid {
    gap: 6px;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-card {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
  }
}

/* Fallback di sicurezza per zoom estremi: se il browser passa al layout
 * mobile, la view resta scrollabile come già previsto, ma l'elenco non viene
 * mai tagliato dal vecchio blocco del body. */
@media (max-width: 760px) {
  body.condo-selector-mode #condominiumSelector.active {
    overflow-y: auto !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-grid {
    overflow-y: auto;
  }
}


/* =========================================================
   V37.28 - SELETTORE CONDOMINIO ANTI-SOVRAPPOSIZIONE CON ZOOM ALTO
   ========================================================= */
body.condo-selector-mode #condominiumSelector .condo-selector-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

body.condo-selector-mode #condominiumSelector .admin-home-button {
  width: min(560px, 100%);
  max-width: 100%;
  margin-top: 0;
}

body.condo-selector-mode #condominiumSelector #selectorCondoArea {
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

body.condo-selector-mode #condominiumSelector .selector-actions-row {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

body.condo-selector-mode #condominiumSelector .selector-actions-row > span {
  flex: 1 1 220px;
  min-width: 0;
}

body.condo-selector-mode #condominiumSelector #selectorCreateCondoBtn {
  flex: 0 0 auto;
  max-width: 100%;
}

body.condo-selector-mode #condominiumSelector .selector-condo-grid {
  margin-top: 0;
}

body.condo-selector-mode #condominiumSelector .selector-condo-card {
  padding: 11px 14px !important;
}

body.condo-selector-mode #condominiumSelector .selector-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.condo-selector-mode #condominiumSelector .selector-card-role {
  margin: 0;
}

@media (min-width: 761px) and (max-width: 1180px),
       (min-width: 761px) and (max-height: 760px) {
  body.condo-selector-mode #condominiumSelector .condo-selector-shell {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-content {
    margin-top: 18px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-heading {
    gap: 10px;
    margin-bottom: 12px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero {
    padding: 16px 22px 15px;
    border-radius: 26px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero::before {
    inset: 8px;
    border-radius: 20px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero .eyebrow {
    padding: 5px 10px;
    font-size: 10px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero h1 {
    margin: 8px 0 7px;
    font-size: clamp(34px, 4.8vw, 54px);
    line-height: 1.02;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero p {
    font-size: 14px;
    line-height: 1.4;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button {
    width: min(520px, 100%);
    padding: 10px 14px;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    margin-bottom: 10px;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.condo-selector-mode #condominiumSelector #selectorCreateCondoBtn {
    align-self: flex-end;
  }
}


/* =========================================================
   V37.29 - FIX DEFINITIVO COMPRESSIONE VERTICALE CON ZOOM ALTO
   Il contenitore elenco e' scrollabile: le singole righe NON devono
   restringersi per cercare di entrare tutte nello spazio disponibile.
   ========================================================= */
body.condo-selector-mode #condominiumSelector .condo-selector-heading {
  flex: 0 0 auto !important;
  min-height: auto !important;
}

body.condo-selector-mode #condominiumSelector #selectorCondoArea:not(.hidden) {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: hidden;
}

body.condo-selector-mode #condominiumSelector .selector-actions-row {
  flex: 0 0 auto !important;
}

body.condo-selector-mode #condominiumSelector .selector-condo-grid {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  align-content: flex-start;
}

body.condo-selector-mode #condominiumSelector .selector-condo-card {
  flex: 0 0 auto !important;
  min-height: 64px !important;
  height: auto !important;
  overflow: hidden;
}

body.condo-selector-mode #condominiumSelector .selector-card-symbol,
body.condo-selector-mode #condominiumSelector .selector-card-copy,
body.condo-selector-mode #condominiumSelector .selector-card-enter {
  flex-shrink: 0;
}

body.condo-selector-mode #condominiumSelector .selector-card-copy {
  flex: 1 1 auto !important;
  min-width: 0;
}

body.condo-selector-mode #condominiumSelector .selector-card-role,
body.condo-selector-mode #condominiumSelector .selector-card-copy h3,
body.condo-selector-mode #condominiumSelector .selector-card-copy p {
  position: static !important;
  transform: none !important;
}

@media (min-width: 761px) and (max-height: 700px) {
  body.condo-selector-mode #condominiumSelector .selector-condo-card {
    min-height: 58px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-card-symbol {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  body.condo-selector-mode #condominiumSelector .selector-card-copy h3 {
    font-size: 15px;
    line-height: 1.15;
  }

  body.condo-selector-mode #condominiumSelector .selector-card-copy p {
    font-size: 11px;
    line-height: 1.2;
  }

  body.condo-selector-mode #condominiumSelector .selector-card-role {
    font-size: 8px;
    line-height: 1.1;
  }
}

@media (min-width: 761px) and (max-height: 560px) {
  body.condo-selector-mode #condominiumSelector .condo-selector-top {
    min-height: 42px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-logo {
    width: 112px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-content {
    margin-top: 7px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-heading {
    gap: 5px;
    margin-bottom: 6px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero {
    padding: 7px 18px;
    border-radius: 18px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero::before {
    inset: 5px;
    border-radius: 14px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero .eyebrow {
    display: none;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero h1 {
    margin: 1px 0 3px;
    font-size: 30px;
  }

  body.condo-selector-mode #condominiumSelector .condo-selector-hero p {
    font-size: 11px;
    line-height: 1.2;
  }

  body.condo-selector-mode #condominiumSelector .admin-home-button {
    min-height: 40px;
    padding: 5px 9px;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    margin-bottom: 5px;
  }
}


/* =========================================================
   V37.30 - FIX MOBILE ELENCO CONDOMINI INVISIBILE
   La v37.29 usa flex: 1 1 0 per il contenitore dell'elenco, corretto
   su desktop ma su mobile puo' collassare a zero altezza. Su smartphone
   ripristiniamo un'altezza reale e rendiamo scrollabile SOLO la lista.
   ========================================================= */
@media (max-width: 760px) {
  body.condo-selector-mode #condominiumSelector .condo-selector-content {
    display: block !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  body.condo-selector-mode #condominiumSelector #selectorCondoArea:not(.hidden) {
    display: block !important;
    flex: none !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    width: 100% !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    display: flex !important;
    flex: none !important;
    margin-bottom: 10px !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-grid {
    display: flex !important;
    flex-direction: column !important;
    flex: none !important;
    width: 100% !important;
    min-height: 180px !important;
    height: auto !important;
    max-height: min(46dvh, 360px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 2px 5px 2px 2px !important;
    gap: 8px !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-card {
    flex: 0 0 auto !important;
    min-height: 64px !important;
  }
}


/* =========================================================
   V37.31 - FIX MOBILE REALE ELENCO CONDOMINI
   La regola desktop V37.28 assegnava flex-basis:220px al contatore.
   Su mobile la actions-row torna in colonna e quello spazio diventava
   altezza verticale, spingendo il pulsante e l'elenco molto più in basso.
   Qui azzeriamo esplicitamente i flex-basis ereditati e manteniamo il
   blocco azioni compatto, così la lista segue subito sotto.
   ========================================================= */
@media (max-width: 760px) {
  body.condo-selector-mode #condominiumSelector #selectorCondoArea:not(.hidden) {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 10px !important;
    margin: 0 0 14px !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-actions-row > span {
    display: block !important;
    flex: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    text-align: center;
  }

  body.condo-selector-mode #condominiumSelector #selectorCreateCondoBtn {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: none !important;
    align-self: center !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 46px;
    margin: 0 !important;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-grid {
    display: flex !important;
    flex-direction: column !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 230px !important;
    max-height: min(42dvh, 340px) !important;
    margin: 0 !important;
    padding: 2px 5px 2px 2px !important;
    gap: 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.condo-selector-mode #condominiumSelector .selector-condo-card {
    flex: 0 0 auto !important;
    min-height: 64px !important;
  }
}

/* =========================================================
   V37.35 - DISABILITA CONDOMINIO + SUBENTRO AMMINISTRATORE
   ========================================================= */
.condo-plaque-delete {
  min-height: 36px !important;
  border: 1px solid #efd1d4;
  background: #fff7f7;
  color: #a64149;
  box-shadow: none;
  font-size: 9.5px !important;
}

.condo-plaque-delete:hover {
  border-color: #e3b8bd;
  background: #fff0f1;
  box-shadow: 0 7px 18px rgba(126, 42, 51, .06);
}

.manager-transfer-dialog-body {
  width: min(620px, calc(100vw - 32px));
  box-sizing: border-box;
}

.manager-transfer-warning {
  margin: 16px 0;
  padding: 14px 15px;
  border: 1px solid #dce8e2;
  border-radius: 16px;
  background: #f5faf7;
  color: #52645b;
  font-size: 12px;
  line-height: 1.55;
}

.manager-transfer-icon {
  color: #2e6b54;
  background: #edf7f2;
}

@media (max-width: 760px) {
  .condo-plaque-delete {
    min-height: 39px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
    font-size: 8.6px !important;
    white-space: normal !important;
    line-height: 1.15;
  }

  .manager-transfer-dialog-body {
    width: calc(100vw - 16px);
  }
}


/* =========================================================
   V37.36 - DIALOG SUBENTRO AMMINISTRATORE PIÙ LEGGIBILE
   ========================================================= */
.manager-transfer-dialog-body {
  width: min(720px, calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px;
  scrollbar-width: thin;
  scrollbar-color: #bcc9c3 transparent;
}

.manager-transfer-dialog-body::-webkit-scrollbar {
  width: 8px;
}

.manager-transfer-dialog-body::-webkit-scrollbar-thumb {
  background: #bcc9c3;
  border-radius: 999px;
}

.manager-transfer-dialog-body .dialog-head {
  gap: 14px;
}

.manager-transfer-dialog-body .dialog-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.manager-transfer-dialog-body .dialog-head h3 {
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -.03em;
  word-break: break-word;
}

.manager-transfer-dialog-body .dialog-copy,
.manager-transfer-dialog-body .invite-note,
.manager-transfer-warning {
  overflow-wrap: anywhere;
}

.manager-transfer-warning {
  margin: 18px 0;
}

.manager-transfer-dialog-body .copy-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

.manager-transfer-dialog-body .copy-link-box input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #d9e3de;
  border-radius: 16px;
  box-sizing: border-box;
  font-size: 16px;
}

.manager-transfer-dialog-body .copy-link-box .primary {
  min-width: 138px;
  align-self: stretch;
}

.manager-transfer-dialog-body .invite-note {
  display: block;
  margin-top: 14px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .manager-transfer-dialog-body {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 22px 18px;
    border-radius: 24px;
  }

  .manager-transfer-dialog-body .dialog-head h3 {
    font-size: clamp(24px, 7.2vw, 30px);
    margin-top: 4px;
  }

  .manager-transfer-dialog-body .dialog-copy {
    font-size: 15px;
    line-height: 1.6;
  }

  .manager-transfer-warning {
    padding: 14px;
    font-size: 13px;
    line-height: 1.55;
  }

  .manager-transfer-dialog-body .copy-link-box {
    grid-template-columns: 1fr;
  }

  .manager-transfer-dialog-body .copy-link-box .primary {
    width: 100%;
    min-width: 0;
  }
}


/* =========================================================
   V37.37 - CAMPI DATA/ORA VOTAZIONI + STILE QUARTI D'ORA
   Ripristina lo stile dei controlli Civico+ creati da app.js e nasconde
   realmente l'input datetime-local nativo usato soltanto per il submit.
   ========================================================= */
.civico-quarter-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
}

.civico-quarter-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 6px;
}

.civico-quarter-control-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.civico-quarter-time-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.civico-quarter-select,
.civico-quarter-date {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid #dce4df;
  border-radius: 13px;
  background: #fbfcfb;
  color: #29362f;
  padding: 0 12px;
  outline: none;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.civico-quarter-select:focus,
.civico-quarter-date:focus {
  border-color: #79a28d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(39,108,76,.08);
}

.civico-quarter-separator {
  color: #7d8983;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

/* Votazioni: i due blocchi Apertura/Chiusura restano puliti e simmetrici. */
.poll-dates-grid > label {
  min-width: 0;
}

.poll-dates-grid .civico-quarter-control {
  margin-top: 0;
}

.poll-dates-grid .civico-quarter-control-datetime {
  grid-template-columns: minmax(0, 1.3fr) minmax(138px, .9fr);
  gap: 8px;
}

.poll-dates-grid .civico-quarter-date,
.poll-dates-grid .civico-quarter-select {
  min-height: 46px;
  height: 46px;
  padding: 0 11px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
}

.poll-dates-grid .civico-quarter-time-group {
  gap: 4px;
}

@media (max-width: 760px) {
  .civico-quarter-control-datetime,
  .poll-dates-grid .civico-quarter-control-datetime {
    grid-template-columns: minmax(0, 1fr);
  }

  .poll-dates-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .poll-dates-grid .civico-quarter-date,
  .poll-dates-grid .civico-quarter-select {
    min-height: 48px;
    height: 48px;
    font-size: 16px;
  }
}


/* =========================================================
   V37.39 - AZIONI CONDOMINIO UNIFORMI PC + MOBILE
   ========================================================= */

/*
 * I quattro comandi del MANAGER diventano una sequenza coerente.
 * Su desktop: 4 pulsanti affiancati, tutti della stessa larghezza.
 * Su mobile: griglia 2x2 con "Elimina condominio" sotto "Modifica".
 */
.condo-plaque-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  gap: 8px;
  padding-top: 4px;
}

/* Il wrapper storico non deve più creare una colonna separata. */
.condo-plaque-actions > .condo-plaque-invite-stack:not(.hidden) {
  display: contents;
}

.condo-plaque-actions > button,
.condo-plaque-actions > .condo-plaque-invite-stack > button {
  width: 100% !important;
  min-width: 0;
  min-height: 44px !important;
}

@media (max-width: 760px) {
  .mobile-condo-identity-plaque .condo-plaque-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-condo-identity-plaque
  .condo-plaque-actions > button,
  .mobile-condo-identity-plaque
  .condo-plaque-actions > .condo-plaque-invite-stack > button {
    min-height: 46px !important;
  }

  /* Riga 1: Modifica | Invita condomini */
  #mobileManageEditCondoBtn {
    grid-column: 1;
    grid-row: 1;
  }

  #mobileManageInviteBtn {
    grid-column: 2;
    grid-row: 1;
  }

  /* Riga 2: Elimina condominio | Proprietario non registrato */
  #mobileManageDeleteCondoBtn {
    grid-column: 1;
    grid-row: 2;
  }

  #mobileManageManualOwnersBtn {
    grid-column: 2;
    grid-row: 2;
  }
}

/* =========================================================
   V37.41 - DIALOG REGOLE: AZIONI SEMPRE VISIBILI
   ========================================================= */
#ruleDialog {
  max-height: calc(100dvh - 24px) !important;
  overflow: hidden !important;
}

#ruleDialog .rule-modal-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px) !important;
  overflow: hidden !important;
}

#ruleDialog .rule-modal-card .modal-head {
  flex: 0 0 auto;
}

#ruleDialog .rule-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-right: -4px;
  scrollbar-width: thin;
  scrollbar-color: #c3cec8 transparent;
}

#ruleDialog .rule-modal-scroll::-webkit-scrollbar {
  width: 7px;
}

#ruleDialog .rule-modal-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c3cec8;
}

#ruleDialog .rule-modal-scroll > label {
  display: block;
  margin-bottom: 15px;
}

#ruleDialog .rule-modal-scroll > .civico-toggle-row {
  display: flex !important;
  margin-bottom: 0;
}

#ruleDialog .rule-modal-actions {
  flex: 0 0 auto;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7ece9;
  background: #fff;
}

@media (max-width: 760px) {
  #ruleDialog {
    max-height: calc(100dvh - 12px) !important;
  }

  #ruleDialog .rule-modal-card {
    max-height: calc(100dvh - 12px) !important;
    padding: 22px 18px 18px;
  }

  #ruleDialog .rule-modal-card .modal-head {
    margin-bottom: 16px;
  }

  #ruleDialog .rule-modal-actions {
    margin-top: 14px;
    padding-top: 14px;
  }
}


/* =========================================================
   V37.42 - ACCETTAZIONI LEGALI IN REGISTRAZIONE
   ========================================================= */
.registration-legal-card {
  margin: 18px 0 4px;
  padding: 18px;
  border: 1px solid #e2e8e5;
  border-radius: 20px;
  background: #fbfdfc;
  box-sizing: border-box;
}

.registration-legal-heading {
  margin-bottom: 14px;
}

.registration-legal-heading strong,
.registration-legal-heading span {
  display: block;
}

.registration-legal-heading strong {
  color: #26342e;
  font-size: 14px;
  font-weight: 700;
}

.registration-legal-heading span {
  margin-top: 4px;
  color: #76817c;
  font-size: 11.5px;
  line-height: 1.45;
}

.apple-step[data-entry-step="register"] .apple-form label.registration-legal-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 11px 0;
  border-top: 1px solid #edf1ef;
  color: #3c4742;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.apple-step[data-entry-step="register"] .apple-form label.registration-legal-check:first-of-type {
  border-top: 0;
}

.apple-step[data-entry-step="register"] .apple-form .registration-legal-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  min-width: 19px;
  min-height: 19px;
  margin: 1px 0 0;
  padding: 0;
  border: 1.5px solid #b9c5bf;
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: none;
  cursor: pointer;
}

.apple-step[data-entry-step="register"] .apple-form .registration-legal-check input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease;
}

.apple-step[data-entry-step="register"] .apple-form .registration-legal-check input[type="checkbox"]:checked {
  border-color: #2f7459;
  background: #2f7459;
}

.apple-step[data-entry-step="register"] .apple-form .registration-legal-check input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}

.apple-step[data-entry-step="register"] .apple-form .registration-legal-check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(47,116,89,.12);
}

.registration-legal-check > span {
  min-width: 0;
}

.registration-legal-check a {
  color: #225f49;
  font-weight: 700;
  text-decoration: none;
}

.registration-legal-check a:hover {
  text-decoration: underline;
}

.registration-legal-check small {
  display: block;
  margin-top: 3px;
  color: #7a8580;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.45;
}

.registration-role-declaration {
  margin-top: 2px !important;
}

@media (max-width: 620px) {
  .registration-legal-card {
    padding: 15px;
    border-radius: 18px;
  }

  .apple-step[data-entry-step="register"] .apple-form label.registration-legal-check {
    font-size: 12px;
  }
}


/* =========================================================
   V37.43 - RUOLO PORTINAIO + INVITO AMMINISTRATORE
   ========================================================= */
.role-choice-person-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 940px;
}

.role-choice-person-row .role-choice-compact {
  min-width: 0;
}

.doorman-invite-icon {
  color: #2e6b54;
  background: #edf7f2;
}

.doorman-invite-dialog-body {
  /* Stessa logica della finestra "Invita condomini": il contenuto
     deve rispettare la larghezza del <dialog> e non generare overflow. */
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 980px) and (min-width: 761px) {
  .role-choice-person-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 650px;
  }
}

@media (max-width: 760px) {
  .role-choice-person-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .doorman-invite-dialog-body {
    width: auto;
    max-width: 100%;
  }
}


/* =========================================================
   V37.44 - MENU ACCOUNT SEMPRE CONTENUTO NEL VIEWPORT
   ========================================================= */
/*
 * Il menu personale può contenere molte sezioni (account, notifiche,
 * sicurezza, inquilini, amministrazione, portinaio, ecc.). A zoom elevato
 * l'altezza CSS disponibile diminuisce: limitiamo quindi il pannello alla
 * viewport e facciamo scorrere SOLO il contenuto del menu.
 */
.account-menu {
  max-height: calc(100dvh - 96px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b9c7c1 transparent;
}

@supports not (height: 100dvh) {
  .account-menu {
    max-height: calc(100vh - 96px) !important;
  }
}

.account-menu::-webkit-scrollbar {
  width: 7px;
}

.account-menu::-webkit-scrollbar-track {
  background: transparent;
}

.account-menu::-webkit-scrollbar-thumb {
  background: #b9c7c1;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

/* Con viewport molto basso (tipico dello zoom alto) compattiamo leggermente
   le righe, senza cambiare struttura o nascondere funzioni. */
@media (min-width: 621px) and (max-height: 720px) {
  .account-menu {
    max-height: calc(100dvh - 84px) !important;
    padding: 6px !important;
  }

  .account-menu-profile {
    padding: 9px 11px 10px;
    margin-bottom: 4px;
  }

  .account-menu-section {
    margin-top: 3px;
    padding-top: 5px;
  }

  .account-menu-section-label {
    padding: 4px 10px 3px;
  }

  .account-menu-section .account-menu-item,
  .account-menu-item {
    min-height: 52px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .account-menu-icon,
  .tenant-manual-icon,
  .tenant-invite-icon {
    width: 32px;
    height: 32px;
  }
}

/* Anche nel selettore condominio il menu deve restare contenuto nella
   viewport a qualunque livello di zoom. */
.selector-account-menu {
  max-height: calc(100dvh - 96px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}


/* =========================================================
   V37.45 - INVITO PORTINAIO: STESSA LOGICA INVITO CONDOMINI
   ========================================================= */
#doormanInviteLinkDialog {
  overflow: hidden;
}

#doormanInviteLinkDialog .doorman-invite-dialog-body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

#doormanInviteLinkDialog .dialog-head > div,
#doormanInviteLinkDialog .dialog-copy,
#doormanInviteLinkDialog .invite-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

#doormanInviteLinkDialog .copy-link-box {
  min-width: 0;
  max-width: 100%;
}

#doormanInviteLinkDialog .copy-link-box input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 620px) {
  #doormanInviteLinkDialog .copy-link-box {
    grid-template-columns: 1fr;
  }

  #doormanInviteLinkDialog .copy-link-box .primary {
    width: 100%;
  }
}

/* =========================================================
   V37.46 - CENTRO NOTIFICHE ACCOUNT
   ========================================================= */
.notification-center-wrap {
  position: relative;
  z-index: 2100;
  flex: 0 0 auto;
}

.notification-bell-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #e1e9e5;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  color: #315e50;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(28,57,46,.05);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.notification-bell-button:hover,
.notification-center-wrap.is-open .notification-bell-button {
  background: #f3f8f5;
  border-color: #cdded6;
}

.notification-bell-button:active {
  transform: scale(.97);
}

.notification-bell-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b83f48;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
}

.notification-center-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(410px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  display: none;
  overflow: hidden;
  border: 1px solid #dde6e1;
  border-radius: 24px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 24px 70px rgba(24,49,40,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.notification-center-wrap.is-open .notification-center-popover {
  display: block;
}

.notification-center-head {
  min-height: 76px;
  padding: 17px 18px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf1ef;
  box-sizing: border-box;
}

.notification-center-head > div {
  min-width: 0;
}

.notification-center-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #80908a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.notification-center-head strong {
  color: #203229;
  font-size: 20px;
  letter-spacing: -.02em;
}

.notification-mark-all {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #2f725a;
  padding: 4px 0;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.notification-preview-list {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c2cdc8 transparent;
}

.notification-preview-list::-webkit-scrollbar,
.notifications-all-list::-webkit-scrollbar {
  width: 7px;
}

.notification-preview-list::-webkit-scrollbar-thumb,
.notifications-all-list::-webkit-scrollbar-thumb {
  background: #c2cdc8;
  border-radius: 999px;
}

.account-notification-item {
  width: 100%;
  min-height: 78px;
  padding: 13px 15px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.account-notification-item:hover {
  background: #f8fbf9;
}

.account-notification-item.is-unread {
  background: #f2f8f5;
}

.account-notification-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf4ef;
  font-size: 18px;
}

.account-notification-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}

.account-notification-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.account-notification-title-row strong {
  min-width: 0;
  color: #25372f;
  font-size: 12.5px;
  line-height: 1.25;
  white-space: normal;
}

.account-notification-unread-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #19875f;
}

.account-notification-message {
  display: block;
  margin-top: 3px;
  color: #53645d;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-notification-copy small {
  display: block;
  margin-top: 5px;
  color: #8a9691;
  font-size: 9.5px;
  line-height: 1.3;
}

.account-notification-arrow {
  align-self: center;
  flex: 0 0 auto;
  color: #91a099;
  font-size: 20px;
}

.notification-empty {
  padding: 32px 18px;
  color: #84918b;
  font-size: 12px;
  text-align: center;
}

.notification-load-all {
  width: calc(100% - 24px);
  min-height: 44px;
  margin: 12px;
  border: 1px solid #cfe0d8;
  border-radius: 14px;
  background: #f2f8f5;
  color: #245f4b;
  font: inherit;
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
}

.notification-load-all:hover {
  background: #e9f4ef;
}

.selector-notification-popover {
  right: 0;
}

.notifications-page {
  min-height: 100vh;
  background: #f7f9f8;
}

.notifications-page.active {
  display: block;
}

.notifications-page-shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 56px;
  box-sizing: border-box;
}

.notifications-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.notifications-back-button,
.notifications-read-all-button {
  min-height: 42px;
  border: 1px solid #dce5e1;
  border-radius: 14px;
  background: #fff;
  color: #31574a;
  padding: 0 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 720;
  cursor: pointer;
}

.notifications-back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.notifications-page-header {
  padding: 30px 32px;
  border: 1px solid #e0e8e4;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff 0%, #f6fbf8 100%);
  box-shadow: 0 15px 40px rgba(30,62,49,.055);
}

.notifications-page-header .eyebrow {
  color: #74847d;
}

.notifications-page-header h1 {
  margin: 7px 0 8px;
  color: #203029;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.notifications-page-header p {
  margin: 0;
  color: #687770;
  font-size: 15px;
  line-height: 1.55;
}

.notifications-page-summary {
  padding: 18px 3px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #718079;
  font-size: 11px;
  font-weight: 650;
}

.notifications-all-list {
  overflow: hidden;
  border: 1px solid #e0e7e3;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(31,55,46,.035);
}

.account-notification-item.is-full {
  min-height: 92px;
  padding: 17px 18px;
}

.account-notification-item.is-full .account-notification-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 14px;
  font-size: 20px;
}

.account-notification-item.is-full .account-notification-title-row strong {
  font-size: 14px;
}

.account-notification-item.is-full .account-notification-message {
  font-size: 12px;
}

.notification-empty-page {
  min-height: 180px;
  display: grid;
  place-items: center;
}

@media (max-width: 760px) {
  #privateNav {
    gap: 7px;
  }

  .notification-bell-button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .notification-center-popover {
    position: fixed;
    top: 72px;
    right: 10px;
    left: auto;
    width: min(390px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 84px);
  }

  .notification-preview-list {
    max-height: calc(100dvh - 210px);
  }

  .selector-notification-center .notification-center-popover {
    top: 72px;
  }

  .notifications-page-shell {
    width: calc(100% - 24px);
    padding: 96px 0 34px;
  }

  .notifications-page-toolbar {
    align-items: stretch;
  }

  .notifications-page-header {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .notifications-page-header h1 {
    font-size: 36px;
  }

  .account-notification-item.is-full {
    padding: 15px 13px;
  }
}

@media (max-width: 520px) {
  .account-trigger-copy {
    max-width: 115px;
  }

  .notification-center-head {
    min-height: 70px;
    padding: 14px 15px 12px;
  }

  .notification-center-head strong {
    font-size: 18px;
  }

  .notifications-page-toolbar {
    flex-direction: column;
  }

  .notifications-back-button,
  .notifications-read-all-button {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   V37.47 - PORTINAIO / GESTIONE PACCHI NEL PALAZZO
   ========================================================= */
.doorman-package-panel {
  margin: 20px 0 24px;
  padding: 22px;
  border: 1px solid #dbe8e2;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(209, 242, 228, .55), transparent 34%),
    linear-gradient(180deg, #fbfefc 0%, #f6faf8 100%);
  box-shadow: 0 14px 34px rgba(28, 74, 58, .055);
  overflow: hidden;
}

.doorman-package-head,
.doorman-package-pending-head,
.doorman-package-submit-row,
.doorman-pending-card-head,
.doorman-pending-card-foot,
.doorman-unit-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.doorman-package-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.doorman-package-head h4,
.doorman-package-pending-head h4 {
  margin: 4px 0 0;
  color: #1d3028;
  letter-spacing: -.025em;
}

.doorman-package-head h4 {
  font-size: 25px;
}

.doorman-package-head p {
  max-width: 660px;
  margin: 7px 0 0;
  color: #6f7c76;
  font-size: 13px;
  line-height: 1.55;
}

.doorman-package-pending-badge {
  min-width: 92px;
  padding: 10px 13px;
  border: 1px solid #d5e6de;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  text-align: center;
  flex: 0 0 auto;
}

.doorman-package-pending-badge span,
.doorman-package-pending-badge b {
  display: block;
}

.doorman-package-pending-badge span {
  color: #76847d;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .075em;
}

.doorman-package-pending-badge b {
  margin-top: 2px;
  color: #1c5945;
  font-size: 24px;
}

.doorman-package-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr);
  gap: 16px;
  min-width: 0;
}

.doorman-package-compose,
.doorman-package-pending {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe8e4;
  border-radius: 20px;
  background: rgba(255,255,255,.9);
}

.doorman-package-search-label > span,
.doorman-package-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: #41534b;
  font-size: 11px;
  font-weight: 750;
}

.doorman-package-fields label > span small {
  color: #8b9791;
  font-weight: 550;
}

.doorman-package-searchbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d7e1dc;
  border-radius: 15px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.doorman-package-searchbox:focus-within {
  border-color: #8dbba8;
  box-shadow: 0 0 0 4px rgba(47, 143, 97, .09);
}

.doorman-package-searchbox > span {
  color: #6d8078;
  font-size: 20px;
  line-height: 1;
}

.doorman-package-searchbox input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #22342c;
  font: inherit;
}

.doorman-package-units {
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin: 12px 0 14px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bccbc4 transparent;
}

.doorman-package-units::-webkit-scrollbar,
.doorman-pending-packages::-webkit-scrollbar {
  width: 7px;
}

.doorman-package-units::-webkit-scrollbar-thumb,
.doorman-pending-packages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #bccbc4;
}

.doorman-unit-option {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e0e7e3;
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.doorman-unit-option:hover {
  border-color: #c7dad1;
  background: #fbfdfc;
}

.doorman-unit-option.is-selected {
  border-color: #9dcab7;
  background: #eff8f4;
  box-shadow: inset 0 0 0 1px rgba(64, 137, 106, .08);
}

.doorman-unit-option.no-recipients {
  cursor: default;
  opacity: .58;
  background: #f8f9f8;
}

.doorman-unit-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.doorman-unit-check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #cad7d1;
  border-radius: 9px;
  background: #f7faf8;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
}

.doorman-unit-option.is-selected .doorman-unit-check {
  border-color: #2d795b;
  background: #2d795b;
  color: #fff;
}

.doorman-unit-copy {
  min-width: 0;
}

.doorman-unit-title {
  align-items: baseline;
}

.doorman-unit-title strong {
  min-width: 0;
  color: #23342d;
  font-size: 12px;
}

.doorman-unit-title small {
  flex: 0 0 auto;
  color: #73817a;
  font-size: 9px;
}

.doorman-unit-names {
  display: block;
  margin-top: 4px;
  color: #69766f;
  font-size: 10.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.doorman-package-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.doorman-package-fields input {
  width: 100%;
  min-width: 0;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid #d7e1dc;
  border-radius: 14px;
  background: #fff;
  padding: 0 13px;
  color: #283a32;
  font: inherit;
}

.doorman-package-fields input:focus {
  outline: none;
  border-color: #8dbba8;
  box-shadow: 0 0 0 4px rgba(47, 143, 97, .09);
}

.doorman-package-submit-row {
  margin-top: 14px;
}

#doormanPackageSelectionSummary {
  color: #75827c;
  font-size: 10.5px;
}

#doormanPackageNotifyBtn {
  min-width: 148px;
}

.doorman-package-pending-head {
  align-items: flex-start;
  margin-bottom: 11px;
}

.doorman-package-pending-head h4 {
  font-size: 17px;
}

.doorman-pending-packages {
  display: grid;
  gap: 9px;
  max-height: 510px;
  padding-right: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bccbc4 transparent;
}

.doorman-pending-card {
  padding: 12px;
  border: 1px solid #e0e7e3;
  border-radius: 15px;
  background: #fff;
}

.doorman-pending-card-head {
  align-items: flex-start;
}

.doorman-pending-card-head strong,
.doorman-pending-card-head small {
  display: block;
}

.doorman-pending-card-head strong {
  color: #273930;
  font-size: 11.5px;
}

.doorman-pending-card-head small,
.doorman-pending-card-foot small {
  margin-top: 3px;
  color: #7c8983;
  font-size: 9px;
}

.doorman-package-status {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  background: #fff2d8;
  color: #7a5a18;
  font-size: 8.5px;
  font-weight: 750;
}

.doorman-pending-card p {
  margin: 8px 0 0;
  color: #66746d;
  font-size: 10px;
  line-height: 1.45;
}

.doorman-pending-card-foot {
  margin-top: 11px;
}

.doorman-package-empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 16px;
  border: 1px dashed #d7e1dc;
  border-radius: 14px;
  color: #839089;
  text-align: center;
  font-size: 10.5px;
}

.doorman-package-empty > span {
  font-size: 22px;
}

.doorman-package-empty strong,
.doorman-package-empty small {
  display: block;
}

@media (max-width: 1100px) {
  .doorman-package-workspace {
    grid-template-columns: 1fr;
  }

  .doorman-pending-packages {
    max-height: 320px;
  }
}

@media (max-width: 760px) {
  .doorman-package-panel {
    margin: 14px 0 18px;
    padding: 14px;
    border-radius: 20px;
  }

  .doorman-package-head {
    gap: 10px;
  }

  .doorman-package-head h4 {
    font-size: 21px;
  }

  .doorman-package-pending-badge {
    min-width: 76px;
    padding: 8px 9px;
  }

  .doorman-package-compose,
  .doorman-package-pending {
    padding: 13px;
    border-radius: 17px;
  }

  .doorman-package-units {
    max-height: 330px;
  }

  .doorman-package-fields {
    grid-template-columns: 1fr;
  }

  .doorman-package-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  #doormanPackageNotifyBtn {
    width: 100%;
  }

  .doorman-unit-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}


/* =========================================================
   V37.48 - SCROLL CHAINING GESTIONE PACCHI
   Consente alla rotella/touchpad di passare dalla scrollbar
   interna alla pagina quando il contenitore raggiunge il limite.
   ========================================================= */
.doorman-package-units,
.doorman-pending-packages {
  overscroll-behavior-y: auto !important;
  overscroll-behavior-x: contain;
}


/* =========================================================
   V37.49 - PORTINAIO SUBITO SOTTO AMMINISTRATORE + BADGE VIOLETTO
   ========================================================= */
.member-role.doorman {
  background: #f3edff;
  color: #6f4db8;
  border: 1px solid #dfd2fb;
  box-shadow: inset 0 0 0 1px rgba(111, 77, 184, .03);
}

.member-role.doorman::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: 1px;
  opacity: .9;
}


/* =========================================================
   V37.50 - ACCORDO ART. 28 GDPR ALLA CREAZIONE CONDOMINIO
   ========================================================= */
#condoDialog {
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
}

.condo-dpa-card {
  margin: 18px 0 20px;
  padding: 17px 18px;
  border: 1px solid #dce7e2;
  border-radius: 18px;
  background: #f7faf8;
  color: #44534c;
}

.condo-dpa-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.condo-dpa-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf5f0;
  color: #2f6b55;
  font-size: 17px;
  font-weight: 800;
}

.condo-dpa-heading strong,
.condo-dpa-heading small {
  display: block;
}

.condo-dpa-heading strong {
  color: #263b32;
  font-size: 13px;
  line-height: 1.25;
}

.condo-dpa-heading small {
  margin-top: 2px;
  color: #748078;
  font-size: 10.5px;
  line-height: 1.35;
}

.condo-dpa-card > p {
  margin: 0 0 13px;
  color: #68766f;
  font-size: 12px;
  line-height: 1.55;
}

#condoForm label.condo-dpa-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  color: #4d5b55;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

#condoForm .condo-dpa-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 1px 0 0;
  border: 1.5px solid #b9c8c1;
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#condoForm .condo-dpa-check input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .12s ease;
}

#condoForm .condo-dpa-check input[type="checkbox"]:checked {
  border-color: #2f7258;
  background: #2f7258;
}

#condoForm .condo-dpa-check input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}

#condoForm .condo-dpa-check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(47,114,88,.12);
}

.condo-dpa-check a {
  color: #28634d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 620px) {
  .condo-dpa-card {
    padding: 15px 14px;
    border-radius: 16px;
  }
}

/* v37.53 - Matita esplicita anche per proprietari non registrati nel Palazzo */
.apple-resident-edit-btn {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background .16s ease, color .16s ease;
}

.apple-resident-edit-btn:hover,
.apple-resident-edit-btn:focus-visible {
  background: #e9e9ec;
  color: #545459;
  outline: none;
}

/* =========================================================
   V37.57 - FIX MENU ACCOUNT MOBILE SOPRA BOTTOM NAV
   Il menu account resta interamente utilizzabile su iPhone:
   - non finisce dietro la bottom navigation;
   - scorre internamente quando il contenuto è più alto;
   - la topbar/menu resta sopra la bottom nav nello stacking.
   ========================================================= */
@media (max-width: 760px) {
  .topbar {
    z-index: 220 !important;
  }

  .account-menu {
    top: calc(var(--mobile-topbar-h) + 7px) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 12px !important;
  }

  body.mobile-condo-nav-active .account-menu {
    bottom: calc(
      var(--mobile-nav-h) +
      max(8px, env(safe-area-inset-bottom)) +
      12px
    ) !important;
  }

  .account-menu-section:last-child {
    padding-bottom: 8px;
  }
}

/* =========================================================
   V37.58 - FIX REGRESSIONE MENU ACCOUNT MOBILE
   In v37.57 top+bottom erano applicati a un elemento absolute
   relativo al piccolo wrapper del profilo: su mobile il pannello
   poteva collassare e risultare invisibile.
   Il menu principale viene ora ancorato direttamente alla viewport.
   ========================================================= */
@media (max-width: 760px) {
  #privateNav .account-menu {
    position: fixed !important;
    top: calc(var(--mobile-topbar-h) + 8px) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    left: auto !important;
    bottom: auto !important;
    width: min(340px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - var(--mobile-topbar-h) - 20px) !important;
    max-height: calc(100dvh - var(--mobile-topbar-h) - 20px - env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    z-index: 40000 !important;
  }

  body.mobile-condo-nav-active #privateNav .account-menu {
    max-height: calc(100vh - var(--mobile-topbar-h) - var(--mobile-nav-h) - 28px) !important;
    max-height: calc(
      100dvh -
      var(--mobile-topbar-h) -
      var(--mobile-nav-h) -
      28px -
      env(safe-area-inset-bottom)
    ) !important;
  }

  #privateNav .account-menu-section:last-child {
    padding-bottom: 10px;
  }
}

/* =========================================================
   V37.61 - LETTURE ACQUA: FILTRI ALLINEATI + AZIONE CAMPAGNA
   ========================================================= */
.water-manager-filters.water-manager-filters-with-campaign {
  display: grid;
  grid-template-columns: minmax(280px, 310px) auto minmax(210px, 230px) minmax(150px, 170px);
  gap: 10px;
  align-items: start;
  width: auto;
}

.water-manager-filters-with-campaign .water-campaign-filter-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.water-manager-filters-with-campaign .water-campaign-select-field,
.water-manager-filters-with-campaign > label {
  display: grid;
  grid-template-rows: 16px 48px;
  gap: 4px;
  margin: 0;
  align-self: start;
}

.water-manager-filters-with-campaign #waterCampaignSelect,
.water-manager-filters-with-campaign #waterUnitFilter,
.water-manager-filters-with-campaign #waterStatusFilter,
.water-manager-filters-with-campaign .civico-select-trigger {
  min-height: 48px;
  height: 48px;
}

.water-manager-filters-with-campaign .water-campaign-inline-action {
  min-height: 48px;
  height: 48px;
  margin-top: 20px;
  white-space: nowrap;
  padding-inline: 20px;
}

.water-manager-filters-with-campaign .water-campaign-selection-meta {
  display: block;
  min-width: 0;
  padding: 0 2px;
  line-height: 1.2;
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .water-manager-panel-compact .water-manager-toolbar {
    align-items: stretch;
  }
  .water-manager-filters.water-manager-filters-with-campaign {
    grid-template-columns: minmax(240px, 1fr) auto minmax(180px, .8fr) minmax(140px, .6fr);
    width: 100%;
  }
}

@media (max-width: 900px) {
  .water-manager-filters.water-manager-filters-with-campaign {
    grid-template-columns: minmax(220px, 1fr) auto 1fr;
  }
  .water-manager-filters-with-campaign > label:last-child {
    grid-column: 3;
  }
}

@media (max-width: 700px) {
  .water-manager-filters.water-manager-filters-with-campaign {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .water-manager-filters-with-campaign .water-campaign-filter-block {
    grid-column: 1;
  }
  .water-manager-filters-with-campaign .water-campaign-inline-action {
    grid-column: 2;
    margin-top: 20px;
    padding-inline: 14px;
  }
  .water-manager-filters-with-campaign > label {
    grid-column: auto !important;
  }
}

@media (max-width: 520px) {
  .water-manager-filters.water-manager-filters-with-campaign {
    grid-template-columns: 1fr;
  }
  .water-manager-filters-with-campaign .water-campaign-filter-block,
  .water-manager-filters-with-campaign .water-campaign-inline-action,
  .water-manager-filters-with-campaign > label {
    grid-column: 1 !important;
  }
  .water-manager-filters-with-campaign .water-campaign-inline-action {
    width: 100%;
    margin-top: 0;
  }
}

/* =========================================================
   V37.62 - LETTURE ACQUA: TOOLBAR COMPATTA + RIEPILOGO
   ========================================================= */
.water-manager-panel-compact .water-manager-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 14px;
}

.water-manager-filters.water-manager-filters-with-campaign {
  display: grid;
  grid-template-columns: minmax(410px, 1.65fr) minmax(210px, .9fr) minmax(160px, .65fr);
  gap: 12px;
  align-items: start;
  width: min(970px, 100%);
}

.water-manager-filters-with-campaign .water-campaign-filter-block,
.water-manager-filters-with-campaign > label {
  display: grid;
  grid-template-rows: 16px 48px auto;
  gap: 5px;
  margin: 0;
  min-width: 0;
  align-self: start;
}

.water-manager-filters-with-campaign .water-filter-label {
  display: flex;
  align-items: center;
  min-height: 16px;
  color: #56645e;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.water-manager-filters-with-campaign .water-campaign-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  height: 48px;
  min-width: 0;
}

.water-manager-filters-with-campaign #waterCampaignSelect,
.water-manager-filters-with-campaign #waterUnitFilter,
.water-manager-filters-with-campaign #waterStatusFilter,
.water-manager-filters-with-campaign .civico-select-trigger,
.water-manager-filters-with-campaign .water-campaign-inline-action {
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.water-manager-filters-with-campaign .water-campaign-inline-action {
  padding-inline: 18px;
  white-space: nowrap;
}

.water-manager-filters-with-campaign .water-campaign-selection-meta {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 26px;
  margin-top: 2px;
  padding: 5px 10px;
  border: 1px solid #d8e7df;
  border-radius: 999px;
  background: #f1f8f4;
  color: #245f49;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 750;
  white-space: nowrap;
}

.water-manager-summary.water-manager-summary-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.water-manager-summary-inline article {
  padding: 12px 16px;
  border-radius: 14px;
  background: #f8faf9;
}

.water-manager-summary-inline b {
  margin-top: 3px;
  font-size: 20px;
}

@media (max-width: 1180px) {
  .water-manager-panel-compact .water-manager-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .water-manager-filters.water-manager-filters-with-campaign {
    width: 100%;
    grid-template-columns: minmax(360px, 1.45fr) minmax(190px, .85fr) minmax(150px, .65fr);
  }
}

@media (max-width: 820px) {
  .water-manager-filters.water-manager-filters-with-campaign {
    grid-template-columns: 1fr 1fr;
  }
  .water-manager-filters-with-campaign .water-campaign-filter-block {
    grid-column: 1 / -1;
  }
  .water-manager-summary.water-manager-summary-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .water-manager-filters.water-manager-filters-with-campaign {
    grid-template-columns: 1fr;
  }
  .water-manager-filters-with-campaign .water-campaign-filter-block,
  .water-manager-filters-with-campaign > label {
    grid-column: 1;
  }
  .water-manager-filters-with-campaign .water-campaign-control-row {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .water-manager-filters-with-campaign .water-campaign-inline-action {
    width: 100%;
  }
  .water-manager-filters-with-campaign .water-campaign-selection-meta {
    white-space: normal;
  }
  .water-manager-summary.water-manager-summary-inline {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   v37.77 - PROPRIETARI NON REGISTRATI MULTI-INTERNO
   ========================================================= */
.manual-owner-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.manual-owner-card-copy .member-unit-badges {
  margin-top: 7px;
}

@media (max-width: 760px) {
  .manual-owner-card-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* =========================================================
   V37.78 - GESTIONE INTERNI: MODALE PIÙ LEGGIBILE E COERENTE
   ========================================================= */
#assignUnitDialog {
  width: min(620px, calc(100% - 30px));
}

#assignUnitDialog form {
  padding: 28px;
}

#assignUnitDialog .dialog-copy {
  margin: 8px 0 22px;
  max-width: 500px;
}

.owner-multi-unit-panel {
  display: grid;
  gap: 18px;
}

.owner-multi-unit-panel.hidden {
  display: none;
}

.owner-multi-unit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.owner-multi-unit-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.owner-member-units-list {
  display: grid;
  gap: 10px;
}

.owner-member-unit-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.owner-member-unit-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 800;
}

.owner-member-unit-main {
  min-width: 0;
}

.owner-member-unit-main > span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
}

.owner-member-unit-main strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.owner-member-unit-actions {
  display: flex;
  align-items: center;
}

.owner-unit-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #efc1c5;
  border-radius: 10px;
  background: #fff;
  color: #a72733;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.owner-unit-remove-btn:hover {
  background: #fff0f1;
  border-color: #e8aeb4;
}

.owner-unit-remove-btn:active {
  transform: translateY(1px);
}

.owner-unit-remove-btn:disabled {
  opacity: .5;
  cursor: wait;
}

.owner-unit-remove-btn > span {
  font-size: 17px;
  line-height: 1;
  margin-top: -1px;
}

.owner-member-units-empty {
  padding: 15px 16px;
  border: 1px dashed #d4ded9;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.owner-add-unit-card {
  margin-top: 2px;
  padding: 17px;
  border: 1px solid #dce8e2;
  border-radius: 17px;
  background: #f7faf8;
}

.owner-add-unit-copy {
  margin-bottom: 14px;
}

.owner-add-unit-copy strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

.owner-add-unit-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.owner-add-unit-card .two-cols {
  margin-bottom: 12px;
}

.owner-add-unit-card label {
  margin: 0;
}

.owner-add-unit-card .primary.full {
  min-height: 44px;
  border-radius: 12px;
}

@media (max-width: 620px) {
  #assignUnitDialog {
    width: min(100% - 20px, 620px);
    max-height: calc(100dvh - 24px);
  }

  #assignUnitDialog form {
    padding: 22px 18px;
  }

  .owner-member-unit-row {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }

  .owner-member-unit-icon {
    width: 38px;
    height: 38px;
  }

  .owner-member-unit-actions {
    grid-column: 1 / -1;
  }

  .owner-unit-remove-btn {
    width: 100%;
  }

  .owner-add-unit-card {
    padding: 14px;
  }
}


/* V37.80 - selettore autolettura multi-interno */
@media (max-width: 700px) {
  .water-unit-switcher {
    padding: 14px;
    border-radius: 17px;
  }

  .water-unit-switcher-list {
    grid-template-columns: 1fr;
  }

  .water-unit-choice {
    padding: 12px 13px;
  }

  .water-unit-switcher-head {
    align-items: flex-start;
  }
}

/* =========================================================
   V37.85 - MOBILE: RESPIRO VERTICALE STEP "COME VUOI INIZIARE?"
   ========================================================= */
@media (max-width: 620px) {
  /*
   * Lo step choice contiene due card impilate + il pulsante Indietro.
   * Con il pannello precedente da 460px il contenuto risultava troppo
   * vicino al bordo superiore. Allineiamo la distanza verticale agli
   * step Accedi / Registrati mantenendo il pannello centrato.
   */
  .apple-step[data-entry-step="choice"].active::before {
    min-height: 570px;
  }
}


/* =========================================================
   V37.86 - MOBILE: RECUPERO PASSWORD CONTENUTO NEL PANNELLO
   ========================================================= */
@media (max-width: 620px) {
  /*
   * Lo step di recupero password contiene più contenuto degli step
   * standard. Il pannello traslucido viene quindi reso più alto e
   * la tipografia leggermente compattata per mantenere anche
   * "Torna all’accesso" all'interno della card su smartphone.
   */
  .apple-step[data-entry-step="forgot-password"] {
    padding: 40px 18px 42px;
  }

  .apple-step[data-entry-step="forgot-password"].active::before {
    min-height: 610px;
    width: 100%;
  }

  .apple-step[data-entry-step="forgot-password"] .forgot-password-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 18px;
    font-size: 27px;
  }

  .apple-step[data-entry-step="forgot-password"] .apple-copy-block {
    margin-bottom: 18px;
  }

  .apple-step[data-entry-step="forgot-password"] .apple-copy-block h2 {
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.03;
    letter-spacing: -.04em;
  }

  .apple-step[data-entry-step="forgot-password"] .apple-copy-block p:last-child {
    margin-top: 14px;
    max-width: 340px;
    font-size: 15px;
    line-height: 1.45;
  }

  .apple-step[data-entry-step="forgot-password"] .forgot-password-form {
    margin-top: 14px;
  }

  .apple-step[data-entry-step="forgot-password"] .forgot-password-form label {
    margin-bottom: 12px;
  }

  .apple-step[data-entry-step="forgot-password"] .apple-primary-action.full {
    margin-top: 10px;
  }

  .apple-step[data-entry-step="forgot-password"] #forgotPasswordBackLogin {
    margin-top: 20px;
    margin-bottom: 16px;
  }
}

@media (max-width: 380px), (max-height: 720px) and (max-width: 620px) {
  .apple-step[data-entry-step="forgot-password"].active::before {
    min-height: 560px;
  }

  .apple-step[data-entry-step="forgot-password"] {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .apple-step[data-entry-step="forgot-password"] .apple-copy-block h2 {
    font-size: 32px;
  }

  .apple-step[data-entry-step="forgot-password"] .apple-copy-block p:last-child {
    font-size: 14px;
  }
}


/* =========================================================
   V37.92 - SFONDO APP POST-LOGIN COME ELEMENTO REALE
   ========================================================= */

/*
 * L'immagine non è più un CSS background della view.
 * È un <picture> fixed indipendente, così non può essere coperto
 * dai background storici delle schermate.
 */
.app-navigation-background {
  display: none;
}

body:not(.entry-mode) .app-navigation-background {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #f6f4ef;
}

body:not(.entry-mode) .app-navigation-background,
body:not(.entry-mode) .app-navigation-background img {
  width: 100%;
  height: 100%;
}

body:not(.entry-mode) .app-navigation-background img {
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Tutta l'app rimane sopra l'immagine. */
body:not(.entry-mode) > .topbar,
body:not(.entry-mode) > main,
body:not(.entry-mode) > .toast {
  position: relative;
  z-index: 1;
}

/* Togliamo i fondi pieni soltanto dalle view post-login. */
body:not(.entry-mode) .condo-selector-page,
body:not(.entry-mode) .condominium-manage-page,
body:not(.entry-mode) .company-area-page,
body:not(.entry-mode) .dashboard-page,
body.condo-selector-mode #condominiumSelector.active {
  background: transparent !important;
}

/* Il selettore aveva anche fondi pieni in regole dedicate. */
body.condo-selector-mode {
  background: transparent !important;
}

@media (max-width: 760px) {
  body.condo-selector-mode {
    background: transparent !important;
  }

  body.condo-selector-mode #condominiumSelector.active {
    background: transparent !important;
  }
}


/* =========================================================
   V37.93 - FIX SFONDO MOBILE: NIENTE CROP LATERALE
   ========================================================= */
/*
 * Gli smartphone moderni sono più "alti e stretti" del 9:16.
 * Con object-fit: cover la versione mobile veniva ingrandita e
 * venivano tagliati proprio i motivi grafici ai lati, lasciando
 * visibile quasi solo la zona centrale color avorio.
 *
 * Su mobile mostriamo quindi l'intera grafica adattandola al viewport.
 */
@media (max-width: 768px) {
  body:not(.entry-mode) .app-navigation-background {
    background: #f6f4ef;
  }

  body:not(.entry-mode) .app-navigation-background img {
    width: 100vw !important;
    height: 100dvh !important;
    object-fit: fill !important;
    object-position: center center !important;
  }
}


/* =========================================================
   V37.96 - RIPRISTINO TOPBAR STICKY + TOAST FIXED
   ========================================================= */
/*
 * La v37.92 aveva impostato position:relative anche su topbar e toast
 * per portarli sopra lo sfondo. Questo annullava:
 * - position:sticky della barra superiore;
 * - position:fixed del toast.
 * Manteniamo quindi solo lo z-index, ripristinando i posizionamenti originali.
 */
body:not(.entry-mode) > .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

body:not(.entry-mode) > main {
  position: relative;
  z-index: 1;
}

body:not(.entry-mode) > .toast {
  position: fixed !important;
  z-index: 100 !important;
}


/* =========================================================
   V37.97 - FIX STRISCIA BIANCA LATERALE SU MOBILE
   ========================================================= */
/*
 * Su alcuni iPhone/PWA il containing block del body può risultare
 * leggermente più stretto del viewport reale. Elementi larghi 100%
 * (topbar e sfondo) si fermavano quindi alcuni pixel prima del bordo.
 * Su mobile ancoriamo i layer principali alla larghezza del viewport.
 */
@media (max-width: 768px) {
  html,
  body {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    overflow-x: clip !important;
  }

  body:not(.entry-mode) > .topbar {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: auto !important;
  }

  body:not(.entry-mode) .app-navigation-background {
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  body:not(.entry-mode) .condominium-manage-page.active,
  body:not(.entry-mode) .dashboard-page.active,
  body.condo-selector-mode #condominiumSelector.active,
  body:not(.entry-mode) .company-area-page.active {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  body:not(.entry-mode) > main {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
  }
}


/* =========================================================
   V37.98 - INTESTAZIONI SEZIONI IN CARD
   ========================================================= */
/*
 * Uniforma i titoli delle voci del menu al resto dell'interfaccia:
 * eyebrow + titolo + descrizione + eventuale azione vivono ora
 * dentro una superficie/card dedicata.
 */
.members-section-head,
.building-section-head,
.resources-section-head,
.assemblies-section-head,
.polls-section-head,
.water-section-head,
.reports-section-head,
.tenders-section-head,
.notices-section-head,
.waste-section-head,
.rules-section-head {
  box-sizing: border-box;
  width: 100%;
  padding: 22px 24px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(205, 216, 210, .88);
  border-radius: 22px;
  box-shadow:
    0 10px 28px rgba(29, 61, 47, .045),
    0 1px 2px rgba(29, 61, 47, .025);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* La descrizione non deve allargare la card quando c'è un pulsante a destra. */
.members-section-head > div:first-child,
.building-section-head > div:first-child,
.resources-section-head > div:first-child,
.assemblies-section-head > div:first-child,
.polls-section-head > div:first-child,
.water-section-head > div:first-child,
.reports-section-head > div:first-child,
.tenders-section-head > div:first-child,
.notices-section-head > div:first-child,
.waste-section-head > div:first-child,
.rules-section-head > div:first-child {
  min-width: 0;
}

/* Il box "Totale" dell'anagrafica diventa un elemento interno della card. */
.members-section-head .members-count-box {
  flex: 0 0 auto;
  box-shadow: none;
  background: rgba(247, 250, 248, .92);
}

/* Mantiene le azioni visivamente allineate dentro la nuova superficie. */
.resources-section-head > button,
.assemblies-section-head > button,
.polls-section-head > button,
.reports-section-head > button,
.tenders-section-head > button,
.notices-section-head > button,
.waste-section-head > button,
.rules-section-head > button {
  flex: 0 0 auto;
  align-self: center;
}

.water-section-head .water-section-actions {
  flex: 0 0 auto;
  align-self: center;
}

@media (max-width: 768px) {
  .members-section-head,
  .building-section-head,
  .resources-section-head,
  .assemblies-section-head,
  .polls-section-head,
  .water-section-head,
  .reports-section-head,
  .tenders-section-head,
  .notices-section-head,
  .waste-section-head,
  .rules-section-head {
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 18px;
    gap: 16px !important;
  }

  /* Su smartphone titolo e azione si impilano in modo uniforme. */
  .members-section-head,
  .resources-section-head,
  .assemblies-section-head,
  .polls-section-head,
  .water-section-head,
  .reports-section-head,
  .tenders-section-head,
  .notices-section-head,
  .waste-section-head,
  .rules-section-head {
    align-items: stretch !important;
  }

  .resources-section-head > button,
  .assemblies-section-head > button,
  .polls-section-head > button,
  .reports-section-head > button,
  .tenders-section-head > button,
  .notices-section-head > button,
  .waste-section-head > button,
  .rules-section-head > button,
  .water-section-head .water-section-actions {
    width: 100%;
    align-self: stretch;
  }

  .water-section-head .water-section-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .water-section-head .water-section-actions > button {
    width: 100%;
  }

  .members-section-head .members-count-box {
    width: 100%;
    min-width: 0;
  }
}


/* =========================================================
   V38.00 - PDF RISORSE A TURNAZIONE
   ========================================================= */

.resource-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid rgba(20, 110, 78, .20);
  border-radius: 12px;
  background: rgba(22, 123, 84, .07);
  color: #176b4b;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.resource-pdf-btn::before {
  content: "↓";
  display: inline-grid;
  place-items: center;
  margin-right: 7px;
  font-size: 13px;
  line-height: 1;
}

.resource-pdf-btn:hover {
  background: rgba(22, 123, 84, .12);
  border-color: rgba(20, 110, 78, .34);
  box-shadow: 0 6px 16px rgba(20, 83, 60, .07);
}

.resource-pdf-btn:active {
  transform: translateY(1px);
}

.resource-pdf-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(22, 123, 84, .10);
}

@media (max-width: 640px) {
  .resource-detail-actions {
    width: 100%;
    justify-content: stretch;
  }

  .resource-detail-actions .resource-pdf-btn,
  .resource-detail-actions .resource-delete-btn {
    flex: 1 1 180px;
    min-height: 44px;
    align-self: stretch;
  }
}

/* =========================================================
   V38.02 - TURNAZIONI A CALENDARIO (GIORNI / SETTIMANE / MESI)
   ========================================================= */
.resource-rotation-interval-fields {
  display: grid;
  grid-template-columns: minmax(88px, .42fr) minmax(190px, 1fr);
  gap: 10px;
  align-items: start;
}

.resource-rotation-interval-fields > input,
.resource-rotation-interval-fields > select,
.resource-rotation-interval-fields > .civico-select {
  min-width: 0;
  width: 100%;
}

.resource-field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .resource-rotation-interval-fields {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}

/* =========================================================
   V38.05 - PIANI RISOLUZIONE SEGNALAZIONI + PRESENZE ASSEMBLEE
   ========================================================= */

.report-resolution-plan {
  margin-top: 16px;
  padding: 17px 18px;
  border: 1px solid rgba(24, 111, 78, .15);
  border-radius: 18px;
  background: rgba(239, 248, 244, .82);
}

.report-resolution-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.report-resolution-plan .eyebrow {
  margin: 0;
  color: #176b4b;
}

.report-resolution-schedule {
  color: #355f4e;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.report-resolution-plan p {
  margin: 0;
  color: #20372e;
  font-size: 13px;
  line-height: 1.6;
}

.report-resolution-plan small {
  display: block;
  margin-top: 10px;
  color: #718078;
  font-size: 10px;
}

.report-plan-action {
  color: #176b4b !important;
  border-color: rgba(23, 107, 75, .18) !important;
  background: rgba(23, 107, 75, .055) !important;
}

.report-resolution-dialog .modal-card,
.report-resolution-modal-card {
  width: min(650px, calc(100vw - 32px));
}

.report-resolution-modal-card > label,
.assembly-participants-modal-card > label {
  display: grid;
  gap: 7px;
  color: #30463d;
  font-size: 12px;
  font-weight: 750;
}

.report-resolution-help {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f8f6;
  color: #607068;
  font-size: 11px;
  line-height: 1.5;
}

.report-resolution-actions {
  flex-wrap: wrap;
}

.report-resolution-actions #deleteReportResolutionPlanBtn {
  margin-right: auto;
}

.assembly-participants-section {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(35, 68, 54, .10);
  border-radius: 20px;
  background: rgba(255, 255, 255, .76);
}

.assembly-participants-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.assembly-participants-head h4 {
  margin: 3px 0 0;
}

.assembly-participants-count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf4ef;
  color: #176b4b;
  font-size: 12px;
  font-weight: 850;
}

.assembly-participants-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.assembly-participant-item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(43, 76, 62, .08);
  border-radius: 13px;
  background: rgba(247, 250, 248, .92);
}

.assembly-participant-item strong,
.assembly-participant-item span {
  display: block;
}

.assembly-participant-item strong {
  overflow: hidden;
  color: #22362e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-participant-item span {
  margin-top: 3px;
  color: #728078;
  font-size: 10px;
  line-height: 1.35;
}

.assembly-participants-dialog .modal-card,
.assembly-participants-modal-card {
  width: min(720px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 36px));
  overflow: auto;
}

.assembly-participants-picker {
  margin: 4px 0 18px;
  padding: 15px;
  border: 1px solid rgba(43, 76, 62, .10);
  border-radius: 17px;
  background: #f8faf9;
}

.assembly-participants-picker-head {
  margin-bottom: 12px;
}

.assembly-participants-picker-head p {
  margin: 5px 0 0;
  color: #6d7b74;
  font-size: 11px;
  line-height: 1.45;
}

.assembly-participant-candidates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding-right: 3px;
}

.assembly-participant-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(43, 76, 62, .10);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}

.assembly-participant-choice:has(input:checked) {
  border-color: rgba(23, 107, 75, .34);
  background: #eef7f2;
}

.assembly-participant-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #176b4b;
  flex: 0 0 auto;
}

.assembly-participant-choice span {
  min-width: 0;
}

.assembly-participant-choice strong,
.assembly-participant-choice small {
  display: block;
}

.assembly-participant-choice strong {
  overflow: hidden;
  color: #263c33;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assembly-participant-choice small {
  margin-top: 2px;
  color: #77837d;
  font-size: 9px;
  line-height: 1.3;
}

.assembly-participants-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: #6d7b74;
  text-align: center;
  font-size: 11px;
}

@media (max-width: 768px) {
  .report-resolution-plan-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .report-resolution-schedule {
    text-align: left;
  }

  .report-resolution-schedule-fields {
    grid-template-columns: 1fr !important;
  }

  .report-resolution-actions > button {
    flex: 1 1 100%;
  }

  .report-resolution-actions #deleteReportResolutionPlanBtn {
    margin-right: 0;
  }

  .assembly-participants-list,
  .assembly-participant-candidates {
    grid-template-columns: 1fr;
  }

  .assembly-participants-section {
    padding: 15px;
    border-radius: 17px;
  }

  .assembly-participants-modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
}


/* =========================================================
   V38.08 - MODALI PARTECIPANTI / PIANO RISOLUZIONE
   Fix overflow + campi coerenti con lo stile Civico+
   ========================================================= */

#assemblyParticipantsDialog,
#reportResolutionPlanDialog {
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

#assemblyParticipantsDialog *,
#reportResolutionPlanDialog * {
  box-sizing: border-box;
}

#assemblyParticipantsForm,
#reportResolutionPlanForm {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.assembly-participants-modal-card,
.report-resolution-modal-card {
  padding: 28px 30px 26px;
  scrollbar-width: thin;
  scrollbar-color: #b6c3bd transparent;
}

.assembly-participants-modal-card::-webkit-scrollbar,
.report-resolution-modal-card::-webkit-scrollbar {
  width: 8px;
}

.assembly-participants-modal-card::-webkit-scrollbar-track,
.report-resolution-modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.assembly-participants-modal-card::-webkit-scrollbar-thumb,
.report-resolution-modal-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b6c3bd;
}

#assemblyParticipantsDialog .modal-head,
#reportResolutionPlanDialog .modal-head {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

#assemblyParticipantsDialog .modal-head > div,
#reportResolutionPlanDialog .modal-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

#assemblyParticipantsDialog .modal-head h3,
#reportResolutionPlanDialog .modal-head h3,
#assemblyParticipantsDialog .modal-head p,
#reportResolutionPlanDialog .modal-head p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#assemblyParticipantsDialog .modal-head .icon-btn,
#reportResolutionPlanDialog .modal-head .icon-btn {
  flex: 0 0 auto;
  margin: 0;
}

/* Sezione anagrafica sempre contenuta nella card */
.assembly-participants-picker {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #dfe8e3;
  border-radius: 18px;
  background: #f8fbf9;
}

.assembly-participant-candidates {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-x: hidden !important;
  overflow-y: auto;
  padding: 0 4px 0 0;
}

.assembly-participant-choice {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.assembly-participant-choice > span {
  min-width: 0;
  max-width: 100%;
}

.assembly-participant-choice strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.assembly-participant-choice small {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Campi "Civico+" per entrambe le modali */
#assemblyParticipantsDialog textarea,
#assemblyParticipantsDialog input,
#assemblyParticipantsDialog select,
#reportResolutionPlanDialog textarea,
#reportResolutionPlanDialog input,
#reportResolutionPlanDialog select {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border: 1px solid #d8e3dd;
  border-radius: 15px;
  background: #fff;
  color: #20342b;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  box-shadow: none;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

#assemblyParticipantsDialog textarea,
#reportResolutionPlanDialog textarea {
  padding: 13px 14px;
  resize: vertical;
}

#assemblyParticipantsDialog input,
#assemblyParticipantsDialog select,
#reportResolutionPlanDialog input,
#reportResolutionPlanDialog select {
  min-height: 48px;
  padding: 11px 13px;
}

#assemblyParticipantsDialog textarea::placeholder,
#reportResolutionPlanDialog textarea::placeholder,
#assemblyParticipantsDialog input::placeholder,
#reportResolutionPlanDialog input::placeholder {
  color: #8c9892;
  opacity: 1;
}

#assemblyParticipantsDialog textarea:focus,
#assemblyParticipantsDialog input:focus,
#assemblyParticipantsDialog select:focus,
#reportResolutionPlanDialog textarea:focus,
#reportResolutionPlanDialog input:focus,
#reportResolutionPlanDialog select:focus {
  border-color: #2d8a65;
  box-shadow: 0 0 0 4px rgba(45, 138, 101, .10);
  background: #fff;
}

#assemblyParticipantsDialog .field-help,
#reportResolutionPlanDialog .field-help {
  display: block;
  margin-top: 2px;
  color: #74827b;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

/* Piano risoluzione: nessun campo può uscire dalla griglia */
.report-resolution-schedule-fields {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-resolution-schedule-fields > label {
  min-width: 0;
  max-width: 100%;
}

#reportResolutionPlanDialog input[type="date"],
#reportResolutionPlanDialog input[type="time"] {
  min-width: 0 !important;
  width: 100% !important;
}

/* Azioni sempre dentro il perimetro della modale */
#assemblyParticipantsDialog .modal-actions,
#reportResolutionPlanDialog .modal-actions {
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  #assemblyParticipantsDialog,
  #reportResolutionPlanDialog {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 22px !important;
  }

  .assembly-participants-modal-card,
  .report-resolution-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 16px) !important;
    padding:
      20px
      16px
      max(22px, env(safe-area-inset-bottom)) !important;
  }

  .assembly-participants-picker {
    padding: 14px;
    border-radius: 16px;
  }

  .assembly-participant-candidates {
    grid-template-columns: 1fr !important;
    max-height: 42dvh;
    padding-right: 2px;
  }

  .report-resolution-schedule-fields {
    grid-template-columns: 1fr !important;
  }

  #assemblyParticipantsDialog .modal-actions > button,
  #reportResolutionPlanDialog .modal-actions > button {
    flex: 1 1 100%;
    width: 100%;
  }
}


/* =========================================================
   V38.09 - FIX DEFINITIVO MODALI PARTECIPANTI / RISOLUZIONE
   ========================================================= */

/* La card è l'unico elemento che deve scorrere verticalmente. */
#assemblyParticipantsForm,
#reportResolutionPlanForm {
  max-height: min(820px, calc(100dvh - 36px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

/*
 * V38.08 applicava lo stile dei campi testuali anche alle checkbox:
 * questo le portava a width:100% e distruggeva la griglia partecipanti.
 * I controlli booleani devono mantenere dimensioni native.
 */
#assemblyParticipantsDialog input[type="checkbox"],
#assemblyParticipantsDialog input[type="radio"] {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 4px;
  box-shadow: none !important;
  flex: 0 0 18px !important;
  accent-color: #176b4b;
}

/* Ripristino della lista dei partecipanti dentro il riquadro. */
.assembly-participant-candidates {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 330px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 0 4px 0 0 !important;
}

.assembly-participant-choice {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 64px;
  padding: 11px 12px !important;
  overflow: hidden !important;
}

.assembly-participant-choice > span {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.assembly-participant-choice strong,
.assembly-participant-choice small {
  width: auto !important;
  max-width: 100% !important;
}

/* Manteniamo i campi testuali Civico+ senza coinvolgere checkbox/radio. */
#assemblyParticipantsDialog input:not([type="checkbox"]):not([type="radio"]),
#assemblyParticipantsDialog textarea,
#assemblyParticipantsDialog select,
#reportResolutionPlanDialog input:not([type="checkbox"]):not([type="radio"]),
#reportResolutionPlanDialog textarea,
#reportResolutionPlanDialog select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/*
 * Le azioni rimangono raggiungibili e visibili in fondo allo scroll,
 * con una lieve superficie bianca coerente con Civico+.
 */
#assemblyParticipantsDialog .modal-actions,
#reportResolutionPlanDialog .modal-actions {
  position: sticky;
  bottom: -1px;
  z-index: 3;
  margin-top: 18px;
  padding-top: 14px;
  padding-bottom: 2px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,.96) 18%,
    #fff 42%
  );
}

/* Il contenuto non deve mai essere troncato lateralmente. */
#assemblyParticipantsDialog .assembly-participants-picker,
#reportResolutionPlanDialog .report-resolution-schedule-fields,
#assemblyParticipantsDialog .modal-actions,
#reportResolutionPlanDialog .modal-actions {
  max-width: 100% !important;
}

/* Area piano risoluzione: scroll verticale pienamente disponibile. */
#reportResolutionPlanDialog .report-resolution-modal-card {
  padding-bottom: 20px !important;
}

@media (max-width: 768px) {
  #assemblyParticipantsForm,
  #reportResolutionPlanForm {
    max-height: calc(100dvh - 16px) !important;
  }

  .assembly-participant-candidates {
    grid-template-columns: 1fr !important;
    max-height: 42dvh !important;
  }

  #assemblyParticipantsDialog .modal-actions,
  #reportResolutionPlanDialog .modal-actions {
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
}


/* =========================================================
   V38.10 - AZIONI MODALI SOLO IN FONDO ALLA SEZIONE
   ========================================================= */

#assemblyParticipantsDialog .modal-actions,
#reportResolutionPlanDialog .modal-actions {
  position: static !important;
  bottom: auto !important;
  z-index: auto !important;
  margin-top: 22px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: transparent !important;
}

@media (max-width: 768px) {
  #assemblyParticipantsDialog .modal-actions,
  #reportResolutionPlanDialog .modal-actions {
    padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
  }
}


/* =========================================================
   V38.11 - ASSEMBLEE: STORICO FILTRABILE + CALENDARIO COLLASSABILE
   ========================================================= */

.assembly-calendar-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin: -10px 0 24px;
}

.assembly-calendar-toggle-btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 12px;
  font-weight: 800;
}

.past-assemblies-section {
  margin-bottom: 26px;
  padding: 20px;
  border: 1px solid rgba(205, 216, 210, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(29, 61, 47, .035);
}

.past-assemblies-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.past-assemblies-head > div:first-child {
  min-width: 0;
}

.past-assemblies-head h4 {
  margin: 4px 0 4px;
  font-size: 18px;
}

.past-assemblies-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.past-assemblies-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 10px;
  flex: 0 0 auto;
}

.past-assemblies-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #52675d;
  font-size: 10px;
  font-weight: 800;
}

.past-assemblies-filters input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d8e3dd;
  border-radius: 12px;
  background: #fff;
  color: #20342b;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.past-assemblies-filters input:focus {
  border-color: #2d8a65;
  box-shadow: 0 0 0 4px rgba(45, 138, 101, .09);
}

.past-assemblies-scroll {
  max-height: 390px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: #b8c5bf transparent;
}

.past-assemblies-scroll::-webkit-scrollbar {
  width: 7px;
}

.past-assemblies-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.past-assemblies-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b8c5bf;
}

.past-assembly-list {
  padding-bottom: 2px;
}

.past-assembly-list-item .assembly-list-date {
  background: #f0f4f2;
  color: #49665a;
}

#assemblyCalendarBlock {
  margin-top: 0;
  padding: 20px;
  border: 1px solid rgba(205, 216, 210, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(29, 61, 47, .035);
}

@media (max-width: 760px) {
  .assembly-calendar-toggle-row {
    margin-top: -4px;
  }

  .assembly-calendar-toggle-btn {
    width: 100%;
  }

  .past-assemblies-section {
    padding: 16px;
    border-radius: 18px;
  }

  .past-assemblies-head {
    display: grid;
    gap: 14px;
    align-items: stretch;
  }

  .past-assemblies-filters {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .past-assemblies-scroll {
    max-height: 360px;
    padding-right: 3px;
  }

  #assemblyCalendarBlock {
    padding: 14px 10px;
    border-radius: 18px;
  }
}

@media (max-width: 430px) {
  .past-assemblies-filters {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   V38.12 - TEMI ASSEMBLEA + POSIZIONE TOGGLE CALENDARIO
   ========================================================= */

/* Campo "Punti / testo libero" nello stile Civico+. */
#assemblyTopics textarea,
#assemblyTopics input[type="text"],
#assemblyTopics .assembly-topic-free-text,
#assemblyTopics .assembly-topic-item textarea,
#assemblyTopics .assembly-topic-item input[type="text"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 48px;
  padding: 12px 14px !important;
  border: 1px solid #d8e3dd !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #20342b !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  box-shadow: none !important;
  outline: none !important;
  resize: vertical;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

#assemblyTopics textarea::placeholder,
#assemblyTopics input[type="text"]::placeholder,
#assemblyTopics .assembly-topic-free-text::placeholder {
  color: #8c9892 !important;
  opacity: 1;
}

#assemblyTopics textarea:focus,
#assemblyTopics input[type="text"]:focus,
#assemblyTopics .assembly-topic-free-text:focus {
  border-color: #2d8a65 !important;
  box-shadow: 0 0 0 4px rgba(45, 138, 101, .10) !important;
  background: #fff !important;
}

/* Il pulsante ora vive subito sopra il calendario che apre. */
.assembly-calendar-toggle-row {
  margin: 0 0 12px !important;
}

#assemblyCalendarBlock {
  margin-top: 0 !important;
}
