/* =====================================================================
 * EasySW – Strumenti Super Admin (rev. 28/10/2026)
 * Colore dedicato (ambra) per non confondere mai la vista "come utente"
 * con la propria.
 * ===================================================================== */
:root {
    --sat-amber: #f2a516;
    --sat-amber-ink: #5b3a00;
    --sat-amber-soft: #fff4dc;
    --sat-amber-line: #f3d48f;
}

/* ------------------------------------------------------------ pulsante header */
.esw-icon-btn.sat-btn.is-on {
    background: var(--sat-amber);
    color: #2b1c00;
}
.esw-icon-btn.sat-btn.is-on:hover { background: #ffb933; color: #2b1c00; }

/* header bordato quando una vista è attiva */
body.sat-active .esw-header { box-shadow: inset 0 -3px 0 var(--sat-amber), 0 6px 18px -12px rgba(0, 0, 0, .45); }

/* ------------------------------------------------------------ barra */
.sat-bar {
    position: sticky;
    top: var(--esw-header-h, 56px);
    z-index: 1029;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 16px;
    background: var(--sat-amber);
    color: #2b1c00;
    font-family: var(--esw-font, system-ui, sans-serif);
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .5);
}
.sat-bar-ico {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .12);
}
.sat-bar-text { flex: 1 1 260px; min-width: 0; }
.sat-bar .sat-dim { opacity: .75; }
.sat-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sat-bar-btn {
    border: 1px solid rgba(0, 0, 0, .25);
    background: rgba(255, 255, 255, .35);
    color: #2b1c00;
    border-radius: 999px;
    padding: 5px 14px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}
.sat-bar-btn:hover { background: rgba(255, 255, 255, .6); }
.sat-bar-btn.primary { background: #2b1c00; color: #fff; border-color: #2b1c00; }
.sat-bar-btn.primary:hover { background: #000; }
.sat-bar-btn:disabled { opacity: .6; cursor: wait; }

/* ------------------------------------------------------------ riquadro dashboard */
.sat-dash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 14px 18px;
    border: 1px dashed var(--sat-amber-line);
    border-radius: var(--esw-radius, 10px);
    background: var(--sat-amber-soft);
    color: var(--sat-amber-ink);
}
.sat-dash.is-on { border-style: solid; border-color: var(--sat-amber); }
.sat-dash-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sat-dash-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--sat-amber-ink); }
.sat-dash-head p { margin: 2px 0 0; font-size: 13px; }
.sat-dash-ico {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--sat-amber);
    color: #2b1c00;
    font-size: 18px;
}
.sat-dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--sat-amber-line);
    background: #fff;
    color: var(--sat-amber-ink);
    border-radius: 999px;
    padding: 7px 14px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.sat-chip:hover { border-color: var(--sat-amber); background: #fffaf0; }
.sat-chip.primary { background: #2b1c00; border-color: #2b1c00; color: #fff; }
.sat-chip.primary:hover { background: #000; }
.sat-chip:disabled { opacity: .6; cursor: wait; }

/* ------------------------------------------------------------ pannello */
.sat-modal .modal-content { font-family: var(--esw-font, system-ui, sans-serif); border-radius: 14px; }
.sat-modal .modal-title { font-weight: 700; display: flex; gap: 10px; align-items: center; }
.sat-modal .modal-title i { color: var(--sat-amber); }
.sat-modal .modal-body { min-height: 360px; }

.sat-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--esw-rail, #f4f6f3);
    color: var(--esw-ink, #1c2421);
    font-size: 14px;
}
.sat-state small { color: var(--esw-muted, #66736e); }
.sat-state.is-on { background: var(--sat-amber-soft); color: var(--sat-amber-ink); border: 1px solid var(--sat-amber-line); }
.sat-state .sat-dim { opacity: .75; }

.sat-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: var(--esw-rail, #f4f6f3);
}
.sat-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--esw-muted, #66736e);
    cursor: pointer;
}
.sat-tabs button.active { background: #fff; color: var(--esw-ink, #1c2421); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.sat-help { font-size: 13px; color: var(--esw-muted, #66736e); margin: 0 0 12px; }

.sat-search { position: relative; margin-bottom: 10px; }
.sat-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--esw-muted, #66736e); font-size: 13px; }
.sat-search input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border: 1px solid var(--esw-line, #e1e6e2);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}
.sat-search input:focus { border-color: var(--sat-amber); box-shadow: 0 0 0 3px rgba(242, 165, 22, .2); }

.sat-list { display: flex; flex-direction: column; gap: 6px; }
.sat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--esw-line, #e1e6e2);
    border-radius: 10px;
    background: #fff;
    color: var(--esw-ink, #1c2421);
    cursor: pointer;
}
.sat-row:hover:not(:disabled) { border-color: var(--sat-amber); background: #fffaf0; }
.sat-row:disabled { cursor: default; }
.sat-row.is-current { border-color: var(--sat-amber); background: var(--sat-amber-soft); }
.sat-row.is-loading { opacity: .6; cursor: wait; }
.sat-row-ico {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--esw-rail, #f4f6f3);
    color: var(--esw-muted, #66736e);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.sat-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sat-row-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sat-row-main small { color: var(--esw-muted, #66736e); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sat-row-meta { flex: none; font-size: 12px; color: var(--esw-muted, #66736e); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sat-row-go { flex: none; font-size: 12px; font-weight: 700; color: var(--sat-amber-ink); }
.sat-row:not(:hover):not(.is-current) .sat-row-go { opacity: .55; }

.sat-loading, .sat-empty { padding: 18px; text-align: center; color: var(--esw-muted, #66736e); font-size: 14px; }

@media (max-width: 575.98px) {
    .sat-bar { padding: 8px 12px; font-size: 13px; }
    .sat-row-meta { display: none; }
    .sat-dash-actions { width: 100%; }
}
