/* WRAPPER GENERALE */
#sites-dashboard {
    background: #f5f5f5;
    color: #222;
    padding: 16px;
    border-radius: 6px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border: 1px solid #ddd;
	width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 🔹 FILTRI COMPATTI IN ORIZZONTALE */

.sd-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px; /* row gap, column gap */
    margin-bottom: 12px;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.sd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0; /* niente spazio verticale extra */
}

/* la riga con i pulsanti va a destra */
.sd-filter-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* INPUT E SELECT */

.sd-filter-row input,
.sd-filter-row select {
    background: #ffffff;
    border: 1px solid #cfd8dc;
    color: #222;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    min-width: 400px;
}

#sd-search-site {
    min-width: 220px;
}

/* PULSANTI FILTRO */

.sd-filter-actions button,
.sd-filters button {
    background: #1976d2;
    border: none;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    font-size: 13px;
}

#sd-btn-reset {
    background: #757575;
}

/* WRAPPER TABELLA */

.sd-table-wrapper {
    margin-top: 8px;
    background: #ffffff;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #e0e0e0;
}

/* EXPORT BUTTON */

.sd-export-btn {
    float: right;
    margin-bottom: 6px;
    background: #eeeeee;
    border: 1px solid #cfd8dc;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* TABELLA */

#sd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#sd-table thead {
    background: #f1f5f9;
    text-transform: uppercase;
    font-size: 11px;
}

#sd-table th,
#sd-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

#sd-table tbody tr:nth-child(even) {
    background: #fafafa;
}

#sd-table tbody tr:hover {
    background: #e3f2fd;
}


/* =========================
   BOTTONE CARRELLO (tabella)
   ========================= */
#sd-table .sd-add-cart{
  background: #1d73e8;
  color: #fff !important;
  border: 1px solid #155bb2;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

#sd-table .sd-add-cart:hover{
  filter: brightness(0.95);
}

#sd-table .sd-add-cart:active{
  transform: translateY(1px);
}

/* MODALE CARRELLO */

.sd-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.sd-modal-inner {
    background: #ffffff;
    padding: 18px;
    border-radius: 6px;
    width: 480px;
    max-width: 95%;
    border: 1px solid #e0e0e0;
}

.sd-modal-inner h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.sd-order-form input,
.sd-order-form textarea {
    width: 100%;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #cfd8dc;
    color: #222;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.sd-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.sd-modal-actions button {
    background: #1976d2;
    border: none;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
}

#sd-close-cart {
    background: #757575;
}

#sd-order-message {
    margin-top: 8px;
    font-size: 13px;
}

/* ELEMENTI CARRELLO */

.sd-cart-item {
    font-size: 13px;
    margin-bottom: 4px;
}

.sd-cart-item .sd-remove {
    margin-left: 6px;
    background: #e53935;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    padding: 0 6px;
    font-size: 11px;
}

#sd-filter-seo {
    min-width: 100px;
    max-width: 120px;
    flex: 0 0 60px;
    padding: 4px 6px;
    font-size: 12px;
}

/* Riduco la larghezza dei campi numerici ZA / DA / TF / DR / AS / PRICE / SPECIAL */
#sd-filter-za,
#sd-filter-da,
#sd-filter-tf,
#sd-filter-dr,
#sd-filter-as {
    min-width: 40px;
    max-width: 50px;
    flex: 0 0 60px;
    padding: 4px 6px;
    font-size: 12px;
}

#sd-filter-price,
#sd-filter-discount,
#sd-filter-special,
#sd-filter-mention {
    min-width: 70px;
    max-width: 80px;
    flex: 0 0 60px;
    padding: 4px 6px;
    font-size: 12px;
}

/* Riduco un po' anche gli altri campi per farci stare tutto in una riga larga */
#sd-filter-state,
#sd-filter-reg,
#sd-filter-adv,
#sd-filter-link_type,
#sd-filter-type {
    min-width: 220px;
    flex: 0 0 220px;
}


/* Ingrandisce il campo Note aggiuntive nel carrello */
#sd-order-notes {
    min-height: 250px !important;
    resize: vertical;
    font-size: 14px;
    padding: 10px;
}

/* Forza la dimensione del campo Note aggiuntive */
#sd-order-notes {
    min-height: 180px !important;
    height: 180px !important;
    max-height: none !important;
    padding: 12px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Cursor a mano sui titoli ordinabili */
#sd-table thead th {
    cursor: pointer;
    position: relative;
    padding-right: 16px; /* spazio per la freccia */
}

/* Prima colonna (carrello) non ordinabile */
#sd-table thead th:first-child {
    cursor: default;
}

#sd-table thead th {
    cursor: pointer;
    position: relative;
    padding-right: 16px;
}
#sd-table thead th:first-child {
    cursor: default;
}

/* ----- Frecce di ordinamento SEMPRE visibili ----- */

/* =========================
   HEADER COLONNE – TESTO + ICONA SOTTO
   ========================= */

/* icona default */
#sd-table thead th::after {
    content: "⇅";
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;       /* grigio leggibile */
    line-height: 1;
}

/* ordinamento ASC */
#sd-table thead th.sd-sort-asc::after {
    content: "▲";
	display: block;
	    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #1d73e8;
}

/* ordinamento DESC */
#sd-table thead th.sd-sort-desc::after {
    content: "▼";
	display: block;
	    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #1d73e8;
}

/* hover */
#sd-table thead th:hover::after {
    color: #0f172a;
}

/* colonna carrello: niente icona */
#sd-table thead th:first-child::after {
    content: "";
}

.sd-num-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sd-num-group .sd-op {
    width: 46px;
    min-width: 46px;
    padding: 4px 6px;
}

.sd-num-group input[type="number"] {
    min-width: 46px;
}

/* --- Contenitore generale filtri --- */
.sd-filters {
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* --- Righe dei filtri --- */
.sd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

/* --- SELECT e INPUT standard --- */
.sd-filter-row select,
.sd-filter-row input[type="text"],
.sd-filter-row input[type="number"] {
    padding: 6px 8px;
    height: 34px !important;   /* più piccoli */
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* --- CONTENITORE FILTRI NUMERICI (operatore + input) --- */
.sd-num-filter {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}

/* --- Label sopra il filtro numerico --- */
.sd-num-filter label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    width: 100%;
}

/* --- Operatore numerico --- */
.sd-num-filter select {
    width: 55px;               /* piccolo */
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

/* --- Input numerico --- */
.sd-num-filter input[type="number"] {
    width: 110px;
}

/* --- Pulsanti --- */
.sd-filter-actions button {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

#sd-btn-search {
    background: #0073aa;
    color: #fff;
}

#sd-btn-reset {
    background: #e5e5e5;
}

/* =========================
   BOTTONE CARRELLO
   ========================= */

.sd-cart-btn {
    background: #000000;          /* sfondo nero */
    color: #ffffff;               /* icona bianca */
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease, transform 0.15s ease;
}

/* se usi SVG o font-icon */
.sd-cart-btn svg,
.sd-cart-btn i {
    fill: #ffffff;
    color: #ffffff;
    font-size: 15px;
}

/* hover */
.sd-cart-btn:hover {
    background: #1f2933;          /* nero leggermente più chiaro */
    transform: scale(1.05);
}

/* focus (accessibilità) */
.sd-cart-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
}


/* --- Responsiveness --- */
@media (max-width: 768px) {
    .sd-num-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .sd-num-filter input[type="number"] {
        width: 100%;
    }

    .sd-num-filter select {
        width: 100%;
    }
}

/* ---- Operatori numerici ultra-compatti ---- */

.sd-num-filter select {
    width: 30px !important;   /* prima era 55px */
    min-width: 30px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center;
    font-size: 12px;
}

/* Riduci ulteriormente l'altezza */
.sd-num-filter select,
.sd-num-filter input[type="number"] {
    height: 28px !important;
    padding: 4px 6px !important;
}

/* Riduci spazi tra i filtri */
.sd-num-filter {
    gap: 4px !important;
    margin-right: 6px;
}

/* Contenitore tabella */
.sd-table-wrapper {
    margin-top: 15px;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    
    /* 👇 importantissimo per non farla "uscire" a destra */
    overflow-x: auto;
    overflow-y: visible;
}

/* Assicura che non superi il contenitore esterno */
#sites-dashboard .sd-table-wrapper {
    max-width: 100%;
    box-sizing: border-box;
}


/* Tabella principale */
#sd-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* se vuoi più compattezza puoi usare 'fixed' */
}

/* Celle più pulite */
#sd-table th,
#sd-table td {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;     /* evita che vada a capo e allarghi righe a caso */
}

/* Intestazioni */
#sd-table th {
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

/* righe */
#sd-table tr:nth-child(even) td {
    background: #fafafa;
}

@media (max-width: 768px) {
    #sd-table th,
    #sd-table td {
        font-size: 12px;
        padding: 4px 6px;
    }
}


#sd-table {
    width: 100% !important;   /* forza larghezza piena */
    min-width: 100% !important;
    border-collapse: collapse;
    table-layout: auto;        /* permette alle colonne di espandersi */
}

.sd-pagination-ajax {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.sd-pagination-ajax .sd-page-btn-ajax {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
}

.sd-pagination-ajax .sd-page-btn-ajax:disabled {
    opacity: 0.4;
    cursor: default;
}

.sd-pagination-ajax .sd-page-info {
    font-size: 13px;
}

/* --- Paginazione AJAX: mostra solo PRECEDENTE / SUCCESSIVA --- */

/* stile base pulsanti paginazione */
.sd-pagination-ajax {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.sd-pagination-ajax .sd-page-btn-ajax {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
}

/* disabilitati */
.sd-pagination-ajax .sd-page-btn-ajax[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* testo centrale */
.sd-pagination-ajax .sd-page-info {
    font-size: 13px;
}

/* ❗ nasconde TUTTI i bottoni di paginazione
   che NON sono "pagina precedente" o "pagina successiva" */
.sd-pagination-ajax .sd-page-btn-ajax:not(.sd-page-prev):not(.sd-page-next) {
    display: none;
}


/* --- Pulsanti PREV / NEXT in blu --- */

.sd-pagination-ajax .sd-page-btn-ajax {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #1d73e8;
    background: #1d73e8;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

/* Hover */
.sd-pagination-ajax .sd-page-btn-ajax:hover:not([disabled]) {
    background: #155bb2;
    border-color: #155bb2;
}

/* Disabled */
.sd-pagination-ajax .sd-page-btn-ajax[disabled] {
    background: #9fc4f5;
    border-color: #9fc4f5;
    cursor: default;
    opacity: 0.7;
}

/* ---------------------------
   Riorganizzazione riga filtri
---------------------------- */

/* Ogni .sd-filter-row è una linea */
.sd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

/* Rende più compatti i blocchi numerici */
.sd-num-filter {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* RIGA SPECIFICA: porta Price, Gambling e Discount su nuova riga */
.sd-filter-group-lower {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: -4px;
}

/* Ogni filtro occuperà uno spazio proporzionato */
.sd-filter-group-lower .sd-num-filter {
    min-width: 220px;
}

/* ---------------------------
   Pulsanti allineati a sinistra
---------------------------- */
.sd-filter-actions {
    display: flex;
    justify-content: flex-start;   /* allinea a sinistra */
    gap: 12px;
}

/* stile opzionale per migliorare l'aspetto */
.sd-filter-actions button {
    min-width: 90px;
}

/* Link "I miei ordini" vicino al carrello */
.sd-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sd-filter-actions button {
    margin: 0;
}

.sd-orders-link {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #2271b1;
    color: #2271b1;
    background: #f0f7ff;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sd-orders-link:hover {
    background: #2271b1;
    color: #fff;
    border-color: #1b5a8a;
}


/* ==============================
   TABELLA SITI – FIX OVERLAP
   ============================== */

/* Tabelle fluide ma leggibili */
#sd-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* INTESTAZIONI */
#sd-table thead th {
    color: #000 !important;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    vertical-align: middle;

    /* SOLO header va a capo */
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;

    padding: 8px 6px;
}

/* CELLE */
#sd-table tbody td {
    font-size: 13px;
    padding: 10px 8px;
    vertical-align: middle;

    /* ❗ EVITA SOVRAPPOSIZIONI */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Colonna SITE più larga */
#sd-table thead th:nth-child(2),
#sd-table tbody td:nth-child(2) {
    width: 220px;
    white-space: normal;        /* il nome sito può andare a capo */
    word-break: break-word;
}

/* Colonne testuali medie */
#sd-table thead th:nth-child(3),
#sd-table thead th:nth-child(4),
#sd-table thead th:nth-child(5),
#sd-table tbody td:nth-child(3),
#sd-table tbody td:nth-child(4),
#sd-table tbody td:nth-child(5) {
    width: 100px;
}

/* Colonne metriche (ZA, DA, TF, DR, ecc.) */
#sd-table thead th:nth-child(n+9),
#sd-table tbody td:nth-child(n+9) {
    width: 70px;
    text-align: center;
}

/* Link sito */
#sd-table td a {
    word-break: break-word;
    color: #00a651;
}

.sd-orders-table tbody tr:hover {
    background: #eef6ff;
}

/* Stato ordine (se lo usi) */
.sd-order-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.sd-order-status--pending {
    background: #fff7e6;
    color: #b35c00;
}

.sd-order-status--completed {
    background: #e6f9ea;
    color: #1e7e34;
}

.sd-order-status--cancelled {
    background: #fdeaea;
    color: #c0392b;
}

/* Link nell'elenco ordini */
.sd-orders-table a {
    color: #2271b1;
    text-decoration: none;
}

.sd-orders-table a:hover {
    text-decoration: underline;
}


/* =====================================================
   ORDINI – FULL WIDTH REALE (FIX FINALE)
   ===================================================== */



/* contenitore tabella */
.sd-orders-list {
    width: 100%;
    overflow-x: auto;
}

/* tabella */
.sd-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* HEADER */
.sd-orders-table thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 12px 10px;
    border-bottom: 2px solid #d1d5db;
    white-space: nowrap;
}

/* CELLE */
.sd-orders-table tbody td {
    padding: 10px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

/* RIGHE */
.sd-orders-table tbody tr:nth-child(even) {
    background: #f9fafb;
}
.sd-orders-table tbody tr:hover {
    background: #eef6ff;
}

/* =====================================================
   ORDINI – FULL WIDTH REALE (FIX FINALE)
   ===================================================== */

/* 🔥 Fa uscire la sezione ordini dal container del tema */
.sd-orders-fullwidth {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 24px; /* respiro ai lati */
    box-sizing: border-box;
}


/* contenitore tabella */
.sd-orders-list {
    width: 100%;
    overflow-x: auto;
}

/* tabella */
.sd-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* HEADER */
.sd-orders-table thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 12px 10px;
    border-bottom: 2px solid #d1d5db;
    white-space: nowrap;
}

/* CELLE */
.sd-orders-table tbody td {
    padding: 10px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

/* RIGHE */
.sd-orders-table tbody tr:nth-child(even) {
    background: #f9fafb;
}
.sd-orders-table tbody tr:hover {
    background: #eef6ff;
}

.sd-orders-table td,
.sd-orders-table th {
    white-space: normal;          /* permette il wrap */
    word-break: break-word;       /* spezza parole lunghe */
    overflow-wrap: anywhere;      /* spezza anche URL */
}

.sd-orders-table td details {
    max-width: 100%;
}

.sd-orders-table td details ul {
    padding-left: 18px;
    margin: 6px 0;
}

.sd-orders-table td details li {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.sd-orders-table a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.sd-orders-table td details summary {
    cursor: pointer;
    font-weight: 600;
}

.sd-orders-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

.sd-orders-table td:nth-child(7) {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}


/* =====================================================
   ORDINI: esce dal container del tema (full width)
   ===================================================== */
.sd-orders-fullwidth{
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 24px;
    box-sizing: border-box;
}

/* contenitore tabella */
.sd-orders-list{
    width: 100%;
    max-width: 100%;
    overflow-x: visible;   /* niente scroll se ci sta */
}

/* tabella */
.sd-orders-table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;  /* IMPORTANTISSIMO: permette alla colonna 7 di “prendere il resto” */
}

/* colonne 1-6 compatte */
.sd-orders-table th:nth-child(-n+6),
.sd-orders-table td:nth-child(-n+6){
    white-space: nowrap;
}

/* colonna 7 (Dettagli) prende il resto e va a capo */
.sd-orders-table th:nth-child(7),
.sd-orders-table td:nth-child(7){
    width: auto;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* anche i link dentro Dettagli vanno a capo */
.sd-orders-table td:nth-child(7) a{
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* WRAPPER GENERALE */
#sites-dashboard {
    background: #f5f5f5;
    color: #222;
    padding: 16px;
    border-radius: 6px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border: 1px solid #ddd;
	width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}



/* 🔹 FILTRI COMPATTI IN ORIZZONTALE */

.sd-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px; /* row gap, column gap */
    margin-bottom: 12px;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.sd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0; /* niente spazio verticale extra */
}

/* la riga con i pulsanti va a destra */
.sd-filter-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* INPUT E SELECT */

.sd-filter-row input,
.sd-filter-row select {
    background: #ffffff;
    border: 1px solid #cfd8dc;
    color: #222;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    min-width: 400px;
}

#sd-search-site {
    min-width: 220px;
}

/* PULSANTI FILTRO */

.sd-filter-actions button,
.sd-filters button {
    background: #1976d2;
    border: none;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    font-size: 13px;
}

#sd-btn-reset {
    background: #757575;
}


/* WRAPPER TABELLA */

.sd-table-wrapper {
    margin-top: 8px;
    background: #ffffff;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #e0e0e0;
}

