.welcome-modal {
            position: fixed !important; top: 0 !important; left: 0 !important;
            width: 100% !important; height: 100% !important;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 99999 !important;
            display: flex; justify-content: center; align-items: center;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
        .welcome-modal-content {
            background: var(--neo-bg);
            color: var(--text-primary);
            border-radius: var(--border-radius-large);
            padding: 2rem;
            max-width: 600px; max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--neo-out-lg);
            border: none;
            margin: 1rem;
        }
        .welcome-header { text-align: center; margin-bottom: 1.5rem; }
        .welcome-header h2 { color: var(--neo-primary); margin: 0.5rem 0 0 0; font-size: 1.5rem; font-weight: 700; }
        .welcome-section { margin-bottom: 1.5rem; }
        .welcome-section h3 { color: var(--neo-primary); margin-bottom: 0.5rem; font-size: 1.1rem; font-weight: 600; }
        .welcome-section p { line-height: 1.6; margin-bottom: 0.5rem; }
        .welcome-section ul, .welcome-section ol { margin-left: 1.5rem; line-height: 1.6; }
        .warning-box {
            background: rgba(231, 76, 60, 0.08);
            color: var(--neo-error);
            padding: 0.75rem;
            border-radius: var(--border-radius-small);
            margin: 0.5rem 0; text-align: center;
            border-left: 4px solid var(--neo-error);
            box-shadow: var(--neo-in-sm);
        }
        .welcome-footer {
            display: flex; gap: 1rem; justify-content: center;
            margin-top: 2rem; flex-wrap: wrap;
        }
        .welcome-footer button {
            display: flex; align-items: center; gap: 0.5rem;
            padding: 0.75rem 1.5rem; border: none;
            border-radius: var(--border-radius-full);
            font-size: 1rem; font-weight: 600;
            cursor: pointer; transition: all 0.3s ease;
            min-width: 140px; justify-content: center;
            font-family: var(--body-font-family);
        }
        .btn-primary {
            background: var(--neo-bg); color: var(--neo-primary);
            box-shadow: var(--neo-out);
        }
        .btn-primary:hover { box-shadow: var(--neo-out-lg); transform: translateY(-2px); }
        .btn-secondary {
            background: var(--neo-bg); color: var(--text-secondary);
            box-shadow: var(--neo-out-sm);
        }
        .btn-secondary:hover { box-shadow: var(--neo-out); }
        @media (max-width: 768px) {
            .welcome-modal-content { margin: 0.5rem; padding: 1.5rem; max-height: 95vh; }
            .welcome-footer { flex-direction: column; }
            .welcome-footer button { width: 100%; }
        }

/* ===== Modale cantieri (PWSWORK) ===== */
.cantieri-modal {
  position: fixed; inset: 0; z-index: 4000;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(0,0,0,.45); padding: 16px;
  overflow-y: auto; /* se la tastiera riduce il viewport, il modale resta scrollabile */
}
.cantieri-modal.visible { display: flex; }
.cantieri-modal-card {
  background: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1a1a1a);
  width: 100%; max-width: 420px;
  max-height: 80vh; max-height: 85dvh; /* dvh segue il viewport reale su mobile */
  margin: auto; /* centrato quando c'è spazio, ancorato in alto quando no */
  border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.cantieri-modal-head { display: flex; align-items: center; justify-content: space-between; }
.cantieri-modal-head h3 { margin: 0; font-size: 1.1rem; }
.cantieri-close { background: none; border: none; cursor: pointer; color: inherit; padding: 4px; }
.cantieri-add {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  border: 1.5px dashed var(--md-sys-color-outline, #999);
  background: transparent; color: inherit; cursor: pointer;
  border-radius: 12px; padding: 10px; font-size: .95rem;
}
.cantieri-manual { display: flex; gap: 8px; }
.cantieri-manual input { flex: 1; }
.cantieri-manual-ok {
  border: none; border-radius: 10px; padding: 0 14px; cursor: pointer;
  background: var(--md-sys-color-primary, #1e6); color: #fff;
}
.cantieri-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.cantiere-item {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--md-sys-color-outline, #ccc);
  border-radius: 12px; padding: 12px; cursor: pointer; user-select: none;
}
.cantiere-item.selected { border-color: var(--md-sys-color-primary, #1e6); background: rgba(30,160,90,.08); }
/* Cantiere assegnato a me su PWSWORK → evidenziato giallo */
.cantiere-item.mine { background: #fff8d6; border-color: #e6c200; }
.cantiere-item.mine .cantiere-box { border-color: #caa900; }
.cantiere-item.selected.mine { border-color: var(--md-sys-color-primary, #1e6); }
.cantiere-box {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid var(--md-sys-color-outline, #999);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; color: #fff;
}
.cantiere-item.selected .cantiere-box { background: var(--md-sys-color-primary, #1e6); border-color: var(--md-sys-color-primary, #1e6); }
.cantiere-item.selected .cantiere-box::after { content: "✕"; }
.cantiere-name { flex: 1; }
.cantieri-empty { text-align: center; color: var(--md-sys-color-on-surface-variant, #777); font-style: italic; padding: 12px; }
.cantieri-modal-foot { display: flex; justify-content: flex-end; }
.cantieri-confirm {
  border: none; border-radius: 12px; padding: 10px 22px; cursor: pointer;
  background: var(--md-sys-color-primary, #1e6); color: #fff; font-size: 1rem;
}
