/* ============================================
   ADMIN.CSS — Stili per il Gestionale
   Integra i token del design system esistente
   ============================================ */
:root {
    --admin-sidebar-width: 280px;
    --admin-bg: #f8f9fa;
    --admin-sidebar-bg: #111111;
    --admin-text: #333333;
    --admin-border: #e0e0e0;
}

body {
    background-color: var(--admin-bg);
    margin: 0;
    overflow: hidden;
    /* Prevent body scroll, handle in main */
}

/* ── Reset Cursor (Bypass style.css global cursor:none) ── */
body * {
    cursor: auto !important;
}

a,
button,
.btn,
.fc-event,
.admin-nav__link,
select,
input[type="checkbox"],
input[type="radio"],
.close-modal {
    cursor: pointer !important;
}

input[type="text"],
input[type="password"],
textarea,
.admin-input {
    cursor: text !important;
}

/* ── Layout ── */
.admin-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.admin-sidebar {
    width: var(--admin-sidebar-width);
    background-color: var(--admin-sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    transition: width 0.3s ease, min-width 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-sidebar::-webkit-scrollbar {
    display: none;
}

.admin-logo {
    padding: 2rem;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.admin-logo span {
    color: var(--accent);
}

.admin-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.admin-nav__link.active {
    color: #fff;
    background: rgba(255, 85, 0, 0.1);
    color: var(--accent);
}

.admin-nav__link svg {
    width: 20px;
    height: 20px;
}

.admin-sidebar__footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-user-info {
    margin-bottom: 1rem;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}

.user-role {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: #d93025;
}

/* ── Main Area ── */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    height: 80px;
    background: #fff;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.view-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.admin-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── UI Elements ── */
.admin-input,
.admin-select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.admin-input:focus,
.admin-select:focus,
textarea:focus {
    border-color: var(--accent);
}

.flex-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-input {
    max-width: 300px;
}

/* ── Table ── */
.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    border: 1px solid var(--admin-border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: #fcfcfc;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #fdfdfd;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* ── Badges Stato Cliente ── */
.badge--cliente {
    background: #e6f4ea;
    color: #137333;
}

.badge--possibile {
    background: #fff8e1;
    color: #f29900;
}

.badge--ex {
    background: #fce8e6;
    color: #c5221f;
}

/* ── Badges Stato Contatto ── */
.badge--non-contattato {
    background: #ffe1e1;
    color: #f20000;
}

.badge--contattato-telefonicamente {
    background: #f9e6fc;
    color: #a71fc5;
}

.badge--contattato-via-mail {
    background: #e4e1ff;
    color: #1f1fc5;
}

.badge--contattato-di-persona {
    background: #edffe4;
    color: #167d0e;
}

/* ── Modals ── */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    min-width: 500px;
    width: 50vw;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin: auto;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* ── Map ── */
.map-container {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}

/* ── Doc ── */
.doc-layout {
    display: flex;
    gap: 2rem;
    height: calc(100vh - 150px);
    overflow-y: hidden;
}

.doc-sidebar {
    width: 300px;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    flex-shrink: 0;
    overflow-y: auto;
    height: 100%;
}

.doc-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.doc-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
}

#emailEditorToolbar {
    position: sticky;
    top: -2rem;
    z-index: 100;
    background: #fff;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--admin-border);
    flex-wrap: wrap;
    gap: 8px;
}

.preview-box {
    border: 1px dashed #ccc;
    padding: 2rem;
}

/* ── Agenda ── */
.agenda-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.agenda-toolbar>select {
    width: 60vw
}

.calendar-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    height: calc(100vh - 200px);
}

/* FullCalendar overrides */
.fc-theme-standard .fc-scrollgrid {
    border-color: var(--admin-border) !important;
}

.fc-col-header-cell {
    background: #fcfcfc;
    padding: 0.5rem 0;
}

.fc-event {
    cursor: pointer;
}

.fc-v-event {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* --- Valutazione --- */
.valutazione-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ── Miglioramenti UI Modali ── */
.modal-content .admin-input,
.modal-content .admin-select,
.modal-content textarea {
    font-size: 16px;
    padding: 1rem 1.2rem;
    height: auto;
    background-color: #f9fbfd;
    border: 2px solid var(--admin-border);
    transition: all 0.3s ease;
}

.modal-content .admin-input:focus,
.modal-content .admin-select:focus,
.modal-content textarea:focus {
    background-color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.1);
}

.modal-content label {
    font-size: 15px;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Stile per gli input data (datetime-local) */
input[type="datetime-local"] {
    position: relative;
    font-family: var(--font-body);
    font-size: 16px !important;
    color: var(--text-dark);
    padding: 1rem 1.2rem !important;
    border-radius: 8px;
    background-color: #f9fbfd;
    border: 2px solid var(--admin-border);
    outline: none;
    transition: all 0.3s ease;
    cursor: text;
    -webkit-appearance: none;
    appearance: none;
}

input[type="datetime-local"]:focus {
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.1);
}

/* Stile per l'icona calendario nativa (su webkit) */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

input[type="datetime-local"]::after {
    content: "📅";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* ── Custom Alert ── */
.custom-alert-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.custom-alert-box {
    background: #111;
    color: #fff;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-alert-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #fff;
}

.custom-alert-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.custom-alert-box .btn {
    width: 100%;
}

/* ── Sidebar Toggle Button (nell'header, sempre visibile) ── */
.sidebar-toggle-btn {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--admin-text);
    padding: 7px 9px;
    margin-right: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 85, 0, 0.1);
    color: var(--accent);
}