/* EXPORT BUTTON */

.sd-export-btn {
    float: right;
    margin-bottom: 6px;
    background: #eeeeee;
    border: 1px solid #cfd8dc;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* TABELLA */

#sd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#sd-table thead {
    background: #f1f5f9;
    text-transform: uppercase;
    font-size: 11px;
}

#sd-table th,
#sd-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

#sd-table tbody tr:nth-child(even) {
    background: #fafafa;
}

#sd-table tbody tr:hover {
    background: #e3f2fd;
}

/* BOTTONE CARRELLO IN TABELLA */

.sd-add-cart {
    background: #ffffff;
    border: none;
    padding: 4px 7px;
    border-radius: 3px;
    cursor: pointer;
    color: #fff;
    font-size: 12px;
}

/* MODALE CARRELLO */

.sd-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.sd-modal-inner {
    background: #ffffff;
    padding: 18px;
    border-radius: 6px;
    width: 480px;
    max-width: 95%;
    border: 1px solid #e0e0e0;
}

.sd-modal-inner h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.sd-order-form input,
.sd-order-form textarea {
    width: 100%;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #cfd8dc;
    color: #222;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.sd-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.sd-modal-actions button {
    background: #1976d2;
    border: none;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
}

#sd-close-cart {
    background: #757575;
}

#sd-order-message {
    margin-top: 8px;
    font-size: 13px;
}

/* ELEMENTI CARRELLO */

.sd-cart-item {
    font-size: 13px;
    margin-bottom: 4px;
}

.sd-cart-item .sd-remove {
    margin-left: 6px;
    background: #e53935;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    padding: 0 6px;
    font-size: 11px;
}

#sd-filter-seo {
    min-width: 100px;
    max-width: 120px;
    flex: 0 0 60px;
    padding: 4px 6px;
    font-size: 12px;
}


/* Riduco un po' anche gli altri campi per farci stare tutto in una riga larga */
#sd-filter-state,
#sd-filter-reg,
#sd-filter-adv,
#sd-filter-link_type,
#sd-filter-type {
    min-width: 220px;
    flex: 0 0 220px;
}


/* Ingrandisce il campo Note aggiuntive nel carrello */
#sd-order-notes {
    min-height: 250px !important;
    resize: vertical;
    font-size: 14px;
    padding: 10px;
}

/* Forza la dimensione del campo Note aggiuntive */
#sd-order-notes {
    min-height: 180px !important;
    height: 180px !important;
    max-height: none !important;
    padding: 12px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Cursor a mano sui titoli ordinabili */
#sd-table thead th {
    cursor: pointer;
    position: relative;
    padding-right: 16px; /* spazio per la freccia */
}

/* Prima colonna (carrello) non ordinabile */
#sd-table thead th:first-child {
    cursor: default;
}

#sd-table thead th {
    cursor: pointer;
    position: relative;
    padding-right: 16px;
}
#sd-table thead th:first-child {
    cursor: default;
}

/* ----- Frecce di ordinamento SEMPRE visibili ----- */

/* Stile base (freccia doppia grigia) */
#sd-table thead th::after {
    content: '⇅';
    font-size: 10px;
    color: #aaa;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
}

/* Freccia ordinamento ASC attiva */
#sd-table thead th.sd-sort-asc::after {
    content: '▲';
    color: #1976d2;
}

/* Freccia ordinamento DESC attiva */
#sd-table thead th.sd-sort-desc::after {
    content: '▼';
    color: #1976d2;
}

/* Colonna carrello NON ordinabile → nessuna freccia */
#sd-table thead th:first-child::after {
    content: '' !important;
}

.sd-num-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sd-num-group .sd-op {
    width: 46px;
    min-width: 46px;
    padding: 4px 6px;
}

.sd-num-group input[type="number"] {
    min-width: 46px;
}

/* --- Contenitore generale filtri --- */
.sd-filters {
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* --- Righe dei filtri --- */
.sd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

/* --- SELECT e INPUT standard --- */
.sd-filter-row select,
.sd-filter-row input[type="text"],
.sd-filter-row input[type="number"] {
    padding: 6px 8px;
    height: 34px !important;   /* più piccoli */
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* --- CONTENITORE FILTRI NUMERICI (operatore + input) --- */
.sd-num-filter {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}

/* --- Label sopra il filtro numerico --- */
.sd-num-filter label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    width: 100%;
}

/* --- Operatore numerico --- */
.sd-num-filter select {
    width: 55px;               /* piccolo */
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

/* --- Input numerico --- */
.sd-num-filter input[type="number"] {
    width: 110px;
}

/* --- Pulsanti --- */
.sd-filter-actions button {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

#sd-btn-search {
    background: #0073aa;
    color: #fff;
}

#sd-btn-reset {
    background: #e5e5e5;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .sd-num-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .sd-num-filter input[type="number"] {
        width: 100%;
    }

    .sd-num-filter select {
        width: 100%;
    }
}

/* ---- Operatori numerici ultra-compatti ---- */

.sd-num-filter select {
    width: 30px !important;   /* prima era 55px */
    min-width: 30px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center;
    font-size: 12px;
}

/* Riduci ulteriormente l'altezza */
.sd-num-filter select,
.sd-num-filter input[type="number"] {
    height: 28px !important;
    padding: 4px 6px !important;
}

/* Riduci spazi tra i filtri */
.sd-num-filter {
    gap: 4px !important;
    margin-right: 6px;
}

/* Contenitore tabella */
.sd-table-wrapper {
    margin-top: 15px;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    
    /* 👇 importantissimo per non farla "uscire" a destra */
    overflow-x: auto;
    overflow-y: visible;
}

/* Assicura che non superi il contenitore esterno */
#sites-dashboard .sd-table-wrapper {
    max-width: 100%;
    box-sizing: border-box;
}


/* Tabella principale */
#sd-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* se vuoi più compattezza puoi usare 'fixed' */
}

/* Celle più pulite */
#sd-table th,
#sd-table td {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;     /* evita che vada a capo e allarghi righe a caso */
}

/* Intestazioni */
#sd-table th {
    background: #f5f5f5;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

/* righe */
#sd-table tr:nth-child(even) td {
    background: #fafafa;
}

@media (max-width: 768px) {
    #sd-table th,
    #sd-table td {
        font-size: 12px;
        padding: 4px 6px;
    }
}


#sd-table {
    width: 100% !important;   /* forza larghezza piena */
    min-width: 100% !important;
    border-collapse: collapse;
    table-layout: auto;        /* permette alle colonne di espandersi */
}

.sd-pagination-ajax {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.sd-pagination-ajax .sd-page-btn-ajax {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
}

.sd-pagination-ajax .sd-page-btn-ajax:disabled {
    opacity: 0.4;
    cursor: default;
}

.sd-pagination-ajax .sd-page-info {
    font-size: 13px;
}

/* --- Paginazione AJAX: mostra solo PRECEDENTE / SUCCESSIVA --- */

/* stile base pulsanti paginazione */
.sd-pagination-ajax {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.sd-pagination-ajax .sd-page-btn-ajax {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 13px;
}

/* disabilitati */
.sd-pagination-ajax .sd-page-btn-ajax[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* testo centrale */
.sd-pagination-ajax .sd-page-info {
    font-size: 13px;
}

/* ❗ nasconde TUTTI i bottoni di paginazione
   che NON sono "pagina precedente" o "pagina successiva" */
.sd-pagination-ajax .sd-page-btn-ajax:not(.sd-page-prev):not(.sd-page-next) {
    display: none;
}


/* --- Pulsanti PREV / NEXT in blu --- */

.sd-pagination-ajax .sd-page-btn-ajax {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #1d73e8;
    background: #1d73e8;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

/* Hover */
.sd-pagination-ajax .sd-page-btn-ajax:hover:not([disabled]) {
    background: #155bb2;
    border-color: #155bb2;
}

/* Disabled */
.sd-pagination-ajax .sd-page-btn-ajax[disabled] {
    background: #9fc4f5;
    border-color: #9fc4f5;
    cursor: default;
    opacity: 0.7;
}

/* ---------------------------
   Riorganizzazione riga filtri
---------------------------- */

/* Ogni .sd-filter-row è una linea */
.sd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

/* Rende più compatti i blocchi numerici */
.sd-num-filter {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* RIGA SPECIFICA: porta Price, Gambling e Discount su nuova riga */
.sd-filter-group-lower {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: -4px;
}

/* Ogni filtro occuperà uno spazio proporzionato */
.sd-filter-group-lower .sd-num-filter {
    min-width: 220px;
}

/* ---------------------------
   Pulsanti allineati a sinistra
---------------------------- */
.sd-filter-actions {
    display: flex;
    justify-content: flex-start;   /* allinea a sinistra */
    gap: 12px;
}

/* stile opzionale per migliorare l'aspetto */
.sd-filter-actions button {
    min-width: 90px;
}

/* Link "I miei ordini" vicino al carrello */
.sd-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sd-filter-actions button {
    margin: 0;
}

.sd-orders-link {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #2271b1;
    color: #2271b1;
    background: #f0f7ff;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sd-orders-link:hover {
    background: #2271b1;
    color: #fff;
    border-color: #1b5a8a;
}


/* ==============================
   TABELLA SITI – FIX OVERLAP
   ============================== */

/* Tabelle fluide ma leggibili */
#sd-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* INTESTAZIONI */
#sd-table thead th {
    color: #000 !important;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    vertical-align: middle;

    /* SOLO header va a capo */
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;

    padding: 8px 6px;
}

/* CELLE */
#sd-table tbody td {
    font-size: 13px;
    padding: 10px 8px;
    vertical-align: middle;

    /* ❗ EVITA SOVRAPPOSIZIONI */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Colonna SITE più larga */
#sd-table thead th:nth-child(2),
#sd-table tbody td:nth-child(2) {
    width: 220px;
    white-space: normal;        /* il nome sito può andare a capo */
    word-break: break-word;
}

/* Colonne testuali medie */
#sd-table thead th:nth-child(3),
#sd-table thead th:nth-child(4),
#sd-table thead th:nth-child(5),
#sd-table tbody td:nth-child(3),
#sd-table tbody td:nth-child(4),
#sd-table tbody td:nth-child(5) {
    width: 100px;
}

/* Colonne metriche (ZA, DA, TF, DR, ecc.) */
#sd-table thead th:nth-child(n+9),
#sd-table tbody td:nth-child(n+9) {
    width: 70px;
    text-align: center;
}

/* Link sito */
#sd-table td a {
    word-break: break-word;
    color: #00a651;
}

.sd-orders-table tbody tr:hover {
    background: #eef6ff;
}

/* Stato ordine (se lo usi) */
.sd-order-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.sd-order-status--pending {
    background: #fff7e6;
    color: #b35c00;
}

.sd-order-status--completed {
    background: #e6f9ea;
    color: #1e7e34;
}

.sd-order-status--cancelled {
    background: #fdeaea;
    color: #c0392b;
}

/* Link nell'elenco ordini */
.sd-orders-table a {
    color: #2271b1;
    text-decoration: none;
}

.sd-orders-table a:hover {
    text-decoration: underline;
}

/* =====================================================
   ORDINI – FULL WIDTH REALE (FIX FINALE)
   ===================================================== */

/* contenitore tabella */
.sd-orders-list {
    width: 100%;
    overflow-x: auto;
}

/* tabella */
.sd-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* HEADER */
.sd-orders-table thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 12px 10px;
    border-bottom: 2px solid #d1d5db;
    white-space: nowrap;
}

/* CELLE */
.sd-orders-table tbody td {
    padding: 10px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

/* RIGHE */
.sd-orders-table tbody tr:nth-child(even) {
    background: #f9fafb;
}
.sd-orders-table tbody tr:hover {
    background: #eef6ff;
}

/* =====================================================
   ORDINI – FULL WIDTH REALE (FIX FINALE)
   ===================================================== */

/* 🔥 Fa uscire la sezione ordini dal container del tema */
.sd-orders-fullwidth {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 24px; /* respiro ai lati */
    box-sizing: border-box;
}


/* contenitore tabella */
.sd-orders-list {
    width: 100%;
    overflow-x: auto;
}

/* tabella */
.sd-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* HEADER */
.sd-orders-table thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    padding: 12px 10px;
    border-bottom: 2px solid #d1d5db;
    white-space: nowrap;
}

/* CELLE */
.sd-orders-table tbody td {
    padding: 10px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

/* RIGHE */
.sd-orders-table tbody tr:nth-child(even) {
    background: #f9fafb;
}
.sd-orders-table tbody tr:hover {
    background: #eef6ff;
}


/* 🔥 Sblocca il contenitore del tema SOLO per la tabella ordini */
.sd-orders-list {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* forza lo scroll anche se il tema lo nasconde */
.sd-orders-list {
    overflow-x: auto !important;
}

/* tabella larga quanto serve */
.sd-orders-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

/* forza sblocco overflow del contenitore del tema */
.entry-content,
.entry-content > *,
.wp-site-blocks,
.site-content,
.container,
.wrap {
    overflow-x: visible;
}

/* ma SOLO la tabella fa scroll */
.sd-orders-list {
    overflow-x: auto;
}

.sd-orders-table td,
.sd-orders-table th {
    white-space: normal;          /* permette il wrap */
    word-break: break-word;       /* spezza parole lunghe */
    overflow-wrap: anywhere;      /* spezza anche URL */
}

.sd-orders-table td details {
    max-width: 100%;
}

.sd-orders-table td details ul {
    padding-left: 18px;
    margin: 6px 0;
}

.sd-orders-table td details li {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.sd-orders-table a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.sd-orders-table td details summary {
    cursor: pointer;
    font-weight: 600;
}

.sd-orders-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

.sd-orders-table td:nth-child(7) {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.sd-orders-fullwidth{
    transform: none !important;
}

/* Colonna DATE: non troncare */
#sd-table th:last-child,
#sd-table td:last-child{
  min-width: 110px;          /* aumenta se vuoi */
  width: 110px;
  white-space: nowrap;
}

/* Evita che la tabella tagli l’ultima colonna */
#sd-table{
  table-layout: auto !important;
}

#sites-dashboard .sd-table-wrapper{
  overflow-x: auto;          /* se serve scroll solo quando necessario */
}


#sd-table td:last-child{
  overflow: visible !important;
  text-overflow: clip !important;
}


/* 2) Icone ordinamento: SOTTO al testo (no a destra) + più leggibili */
#sd-table thead th{
  padding-right: 0 !important; /* niente spazio a destra */
}

/* Reset totale dell'icona a destra impostata da altri blocchi */
#sd-table thead th::after{
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;

  display: block !important;
  margin-top: 4px !important;

  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  color: #64748b !important; /* grigio più visibile */
  content: "⇅" !important;
}

/* Stato ASC/DESC in blu */
#sd-table thead th.sd-sort-asc::after{
  content: "▲" !important;
  color: #1d73e8 !important;
}

#sd-table thead th.sd-sort-desc::after{
  content: "▼" !important;
  color: #1d73e8 !important;
}

/* Hover più evidente */
#sd-table thead th:hover::after{
  color: #0f172a !important;
}

/* Colonna carrello: nessuna icona */
#sd-table thead th:first-child::after{
  content: "" !important;
}

/* FIX: toglie barra/triangolo blu senza toccare le tue icone testuali */
#sd-table thead th.sd-sort-asc::before,
#sd-table thead th.sd-sort-desc::before{
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

#sd-table thead th.sd-sort-asc,
#sd-table thead th.sd-sort-desc{
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.sd-link-badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
.sd-link-badge--ok{ background:#e6f9ea; color:#1e7e34; }
.sd-link-badge--ko{ background:#fdeaea; color:#c0392b; }
.sd-link-badge--na{ background:#f3f4f6; color:#374151; }


#sd-btn-cart {
    position: relative;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}


/* RESET totale stile */
.sd-btn {
    font-family: inherit;           /* usa lo stesso font del sito */
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;            /* tutti uguali */
    padding: 12px 22px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    color: #fff;
}

/* Hover uniforme */
.sd-btn:hover {
    transform: translateY(-2px);
}

#sd-btn-search {
    background: linear-gradient(135deg, #0f766e, #115e59);
    box-shadow: 0 4px 12px rgba(15,118,110,0.3);
}

#sd-btn-reset {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 4px 12px rgba(75,85,99,0.3);
}

#sd-btn-cart {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

#sd-btn-orders {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

#sd-btn-export {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

#sd-send-order {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

#sd-close-cart {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 4px 12px rgba(75,85,99,0.3);
}

#sd-cart-count {
    /* v4.77: contatore siti sempre visibile nel tondo bianco del Carrello */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    margin: 0;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #1d4ed8 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* FORZA stesso border-radius per tutti */
#sd-btn-search,
#sd-btn-reset,
#sd-btn-cart,
#sd-btn-export,
#sd-send-order,
#sd-close-cart,
#sd-btn-orders,
#sd-btn-discount,
#sd-btn-italy,
#sd-only-gambling {
    border-radius: 12px !important;
}

/*pulsante aggiungi al carrello */
.sd-btn-mini {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 10px;
    min-height: auto;
}

.sd-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}

.sd-btn-primary:hover {
    box-shadow: 0 6px 16px rgba(37,99,235,0.35);
}

/*pulsante exporta csv */

.sd-btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 4px 10px rgba(75,85,99,0.25);
	float: right;
}

.sd-btn-secondary:hover {
    box-shadow: 0 6px 16px rgba(75,85,99,0.35);
}


.sd-add-cart {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(37,99,235,0.3);
}

.sd-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.45);
}

.sd-add-cart:active {
    transform: scale(0.95);
}

/*conteggio costo carrello */

