/* ==========================================================================
   RepoWeb ODA — aggiunte specifiche (caricato DOPO style.css e style-repoweb.css)
   ========================================================================== */

/* Brand: logo RepoWeb + etichetta "ODA" (style-repoweb nasconde gli span, non gli em) */
.topbar .brand { gap: 8px !important; }
.topbar .brand .brand-tag {
    display: inline-block; font-style: normal; font-weight: 700; font-size: 11px;
    letter-spacing: .08em; color: var(--c-primary); background: var(--c-accent);
    border-radius: 4px; padding: 2px 6px; line-height: 1.2;
}

/* Semaforo impianti */
.site-card { display: flex; flex-direction: column; gap: 6px; }
.site-head { display: flex; align-items: center; gap: 10px; }
.site-head h3 { margin: 0; font-size: 15px; }
.lane-light { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0;
              box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.lane-green  { background: #1a8a4f; }
.lane-yellow { background: #e8a200; }
.lane-red    { background: #c0392b; }
.lane-off    { background: #b0b7c3; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 4px 0 0; font-size: 13px; }
.kv dt { color: var(--c-text-soft); }
.kv dd { margin: 0; }
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* Griglia a due colonne per i grafici */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.chart-card canvas { width: 100% !important; max-height: 260px; }
.empty-state { color: var(--c-text-soft); text-align: center; padding: 28px 12px; }

/* Esploratore dati */
.toolbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar-row label { margin: 0; white-space: nowrap; }
.toolbar-row select, .toolbar-row input[type=text] { margin: 0; }
.filter-row input[type=text] { flex: 1; min-width: 200px; }
.toolbar-actions { margin-top: 4px; }
.toolbar .spacer { flex: 1; }
.results-meta { color: var(--c-text-soft); margin: 0 0 10px; }
.table-wrap.wide { overflow-x: auto; }
table.data th a { color: inherit; white-space: nowrap; }
table.data td .null { color: #aaa; font-style: italic; font-size: 12px; }
table.data.compact td, table.data.compact th { padding: 6px 8px; font-size: 12.5px; white-space: nowrap; }

/* Form inline nelle tabelle */
form.inline { display: inline; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-disabled td { color: var(--c-text-muted); }
.tag { display: inline-block; font-size: 11px; background: var(--c-bg); border: 1px solid var(--c-border);
       border-radius: 10px; padding: 1px 7px; color: var(--c-text-soft); margin-left: 4px; }

/* Riquadro credenziali (mostrato una sola volta) */
.secret-box { background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }
.secret-box pre { margin: 10px 0 0; background: #fff; }

/* Login: sottotitolo e badge */
.login-box .login-sub { text-align: center; color: var(--c-text-soft); margin: -14px 0 18px; font-size: 13px; }
.login-box .brand-tag { display: inline-block; font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: .08em;
    color: var(--c-primary); background: var(--c-accent); border-radius: 4px; padding: 2px 8px; }

/* Nelle barre filtro i campi non devono occupare tutta la larghezza */
.toolbar-row select, .toolbar-row input[type=text], .toolbar-row input[type=date] { width: auto; }
.toolbar-row select { min-width: 160px; }