/* ── Sidebar CHIUSA: completamente nascosta ── */
.sidebar-collapsed .admin-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0;
}

/* ── Mobile ── */
@media (min-width: 769px) {

    /* Assicurati che il toggle sia sempre visibile su desktop */
    .sidebar-toggle-btn {
        display: flex;
    }
}

/* ── Riga cliente attiva (filtro lavori) ── */
.row-active {
    background: rgba(255, 85, 0, 0.06) !important;
    outline: 2px solid rgba(255, 85, 0, 0.3);
    outline-offset: -2px;
}

/* ── Doc Sidebar Header ── */
.doc-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.doc-sidebar-header h3 {
    margin: 0;
}

.btn-info {
    background: rgba(255, 85, 0, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 85, 0, 0.3);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-info:hover {
    background: rgba(255, 85, 0, 0.2);
}

/* ── Media Queries Mobile ── */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .view-container {
        padding: 1.5rem 1rem;
    }

    .admin-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        width: var(--admin-sidebar-width) !important;
        min-width: var(--admin-sidebar-width) !important;
        transform: translateX(0);
        transition: transform 0.3s ease !important;
    }

    /* Sidebar chiusa su mobile → slide fuori a sinistra */
    .sidebar-collapsed .admin-sidebar {
        transform: translateX(-100%) !important;
        width: var(--admin-sidebar-width) !important;
        min-width: var(--admin-sidebar-width) !important;
    }

    /* Il toggle btn rimane visibile su mobile */
    .sidebar-toggle-btn {
        display: flex;
    }

    .admin-main {
        width: 100%;
        height: auto;
        overflow-y: auto;
    }

    .admin-header {
        display: flex;
        align-items: center;
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
    }

    /* Tabelle scrollabili */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Layout doc/email: colonna invece di riga */
    .doc-layout {
        flex-direction: column;
        height: auto !important;
        overflow-y: visible !important;
    }

    .doc-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--admin-border);
        height: auto !important;
        overflow-y: visible !important;
    }

    .doc-preview {
        width: 100% !important;
        padding: 1rem 0.5rem;
        min-height: 70vh !important;
        height: auto !important;
        overflow-y: visible !important;
    }

    #emailEditorToolbar {
        position: static !important;
        padding: 0.5rem 1rem !important;
    }

    /* Flex toolbar su mobile → colonna */
    .flex-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    /* Calendario a tutto schermo */
    .calendar-container {
        min-height: 400px;
    }

    .agenda-layout {
        flex-direction: column;
    }

    /* FullCalendar Custom CSS */
    #calendar>.fc-toolbar {
        flex-direction: column !important;
        gap: 1rem;
    }

    /* Modal più piccola */
    .modal {
        overflow-y: auto !important;
        padding: 1rem 0.5rem;
    }

    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        min-width: auto !important;
        margin: auto;
    }

    .form-row {
        flex-direction: column;
        gap: 0rem;
    }

    /* Valutazione */
    .valutazione-layout {
        display: flex;
        flex-direction: column;

    }
}

/* ==========================================================================
   Sezione Dettagli Cliente - Grid Premium & Responsiva
   ========================================================================== */
.cliente-box {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border-left: 5px solid var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.dettaglio-cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 0.75rem;
}

.dettaglio-cliente-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-text);
}