.sd-cart-total {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-size: 16px;
    font-weight: 600;
    text-align: right;
}

.price-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 13px;
}

.price-compact .old {
    text-decoration: line-through;
    color: #999;
    font-size: 11px;
}

.price-compact .new {
    color: #00CC61;
    font-weight: 600;
}




/* sconto alto (>=50%) */
.badge-discount.super {
    background: linear-gradient(135deg, #ff7a18, #ff3d00); /* arancio/rosso */
    color: #fff;
    box-shadow: 0 0 6px rgba(255, 61, 0, 0.4);
}

/* no discount */
.no-discount {
    color: #999;
    font-size: 12px;
}

/* base badge */
.badge-discount {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #00CC61;
    color: #fff;
    white-space: nowrap;
}

/* sconto medio (>=30%) */
.badge-discount.top {
    background: #007bff; /* blu */
    color: #fff;
}

.super-deal td:first-child {
    border-left: 3px solid #ff3d00;
}

.top-deal td:first-child {
    border-left: 3px solid #007bff;
}

table tbody tr:hover td {
    background-color: rgba(0, 204, 97, 0.08) !important;
}

tr:has(.badge-discount.super) {
    background: rgba(255, 61, 0, 0.05);
}

.badge-discount:hover {
    transform: scale(1.05);
    transition: 0.15s ease;
}

/* SUPER DEAL 🔥 */
.super-deal td {
    background: rgba(255, 61, 0, 0.08) !important;
}

/* TOP DEAL 🚀 */
.top-deal td {
    background: rgba(0, 123, 255, 0.08) !important;
}

/* visualizzazione da mobile */

@media (max-width: 768px) {

    #sd-table {
        width: auto !important;
        min-width: 1100px; /* aumenta se serve */
        table-layout: auto !important;
    }

    #sd-table th,
    #sd-table td {
        white-space: nowrap;
    }

    .sd-table-wrapper,
    #sd-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

}

@media (max-width: 768px) {

    #sd-table td:nth-child(2),
    #sd-table th:nth-child(2) {
        min-width: 220px;
        max-width: 260px;
    }

}

/* MODAL BASE */
#sd-cart-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* CONTENUTO INTERNO */
#sd-cart-modal .sd-modal-inner {
    background: #ffffff;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;       /* altezza massima viewport */
    overflow-y: auto;       /* SCROLL ATTIVO */
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

/* MOBILE */
@media (max-width: 768px) {
    #sd-cart-modal .sd-modal-inner {
        width: 96%;
        max-height: 85vh;
        padding: 18px;
    }
}

/* preferenza ricezione email*/

/* =========================
   EMAIL PREFERENCES ACCOUNT STYLE
========================= */

.sd-email-pref-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    max-width: 700px;
    margin-top: 30px;
}

/* Titolo come Account */
.sd-email-pref-box h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #374151;
}

/* Label */
.sd-email-pref-box label {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}

/* Checkbox container */
.sd-email-pref-box .sd-checkbox-row {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Checkbox più elegante */
.sd-email-pref-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6; /* blu stile account */
    cursor: pointer;
}

