/* ===== Pannello di amministrazione ===== */
body.is-admin { background: #f4f5f7; }
.is-admin .site-header { position: static; }
.is-admin .nav > a { font-size: 15px; padding: 8px 10px; }
.admin-wrap { padding-top: 24px; }
.admin-wrap h1 { font-size: 28px; margin: 8px 0 18px; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 22px 24px; margin-bottom: 22px; }
.card h2 { margin-top: 0; font-size: 21px; }
.card h3 { margin-top: 0; }
.card-hl { border-left: 4px solid var(--primario); }
.card > summary { cursor: pointer; }
.card[open] > summary { margin-bottom: 16px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head > div, .admin-head form { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-n { font-size: 32px; font-weight: 700; color: var(--primario); line-height: 1; }
.stat-l { color: var(--muted); font-size: 14px; margin-top: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.filters input, .filters select { padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font: inherit; font-size: 14px; background: #fff; }
.filters input[type=search] { min-width: 220px; }

.table-scroll { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
.tbl th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafafa; }
.tbl tr.off td { opacity: .55; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #fafcfb; }
.tbl .actions { white-space: nowrap; }
.tbl .actions, .tbl .actions form { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; margin: 0; }
.tbl-form input[type=text] { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 4px; font: inherit; font-size: 15px; }
.tbl-form input[type=color] { width: 48px; height: 34px; padding: 0; border: 1px solid #ccc; }
.mini-logo { max-height: 28px; max-width: 60px; vertical-align: middle; margin-right: 8px; object-fit: contain; }
.dot-tema { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.more { position: relative; }
.more > summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 4px; list-style: none; }
.more[open] { display: flex; flex-direction: column; gap: 4px; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--testo); border-radius: 8px 8px 0 0; font-size: 15px; }
.tabs a.on { background: #fff; font-weight: 700; }
.tabs + .card { border-top-left-radius: 0; }

.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .edit-grid { grid-template-columns: 1fr; } }
.preview .percorso summary { font-size: 17px; }
.admin-box { background: #fbfaf3; border-color: #ece6c8 !important; }
.form input[type=color] { width: 70px; height: 40px; padding: 2px; display: block; margin-top: 6px; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 15px; margin: 0 0 18px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.plain { padding-left: 18px; }
.plain li { margin: 4px 0; }

.st-assegnata { background: #e8f0fb; color: #1d4a7a; }
.st-confermata { background: #e6f5ef; color: #145c3c; }
.st-lista_attesa { background: #fff3cd; color: #7a5b00; }
.st-annullata { background: #eee; color: #777; }

/* Archivio loghi */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.logo-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.logo-img { height: 90px; display: flex; align-items: center; justify-content: center; }
.logo-img img { max-height: 90px; max-width: 100%; object-fit: contain; }
.logo-card input[type=text] { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 4px; font: inherit; font-size: 14px; }
.logo-card .btn { align-self: flex-start; }
.sticky-save { position: sticky; bottom: 0; background: #f4f5f7; padding: 12px 0; }

/* Elenco link enti */
.link-cell { font-size: 13px; word-break: break-all; max-width: 380px; }
@media print {
  .no-print, .filters, .admin-head > div, .site-header, .site-footer, .hint { display: none !important; }
  body.is-admin { background: #fff; }
  .table-scroll { box-shadow: none; }
  .tbl td, .tbl th { padding: 6px 8px; font-size: 12px; }
}

.st-da_approvare { background: #fde8d7; color: #8a3d00; }
.inp-sm { padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font: inherit; font-size: 14px; max-width: 220px; background: #fff; }
.is-admin .header-inner { gap: 12px; }
.is-admin .brand-text { font-size: 18px; white-space: nowrap; }
.is-admin .nav > a { font-size: 14px; padding: 8px 7px; }