.dettaglio-cliente-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-chiudi-dettaglio {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-chiudi-dettaglio:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.15);
}

.dettaglio-cliente-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.dettaglio-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.2rem 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.dettaglio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: rgba(255, 85, 0, 0.3);
    background: #ffffff;
}

.dettaglio-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dettaglio-card__label svg {
    color: var(--accent);
}

.dettaglio-card__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text);
    word-break: break-word;
    line-height: 1.4;
}

.dettaglio-card__value em {
    font-weight: 400;
    color: #b0b0b0;
    font-style: italic;
}

.dettaglio-card__value a {
    color: var(--admin-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.dettaglio-card__value a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.dettaglio-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    background: var(--accent);
    border: 1px solid var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.dettaglio-card__link:hover {
    background: #e04a00;
    border-color: #e04a00;
    box-shadow: 0 2px 8px rgba(255, 85, 0, 0.3);
    transform: scale(1.02);
}

/* Responsive Overrides per Dettagli */
@media (max-width: 992px) {
    .dettaglio-cliente-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dettaglio-cliente-grid {
        grid-template-columns: 1fr;
    }

    .dettaglio-cliente-box {
        padding: 1.25rem;
    }
}

/* Accordion Dettagli Cliente & Mobile Address Wraps */
.cliente-dettaglio-row td {
    padding: 0 1rem 1.5rem 1rem !important;
    background: #fdfdfd;
}

#clientiTable tbody tr.cliente-dettaglio-row:hover {
    background: transparent !important;
}

.dettaglio-cliente-accordion-container {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border-left: 5px solid var(--accent);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    text-align: left;
}

.dettaglio-card--fullwidth {
    grid-column: span 4;
}

.dettaglio-card__value--posizione {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.posizione-indirizzo {
    flex: 1;
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 992px) {
    .dettaglio-card--fullwidth {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dettaglio-cliente-accordion-container {
        padding: 1.25rem;
    }
    
    .dettaglio-card__value--posizione {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .posizione-indirizzo {
        width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 576px) {
    .dettaglio-card--fullwidth {
        grid-column: span 1;
    }
}

/* =========================================
   SEARCHABLE SELECT (Vanilla JS)
========================================= */
.searchable-select-container {
    position: relative;
    width: 100%;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
}

.searchable-select-display {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--admin-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.searchable-select-display:hover {
    border-color: #b0b0b0;
}

.searchable-select-container.open .searchable-select-display {
    border-color: var(--admin-primary, #111);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

.searchable-select-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.searchable-select-container.open .searchable-select-dropdown {
    display: flex;
}

.searchable-select-input {
    border: none;
    border-bottom: 1px solid var(--admin-border);
    padding: 12px 14px;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.searchable-select-input:focus {
    background: #fdfdfd;
}

.searchable-select-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

.searchable-select-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--admin-text);
    transition: background 0.15s;
}

.searchable-select-item:hover {
    background: var(--admin-bg);
}

.searchable-select-item.selected {
    background: #f0f0f0;
    font-weight: 600;
}

.searchable-select-no-results {
    padding: 12px 14px;
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* -- Social badges -- */
.social-badge {
    transition: all 0.2s ease-in-out !important;
}
.social-badge.fb:hover {
    background: rgba(24, 119, 242, 0.2) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.15);
}
.social-badge.ig:hover {
    background: rgba(225, 48, 108, 0.2) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(225, 48, 108, 0.15);
}

/* --- Stili per Script Vocali e Quill --- */
.ql-container {
    font-family: inherit !important;
    font-size: 1rem !important;
}
.ql-editor {
    min-height: 400px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--admin-text);
}
.script-placeholder {
    background-color: rgba(255, 85, 0, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 85, 0, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 600;
    margin: 0 2px;
    display: inline-block;
    user-select: all;
}
.ql-toolbar.ql-snow {
    border-color: var(--admin-border) !important;
    background: #f8f9fa;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
.ql-container.ql-snow {
    border-color: var(--admin-border) !important;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}
/* Autocomplete dropdown for Vocal Scripts editor */
.script-autocomplete-dropdown {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--admin-text);
}
.script-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.script-autocomplete-item:hover,
.script-autocomplete-item.active {
    background-color: rgba(255, 85, 0, 0.1);
    color: var(--accent, #ff5500);
}
/* Rendi invisibile il placeholder di Quill se l'editor non ha la classe ql-blank */
.ql-editor:not(.ql-blank)::before {
    display: none !important;
    content: "" !important;
}