/* Bottone stile Update Account */
.sd-email-pref-box .sd-btn-primary {
    background: #3b82f6;
    border: none;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sd-email-pref-box .sd-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Messaggio successo */
.sd-email-pref-box .sd-success {
    color: #16a34a;
    font-weight: 600;
    margin-bottom: 15px;
}
/* === Sites Dashboard v3.0 === */
#sites-dashboard.sd-v3{--sd-ink:#111827;--sd-muted:#6b7280;--sd-line:#e5e7eb;--sd-soft:#f8fafc;--sd-brand:#111827;max-width:1500px;margin:24px auto;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--sd-ink)}
.sd-v3 *{box-sizing:border-box}.sd-v3-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 30px;background:#fff;border:1px solid var(--sd-line);border-radius:18px;margin-bottom:18px;box-shadow:0 8px 28px rgba(15,23,42,.05)}
.sd-v3-hero h2{font-size:30px;line-height:1.15;margin:5px 0 7px}.sd-v3-hero p,.sd-muted{color:var(--sd-muted);margin:0}.sd-eyebrow{font-size:11px;letter-spacing:.14em;font-weight:800;color:#64748b}.sd-v3-hero-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.sd-v3 .sd-btn{border:1px solid #d1d5db;border-radius:9px;padding:10px 14px;font-weight:700;text-decoration:none;background:#fff;color:#111827;cursor:pointer;white-space:nowrap}.sd-v3 .sd-btn-primary{background:#111827;color:#fff;border-color:#111827}.sd-v3 .sd-btn:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(15,23,42,.08)}
.sd-v3-layout{display:grid;grid-template-columns:255px minmax(0,1fr);gap:18px;align-items:start}.sd-v3-sidebar{position:sticky;top:20px;background:#fff;border:1px solid var(--sd-line);border-radius:16px;padding:18px;box-shadow:0 8px 28px rgba(15,23,42,.04)}.sd-filter-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;font-size:16px}.sd-filter-title button{border:0;background:none;color:#64748b;cursor:pointer;font-size:12px}.sd-field-label{display:block;font-size:12px;font-weight:700;margin:12px 0 6px}.sd-v3-sidebar input,.sd-v3-sidebar select,.sd-order-form input,.sd-order-form textarea{width:100%;border:1px solid #dbe1e8;border-radius:8px;background:#fff;padding:10px 11px;min-height:40px;color:#111827}.sd-v3-sidebar input:focus,.sd-v3-sidebar select:focus,.sd-order-form input:focus,.sd-order-form textarea:focus{outline:none;border-color:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.14)}
.sd-advanced-toggle{font-size:12px;font-weight:800;margin:18px 0 8px;padding-top:14px;border-top:1px solid var(--sd-line)}.sd-v3-metrics{display:grid;grid-template-columns:1fr;gap:7px}.sd-num-filter{display:grid!important;grid-template-columns:72px 48px 1fr!important;align-items:center;gap:5px!important}.sd-num-filter label{font-size:11px!important;margin:0!important}.sd-num-filter select,.sd-num-filter input{min-height:34px!important;height:34px!important;padding:5px!important;font-size:12px!important}.sd-hidden-filter{display:none!important}.sd-search-full{width:100%;margin-top:14px}
.sd-v3-main{min-width:0}.sd-v3-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid var(--sd-line);border-radius:14px;padding:14px 16px;margin-bottom:10px}.sd-toolbar-sub{display:block;font-size:12px;color:var(--sd-muted);font-weight:400;margin-top:2px}.sd-quick-filters{display:flex;gap:7px;flex-wrap:wrap}.sd-chip{border:1px solid #dbe1e8;background:#fff;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:700;cursor:pointer}.sd-chip.active{background:#111827;color:#fff;border-color:#111827}
.sd-v3 .sd-table-wrapper{overflow:auto;background:#fff;border:1px solid var(--sd-line);border-radius:14px}.sd-v3-table{width:100%;border-collapse:separate!important;border-spacing:0!important;min-width:1000px;font-size:13px}.sd-v3-table th{background:#f8fafc!important;color:#64748b!important;font-size:10px!important;letter-spacing:.06em;text-align:left!important;padding:12px 10px!important;border-bottom:1px solid var(--sd-line)!important;white-space:nowrap}.sd-v3-table td{padding:13px 10px!important;border-bottom:1px solid #eef2f7!important;vertical-align:middle!important;background:#fff}.sd-v3-table tbody tr:hover td{background:#fbfdff}.sd-actions-cell{white-space:nowrap;width:76px}.sd-actions-cell button{width:30px;height:30px;border-radius:8px;border:1px solid #dbe1e8;background:#fff;cursor:pointer;font-size:17px;margin-right:3px}.sd-actions-cell .sd-add-cart{background:#111827;color:#fff;border-color:#111827}.sd-favorite.is-favorite{color:#e11d48}.sd-site-cell a{text-decoration:none;color:#111827}.sd-site-cell strong{display:block;font-size:14px}.sd-site-cell small,.sd-v3-table small{display:block;color:#7c8798;margin-top:3px}.sd-category-pill,.sd-link-pill{display:inline-flex;border:1px solid #e2e8f0;background:#f8fafc;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:700}.sd-score{display:inline-flex;align-items:baseline;gap:2px;padding:5px 8px;border-radius:8px;font-size:10px;font-weight:700}.sd-score b{font-size:14px}.sd-score.great{background:#ecfdf5;color:#047857}.sd-score.good{background:#eff6ff;color:#1d4ed8}.sd-score.mid{background:#fffbeb;color:#b45309}.sd-score.low{background:#fef2f2;color:#b91c1c}.sd-metric-main{font-size:12px}.sd-price-cell>div{display:flex;gap:7px;align-items:center;justify-content:space-between;min-width:145px;padding:2px 0}.sd-price-cell span{font-size:10px;color:#64748b}.sd-price-cell b{font-size:12px}.sd-price-cell em{font-size:9px;background:#fee2e2;color:#b91c1c;border-radius:5px;padding:2px 4px;font-style:normal}.sd-empty{text-align:center!important;padding:40px!important;color:#64748b}.sd-skeleton{padding:40px;text-align:center;color:#64748b}
.sd-v3 .sd-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:99998;display:none;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(3px)}.sd-v3 .sd-modal-inner{width:min(620px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;padding:24px;box-shadow:0 24px 70px rgba(15,23,42,.25)}.sd-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.sd-modal-head h3{font-size:24px;margin:3px 0 0}.sd-modal-x{border:0;background:#f1f5f9;width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer}.sd-cart-item{display:grid!important;grid-template-columns:1fr auto auto auto;gap:10px;align-items:center;border-bottom:1px solid #eef2f7;padding:12px 0!important}.sd-cart-item span{font-size:11px;color:#64748b}.sd-cart-item .sd-remove{border:0;background:#f1f5f9;border-radius:6px;cursor:pointer}.sd-cart-total{font-size:20px!important;font-weight:800!important;text-align:right;padding:16px 0;border-top:1px solid #e5e7eb;margin-top:4px}.sd-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sd-order-form textarea{margin-top:10px;min-height:100px;resize:vertical}.sd-modal-actions{display:flex;justify-content:flex-end;margin-top:12px}.sd-price-options{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-top:16px}.sd-price-select{border:1px solid #dbe1e8!important;background:#fff!important;border-radius:10px!important;padding:14px!important;text-align:left;font-weight:800;cursor:pointer}.sd-price-select:hover{border-color:#111827!important;background:#f8fafc!important}.sd-v3-toast{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#111827;color:#fff;padding:14px 22px;border-radius:10px;font-size:14px;font-weight:700;display:none;z-index:99999;box-shadow:0 14px 40px rgba(0,0,0,.25)}
.sd-pagination-ajax{padding:14px;display:flex;gap:5px;flex-wrap:wrap;justify-content:center}.sd-page-btn-ajax{border:1px solid #dbe1e8;background:#fff;border-radius:7px;padding:6px 9px;cursor:pointer}.sd-page-btn-ajax.is-active{background:#111827;color:#fff;border-color:#111827}
@media(max-width:980px){.sd-v3-layout{grid-template-columns:1fr}.sd-v3-sidebar{position:static}.sd-v3-metrics{grid-template-columns:1fr 1fr}.sd-v3-hero{align-items:flex-start;flex-direction:column}.sd-v3-hero-actions{justify-content:flex-start}.sd-v3-toolbar{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){#sites-dashboard.sd-v3{margin:10px}.sd-v3-hero{padding:20px}.sd-v3-hero h2{font-size:24px}.sd-v3-hero-actions{width:100%}.sd-v3-hero-actions .sd-btn{flex:1;text-align:center}.sd-v3-metrics{grid-template-columns:1fr}.sd-form-grid{grid-template-columns:1fr}}

/* v3.1 - SEO metrics visibility */
.sd-seo-cell{min-width:255px}.sd-seo-metrics{display:grid;grid-template-columns:repeat(5,minmax(38px,1fr));gap:5px;min-width:245px}.sd-seo-metrics>span{display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #e2e8f0;background:#f8fafc;border-radius:8px;padding:5px 4px;line-height:1.05}.sd-seo-metrics small{margin:0 0 4px!important;font-size:9px!important;font-weight:800;color:#64748b!important;letter-spacing:.04em}.sd-seo-metrics b{font-size:13px;color:#111827}.sd-v3-table{min-width:1180px}

/* === v3.2 - Column sizing/readability fix === */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table{
  width:100% !important;
  min-width:1120px !important;
  table-layout:fixed !important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th,
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td{
  box-sizing:border-box !important;
}
/* Azioni */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(1),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(1){width:92px !important;min-width:92px !important;}
/* Sito */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(2),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(2){width:205px !important;min-width:205px !important;white-space:normal !important;word-break:normal !important;overflow-wrap:anywhere !important;}
/* Categoria */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){width:135px !important;min-width:135px !important;}
/* Opportunity */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){width:115px !important;min-width:115px !important;}
/* Authority / metriche SEO */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(5),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(5){width:315px !important;min-width:315px !important;}
/* Link */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){width:90px !important;min-width:90px !important;text-align:center !important;}
/* Prezzi */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(7),
#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(7){width:185px !important;min-width:185px !important;white-space:normal !important;overflow:visible !important;text-overflow:clip !important;}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table thead th{white-space:nowrap !important;word-break:normal !important;overflow:visible !important;text-overflow:clip !important;}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-cell strong{line-height:1.25;overflow-wrap:anywhere;}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-cell{min-width:315px !important;overflow:visible !important;}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics{grid-template-columns:repeat(5,1fr) !important;min-width:285px !important;gap:7px !important;}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics>span{min-width:48px;padding:7px 5px;}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell>div{min-width:0 !important;}
@media(max-width:1200px){
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table{min-width:1120px !important;}
}


/* === v3.3 - Desktop table fits container without horizontal scrolling === */
@media (min-width:981px){
  #sites-dashboard.sd-v3 .sd-table-wrapper{overflow-x:hidden !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table{
    width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th,
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td{
    min-width:0 !important;
    padding:11px 7px !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(1),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(1){width:7% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(2),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(2){width:18% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){width:12% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){width:11% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(5),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(5){width:29% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){width:8% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(7),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(7){width:15% !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-cell{min-width:0 !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics{
    min-width:0 !important;
    width:100% !important;
    gap:4px !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics>span{
    min-width:0 !important;
    padding:6px 2px !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics b{font-size:12px !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell>div{gap:4px !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell span{font-size:9px !important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell b{font-size:11px !important;white-space:nowrap;}
}

/* === v4.0 - Projects, persistent favorites, purchased history === */
.sd-project-picker{display:flex;gap:7px;align-items:center;margin-left:auto}.sd-project-picker select{max-width:230px;border:1px solid #dbe1e8;border-radius:9px;padding:7px 9px;background:#fff;font-size:12px}.sd-purchased-badge{display:block;margin-top:5px;font-size:8px;font-weight:800;color:#047857;white-space:nowrap}.sd-project-row{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #eef2f7}.sd-project-row strong,.sd-project-row small{display:block}.sd-project-row small{color:#64748b;margin-top:2px}.sd-project-delete{border:0;background:#fef2f2;color:#b91c1c;border-radius:7px;padding:6px 9px;cursor:pointer}.sd-project-create{margin-top:20px;padding-top:15px;border-top:1px solid #e5e7eb}.sd-project-create h4{margin:0 0 10px}.sd-project-create input,.sd-project-create textarea{width:100%;border:1px solid #dbe1e8;border-radius:8px;padding:10px;margin:0 0 8px}.sd-project-create textarea{min-height:70px}.sd-project-create #sd-project-msg{font-size:12px;margin-left:10px}.sd-order-project{display:inline-block;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700}.sd-orders-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:14px;overflow:hidden}.sd-orders-table th{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.04em}.sd-orders-table th,.sd-orders-table td{padding:12px;border-bottom:1px solid #eef2f7;text-align:left;vertical-align:top}.sd-orders-table tr:last-child td{border-bottom:0}
@media(max-width:1200px){.sd-v3-toolbar{flex-wrap:wrap}.sd-project-picker{margin-left:0}}


/* === v4.1 - 8 colonne, sponsorizzato e preferiti === */
.sd-sponsored-pill{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:5px 7px;border-radius:999px;font-size:10px;font-weight:800}.sd-sponsored-pill.is-yes{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.sd-sponsored-pill.is-no{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}
@media (min-width:981px){
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(1),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(1){width:7% !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(2),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(2){width:16% !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){width:10% !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){width:9% !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(5),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(5){width:27% !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){width:10% !important;text-align:center !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(7),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(7){width:7% !important;text-align:center !important}
 #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){width:14% !important}
}

/* v4.3 - azioni riga isolate: evita sovrapposizione tra Preferiti e Carrello */
.sd-v3-table .sd-actions-cell{position:relative!important;width:82px!important;min-width:82px!important;padding-left:6px!important;padding-right:6px!important;}
.sd-v3-table .sd-row-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;white-space:nowrap!important;}
.sd-v3-table .sd-row-actions .sd-favorite,
.sd-v3-table .sd-row-actions .sd-add-cart{position:static!important;float:none!important;display:inline-flex!important;flex:0 0 30px!important;width:30px!important;height:30px!important;min-width:30px!important;margin:0!important;padding:0!important;align-items:center!important;justify-content:center!important;line-height:1!important;transform:none;}
.sd-v3-table .sd-row-actions .sd-favorite{background:#fff!important;color:#64748b!important;border:1px solid #dbe1e8!important;box-shadow:none!important;}
.sd-v3-table .sd-row-actions .sd-favorite.is-favorite{color:#e11d48!important;}
.sd-v3-table .sd-row-actions .sd-add-cart{background:#111827!important;color:#fff!important;border:1px solid #111827!important;box-shadow:none!important;}
.sd-v3-table .sd-row-actions .sd-add-cart:hover{background:#000!important;transform:none!important;}

/* === v4.4 - Desktop table fit & action polish === */
@media (min-width:1100px){
  #sites-dashboard.sd-v3 .sd-table-wrapper{overflow-x:hidden!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table{width:100%!important;min-width:0!important;table-layout:fixed!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th,
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td{min-width:0!important;overflow:hidden!important;text-overflow:clip!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th{padding:11px 8px!important;font-size:9px!important;letter-spacing:.035em!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;line-height:1.2!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td{padding:12px 8px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(1),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(1){width:6.5%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(2),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(2){width:16%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){width:10%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){width:9%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(5),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(5){width:27%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){width:10%!important;text-align:center!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(7),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(7){width:7%!important;text-align:center!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){width:14.5%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-actions-cell{width:auto!important;min-width:0!important;padding:10px 5px!important;overflow:visible!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions{display:flex!important;width:100%!important;gap:5px!important;justify-content:center!important;align-items:center!important;overflow:visible!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions .sd-favorite,
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions .sd-add-cart{flex:0 0 29px!important;width:29px!important;min-width:29px!important;height:29px!important;border-radius:8px!important;font-size:16px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-cell strong{font-size:13px!important;line-height:1.2!important;overflow-wrap:anywhere!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-category-pill{max-width:100%!important;padding:5px 7px!important;font-size:10px!important;white-space:normal!important;text-align:center!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-score{padding:5px 6px!important;white-space:nowrap!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-score b{font-size:13px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-cell{min-width:0!important;padding-left:7px!important;padding-right:7px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics{width:100%!important;min-width:0!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics>span{min-width:0!important;padding:6px 2px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics small{font-size:8px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-seo-metrics b{font-size:12px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell{padding-left:7px!important;padding-right:7px!important;overflow:visible!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell>div{width:100%!important;min-width:0!important;gap:4px!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell span{font-size:9px!important;white-space:normal!important;line-height:1.15!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell b{font-size:11px!important;white-space:nowrap!important;}
}


/* v4.10 - pagina Progetti / Clienti */
.sd-projects-page{max-width:1180px;margin:0 auto;padding:8px 0 30px}.sd-projects-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}.sd-projects-page-head h2{margin:4px 0 5px;font-size:28px}.sd-projects-page-head p{margin:0;color:#64748b}.sd-projects-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.sd-project-card{display:block!important;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:20px;box-shadow:0 5px 18px rgba(15,23,42,.04)}.sd-project-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.sd-project-card h3{margin:0 0 3px;font-size:19px}.sd-project-card a{font-size:13px;color:#2563eb;text-decoration:none}.sd-project-notes{color:#64748b;font-size:13px;margin:12px 0 0}.sd-project-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:18px}.sd-project-stats div{background:#f8fafc;border:1px solid #eef2f7;border-radius:10px;padding:10px}.sd-project-stats strong,.sd-project-stats span{display:block}.sd-project-stats strong{font-size:16px;color:#0f172a}.sd-project-stats span{font-size:10px;color:#64748b;margin-top:2px}.sd-project-orders{margin-top:16px;border-top:1px solid #eef2f7;padding-top:13px}.sd-project-orders summary{cursor:pointer;font-weight:700;font-size:12px;color:#334155}.sd-project-orders-list{margin-top:10px}.sd-project-order-line{display:grid;grid-template-columns:1fr .7fr 1fr .8fr;gap:8px;padding:8px 0;border-bottom:1px solid #f1f5f9;font-size:11px;align-items:center}.sd-project-order-line strong{text-align:right}.sd-project-no-orders{margin:16px 0 0;color:#94a3b8;font-size:12px}.sd-projects-empty{background:#fff;border:1px dashed #cbd5e1;border-radius:16px;padding:35px;text-align:center}.sd-projects-empty p{color:#64748b}.sd-projects-empty .sd-btn{margin-top:8px}@media(max-width:800px){.sd-projects-page-head{display:block}.sd-projects-page-head>.sd-btn{margin-top:14px}.sd-projects-grid{grid-template-columns:1fr}.sd-project-stats{grid-template-columns:repeat(2,1fr)}}

/* v4.11 - Azioni ordini completati */
.sd-order-actions { white-space: nowrap; text-align: center; }
.sd-delete-order-form { margin: 0; }
.sd-delete-order-btn {
    appearance: none;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.sd-delete-order-btn:hover { background: #fef2f2; border-color: #fca5a5; }
.sd-order-delete-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

/* v4.22 - Dettaglio ordine frontend in modal */
.sd-order-details-cell{white-space:nowrap;text-align:center}.sd-order-details-btn{appearance:none;border:0;background:transparent;color:#111827;font-weight:700;cursor:pointer;padding:7px 9px;border-radius:8px}.sd-order-details-btn:before{content:'▾';margin-right:5px}.sd-order-details-btn:hover{background:#f1f5f9}.sd-order-modal{display:none;position:fixed;inset:0;z-index:999999}.sd-order-modal.is-open{display:block}.sd-order-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(2px)}.sd-order-modal-dialog{position:relative;width:min(900px,calc(100vw - 40px));max-height:calc(100vh - 60px);margin:30px auto;background:#fff;border-radius:18px;box-shadow:0 25px 80px rgba(15,23,42,.28);overflow:hidden;display:flex;flex-direction:column}.sd-order-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 26px;border-bottom:1px solid #e5e7eb}.sd-order-modal-head h3{margin:0;font-size:22px;color:#0f172a}.sd-order-modal-head p{margin:4px 0 0;color:#64748b;font-size:13px}.sd-order-modal-close{appearance:none;border:0;background:#f1f5f9;color:#334155;width:38px;height:38px;border-radius:50%;font-size:27px;line-height:1;cursor:pointer}.sd-order-modal-close:hover{background:#e2e8f0}.sd-order-modal-body{padding:22px 26px 28px;overflow:auto;background:#f8fafc}.sd-order-site-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;margin-bottom:14px;box-shadow:0 2px 7px rgba(15,23,42,.03)}.sd-order-site-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.sd-order-site-index{display:block;color:#94a3b8;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.sd-order-site-card h4{margin:3px 0 0;font-size:18px}.sd-order-site-card h4 a{color:#0f172a;text-decoration:none}.sd-order-site-card h4 a:hover{color:#2563eb}.sd-order-monitor-badge{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700;white-space:nowrap}.sd-order-monitor-badge:before{content:'';width:8px;height:8px;border-radius:50%;margin-right:6px}.sd-order-monitor-badge.is-ok{background:#ecfdf5;color:#15803d}.sd-order-monitor-badge.is-ok:before{background:#65a30d}.sd-order-monitor-badge.is-error{background:#fef2f2;color:#b91c1c}.sd-order-monitor-badge.is-error:before{background:#ef4444}.sd-order-monitor-badge.is-pending{background:#f1f5f9;color:#64748b}.sd-order-monitor-badge.is-pending:before{background:#94a3b8}.sd-order-site-meta{display:flex;gap:26px;margin:16px 0 13px}.sd-order-site-meta span{display:flex;flex-direction:column}.sd-order-site-meta small,.sd-order-link-grid small{font-size:11px;color:#64748b;margin-bottom:2px}.sd-order-site-meta strong{font-size:14px;color:#0f172a}.sd-order-link-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sd-order-link-grid>div{min-width:0;background:#f8fafc;border:1px solid #eef2f7;border-radius:10px;padding:10px 12px;display:flex;flex-direction:column}.sd-order-link-grid a{font-size:13px;color:#2563eb;text-decoration:none;overflow-wrap:anywhere}.sd-order-link-grid em{font-size:13px;color:#94a3b8}.sd-order-last-check{margin-top:10px;font-size:11px;color:#94a3b8}.sd-order-modal-notes{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:15px 18px}.sd-order-modal-notes p{margin:5px 0 0;color:#475569}.sd-modal-open{overflow:hidden}@media(max-width:700px){.sd-order-modal-dialog{width:100%;height:100%;max-height:none;margin:0;border-radius:0}.sd-order-modal-head,.sd-order-modal-body{padding:18px}.sd-order-site-card-head{display:block}.sd-order-monitor-badge{margin-top:10px}.sd-order-link-grid{grid-template-columns:1fr}.sd-order-site-meta{gap:18px}}


/* v4.23 - Ottimizzazione tabella Ordini frontend */
@media (min-width: 1100px) {
  .sd-orders-table {
    width: 100% !important;
    table-layout: fixed !important;
  }
  .sd-orders-table th,
  .sd-orders-table td {
    box-sizing: border-box;
    min-width: 0;
    vertical-align: middle;
  }
  .sd-orders-table th:nth-child(1), .sd-orders-table td:nth-child(1) { width: 11% !important; }
  .sd-orders-table th:nth-child(2), .sd-orders-table td:nth-child(2) { width: 13% !important; }
  .sd-orders-table th:nth-child(3), .sd-orders-table td:nth-child(3) { width: 14% !important; }
  .sd-orders-table th:nth-child(4), .sd-orders-table td:nth-child(4) { width: 14% !important; }
  .sd-orders-table th:nth-child(5), .sd-orders-table td:nth-child(5) { width: 7% !important; text-align:center; }
  .sd-orders-table th:nth-child(6), .sd-orders-table td:nth-child(6) { width: 7% !important; white-space:nowrap !important; }
  .sd-orders-table th:nth-child(7), .sd-orders-table td:nth-child(7) { width: 10% !important; white-space:nowrap !important; word-break:normal !important; overflow-wrap:normal !important; }
  .sd-orders-table th:nth-child(8), .sd-orders-table td:nth-child(8) { width: 12% !important; white-space:nowrap !important; }
  .sd-orders-table th:nth-child(9), .sd-orders-table td:nth-child(9) { width: 7% !important; white-space:nowrap !important; text-align:center; }
  .sd-orders-table th:nth-child(10), .sd-orders-table td:nth-child(10) { width: 5% !important; white-space:nowrap !important; text-align:center; }
  .sd-orders-table td:nth-child(2),
  .sd-orders-table td:nth-child(3),
  .sd-orders-table td:nth-child(4) {
    white-space:normal !important;
    overflow-wrap:anywhere;
  }
  .sd-orders-table .sd-order-total { font-weight:700; }
  .sd-orders-table .sd-order-details-btn,
  .sd-orders-table .sd-delete-order-btn { max-width:100%; }
}
@media (max-width: 1099px) {
  .sd-orders-table { min-width: 980px; }
}

/* v4.24 - Spazio pulsanti Dettagli/Azioni */
@media (min-width:1100px){
  .sd-orders-table th:nth-child(1), .sd-orders-table td:nth-child(1){width:11%!important}
  .sd-orders-table th:nth-child(2), .sd-orders-table td:nth-child(2){width:12%!important}
  .sd-orders-table th:nth-child(3), .sd-orders-table td:nth-child(3){width:13%!important}
  .sd-orders-table th:nth-child(4), .sd-orders-table td:nth-child(4){width:13%!important}
  .sd-orders-table th:nth-child(5), .sd-orders-table td:nth-child(5){width:7%!important}
  .sd-orders-table th:nth-child(6), .sd-orders-table td:nth-child(6){width:7%!important}
  .sd-orders-table th:nth-child(7), .sd-orders-table td:nth-child(7){width:10%!important}
  .sd-orders-table th:nth-child(8), .sd-orders-table td:nth-child(8){width:12%!important}
  .sd-orders-table th:nth-child(9), .sd-orders-table td:nth-child(9){width:8%!important}
  .sd-orders-table th:nth-child(10), .sd-orders-table td:nth-child(10){width:7%!important}
  .sd-orders-table .sd-order-details-btn,
  .sd-orders-table .sd-delete-order-btn{
    width:auto!important;max-width:none!important;min-width:max-content!important;
    white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;
  }
  .sd-orders-table .sd-order-details-cell,
  .sd-orders-table .sd-order-actions{overflow:visible!important;white-space:nowrap!important}
}


/* v4.25 - Rifinitura pulsanti Ordini e intestazione Numero siti */
@media (min-width:1100px){
  .sd-orders-table th:nth-child(5){white-space:normal!important;line-height:1.15!important;text-align:center!important;}
  .sd-orders-table .sd-order-details-btn,
  .sd-orders-table .sd-delete-order-btn{
    font-size:12px!important;
    line-height:1.2!important;
    padding:7px 6px!important;
    min-width:0!important;
    max-width:100%!important;
    width:auto!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
  .sd-orders-table .sd-order-details-btn:before{margin-right:3px!important;}
  .sd-orders-table th:nth-child(9), .sd-orders-table td:nth-child(9){width:8%!important;padding-left:6px!important;padding-right:6px!important;}
  .sd-orders-table th:nth-child(10), .sd-orders-table td:nth-child(10){width:7%!important;padding-left:6px!important;padding-right:6px!important;}
}

/* v4.26 - contrasto pulsanti principali area Progetti */
.sd-projects-page .sd-btn.sd-btn-primary,
.sd-projects-page button.sd-btn-primary,
.sd-projects-page #sd-manage-projects {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}
.sd-projects-page .sd-btn.sd-btn-primary:hover,
.sd-projects-page .sd-btn.sd-btn-primary:focus,
.sd-projects-page button.sd-btn-primary:hover,
.sd-projects-page button.sd-btn-primary:focus,
.sd-projects-page #sd-manage-projects:hover,
.sd-projects-page #sd-manage-projects:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
}

/* v4.27 - URL lunghi nel popup dettaglio ordine */
.sd-order-modal .sd-order-link-grid > div {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}
.sd-order-modal .sd-order-link-grid a,
.sd-order-modal .sd-order-link-grid em {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;
    box-sizing: border-box !important;
}


/* ==========================================================
   v4.29 - Design system unificato: Database / Ordini / Progetti
   ========================================================== */
:root{
  --sd-ui-brand:#3157e8;
  --sd-ui-brand-hover:#2447cc;
  --sd-ui-ink:#0f172a;
  --sd-ui-muted:#64748b;
  --sd-ui-line:#e2e8f0;
  --sd-ui-soft:#f8fafc;
  --sd-ui-danger:#dc2626;
  --sd-ui-radius:12px;
  --sd-ui-font:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

#sites-dashboard.sd-v3,
.sd-projects-page,
.sd-orders-table,
.sd-order-modal{
  font-family:var(--sd-ui-font)!important;
  color:var(--sd-ui-ink);
}

/* Titoli / testi */
#sites-dashboard.sd-v3 h2,
#sites-dashboard.sd-v3 h3,
.sd-projects-page h2,
.sd-projects-page h3,
.sd-order-modal h3{color:var(--sd-ui-ink);font-family:var(--sd-ui-font)!important;font-weight:750;letter-spacing:-.015em}
.sd-eyebrow{color:var(--sd-ui-muted)!important;font-family:var(--sd-ui-font)!important;font-weight:800!important}

/* Pulsanti condivisi */
#sites-dashboard.sd-v3 .sd-btn,
.sd-projects-page .sd-btn,
.sd-projects-page .sd-project-delete,
.sd-orders-table button,
.sd-orders-table .sd-order-details-btn,
.sd-orders-table .sd-delete-order-btn{
  font-family:var(--sd-ui-font)!important;
  border-radius:9px!important;
  font-weight:700!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
#sites-dashboard.sd-v3 .sd-btn-primary,
.sd-projects-page .sd-btn-primary,
.sd-projects-page #sd-manage-projects{
  background:var(--sd-ui-brand)!important;
  border-color:var(--sd-ui-brand)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
#sites-dashboard.sd-v3 .sd-btn-primary:hover,
.sd-projects-page .sd-btn-primary:hover,
.sd-projects-page #sd-manage-projects:hover{
  background:var(--sd-ui-brand-hover)!important;
  border-color:var(--sd-ui-brand-hover)!important;
  color:#fff!important;
}
#sites-dashboard.sd-v3 .sd-btn-secondary,
.sd-orders-table .sd-order-details-btn{
  background:#fff!important;
  color:var(--sd-ui-brand)!important;
  border:1px solid var(--sd-ui-brand)!important;
}
#sites-dashboard.sd-v3 .sd-btn-secondary:hover,
.sd-orders-table .sd-order-details-btn:hover{
  background:#eef2ff!important;
  color:var(--sd-ui-brand-hover)!important;
}
.sd-projects-page .sd-project-delete,
.sd-orders-table .sd-delete-order-btn{
  background:#fff!important;
  color:var(--sd-ui-danger)!important;
  border:1px solid #fecaca!important;
}
.sd-projects-page .sd-project-delete:hover,
.sd-orders-table .sd-delete-order-btn:hover{background:#fef2f2!important;border-color:#fca5a5!important}

/* Database: porta il nero della v3 sul blu comune */
#sites-dashboard.sd-v3{--sd-brand:var(--sd-ui-brand);--sd-ink:var(--sd-ui-ink);--sd-muted:var(--sd-ui-muted);--sd-line:var(--sd-ui-line);--sd-soft:var(--sd-ui-soft)}
#sites-dashboard.sd-v3 .sd-chip.active,
#sites-dashboard.sd-v3 .sd-actions-cell .sd-add-cart,
#sites-dashboard.sd-v3 .sd-v3-toast{background:var(--sd-ui-brand)!important;border-color:var(--sd-ui-brand)!important;color:#fff!important}
#sites-dashboard.sd-v3 .sd-site-cell a{color:var(--sd-ui-brand)!important}
#sites-dashboard.sd-v3 .sd-v3-hero,
#sites-dashboard.sd-v3 .sd-v3-sidebar,
#sites-dashboard.sd-v3 .sd-v3-toolbar,
#sites-dashboard.sd-v3 .sd-table-wrapper{border-color:var(--sd-ui-line)!important;box-shadow:0 6px 22px rgba(15,23,42,.045)!important}
#sites-dashboard.sd-v3 input,
#sites-dashboard.sd-v3 select,
#sites-dashboard.sd-v3 textarea{font-family:var(--sd-ui-font)!important;border-color:var(--sd-ui-line)!important}
#sites-dashboard.sd-v3 input:focus,
#sites-dashboard.sd-v3 select:focus,
#sites-dashboard.sd-v3 textarea:focus{border-color:var(--sd-ui-brand)!important;box-shadow:0 0 0 3px rgba(49,87,232,.12)!important}

/* Ordini: stessa superficie e intestazione del Database */
.sd-orders-table{
  width:100%!important;
  background:#fff!important;
  border:1px solid var(--sd-ui-line)!important;
  border-radius:16px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden!important;
  box-shadow:0 6px 22px rgba(15,23,42,.04)!important;
}
.sd-orders-table thead th{
  background:var(--sd-ui-soft)!important;
  color:#334155!important;
  font-family:var(--sd-ui-font)!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.035em!important;
  text-transform:uppercase!important;
  border-color:var(--sd-ui-line)!important;
}
.sd-orders-table tbody td{
  background:#fff!important;
  color:var(--sd-ui-ink)!important;
  border-color:#eef2f7!important;
  font-family:var(--sd-ui-font)!important;
}
.sd-orders-table tbody tr:nth-child(even) td{background:#fbfdff!important}
.sd-orders-table tbody tr:hover td{background:#f8faff!important}
.sd-orders-table .sd-order-project{background:#eef2ff!important;color:#2447cc!important;border-radius:999px!important;font-weight:700!important}
.sd-orders-table .sd-order-total{font-weight:800!important;color:var(--sd-ui-ink)!important}

/* Progetti: allineamento colori/superfici */
.sd-projects-page{color:var(--sd-ui-ink)!important}
.sd-projects-page-head p,.sd-project-notes,.sd-project-no-orders{color:var(--sd-ui-muted)!important}
.sd-project-card,.sd-projects-empty{border-color:var(--sd-ui-line)!important;box-shadow:0 6px 22px rgba(15,23,42,.04)!important}
.sd-project-card a{color:var(--sd-ui-brand)!important}
.sd-project-stats div{background:var(--sd-ui-soft)!important;border-color:#eef2f7!important}
.sd-project-orders summary{color:#334155!important}

/* Modal condivisi */
#sites-dashboard.sd-v3 .sd-modal-inner,
.sd-order-modal-dialog{border-radius:18px!important;font-family:var(--sd-ui-font)!important;box-shadow:0 24px 70px rgba(15,23,42,.22)!important}
.sd-modal-x,.sd-order-modal-close{font-family:var(--sd-ui-font)!important}

@media(max-width:800px){
  #sites-dashboard.sd-v3,.sd-projects-page,.sd-orders-table{font-family:var(--sd-ui-font)!important}
}


/* ==========================================================
   v4.30 - Rifiniture Database: filtri, colonne e azioni
   ========================================================== */
#sites-dashboard.sd-v3 #sd-btn-reset{
  color:#3157e8!important;
  -webkit-text-fill-color:#3157e8!important;
  background:#fff!important;
  border:1px solid #3157e8!important;
  font-weight:750!important;
  opacity:1!important;
}
#sites-dashboard.sd-v3 #sd-btn-reset:hover,
#sites-dashboard.sd-v3 #sd-btn-reset:focus{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#3157e8!important;
}
@media (min-width:1100px){
  /* Mantiene il totale al 100%, dando più respiro a Categoria e Opportunity */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(1),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(1){width:7.5%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(2),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(2){width:14%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){width:12%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){width:11%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(5),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(5){width:25%!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){width:9%!important;text-align:center!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(7),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(7){width:8%!important;text-align:center!important;}
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),#sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){width:13.5%!important;}

  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-actions-cell{
    padding-left:3px!important;padding-right:3px!important;overflow:hidden!important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions{
    gap:3px!important;justify-content:center!important;max-width:100%!important;overflow:hidden!important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions .sd-favorite,
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions .sd-add-cart{
    flex:0 0 26px!important;width:26px!important;min-width:26px!important;height:26px!important;
    padding:0!important;border-radius:7px!important;font-size:14px!important;box-sizing:border-box!important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-purchased-badge{
    font-size:7px!important;white-space:normal!important;text-align:center!important;line-height:1.15!important;
  }
}

/* v4.31 - Migliore contrasto opzioni tipo pubblicazione */
.sd-v3 #sd-price-modal .sd-price-select,
.sd-v3 .sd-price-options .sd-price-select{
  color:#1e3a5f!important;
  background:#ffffff!important;
  border:1px solid #cbd5e1!important;
  font-family:var(--sd-ui-font, inherit)!important;
  font-weight:700!important;
  opacity:1!important;
  -webkit-text-fill-color:#1e3a5f!important;
}
.sd-v3 #sd-price-modal .sd-price-select:hover,
.sd-v3 #sd-price-modal .sd-price-select:focus,
.sd-v3 .sd-price-options .sd-price-select:hover,
.sd-v3 .sd-price-options .sd-price-select:focus{
  color:#ffffff!important;
  background:#3157e8!important;
  border-color:#3157e8!important;
  -webkit-text-fill-color:#ffffff!important;
  outline:none!important;
}
\n\n/* ==========================================================\n   v4.32 - Popup carrello: chiusura e rimozione ben visibili\n   ========================================================== */\n#sites-dashboard.sd-v3 #sd-cart-modal #sd-close-cart{\n  display:inline-flex!important;align-items:center!important;justify-content:center!important;\n  width:42px!important;height:42px!important;min-width:42px!important;padding:0!important;\n  border:1px solid #dbe3ee!important;border-radius:12px!important;\n  background:#f1f5f9!important;color:#334155!important;-webkit-text-fill-color:#334155!important;\n  font-size:25px!important;font-weight:500!important;line-height:1!important;opacity:1!important;\n  box-shadow:none!important;cursor:pointer!important;\n}\n#sites-dashboard.sd-v3 #sd-cart-modal #sd-close-cart:hover,\n#sites-dashboard.sd-v3 #sd-cart-modal #sd-close-cart:focus{\n  background:#3157e8!important;border-color:#3157e8!important;color:#fff!important;\n  -webkit-text-fill-color:#fff!important;outline:none!important;\n}\n#sites-dashboard.sd-v3 #sd-cart-modal .sd-cart-item .sd-remove{\n  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;\n  width:auto!important;min-width:88px!important;height:34px!important;margin-left:8px!important;padding:0 12px!important;\n  border:1px solid #dc2626!important;border-radius:9px!important;background:#fff!important;\n  color:#dc2626!important;-webkit-text-fill-color:#dc2626!important;\n  font-family:var(--sd-ui-font,inherit)!important;font-size:13px!important;font-weight:700!important;line-height:1!important;\n  opacity:1!important;cursor:pointer!important;white-space:nowrap!important;\n}\n#sites-dashboard.sd-v3 #sd-cart-modal .sd-cart-item .sd-remove:hover,\n#sites-dashboard.sd-v3 #sd-cart-modal .sd-cart-item .sd-remove:focus{\n  background:#dc2626!important;color:#fff!important;-webkit-text-fill-color:#fff!important;outline:none!important;\n}\n#sites-dashboard.sd-v3 #sd-cart-modal .sd-cart-item{\n  grid-template-columns:minmax(0,1fr) auto auto auto!important;\n}\n@media(max-width:640px){\n  #sites-dashboard.sd-v3 #sd-cart-modal .sd-cart-item{grid-template-columns:minmax(0,1fr) auto!important;}\n  #sites-dashboard.sd-v3 #sd-cart-modal .sd-cart-item .sd-remove{grid-column:2!important;min-width:82px!important;}\n}\n

/* ==========================================================
   v4.33 - Popup carrello: controlli coerenti e leggibili
   ========================================================== */
#sd-cart-modal #sd-close-cart{
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#f1f5f9!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  box-shadow:none!important;
  font-size:27px!important;
  font-weight:400!important;
  line-height:1!important;
  opacity:1!important;
  cursor:pointer!important;
}
#sd-cart-modal #sd-close-cart:hover,
#sd-cart-modal #sd-close-cart:focus{
  background:#e2e8f0!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  outline:none!important;
  box-shadow:none!important;
}
#sd-cart-modal .sd-cart-item{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:16px 0!important;
  border-bottom:1px solid #e5e7eb!important;
}
#sd-cart-modal .sd-cart-site{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:10px!important;
}
#sd-cart-modal .sd-cart-site strong{
  color:#0f172a!important;
  font-weight:750!important;
}
#sd-cart-modal .sd-cart-item .sd-remove{
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  height:30px!important;
  min-height:30px!important;
  margin:0!important;
  padding:0 10px!important;
  border:1px solid #ef4444!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#dc2626!important;
  -webkit-text-fill-color:#dc2626!important;
  box-shadow:none!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
  opacity:1!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
#sd-cart-modal .sd-cart-item .sd-remove span{
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  font-size:14px!important;
}
#sd-cart-modal .sd-cart-item .sd-remove:hover,
#sd-cart-modal .sd-cart-item .sd-remove:focus{
  background:#dc2626!important;
  border-color:#dc2626!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  outline:none!important;
}
#sd-cart-modal .sd-cart-price{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:12px!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
#sd-cart-modal .sd-cart-price span{
  color:#64748b!important;
  font-size:13px!important;
}
#sd-cart-modal .sd-cart-price b{
  color:#0f172a!important;
  font-size:15px!important;
}
@media(max-width:640px){
  #sd-cart-modal .sd-cart-item{align-items:flex-start!important;gap:10px!important;}
  #sd-cart-modal .sd-cart-site{gap:7px!important;}
  #sd-cart-modal .sd-cart-price{gap:7px!important;}
}

/* ==========================================================
   v4.34 - Carrello: X identica al modal "Vedi siti"
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  max-width:38px!important;
  max-height:38px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#f1f5f9!important;
  background-image:none!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:27px!important;
  font-weight:400!important;
  line-height:38px!important;
  opacity:1!important;
  cursor:pointer!important;
  transform:none!important;
}
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x:focus{
  background:#e2e8f0!important;
  background-image:none!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  border:0!important;
  box-shadow:none!important;
  outline:none!important;
  transform:none!important;
}

/* ==========================================================
   v4.35 - Carrello: chiusura identica al popup "Vedi siti"
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  max-width:44px!important;
  max-height:44px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #4f46ff!important;
  border-radius:12px!important;
  background:#fff!important;
  background-image:none!important;
  color:#4f46ff!important;
  -webkit-text-fill-color:#4f46ff!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:22px!important;
  font-weight:400!important;
  line-height:1!important;
  opacity:1!important;
  cursor:pointer!important;
  transform:none!important;
}
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x:focus{
  border-color:#3157e8!important;
  background:#f8faff!important;
  background-image:none!important;
  color:#3157e8!important;
  -webkit-text-fill-color:#3157e8!important;
  box-shadow:none!important;
  outline:none!important;
  transform:none!important;
}


/* ==========================================================
   v4.36 - Carrello: hover X identico al popup Vedi siti
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-modal-head > #sd-close-cart.sd-modal-x:focus{
  background:#e2e8f0!important;
  background-image:none!important;
  border-color:transparent!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  box-shadow:none!important;
  outline:none!important;
  transform:none!important;
}

/* v4.37 - bandiera paese nello shortcode Database */
#sd-table .sd-country-flag {
  display: inline-block;
  margin-right: 3px;
  font-size: 1.05em;
  line-height: 1;
  vertical-align: -0.08em;
}


/* === v4.39 - Database price filter labels + wider operator selector === */
#sites-dashboard.sd-v3 .sd-num-filter{
  grid-template-columns:92px 62px minmax(0,1fr)!important;
}
#sites-dashboard.sd-v3 .sd-num-filter select{
  width:62px!important;
  min-width:62px!important;
  padding-left:8px!important;
  padding-right:22px!important;
  text-align:left!important;
}
#sites-dashboard.sd-v3 .sd-num-filter label{
  line-height:1.15!important;
}
@media(max-width:600px){
  #sites-dashboard.sd-v3 .sd-num-filter{grid-template-columns:96px 64px minmax(0,1fr)!important;}
  #sites-dashboard.sd-v3 .sd-num-filter select{width:64px!important;min-width:64px!important;}
}

/* ==========================================================
   v4.40 - Database: filtri metriche sempre dentro il riquadro
   ========================================================== */
#sites-dashboard.sd-v3 .sd-v3-sidebar,
#sites-dashboard.sd-v3 .sd-v3-metrics,
#sites-dashboard.sd-v3 .sd-num-filter{
  box-sizing:border-box!important;
  max-width:100%!important;
}
#sites-dashboard.sd-v3 .sd-v3-metrics{
  width:100%!important;
  min-width:0!important;
}
#sites-dashboard.sd-v3 .sd-num-filter{
  width:100%!important;
  min-width:0!important;
  grid-template-columns:minmax(0, 132px) 62px minmax(0, 1fr)!important;
  column-gap:8px!important;
}
#sites-dashboard.sd-v3 .sd-num-filter label,
#sites-dashboard.sd-v3 .sd-num-filter select,
#sites-dashboard.sd-v3 .sd-num-filter input[type="number"]{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}
#sites-dashboard.sd-v3 .sd-num-filter select{
  width:62px!important;
}
#sites-dashboard.sd-v3 .sd-num-filter input[type="number"]{
  width:100%!important;
  flex:none!important;
}
@media(max-width:600px){
  #sites-dashboard.sd-v3 .sd-num-filter{
    grid-template-columns:minmax(0, 132px) 62px minmax(0, 1fr)!important;
  }
}

/* ==========================================================
   v4.41 - Database: proporzioni filtri metriche ottimizzate
   Operatore compatto + valore più largo + gap ridotto
   ========================================================== */
#sites-dashboard.sd-v3 .sd-num-filter{
  grid-template-columns:minmax(0, 124px) 54px minmax(74px, 1fr)!important;
  column-gap:5px!important;
}
#sites-dashboard.sd-v3 .sd-num-filter select{
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
  padding-left:7px!important;
  padding-right:18px!important;
}
#sites-dashboard.sd-v3 .sd-num-filter input[type="number"]{
  width:100%!important;
  min-width:74px!important;
  padding-left:9px!important;
  padding-right:7px!important;
}
@media(max-width:600px){
  #sites-dashboard.sd-v3 .sd-num-filter{
    grid-template-columns:minmax(0, 124px) 54px minmax(74px, 1fr)!important;
    column-gap:5px!important;
  }
}

/* ==========================================================
   v4.42 - Database: selettore progetto ampio + smart buttons 2x2
   ========================================================== */
#sites-dashboard.sd-v3 .sd-v3-toolbar{
  display:grid!important;
  grid-template-columns:minmax(245px,.9fr) minmax(390px,1.35fr) minmax(270px,.8fr)!important;
  align-items:center!important;
  gap:16px!important;
}
#sites-dashboard.sd-v3 .sd-project-picker{
  display:grid!important;
  grid-template-columns:minmax(240px,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  margin-left:0!important;
  min-width:0!important;
}
#sites-dashboard.sd-v3 .sd-project-picker select{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:42px!important;
  padding:8px 34px 8px 12px!important;
  font-size:13px!important;
}
#sites-dashboard.sd-v3 .sd-project-picker #sd-manage-projects{
  height:42px!important;
  white-space:nowrap!important;
  padding:8px 14px!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters .sd-chip{
  width:100%!important;
  min-width:0!important;
  padding:8px 9px!important;
  font-size:11.5px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  text-align:center!important;
}
@media(max-width:1180px){
  #sites-dashboard.sd-v3 .sd-v3-toolbar{
    grid-template-columns:minmax(220px,.8fr) minmax(350px,1.3fr) minmax(245px,.8fr)!important;
    gap:12px!important;
  }
}
@media(max-width:980px){
  #sites-dashboard.sd-v3 .sd-v3-toolbar{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }
  #sites-dashboard.sd-v3 .sd-project-picker{
    width:100%!important;
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  #sites-dashboard.sd-v3 .sd-quick-filters{
    max-width:420px!important;
  }
}

/* ==========================================================
   v4.43 - Toolbar database: proporzioni contenute nel box
   ========================================================== */
#sites-dashboard.sd-v3 .sd-v3-toolbar{
  grid-template-columns:minmax(235px,28%) minmax(360px,42%) minmax(250px,30%)!important;
  gap:12px!important;
  box-sizing:border-box!important;
}
#sites-dashboard.sd-v3 .sd-project-picker{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}
#sites-dashboard.sd-v3 .sd-project-picker select{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
}
#sites-dashboard.sd-v3 .sd-project-picker #sd-manage-projects{
  padding-left:12px!important;
  padding-right:12px!important;
  flex:0 0 auto!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters .sd-chip{
  box-sizing:border-box!important;
  max-width:100%!important;
  padding-left:7px!important;
  padding-right:7px!important;
  font-size:11px!important;
}
@media(max-width:1180px) and (min-width:981px){
  #sites-dashboard.sd-v3 .sd-v3-toolbar{
    grid-template-columns:minmax(215px,27%) minmax(330px,43%) minmax(235px,30%)!important;
    gap:10px!important;
  }
  #sites-dashboard.sd-v3 .sd-project-picker #sd-manage-projects{padding-left:10px!important;padding-right:10px!important;}
  #sites-dashboard.sd-v3 .sd-quick-filters .sd-chip{font-size:10.5px!important;padding-left:5px!important;padding-right:5px!important;}
}

/* ==========================================================
   v4.44 - Toolbar database: testo sinistro compatto, filtri nel box
   ========================================================== */
#sites-dashboard.sd-v3 .sd-v3-toolbar{
  grid-template-columns:minmax(185px,22%) minmax(355px,46%) minmax(250px,32%)!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}
#sites-dashboard.sd-v3 .sd-v3-toolbar > div:first-child{
  min-width:0!important;
  max-width:220px!important;
}
#sites-dashboard.sd-v3 .sd-v3-toolbar > div:first-child strong{
  display:block!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 .sd-toolbar-sub{
  display:block!important;
  max-width:190px!important;
  line-height:1.45!important;
  white-space:normal!important;
}
#sites-dashboard.sd-v3 .sd-project-picker{
  min-width:0!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters{
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters .sd-chip{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
@media(max-width:1180px) and (min-width:981px){
  #sites-dashboard.sd-v3 .sd-v3-toolbar{
    grid-template-columns:minmax(170px,21%) minmax(330px,46%) minmax(235px,33%)!important;
    gap:8px!important;
  }
  #sites-dashboard.sd-v3 .sd-v3-toolbar > div:first-child{max-width:195px!important;}
  #sites-dashboard.sd-v3 .sd-toolbar-sub{max-width:175px!important;}
}

/* ==========================================================
   v4.45 - Toolbar database: smart buttons compatti e sempre nel box
   ========================================================== */
#sites-dashboard.sd-v3 .sd-v3-toolbar{
  grid-template-columns:210px minmax(0,1fr) 292px!important;
  gap:8px!important;
  overflow:hidden!important;
}
#sites-dashboard.sd-v3 .sd-v3-toolbar > div:first-child{
  width:210px!important;
  max-width:210px!important;
}
#sites-dashboard.sd-v3 .sd-toolbar-sub{
  max-width:185px!important;
}
#sites-dashboard.sd-v3 .sd-project-picker{
  gap:7px!important;
  overflow:visible!important;
}
#sites-dashboard.sd-v3 .sd-project-picker #sd-manage-projects{
  padding-left:10px!important;
  padding-right:10px!important;
  font-size:12px!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters{
  width:292px!important;
  max-width:292px!important;
  justify-self:end!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:6px!important;
  row-gap:6px!important;
  overflow:hidden!important;
}
#sites-dashboard.sd-v3 .sd-quick-filters .sd-chip{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  padding:6px 5px!important;
  font-size:10.5px!important;
  line-height:1.1!important;
  min-height:36px!important;
  height:36px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
}
@media(max-width:1180px) and (min-width:981px){
  #sites-dashboard.sd-v3 .sd-v3-toolbar{
    grid-template-columns:190px minmax(0,1fr) 270px!important;
    gap:7px!important;
  }
  #sites-dashboard.sd-v3 .sd-v3-toolbar > div:first-child{width:190px!important;max-width:190px!important;}
  #sites-dashboard.sd-v3 .sd-toolbar-sub{max-width:165px!important;}
  #sites-dashboard.sd-v3 .sd-quick-filters{width:270px!important;max-width:270px!important;gap:5px!important;}
  #sites-dashboard.sd-v3 .sd-quick-filters .sd-chip{font-size:10px!important;padding:5px 4px!important;height:34px!important;min-height:34px!important;}
}

/* v4.48 - DOFOLLOW badge aligned with TAG ADV style */
.sd-dofollow-pill{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:5px 7px;border-radius:999px;font-size:10px;font-weight:800;border:1px solid transparent}
.sd-dofollow-pill.is-yes{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.sd-dofollow-pill.is-no{background:#fef2f2;color:#b91c1c;border-color:#fecaca}

/* v4.49 - Prezzo di listino accanto al prezzo Normale scontato */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-list-price{
  font-size:10px !important;
  color:#94a3b8 !important;
  text-decoration:line-through !important;
  white-space:nowrap !important;
}

/* v4.50 - layout compatto e leggibile della colonna PREZZI */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell{
  min-width:150px!important;
  padding-left:10px!important;
  padding-right:10px!important;
  overflow:hidden!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row{
  display:grid!important;
  grid-template-columns:58px minmax(0,1fr)!important;
  align-items:center!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
  padding:3px 0!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-label{
  font-size:9px!important;
  line-height:1.15!important;
  color:#64748b!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:3px 5px!important;
  min-width:0!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values b{
  font-size:12px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values em{
  flex:0 0 auto!important;
  font-size:8.5px!important;
  line-height:1!important;
  padding:3px 5px!important;
  border-radius:999px!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-list-price{
  font-size:9px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}

/* v4.51 - restyling elegante colonna PREZZI */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell{
  min-width:158px!important;
  padding:10px 12px!important;
  overflow:hidden!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:center!important;
  column-gap:8px!important;
  row-gap:2px!important;
  width:100%!important;
  min-width:0!important;
  padding:7px 0!important;
  border-bottom:1px solid #eef2f7!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row:last-child{
  border-bottom:0!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-label{
  font-size:10px!important;
  line-height:1.2!important;
  color:#64748b!important;
  white-space:nowrap!important;
  font-weight:500!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  min-width:0!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values b{
  font-size:13px!important;
  line-height:1.1!important;
  color:#0f172a!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-list-price{
  font-size:9px!important;
  line-height:1.1!important;
  color:#94a3b8!important;
  text-decoration:line-through!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted{
  grid-template-columns:1fr auto!important;
  padding-top:5px!important;
  padding-bottom:8px!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted .sd-price-values{
  display:grid!important;
  grid-template-columns:auto auto!important;
  justify-content:end!important;
  align-items:center!important;
  gap:2px 6px!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted .sd-list-price{
  grid-column:1!important;
  grid-row:1!important;
  align-self:center!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted .sd-price-values b{
  grid-column:2!important;
  grid-row:1!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted .sd-price-values em{
  grid-column:2!important;
  grid-row:2!important;
  justify-self:end!important;
  font-size:8.5px!important;
  line-height:1!important;
  font-weight:700!important;
  color:#b91c1c!important;
  background:#fee2e2!important;
  border:1px solid #fecaca!important;
  padding:3px 6px!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  font-style:normal!important;
}

/* v4.52 - prezzi più leggeri e listino più leggibile */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell{
  min-width:154px!important;
  padding:8px 10px!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row{
  padding:6px 0!important;
  column-gap:7px!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-label{
  font-size:9px!important;
  font-weight:400!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values b{
  font-size:11px!important;
  font-weight:400!important;
  color:#334155!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-list-price{
  font-size:10px!important;
  font-weight:500!important;
  color:#64748b!important;
  text-decoration-line:line-through!important;
  text-decoration-thickness:1.5px!important;
  text-decoration-color:#64748b!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted .sd-price-values em{
  font-size:8px!important;
  font-weight:600!important;
  padding:2px 5px!important;
}

/* v4.54 - prezzi più leggibili: tutto in grassetto + badge sconto verde */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-label{
  font-weight:700!important;
  color:#475569!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-values b{
  font-weight:700!important;
  color:#334155!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-list-price{
  font-weight:700!important;
  color:#64748b!important;
  opacity:1!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell .sd-price-row.is-discounted .sd-price-values em{
  font-size:9px!important;
  font-weight:800!important;
  color:#15803d!important;
  background:#dcfce7!important;
  border:1px solid #86efac!important;
  padding:3px 6px!important;
  border-radius:999px!important;
  opacity:1!important;
}

/* ==========================================================
   v4.55 - Popup Progetto: X identica al popup "Vedi siti"
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-project-modal .sd-modal-head > #sd-project-close.sd-modal-x{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  max-width:38px!important;
  max-height:38px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#f1f5f9!important;
  background-image:none!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:27px!important;
  font-weight:400!important;
  line-height:1!important;
  opacity:1!important;
  cursor:pointer!important;
  transform:none!important;
}
html body #sites-dashboard.sd-v3 #sd-project-modal .sd-modal-head > #sd-project-close.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-project-modal .sd-modal-head > #sd-project-close.sd-modal-x:focus{
  background:#e2e8f0!important;
  background-image:none!important;
  border:0!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  box-shadow:none!important;
  outline:none!important;
  transform:none!important;
}


/* ==========================================================
   v4.56 - Popup Progetto: X uguale al popup "Vedi siti"
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-project-modal .sd-modal-head > #sd-project-close.sd-modal-x{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  max-width:44px!important;
  max-height:44px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #4f46ff!important;
  border-radius:12px!important;
  background:#fff!important;
  background-image:none!important;
  color:#4f46ff!important;
  -webkit-text-fill-color:#4f46ff!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:22px!important;
  font-weight:400!important;
  line-height:1!important;
  opacity:1!important;
  cursor:pointer!important;
  transform:none!important;
}
html body #sites-dashboard.sd-v3 #sd-project-modal .sd-modal-head > #sd-project-close.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-project-modal .sd-modal-head > #sd-project-close.sd-modal-x:focus{
  background:#e2e8f0!important;
  background-image:none!important;
  border-color:transparent!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  box-shadow:none!important;
  outline:none!important;
  transform:none!important;
}


/* ==========================================================
   v4.59 - Authority: ordinamento metriche compatto con frecce per ogni parametro
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-authority-head{
  cursor:default !important;
  white-space:normal !important;
  overflow:visible !important;
}
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-authority-head::after{
  content:"" !important;
  display:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-authority-head:hover::after{
  content:"" !important;
  display:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-title{
  display:block !important;
  margin:0 0 6px 0 !important;
  padding:0 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  gap:4px !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort{
  -webkit-appearance:none !important;
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:31px !important;
  max-width:none !important;
  height:24px !important;
  min-height:24px !important;
  max-height:24px !important;
  margin:0 !important;
  padding:0 6px !important;
  border:0 !important;
  border-radius:6px !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
  font-family:var(--sd-ui-font,inherit) !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1 !important;
  letter-spacing:.03em !important;
  text-align:center !important;
  white-space:nowrap !important;
  cursor:pointer !important;
  opacity:1 !important;
  transform:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort::before{
  content:none !important;
  display:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort::after{
  content:"↕" !important;
  display:inline-block !important;
  position:static !important;
  margin-left:3px !important;
  font-size:9px !important;
  font-weight:700 !important;
  line-height:1 !important;
  color:#64748b !important;
  opacity:.9 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort:hover,
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort:focus{
  background:#f1f5f9 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  outline:none !important;
  box-shadow:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort.sd-sort-asc,
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort.sd-sort-desc{
  background:#eff6ff !important;
  color:#1d73e8 !important;
  -webkit-text-fill-color:#1d73e8 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort.sd-sort-asc::after,
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort.sd-sort-desc::after{
  display:inline-block !important;
  margin-left:3px !important;
  font-size:8px !important;
  line-height:1 !important;
  color:#1d73e8 !important;
  opacity:1 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort.sd-sort-asc::after{
  content:"▲" !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-authority-sorters .sd-metric-sort.sd-sort-desc::after{
  content:"▼" !important;
}


/* ==========================================================
   v4.60 - Prezzi: ordinamento separato Normale / Gambling / Mention
   Stessa grafica compatta usata per le metriche Authority.
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-prices-head{
  cursor:default !important;
  white-space:normal !important;
  overflow:visible !important;
}
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-prices-head::after,
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-prices-head:hover::after{
  content:"" !important;
  display:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-prices-title{
  display:block !important;
  margin:0 0 6px 0 !important;
  padding:0 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  gap:3px !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort{
  -webkit-appearance:none !important;
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  height:24px !important;
  min-height:24px !important;
  max-height:24px !important;
  margin:0 !important;
  padding:0 4px !important;
  border:0 !important;
  border-radius:6px !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
  font-family:var(--sd-ui-font,inherit) !important;
  font-size:8px !important;
  font-weight:800 !important;
  line-height:1 !important;
  letter-spacing:.015em !important;
  text-align:center !important;
  white-space:nowrap !important;
  cursor:pointer !important;
  opacity:1 !important;
  transform:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort::before{
  content:none !important;
  display:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort::after{
  content:"↕" !important;
  display:inline-block !important;
  position:static !important;
  margin-left:2px !important;
  font-size:8px !important;
  font-weight:700 !important;
  line-height:1 !important;
  color:#64748b !important;
  opacity:.9 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort:hover,
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort:focus{
  background:#f1f5f9 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  outline:none !important;
  box-shadow:none !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort.sd-sort-asc,
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort.sd-sort-desc{
  background:#eff6ff !important;
  color:#1d73e8 !important;
  -webkit-text-fill-color:#1d73e8 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort.sd-sort-asc::after,
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort.sd-sort-desc::after{
  display:inline-block !important;
  margin-left:2px !important;
  font-size:7px !important;
  line-height:1 !important;
  color:#1d73e8 !important;
  opacity:1 !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort.sd-sort-asc::after{
  content:"▲" !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort.sd-sort-desc::after{
  content:"▼" !important;
}

/* ==========================================================
   v4.61 - Prezzi: sorter compatti dentro la larghezza colonna
   Mantiene lo stile Authority senza far uscire Normale/Gambling/Mention.
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  align-items:center !important;
  gap:0 !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow:visible !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  height:22px !important;
  min-height:22px !important;
  max-height:22px !important;
  padding:0 1px !important;
  margin:0 !important;
  font-size:7px !important;
  line-height:1 !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
  overflow:visible !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort::after{
  margin-left:1px !important;
  font-size:7px !important;
  flex:0 0 auto !important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-prices-title{
  margin-bottom:5px !important;
}


/* ==========================================================
   v4.62 - Desktop: più spazio ai sorter PREZZI
   Recupera larghezza da Opportunity e TAG ADV mantenendo il totale al 100%.
   ========================================================== */
@media (min-width:1100px){
  /* 7.5 + 14 + 12 + 8.5 + 25 + 7 + 8 + 18 = 100 */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){
    width:8.5% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){
    width:7% !important;
    padding-left:4px !important;
    padding-right:4px !important;
    text-align:center !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){
    width:18% !important;
  }

  /* Opportunity resta leggibile anche nella colonna più stretta. */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4){
    font-size:8.5px !important;
    letter-spacing:.02em !important;
    line-height:1.15 !important;
    white-space:normal !important;
  }

  /* TAG ADV più compatto, senza alterare il badge nelle righe. */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6){
    font-size:8.5px !important;
    letter-spacing:.02em !important;
    white-space:normal !important;
  }

  /* Con la nuova larghezza i tre sorter prezzi possono respirare. */
  html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:2px !important;
  }
  html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort{
    font-size:8px !important;
    padding:0 2px !important;
    overflow:hidden !important;
    text-overflow:clip !important;
  }
  html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort::after{
    margin-left:2px !important;
    font-size:7px !important;
  }
}


/* ==========================================================
   v4.63 - Preferiti accanto alla nazionalità
   Sposta il cuore nella cella SITO e recupera spazio per PREZZI.
   ========================================================== */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-meta{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:6px !important;
  min-width:0 !important;
  margin-top:3px !important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-meta small{
  display:inline-flex !important;
  align-items:center !important;
  min-width:0 !important;
  margin:0 !important;
  line-height:1.25 !important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-favorite{
  -webkit-appearance:none !important;
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 24px !important;
  width:24px !important;
  min-width:24px !important;
  max-width:24px !important;
  height:24px !important;
  min-height:24px !important;
  max-height:24px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid #dbe1e8 !important;
  border-radius:7px !important;
  background:#fff !important;
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
  box-shadow:none !important;
  font-family:var(--sd-ui-font,inherit) !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1 !important;
  cursor:pointer !important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-favorite:hover,
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-favorite:focus{
  border-color:#3157e8 !important;
  color:#3157e8 !important;
  -webkit-text-fill-color:#3157e8 !important;
  background:#f8faff !important;
  outline:none !important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-site-favorite.is-favorite{
  border-color:#fecdd3 !important;
  color:#e11d48 !important;
  -webkit-text-fill-color:#e11d48 !important;
  background:#fff1f2 !important;
}

@media (min-width:1100px){
  /* 4.5 + 14 + 12 + 8.5 + 25 + 7 + 8 + 21 = 100 */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(1),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(1){
    width:4.5% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){
    width:21% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-actions-cell{
    padding-left:3px !important;
    padding-right:3px !important;
    text-align:center !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    width:100% !important;
    gap:0 !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-row-actions .sd-add-cart{
    flex:0 0 30px !important;
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    margin:0 !important;
  }
}

/* ==========================================================
   v4.64 - Opportunity leggermente più larga
   Recupera poco spazio da Categoria e Prezzi mantenendo la tabella al 100%.
   ========================================================== */
@media (min-width:1100px){
  /* 4.5 + 14 + 11.5 + 9.5 + 25 + 7 + 8 + 20.5 = 100 */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){
    width:11.5% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(4){
    width:9.5% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){
    width:20.5% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(4){
    font-size:9px !important;
  }
}


/* ==========================================================
   v4.65 - Categoria e TAG ADV più compatti
   Recupera spazio per la colonna PREZZI mantenendo Opportunity invariata.
   ========================================================== */
@media (min-width:1100px){
  /* 4.5 + 14 + 10.5 + 9.5 + 25 + 6.5 + 8 + 22 = 100 */
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(3),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(3){
    width:10.5% !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(6),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(6){
    width:6.5% !important;
    padding-left:3px !important;
    padding-right:3px !important;
  }
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table th:nth-child(8),
  #sites-dashboard.sd-v3 #sd-table.sd-v3-table td:nth-child(8){
    width:22% !important;
  }
}


/* ==========================================================
   v4.66 - PREZZI allineati alle tre sotto-intestazioni
   Normale / Gambling / Mention sono colonne visive coordinate
   tra header e righe; rimosse le etichette ripetute nelle celle.
   ========================================================== */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-cell{
  padding-left:8px!important;
  padding-right:8px!important;
  overflow:visible!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  gap:2px!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  padding:4px 1px!important;
  text-align:center!important;
  border:0!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-price-main{
  display:block!important;
  color:#334155!important;
  font-size:11px!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-price-discount-line{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:3px!important;
  margin-top:4px!important;
  min-width:0!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-list-price{
  display:inline-block!important;
  color:#64748b!important;
  font-size:8.5px!important;
  font-weight:700!important;
  line-height:1!important;
  text-decoration:line-through!important;
  text-decoration-thickness:1.2px!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot em{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#15803d!important;
  background:#dcfce7!important;
  border:1px solid #86efac!important;
  border-radius:999px!important;
  padding:2px 4px!important;
  font-size:8px!important;
  font-weight:800!important;
  font-style:normal!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-price-empty{
  color:#cbd5e1!important;
  font-size:11px!important;
  font-weight:600!important;
}

/* Header e valori usano esattamente la stessa griglia a tre colonne. */
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:2px!important;
}
html body #sites-dashboard.sd-v3 #sd-table .sd-price-sorters .sd-metric-sort{
  justify-content:center!important;
  text-align:center!important;
}


/* ==========================================================
   v4.67 - PREZZI più leggibili e sconto verticale
   Tutti i prezzi in grassetto. Per il prezzo Normale scontato:
   listino -> badge sconto -> prezzo finale, uno sotto l'altro.
   ========================================================== */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-price-main,
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-list-price,
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-price-empty{
  font-weight:800!important;
}

#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot .sd-price-main{
  color:#1e293b!important;
  font-size:11.5px!important;
}

#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot.is-discounted{
  gap:0!important;
}

/* Il blocco listino+sconto viene prima del prezzo finale. */
#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot.is-discounted .sd-price-discount-line{
  order:1!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:nowrap!important;
  gap:3px!important;
  margin:0 0 4px 0!important;
  width:100%!important;
}

#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot.is-discounted .sd-price-main{
  order:2!important;
  margin:0!important;
}

#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot.is-discounted .sd-list-price{
  color:#64748b!important;
  font-size:9px!important;
  line-height:1.05!important;
  text-decoration-line:line-through!important;
  text-decoration-thickness:1.4px!important;
  text-decoration-color:#64748b!important;
}

#sites-dashboard.sd-v3 #sd-table.sd-v3-table .sd-price-slot.is-discounted em{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:3px 6px!important;
  color:#15803d!important;
  background:#dcfce7!important;
  border:1px solid #86efac!important;
  border-radius:999px!important;
  font-size:8.5px!important;
  font-weight:800!important;
  line-height:1!important;
}


/* ==========================================================
   v4.68 - Opportunity Score: pulsante info e popup esplicativo
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-opportunity-head{
  position:relative!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-headline{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  white-space:nowrap!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-help{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #94a3b8!important;
  border-radius:50%!important;
  background:#fff!important;
  color:#64748b!important;
  -webkit-text-fill-color:#64748b!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
  cursor:pointer!important;
  box-shadow:none!important;
  vertical-align:middle!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-help:hover,
html body #sites-dashboard.sd-v3 .sd-opportunity-help:focus{
  border-color:#3157e8!important;
  background:#eef2ff!important;
  color:#3157e8!important;
  -webkit-text-fill-color:#3157e8!important;
  outline:none!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal.sd-modal{
  z-index:1000000!important;
  padding:20px!important;
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(2px);
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-backdrop{
  position:absolute!important;
  inset:0!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-panel{
  position:relative!important;
  z-index:1!important;
  width:min(720px,calc(100vw - 40px))!important;
  max-width:720px!important;
  max-height:calc(100vh - 50px)!important;
  padding:0!important;
  overflow:auto!important;
  border:1px solid #e2e8f0!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 25px 80px rgba(15,23,42,.28)!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-modal-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:20px!important;
  padding:22px 26px!important;
  border-bottom:1px solid #e5e7eb!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-eyebrow{
  display:block!important;
  margin-bottom:5px!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.12em!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal h3{
  margin:0!important;
  color:#0f172a!important;
  font-size:22px!important;
  line-height:1.25!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal #sd-opportunity-close.sd-modal-x{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #4f46ff!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#4f46ff!important;
  -webkit-text-fill-color:#4f46ff!important;
  box-shadow:none!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:22px!important;
  font-weight:400!important;
  line-height:1!important;
  cursor:pointer!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal #sd-opportunity-close.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-opportunity-modal #sd-opportunity-close.sd-modal-x:focus{
  background:#e2e8f0!important;
  border-color:transparent!important;
  color:#334155!important;
  -webkit-text-fill-color:#334155!important;
  outline:none!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-content{
  padding:22px 26px 26px!important;
  color:#334155!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:14px!important;
  line-height:1.65!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-content p{
  margin:0 0 16px!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-content h4{
  margin:4px 0 12px!important;
  color:#0f172a!important;
  font-size:15px!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-scale{
  display:grid!important;
  gap:7px!important;
  margin:0 0 18px!important;
  padding:14px 16px!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  background:#f8fafc!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-scale>div{
  display:grid!important;
  grid-template-columns:22px 64px minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-scale strong{
  color:#0f172a!important;
  white-space:nowrap!important;
}
html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-summary{
  margin-bottom:0!important;
  padding:13px 15px!important;
  border-radius:10px!important;
  background:#eef2ff!important;
  color:#1e3a8a!important;
}
@media(max-width:640px){
  html body #sites-dashboard.sd-v3 #sd-opportunity-modal.sd-modal{padding:10px!important;}
  html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-panel{width:100%!important;max-height:calc(100vh - 20px)!important;}
  html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-modal-head,
  html body #sites-dashboard.sd-v3 #sd-opportunity-modal .sd-opportunity-content{padding:18px!important;}
}


/* ==========================================================
   v4.69 - Opportunity: help accanto all'indicatore di sort
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-opportunity-head::after,
html body #sites-dashboard.sd-v3 #sd-table thead th.sd-opportunity-head:hover::after{
  content:""!important;
  display:none!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-headline{
  display:block!important;
  white-space:nowrap!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-tools{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  margin-top:5px!important;
  min-height:18px!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-sort-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:14px!important;
  min-width:14px!important;
  height:18px!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-sort-icon::before{
  content:"⇅"!important;
}
html body #sites-dashboard.sd-v3 th.sd-opportunity-head.sd-sort-asc .sd-opportunity-sort-icon::before{
  content:"▲"!important;
  color:#1d73e8!important;
}
html body #sites-dashboard.sd-v3 th.sd-opportunity-head.sd-sort-desc .sd-opportunity-sort-icon::before{
  content:"▼"!important;
  color:#1d73e8!important;
}
html body #sites-dashboard.sd-v3 .sd-opportunity-help{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  margin:0!important;
  flex:0 0 18px!important;
}


/* v4.70 - Allegati ordine */
.sd-order-attachments-field{margin-top:10px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;padding:12px 14px}
.sd-order-attachments-field>label{display:flex;align-items:center;gap:10px;cursor:pointer;color:#0f172a;margin:0}
.sd-order-attachments-field>label>span:last-child{display:flex;flex-direction:column;gap:1px}
.sd-order-attachments-field label strong{font-size:13px}
.sd-order-attachments-field label small{font-size:11px;color:#64748b;font-weight:500}
.sd-order-attachments-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9px;background:#eef2ff;color:#4f46e5;font-size:18px;font-weight:800;flex:0 0 32px}
.sd-order-attachments-field input[type=file]{margin-top:10px!important;min-height:0!important;padding:7px!important;background:#fff!important;font-size:12px!important}
.sd-order-attachments-list{display:flex;flex-direction:column;gap:5px;margin-top:8px}
.sd-order-attachments-list>span{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;font-size:11px;color:#475569}
.sd-order-attachments-list em{font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sd-order-attachments-list small{color:#94a3b8;white-space:nowrap}
.sd-attachment-warning{font-size:11px;color:#b91c1c}
.sd-order-modal-attachments{margin-top:14px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:15px 18px}
.sd-order-attachment-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}
.sd-order-attachment-links a{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:7px 10px;border:1px solid #dbe3ee;border-radius:9px;background:#f8fafc;color:#2563eb;text-decoration:none;font-size:12px;font-weight:600;overflow-wrap:anywhere}
.sd-order-attachment-links a:hover{background:#eef2ff;border-color:#c7d2fe}

/* ==========================================================
   v4.71 - Siti simili consigliati nel carrello
   ========================================================== */
html body #sites-dashboard.sd-v3 .sd-cart-similar{margin:4px 0 16px;padding:15px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc}
html body #sites-dashboard.sd-v3 .sd-similar-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:10px}
html body #sites-dashboard.sd-v3 .sd-similar-head h4{margin:2px 0 0;font-size:15px;line-height:1.2;color:#0f172a}
html body #sites-dashboard.sd-v3 .sd-similar-head small{font-size:10px;color:#64748b;text-align:right}
html body #sites-dashboard.sd-v3 .sd-similar-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
html body #sites-dashboard.sd-v3 .sd-similar-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"info meta" "add add";gap:8px 10px;padding:11px;border:1px solid #dbe3ee;border-radius:11px;background:#fff;box-shadow:0 2px 7px rgba(15,23,42,.035)}
html body #sites-dashboard.sd-v3 .sd-similar-info{grid-area:info;min-width:0;display:flex;flex-direction:column;gap:3px}
html body #sites-dashboard.sd-v3 .sd-similar-info strong{font-size:12px;color:#1d4ed8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #sites-dashboard.sd-v3 .sd-similar-info span{font-size:10px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #sites-dashboard.sd-v3 .sd-similar-meta{grid-area:meta;display:flex;align-items:center;gap:7px;white-space:nowrap}
html body #sites-dashboard.sd-v3 .sd-similar-meta b{font-size:12px;color:#0f172a}
html body #sites-dashboard.sd-v3 .sd-similar-score{display:inline-flex;align-items:center;padding:3px 6px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:9px;font-weight:800}
html body #sites-dashboard.sd-v3 .sd-similar-add{grid-area:add!important;width:100%!important;min-height:30px!important;padding:5px 9px!important;border-radius:8px!important;font-size:11px!important;font-weight:800!important}
html body #sites-dashboard.sd-v3 .sd-similar-loading{padding:8px 2px;font-size:11px;color:#64748b}
@media(max-width:640px){html body #sites-dashboard.sd-v3 .sd-similar-grid{grid-template-columns:1fr}html body #sites-dashboard.sd-v3 .sd-similar-head{align-items:flex-start;flex-direction:column}html body #sites-dashboard.sd-v3 .sd-similar-head small{text-align:left}}


/* ==========================================================
   v4.72 - Testo pulsante Aggiungi nei siti simili
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-similar-card .sd-similar-add{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  opacity:1!important;
  text-shadow:none!important;
}
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-similar-card .sd-similar-add:hover,
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-similar-card .sd-similar-add:focus,
html body #sites-dashboard.sd-v3 #sd-cart-modal .sd-similar-card .sd-similar-add:active{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  opacity:1!important;
}


/* ==========================================================
   v4.78 - Contatore Carrello: numero visibile e bottone compatto
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-btn-cart{
  gap:8px!important;
  padding:10px 16px!important;
}
html body #sites-dashboard.sd-v3 #sd-btn-cart #sd-cart-count{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 28px!important;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:999px!important;
  background:#ffffff!important;
  color:#3157e8!important;
  -webkit-text-fill-color:#3157e8!important;
  font-family:var(--sd-ui-font,inherit)!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:28px!important;
  text-align:center!important;
  text-indent:0!important;
  opacity:1!important;
  visibility:visible!important;
  overflow:visible!important;
  font-variant-numeric:tabular-nums;
}
html body #sites-dashboard.sd-v3 #sd-btn-cart:hover #sd-cart-count,
html body #sites-dashboard.sd-v3 #sd-btn-cart:focus #sd-cart-count{
  background:#ffffff!important;
  color:#3157e8!important;
  -webkit-text-fill-color:#3157e8!important;
  opacity:1!important;
}

/* ==========================================================
   v4.81 - Consigliami: selezione automatica per budget
   ========================================================== */
html body #sites-dashboard.sd-v3 #sd-btn-recommend{
  background:linear-gradient(135deg,#7c3aed,#4f46e5)!important;
  border:0!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 4px 12px rgba(79,70,229,.24)!important;
  white-space:nowrap!important;
}
html body #sites-dashboard.sd-v3 #sd-btn-recommend:hover,
html body #sites-dashboard.sd-v3 #sd-btn-recommend:focus{
  background:linear-gradient(135deg,#6d28d9,#4338ca)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  transform:translateY(-1px);
}
html body #sites-dashboard.sd-v3 #sd-recommend-modal .sd-recommend-panel{
  width:min(900px,96vw)!important;
  max-height:92vh!important;
  padding:0!important;
  overflow:auto!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-modal .sd-modal-head{
  padding:24px 26px 10px!important;
  align-items:center!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-modal h3{
  margin:2px 0 0!important;
  color:#0f172a!important;
  font-size:23px!important;
  line-height:1.2!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-modal>.sd-recommend-panel>.sd-muted{
  margin:0!important;
  padding:0 26px 18px!important;
  color:#64748b!important;
  font-size:12px!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-modal #sd-recommend-close.sd-modal-x{
  -webkit-appearance:none!important;appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;margin:0!important;
  border:1px solid #4f46ff!important;border-radius:12px!important;background:#fff!important;color:#4f46ff!important;-webkit-text-fill-color:#4f46ff!important;
  box-shadow:none!important;font-family:var(--sd-ui-font,inherit)!important;font-size:22px!important;font-weight:400!important;line-height:1!important;cursor:pointer!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-modal #sd-recommend-close.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-recommend-modal #sd-recommend-close.sd-modal-x:focus{
  background:#e2e8f0!important;border-color:transparent!important;color:#334155!important;-webkit-text-fill-color:#334155!important;outline:none!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-form{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:18px 26px!important;background:#f8fafc!important;border-top:1px solid #eef2f7!important;border-bottom:1px solid #eef2f7!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-field{display:flex!important;flex-direction:column!important;gap:6px!important;min-width:0!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-field-wide{grid-column:1/-1!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-field label{font-size:11px!important;font-weight:800!important;color:#334155!important;letter-spacing:.02em!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-field input,
html body #sites-dashboard.sd-v3 .sd-recommend-field select{
  width:100%!important;min-width:0!important;box-sizing:border-box!important;min-height:43px!important;margin:0!important;padding:9px 11px!important;border:1px solid #dbe3ee!important;border-radius:10px!important;background:#fff!important;color:#0f172a!important;font-size:13px!important;box-shadow:none!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-money{position:relative!important;display:flex!important;align-items:center!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-money>span{position:absolute!important;left:12px!important;color:#64748b!important;font-weight:800!important;z-index:1!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-money input{padding-left:28px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-actions{display:flex!important;justify-content:flex-end!important;padding:16px 26px 8px!important;}
html body #sites-dashboard.sd-v3 #sd-recommend-run{min-width:210px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-message{padding:0 26px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-alert{margin:10px 0!important;padding:10px 12px!important;border:1px solid #dbeafe!important;border-radius:10px!important;background:#eff6ff!important;color:#1e40af!important;font-size:11px!important;font-weight:650!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-alert.is-error{border-color:#fecaca!important;background:#fef2f2!important;color:#b91c1c!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-loading{padding:18px 26px 24px!important;color:#64748b!important;font-size:12px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-results{padding:6px 26px 26px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-summary{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:14px!important;margin:8px 0 12px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-summary>div{display:flex!important;flex-direction:column!important;gap:3px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-summary strong{font-size:17px!important;color:#0f172a!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-summary>span{font-size:11px!important;font-weight:800!important;color:#475569!important;white-space:nowrap!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-list{display:flex!important;flex-direction:column!important;gap:8px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-card{
  display:grid!important;grid-template-columns:30px minmax(150px,1.35fr) minmax(235px,1.8fr) minmax(92px,.65fr) minmax(92px,.65fr)!important;align-items:center!important;gap:12px!important;
  padding:11px 12px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fff!important;box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-rank{display:flex!important;align-items:center!important;justify-content:center!important;width:26px!important;height:26px!important;border-radius:8px!important;background:#eef2ff!important;color:#4338ca!important;font-size:11px!important;font-weight:900!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-site,
html body #sites-dashboard.sd-v3 .sd-recommend-authority,
html body #sites-dashboard.sd-v3 .sd-recommend-opportunity,
html body #sites-dashboard.sd-v3 .sd-recommend-price{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-site strong{font-size:12px!important;color:#1d4ed8!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-site span,
html body #sites-dashboard.sd-v3 .sd-recommend-authority span{font-size:9.5px!important;color:#64748b!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-card small{font-size:9px!important;text-transform:uppercase!important;letter-spacing:.05em!important;color:#94a3b8!important;font-weight:800!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-card b{font-size:13px!important;color:#0f172a!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-authority b{color:#4338ca!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-result-actions{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;margin-top:14px!important;}
html body #sites-dashboard.sd-v3 #sd-recommend-add-all{min-width:260px!important;}
html body #sites-dashboard.sd-v3 #sd-recommend-alternative{min-width:165px!important;}
@media(max-width:760px){
  html body #sites-dashboard.sd-v3 .sd-recommend-form{grid-template-columns:1fr!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-field-wide{grid-column:auto!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-card{grid-template-columns:30px minmax(0,1fr) auto!important;grid-template-areas:"rank site price" "rank authority authority" "rank opportunity opportunity"!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-rank{grid-area:rank!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-site{grid-area:site!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-authority{grid-area:authority!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-opportunity{grid-area:opportunity!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-price{grid-area:price!important;text-align:right!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-summary{align-items:flex-start!important;flex-direction:column!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-result-actions{flex-direction:column-reverse!important;align-items:stretch!important;}
  html body #sites-dashboard.sd-v3 #sd-recommend-add-all,
  html body #sites-dashboard.sd-v3 #sd-recommend-alternative{width:100%!important;min-width:0!important;}
}

/* v4.83 - Progetto in Consigliami */
html body #sites-dashboard.sd-v3 .sd-recommend-project-note{
  display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:4px!important;
  margin:0 0 10px!important;padding:9px 11px!important;border:1px solid #e2e8f0!important;
  border-radius:10px!important;background:#f8fafc!important;color:#334155!important;font-size:10.5px!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-project-note strong{font-weight:800!important;color:#0f172a!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-project-note span{color:#64748b!important;}

/* ==========================================================
   v4.90 - Help "Consigliami"
   ========================================================== */
html body #sites-dashboard.sd-v3 .sd-recommend-title-row{
  display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-title-row h3{margin-right:0!important;}
html body #sites-dashboard.sd-v3 #sd-recommend-help.sd-recommend-help{
  -webkit-appearance:none!important;appearance:none!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 24px!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;
  padding:0!important;margin:3px 0 0!important;border:1px solid #c7d2fe!important;border-radius:50%!important;
  background:#eef2ff!important;color:#4f46e5!important;-webkit-text-fill-color:#4f46e5!important;
  font-family:var(--sd-ui-font,inherit)!important;font-size:13px!important;font-weight:900!important;line-height:1!important;
  box-shadow:none!important;cursor:pointer!important;transition:background .15s ease,border-color .15s ease,color .15s ease!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help.sd-recommend-help:hover,
html body #sites-dashboard.sd-v3 #sd-recommend-help.sd-recommend-help:focus{
  background:#e0e7ff!important;border-color:#818cf8!important;color:#3730a3!important;-webkit-text-fill-color:#3730a3!important;outline:none!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help-modal{
  z-index:100002!important;background:rgba(15,23,42,.56)!important;backdrop-filter:blur(4px)!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help-modal .sd-recommend-help-panel{
  width:min(720px,94vw)!important;max-height:88vh!important;padding:0!important;overflow:auto!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help-modal .sd-modal-head{
  padding:22px 24px 17px!important;border-bottom:1px solid #eef2f7!important;align-items:center!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help-modal h3{
  margin:2px 0 0!important;color:#0f172a!important;font-size:21px!important;line-height:1.25!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help-close.sd-modal-x{
  -webkit-appearance:none!important;appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;margin:0!important;
  border:1px solid #4f46ff!important;border-radius:12px!important;background:#fff!important;color:#4f46ff!important;-webkit-text-fill-color:#4f46ff!important;
  box-shadow:none!important;font-family:var(--sd-ui-font,inherit)!important;font-size:22px!important;font-weight:400!important;line-height:1!important;cursor:pointer!important;
}
html body #sites-dashboard.sd-v3 #sd-recommend-help-close.sd-modal-x:hover,
html body #sites-dashboard.sd-v3 #sd-recommend-help-close.sd-modal-x:focus{
  background:#e2e8f0!important;border-color:transparent!important;color:#334155!important;-webkit-text-fill-color:#334155!important;outline:none!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-help-content{
  padding:20px 24px 24px!important;color:#475569!important;font-size:12px!important;line-height:1.6!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-help-content>p{margin:0 0 17px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-help-content b,
html body #sites-dashboard.sd-v3 .sd-recommend-help-content strong{color:#0f172a!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-help-step{
  display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;gap:12px!important;align-items:start!important;
  padding:12px 0!important;border-top:1px solid #eef2f7!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-help-step>span{
  display:flex!important;align-items:center!important;justify-content:center!important;width:28px!important;height:28px!important;
  border-radius:9px!important;background:#eef2ff!important;color:#4338ca!important;font-weight:900!important;font-size:11px!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-help-step strong{display:block!important;margin:1px 0 2px!important;font-size:12.5px!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-help-step p{margin:0!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-help-note{
  margin-top:12px!important;padding:13px 15px!important;border:1px solid #dbeafe!important;border-radius:12px!important;background:#f8fbff!important;
}
html body #sites-dashboard.sd-v3 .sd-recommend-help-note strong{display:block!important;margin-bottom:3px!important;color:#1d4ed8!important;}
html body #sites-dashboard.sd-v3 .sd-recommend-help-note p{margin:0!important;}
@media(max-width:600px){
  html body #sites-dashboard.sd-v3 #sd-recommend-help-modal .sd-modal-head{padding:18px!important;}
  html body #sites-dashboard.sd-v3 .sd-recommend-help-content{padding:16px 18px 20px!important;}
  html body #sites-dashboard.sd-v3 #sd-recommend-help-modal h3{font-size:18px!important;}
}


#sites-dashboard.sd-v3 .sd-lang-switch{
  display:inline-flex;align-items:center;gap:3px;padding:4px;
  border:1px solid #dbe3ee;border-radius:14px;background:#fff;
  min-height:44px;box-sizing:border-box;
}
#sites-dashboard.sd-v3 .sd-lang-btn{
  appearance:none;border:0;background:transparent;color:#64748b;
  min-width:58px;height:34px;padding:0 9px;border-radius:10px;
  font:700 13px/1 var(--sd-ui-font,inherit);cursor:pointer;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease;
}
#sites-dashboard.sd-v3 .sd-lang-btn:hover{background:#f1f5f9;color:#3157e8;}
#sites-dashboard.sd-v3 .sd-lang-btn.is-active{
  background:#eef2ff;color:#3157e8;box-shadow:inset 0 0 0 1px #c7d2fe;
}
@media(max-width:760px){
  #sites-dashboard.sd-v3 .sd-lang-switch{width:auto;}
  #sites-dashboard.sd-v3 .sd-lang-btn{min-width:52px;}
}

/* v4.96 - language switch for Orders / Projects */
.sd-section-head-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.sd-orders-lang-row{display:flex;justify-content:flex-end;margin:0 0 14px}
.sd-secondary-lang-switch{display:inline-flex;align-items:center;padding:3px;border:1px solid #dbe3ef;border-radius:12px;background:#fff;gap:2px}
.sd-secondary-lang-btn{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:9px!important;padding:7px 10px!important;min-width:0!important;font-size:13px!important;font-weight:800!important;line-height:1!important;color:#64748b!important;cursor:pointer}
.sd-secondary-lang-btn.is-active{background:#eef2ff!important;color:#3158e8!important}
.sd-secondary-lang-btn:hover{background:#f5f7ff!important;color:#3158e8!important}
@media(max-width:700px){.sd-projects-page-head{align-items:flex-start}.sd-section-head-actions{justify-content:flex-start}.sd-orders-lang-row{justify-content:flex-start}}


/* v4.99 - Nascondi siti già utilizzati */
#sites-dashboard.sd-v3 .sd-hide-used-toggle{display:none;align-items:center;gap:5px;white-space:nowrap;font-size:11px;font-weight:700;color:#475569;cursor:pointer;margin:0 2px}
#sites-dashboard.sd-v3 .sd-hide-used-toggle.is-visible{display:inline-flex}
#sites-dashboard.sd-v3 .sd-hide-used-toggle input{width:14px;height:14px;margin:0;accent-color:#4f46e5;cursor:pointer}
#sites-dashboard.sd-v3 .sd-hide-used-toggle span{line-height:1.15}
@media(max-width:1200px){#sites-dashboard.sd-v3 .sd-hide-used-toggle{font-size:10.5px}}

/* ==========================================================
   v5.00 - Database: flag siti gia utilizzati sotto al progetto
   ========================================================== */
#sites-dashboard.sd-v3 .sd-project-picker .sd-hide-used-toggle{
  grid-column:1!important;
  grid-row:2!important;
  justify-self:start!important;
  margin:1px 0 0 2px!important;
}
#sites-dashboard.sd-v3 .sd-project-picker #sd-active-project{
  grid-column:1!important;
  grid-row:1!important;
}
#sites-dashboard.sd-v3 .sd-project-picker #sd-manage-projects{
  grid-column:2!important;
  grid-row:1!important;
  align-self:center!important;
}
@media(max-width:700px){
  #sites-dashboard.sd-v3 .sd-project-picker .sd-hide-used-toggle{
    grid-column:1 / -1!important;
  }
}

/* v5.01 - Duplica ordine */
.sd-order-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.sd-duplicate-order-btn{display:inline-flex;align-items:center;justify-content:center;padding:7px 10px;border-radius:8px;background:#eef2ff;border:1px solid #c7d2fe;color:#4338ca!important;text-decoration:none!important;font-size:12px;font-weight:700;line-height:1.1}.sd-duplicate-order-btn:hover{background:#e0e7ff;color:#3730a3!important}


/* v5.03 - Azioni ordine compatte: Duplica / Elimina dentro la cella */
.sd-orders-table td.sd-order-actions{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:6px!important;
  white-space:normal!important;
  overflow:hidden!important;
}
.sd-orders-table td.sd-order-actions .sd-duplicate-order-btn,
.sd-orders-table td.sd-order-actions .sd-delete-order-form,
.sd-orders-table td.sd-order-actions .sd-delete-order-btn{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
.sd-orders-table td.sd-order-actions .sd-duplicate-order-btn,
.sd-orders-table td.sd-order-actions .sd-delete-order-btn{
  padding:7px 5px!important;
  font-size:11px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.sd-orders-table td.sd-order-actions .sd-delete-order-form{margin:0!important;}

/* v5.04 - Fix grafico colonna AZIONI ordini: pulsanti sempre visibili */
@media (min-width:1100px){
  .sd-orders-table th:nth-child(1), .sd-orders-table td:nth-child(1){width:10.5%!important;}
  .sd-orders-table th:nth-child(2), .sd-orders-table td:nth-child(2){width:11.5%!important;}
  .sd-orders-table th:nth-child(3), .sd-orders-table td:nth-child(3){width:12.5%!important;}
  .sd-orders-table th:nth-child(4), .sd-orders-table td:nth-child(4){width:12.5%!important;}
  .sd-orders-table th:nth-child(10), .sd-orders-table td:nth-child(10){width:10%!important;min-width:104px!important;}
}
.sd-orders-table td.sd-order-actions{
  display:table-cell!important;
  vertical-align:middle!important;
  text-align:center!important;
  white-space:normal!important;
  overflow:visible!important;
}
.sd-orders-table td.sd-order-actions .sd-duplicate-order-btn,
.sd-orders-table td.sd-order-actions .sd-delete-order-form{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
}
.sd-orders-table td.sd-order-actions .sd-delete-order-form{margin-top:7px!important;}
.sd-orders-table td.sd-order-actions .sd-duplicate-order-btn,
.sd-orders-table td.sd-order-actions .sd-delete-order-btn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  padding:7px 5px!important;
  font-size:11px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
/* v5.06 - Trova siti alternativi negli ordini */
.sd-orders-table td.sd-order-actions .sd-alternative-order-btn{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;box-sizing:border-box!important;padding:7px 6px!important;
  border-radius:8px!important;background:#f5f3ff!important;border:1px solid #ddd6fe!important;
  color:#6d28d9!important;text-decoration:none!important;font-size:11px!important;font-weight:700!important;
  line-height:1.15!important;white-space:normal!important;text-align:center!important;
}
.sd-orders-table td.sd-order-actions .sd-alternative-order-btn:hover{background:#ede9fe!important;color:#5b21b6!important;}

/* v5.08 - Spaziatura pulsanti azioni ordine */
.sd-orders-table td.sd-order-actions .sd-alternative-order-btn{
  margin-top:7px!important;
}

/* ==========================================================
   v5.09 - Metriche SEO nel carrello + pulsante PDF
   ========================================================== */
#sites-dashboard #sd-cart-modal .sd-cart-site-main{
  min-width:0!important;display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;
}
#sites-dashboard #sd-cart-modal .sd-cart-metrics{
  display:inline-flex!important;align-items:center!important;gap:5px!important;flex-wrap:wrap!important;
}
#sites-dashboard #sd-cart-modal .sd-cart-metrics>span{
  display:inline-flex!important;align-items:center!important;gap:3px!important;padding:3px 6px!important;
  border:1px solid #e2e8f0!important;border-radius:7px!important;background:#f8fafc!important;line-height:1!important;
}
#sites-dashboard #sd-cart-modal .sd-cart-metrics small{font-size:9px!important;color:#64748b!important;font-weight:700!important;letter-spacing:.02em!important}
#sites-dashboard #sd-cart-modal .sd-cart-metrics b{font-size:11px!important;color:#0f172a!important;font-weight:800!important}
#sites-dashboard #sd-cart-modal .sd-cart-metrics-loading{font-size:11px!important;color:#94a3b8!important}
#sites-dashboard #sd-cart-modal .sd-cart-opportunity{border-color:#c7d2fe!important;background:#eef2ff!important}
#sites-dashboard #sd-cart-modal .sd-modal-actions{gap:10px!important;align-items:center!important;flex-wrap:wrap!important}
#sites-dashboard #sd-cart-modal #sd-print-cart-pdf{white-space:nowrap!important}
@media(max-width:640px){
  #sites-dashboard #sd-cart-modal .sd-cart-site-main{align-items:flex-start!important;flex-direction:column!important;gap:7px!important}
  #sites-dashboard #sd-cart-modal .sd-cart-metrics{gap:4px!important}
}


/* v5.10 - Dofollow e Tag ADV nel carrello */
#sites-dashboard #sd-cart-modal .sd-cart-dofollow.is-yes{background:#ecfdf5!important;border-color:#a7f3d0!important}
#sites-dashboard #sd-cart-modal .sd-cart-dofollow.is-yes b{color:#047857!important}
#sites-dashboard #sd-cart-modal .sd-cart-dofollow.is-no{background:#fef2f2!important;border-color:#fecaca!important}
#sites-dashboard #sd-cart-modal .sd-cart-dofollow.is-no b{color:#b91c1c!important}
#sites-dashboard #sd-cart-modal .sd-cart-tag-adv.is-yes{background:#fef2f2!important;border-color:#fecaca!important}
#sites-dashboard #sd-cart-modal .sd-cart-tag-adv.is-yes b{color:#b91c1c!important}
#sites-dashboard #sd-cart-modal .sd-cart-tag-adv.is-no{background:#ecfdf5!important;border-color:#a7f3d0!important}
#sites-dashboard #sd-cart-modal .sd-cart-tag-adv.is-no b{color:#047857!important}
/* v5.11 - Dashboard progetto */
.sd-project-card{cursor:pointer}.sd-project-card a,.sd-project-card button,.sd-project-card details{cursor:auto}.sd-project-dashboard{margin-top:14px;padding-top:14px;border-top:1px solid #eef2f7}.sd-project-card.is-dashboard-open .sd-project-dashboard{display:block!important}.sd-project-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px}.sd-project-metrics>div{background:#fff;border:1px solid #e8edf4;border-radius:10px;padding:10px}.sd-project-metrics span,.sd-project-metrics strong{display:block}.sd-project-metrics span{font-size:10px;color:#64748b;margin-bottom:3px}.sd-project-metrics strong{font-size:16px;color:#0f172a}.sd-project-find-new{display:inline-flex!important;text-decoration:none!important}@media(max-width:800px){.sd-project-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v5.12 - Dashboard progetto sempre visibile */
.sd-projects-page .sd-project-card{cursor:default!important}
.sd-projects-page .sd-project-dashboard{display:block!important}
.sd-projects-page .sd-project-find-new{cursor:pointer!important}
.sd-projects-page .sd-project-find-new:hover,.sd-projects-page .sd-project-find-new:focus{cursor:pointer!important}

/* v5.13 - Project actions: Find new sites next to Delete */
.sd-projects-page .sd-project-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}
.sd-projects-page .sd-project-card-actions .sd-project-find-new,.sd-projects-page .sd-project-card-actions .sd-project-delete{margin:0!important;white-space:nowrap;cursor:pointer!important}
@media(max-width:700px){.sd-projects-page .sd-project-card-top{flex-wrap:wrap}.sd-projects-page .sd-project-card-actions{width:100%;justify-content:flex-start;margin-left:0}}

/* v5.17 - Richiedi un sito */
#sites-dashboard .sd-request-site-panel{max-width:650px!important}
#sites-dashboard .sd-request-site-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
#sites-dashboard .sd-request-site-form .sd-recommend-field-wide{grid-column:1/-1}
#sites-dashboard #sd-request-note{min-height:100px;resize:vertical}
#sites-dashboard #sd-request-site-message.is-success{margin-top:14px;padding:11px 13px;border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:10px}
#sites-dashboard #sd-request-site-message.is-error{margin-top:14px;padding:11px 13px;border:1px solid #fecaca;background:#fef2f2;color:#b91c1c;border-radius:10px}
#sites-dashboard .sd-request-show-existing{margin-left:8px;border:0;background:transparent;color:#2563eb;font-weight:800;text-decoration:underline;cursor:pointer}
@media(max-width:640px){#sites-dashboard .sd-request-site-form{grid-template-columns:1fr}#sites-dashboard .sd-request-site-form .sd-recommend-field-wide{grid-column:auto}}
