/* AC Manager · pagina frontend Strutture */
.ac-sf-app .ac-subtitle a { color: #2563eb; text-decoration: none; font-weight: 600; }
.ac-sf-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ac-sf-card { padding: 20px; border-left: 4px solid #e0b468; }
.ac-sf-card-testa { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ac-sf-card h3 { margin: 0 0 6px; font-size: 17px; }
.ac-sf-card h3 a { color: #1a202c; text-decoration: none; }
.ac-sf-meta { margin: 2px 0; font-size: 13px; color: #718096; }
.ac-sf-azioni { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.ac-sf-azioni form { margin: 0; }
.ac-sf-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: #718096; white-space: nowrap; }
.ac-sf-badge.ac-sf-ok { background: #1f8a4c; }
.ac-sf-badge.ac-sf-no { background: #b32d2e; }
.ac-sf-badge.ac-sf-att { background: #b26a00; }
.ac-sf-sezione { padding: 22px 25px; margin-bottom: 20px; }
.ac-sf-sezione .ac-card-header-flex { margin-bottom: 14px; }
.ac-sf-tabs { margin-bottom: 18px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
.ac-sf-tabs .ac-filter-tab { white-space: nowrap; }
.ac-sf-h { margin: 22px 0 12px; font-size: 17px; font-weight: 700; color: var(--ac-ink, #1a202c); }
.ac-sf-h:first-child { margin-top: 0; }
.ac-sf-nota { max-width: 760px; font-size: 13.5px; color: #4a5568; line-height: 1.5; }
.ac-sf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 4px 16px; }
.ac-sf-campo { margin-bottom: 10px; }
.ac-sf-campo label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: #2d3748; }
.ac-sf-campo input, .ac-sf-campo textarea, .ac-sf-campo select,
.ac-sf-riga input[type=text], .ac-sf-riga input[type=email], .ac-sf-riga select, .ac-sf-riga-box input[type=text] {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid #cbd5e0; border-radius: 8px; font-size: 14px; background: #fff; }
.ac-sf-campo input[type=color] { padding: 2px; height: 40px; }
.ac-sf-campo small { display: block; margin-top: 3px; color: #718096; font-size: 12px; }
.ac-sf-riga { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.ac-sf-riga input[type=text], .ac-sf-riga input[type=email], .ac-sf-riga select { width: auto; flex: 1 1 200px; }
.ac-sf-riga-box { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #fcfcfd; }
.ac-sf-riga-box form { margin: 0; }
.ac-sf-riga-box .ac-sf-riga { margin: 0 0 8px; }
.ac-sf-tabella-wrap { overflow-x: auto; margin: 8px 0 14px; }
.ac-sf-tabella { width: 100%; border-collapse: collapse; font-size: 14px; }
.ac-sf-tabella th { text-align: left; padding: 8px 12px; background: #f7fafc; color: #4a5568; font-size: 12.5px; font-weight: 700; border: 0; }
.ac-sf-tabella tbody tr:nth-child(even) td { background: #fafbfc; }
.ac-sf-tabella td { padding: 9px 12px; border: 0; vertical-align: middle; }
.ac-sf-dx { text-align: right; width: 1%; white-space: nowrap; }
.ac-sf-dx form { margin: 0; }
.ac-sf-dett { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; background: #fcfcfd; }
.ac-sf-dett summary { cursor: pointer; padding: 2px 0; }
.ac-sf-dett[open] summary { margin-bottom: 12px; }
.action-btn.ac-sf-elimina { background: #fff; color: #c53030; border: 1px solid #feb2b2; }
.action-btn.ac-sf-elimina:hover { background: #fff5f5; }
.ac-sf-avviso { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; border-left: 4px solid; }
.ac-sf-avviso.ac-sf-success { background: #f0fff4; border-color: #1f8a4c; color: #22543d; }
.ac-sf-avviso.ac-sf-error { background: #fff5f5; border-color: #c53030; color: #742a2a; }
.ac-sf-avviso.ac-sf-warning { background: #fffaf0; border-color: #dd6b20; color: #7b341e; }
.ac-sf-avviso.ac-sf-info { background: #ebf8ff; border-color: #2563eb; color: #2a4365; }
.ac-sf-avviso code { font-size: 16px; font-weight: 700; }
@media (max-width: 600px) { .ac-sf-sezione { padding: 16px; } .ac-sf-riga > * { flex: 1 1 100%; } }

/* Niente sottolineature: link, pulsanti, tab e riassunti dei blocchi apribili */
.ac-sf-app a, .ac-sf-app a:hover, .ac-sf-app a:focus, .ac-sf-app summary, .ac-sf-app .action-btn, .ac-sf-app .ac-filter-tab { text-decoration: none !important; }
.ac-sf-app .ac-sf-tabella, .ac-sf-app .ac-sf-tabella td, .ac-sf-app .ac-sf-tabella th { border: 0 !important; text-decoration: none !important; }
.ac-sf-app .ac-sf-dett { border: 1px solid #edf2f7; }
.ac-sf-app .ac-sf-riga-box { border: 1px solid #edf2f7; }
.ac-sf-card-testa h3 a { color: var(--ac-ink, #1a202c); }

/* Popup scheda struttura */
.ac-sf-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ac-sf-modal-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.ac-sf-modal-box { position: relative; width: 100%; max-width: 980px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: #f4f6f9; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.ac-sf-modal-testa { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; background: #fff; border-bottom: 1px solid #edf2f7; flex: 0 0 auto; }
.ac-sf-modal-testa h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.ac-sf-modal-chiudi { width: 36px; height: 36px; border-radius: 50%; background: #f1f5f9; color: #4a5568; font-size: 24px; line-height: 36px; text-align: center; flex: 0 0 auto; }
.ac-sf-modal-chiudi:hover { background: #e2e8f0; }
.ac-sf-modal-corpo { padding: 18px 22px 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
body.ac-sf-modale-aperta { overflow: hidden; }
@media (max-width: 600px) { .ac-sf-modal { padding: 0; } .ac-sf-modal-box { max-width: none; height: 100%; max-height: none; border-radius: 0; } .ac-sf-modal-corpo { padding: 12px 12px 8px; } }
