/* Variables */
:root {
    --analytics-primary: rgba(255, 255, 255, 1); /*#FF6B35;*/
    --analytics-accent: rgba(255, 255, 255, 0.05); /*#FFD23F;*/
    --analytics-focus-color: #9ca3af;
    --analytics-bg-start: #1a1625;
    --analytics-bg-end: #2d1b2e;
    --analytics-glass-bg: rgba(255, 255, 255, 0.05);
    --analytics-glass-bg-strong: rgba(255, 255, 255, 0.30);
    --analytics-glass-border: rgba(255, 255, 255, 0.1);
    --analytics-text-primary: #ffffff;
    --analytics-text-secondary: rgba(255, 255, 255, 0.7);
    --analytics-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --analytics-blur: blur(4px);
}

/* ====================================== */
/* General - Modern Glass Design */
/* ====================================== */

@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --font-family: "Outfit", "Euclid Circular A", 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* font-family ereditata da body — il selettore universale con :not() è stato rimosso per performance */
.rz-autocomplete-panel, .rz-dropdown-panel, .rz-multiselect-panel {
    font-family: var(--font-family);
}


body {
    font-family: var(--font-family);
    background-color: black;

}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    color: var(--analytics-text-primary);
}

:focus-visible {
    outline: none !important;
}

/* Sovrascrive le variabili CSS di Bootstrap per lo sfondo */
:root {
    --bs-body-bg: transparent !important;
}

.page,
main {
    background: transparent !important;
}

h6 {
    color: var(--analytics-text-primary);
}

input:-internal-autofill-selected,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus
{
    background-color: var(--analytics-glass-bg) !important;
    background-image: none !important;
    -webkit-text-fill-color: var(--analytics-text-primary) !important;
    box-shadow: 0 0 0px 1000px var(--analytics-glass-bg) inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* Spinner */
.spinner {
    background: #51373C;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    opacity: 0.5;
}

.spinner-border {
    color: #0071c1;
    position: fixed;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    bottom: 0;
    right: 0;
    z-index: 99999;
    opacity: 0.5;
    height: 50px;
    width: 50px;
    opacity: 1;
}

/* ====================================== */
/* Analytics Dashboard Theme - Modern Glass Design */
/* ====================================== */



/* ====================================== */
/* Dashboard Layout */
/* ====================================== */

.analytics-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--analytics-bg-start) 0%, var(--analytics-bg-end) 100%);
}

.analytics-dashboard {
    flex: 1;
    padding-left: 80px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(38, 82, 247, 0.2) 0%, rgba(25, 17, 53, 0.2) 100%);
    transition: padding-left 0.25s ease;
}

.modern-sidebar.expanded ~ .analytics-dashboard {
    padding-left: 240px;
}

.analytics-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}



/* Atmospheric background effect */
.analytics-backdrop::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.analytics-backdrop::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 82, 247, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.analytics-content {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 0px 20px;
    max-height: calc(100vh - 90px);
}

.analytics-content::-webkit-scrollbar {
    width: 8px;
}

.analytics-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.analytics-content::-webkit-scrollbar-track {
    background-color: transparent;
}

/* ====================================== */
/* Header */
/* ====================================== */

.analytics-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 20px 1rem 20px;
    background: linear-gradient(to bottom, rgba(0, 1, 5, 0.95), rgba(11, 20, 49, 0));
    /* backdrop-filter: blur(20px); */
    /* -webkit-backdrop-filter: blur(20px); */
}

.analytics-title {
    font-size: 2rem;
    font-weight: 300;
    color: var(--analytics-text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.analytics-logo {
    height: 50px;
    width: auto;
    /* transition: all 0.3s ease; */
}

/* .analytics-logo:hover {
    transform: scale(1.05);
} */

.analytics-subtitle {
    font-size: 1.50rem;
    font-weight: 400;
    color: var(--analytics-text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.analytics-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--analytics-text-primary);
    margin: 0;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    background: rgba(26, 22, 37, 0.55);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
}

.analytics-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.analytics-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    /* backdrop-filter: var(--analytics-blur);
    -webkit-backdrop-filter: var(--analytics-blur); */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--analytics-text-primary);
    cursor: pointer;
    /* transition: all 0.3s ease; */
}

/* .analytics-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
} */

/* Pulsante Area Live nella toolbar */
.analytics-icon-btn.live-btn {
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.35);
}

.analytics-icon-btn.live-btn:hover {
    background: rgba(255, 69, 58, 0.15);
}

/* ====================================== */
/* Glass Card Base */
/* ====================================== */

.glass-card {
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--analytics-shadow);
    /* transition: all 0.3s ease; */
}

/* Blocco aggiunta/modifica riga contratto */
.riga-contratto-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1rem 0.25rem 1rem;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.riga-contratto-block.in-modifica {
    background: rgba(255, 193, 7, 0.08);
    border: 1.5px solid rgba(255, 193, 7, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12);
}

.btn.btn-add {
    background: rgba(40, 167, 69, 0.18);
    border-color: rgba(40, 167, 69, 0.55);
    color: rgba(180, 255, 200, 0.9);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn.btn-add:hover {
    background: rgba(40, 167, 69, 0.32);
    border-color: rgba(40, 167, 69, 0.8);
    color: #fff;
}

.btn.btn-add:disabled {
    background: rgba(40, 167, 69, 0.07);
    border-color: rgba(40, 167, 69, 0.2);
    color: rgba(180, 255, 200, 0.35);
}

/* .glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
} */

/* ====================================== */
/* Hero Section */
/* ====================================== */

.hero-section {
       /* background: linear-gradient(135deg, rgba(38, 82, 247, 0.2) 0%, rgba(25, 17, 53, 0.2) 100%); */
    border: 1px solid var(--analytics-glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--analytics-shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--analytics-text-secondary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 400;
    color: var(--analytics-text-primary);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: #1a1625;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    /* transition: all 0.3s ease; */
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hero-cta-secondary {
    background: transparent;
    color: var(--analytics-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

/* .hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.3);
}

.hero-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.12);
} */

/* ====================================== */
/* Metrics Grid */
/* ====================================== */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    /* transition: all 0.3s ease; */
}

/* .metric-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
} */

.metric-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--analytics-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--analytics-text-primary);
    margin: 0;
}

/* ====================================== */
/* Chart Card */
/* ====================================== */

.chart-card {
    /* background: var(--analytics-glass-bg); */
    border: 1px solid var(--analytics-glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    max-height: 360px;
    /* margin-bottom: 1.5rem; */
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--analytics-text-primary);
    margin: 0;
}

.chart-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--analytics-text-secondary);
}

.chart-placeholder {
    height: 200px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--analytics-text-secondary);
}

.chart-content {
    max-height: 308px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
}

.modern-chart {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
}

.chart-surface {
    position: relative;
    margin: 0 auto;
}

.chart-axis-label {
    position: absolute;
    transform: translate(-10px, -50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    text-align: right;
    white-space: nowrap;
}

.chart-value {
    position: absolute;
    transform: translate(-50%, -120%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    padding: 1px 4px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    opacity: 1;
}

.chart-label {
    position: absolute;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.modern-chart svg {
    width: 100%;
    height: auto;
}

.chart-bar {
    /* transition: all 0.3s ease; */
    cursor: pointer;
}

/* .chart-bar:hover {
    opacity: 0.8;
    filter: brightness(1.2) url(#glow);
} */

@keyframes barGrow {
    from {
        transform: scaleY(0);
        opacity: 0;
    }

    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

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

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

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    padding: 1rem 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.legend-label {
    font-size: 0.85rem;
    color: var(--analytics-text-secondary);
    font-weight: 500;
}

.chart-content .rz-chart {
    background: transparent !important;
}

.chart-content .rz-chart-legend {
    color: var(--analytics-text-primary) !important;
}

.chart-content .rz-chart-legend-item-text {
    fill: var(--analytics-text-primary) !important;
}

.chart-content .rz-axis-label {
    fill: var(--analytics-text-secondary) !important;
}

.chart-content .rz-series-data-label {
    fill: var(--analytics-text-primary) !important;
    font-weight: 600;
}

/* ====================================== */
/* Modern Grid */
/* ====================================== */

tr:hover {
    cursor: pointer;
}

.modern-grid {
    background: transparent !important;
    border: none !important;
    width: 100% !important;
}

.grid-maschere {
    margin: auto;
    position: sticky !important;
    max-height: calc(100VH - 360px);
    padding-left: 0px;
    padding-right: 0px;
}

.grid-ingressi-dashboard{
    max-height: 270px;
}

.modern-grid table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
}

.modern-grid thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
}

.modern-grid thead tr:first-child th:first-child {
    border-top-left-radius: 12px !important;
    overflow: hidden !important;
}

.modern-grid thead tr:first-child th:last-child {
    border-top-right-radius: 12px !important;
    overflow: hidden !important;
}

.modern-grid tbody {
    background: transparent !important;
}

.modern-grid td {
    background: transparent !important;
    color: var(--analytics-text-primary) !important;
    padding: 10px 10px 10px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modern-grid th {
    background-color:rgb(22, 27, 51) !important;
    color: var(--analytics-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    padding: 0px 10px 0px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.dialog .modern-grid th {
   display: none;
}

.modern-grid tr {
    background: transparent !important;
}

/* Force transparent on all cells - all variations */
.modern-grid tbody>tr>td {
    background: transparent !important;
    color: var(--analytics-text-primary) !important;
}

.modern-grid tbody>tr:nth-child(odd)>td {
    background: transparent !important;
}

.modern-grid tbody>tr:nth-child(even)>td {
    background: transparent !important;
}

.modern-grid.rz-grid-table-striped tbody>tr:nth-child(odd)>td {
    background: transparent !important;
}

.modern-grid.rz-grid-table-striped tbody>tr:nth-child(even)>td {
    background: transparent !important;
}

.modern-grid .rz-grid-table-striped tbody>tr:not(.rz-expanded-row-content):nth-child(odd)>td {
    background: transparent !important;
}

.modern-grid tbody tr:hover>td {
    background: rgba(100, 181, 246, 0.10) !important;
}


/* Nascondi header nel box scadenze */
.scadenze-grid thead {
    display: none !important;
}

.scadenze-grid tfoot{
    background-color: transparent !important;
}

.modern-grid .rz-header-row {
    background: rgba(10, 10, 35, 0.95) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.modern-grid .rz-header-cell {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: var(--analytics-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-align: left !important;
    background: rgba(10, 10, 35, 0.95) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    /* backdrop-filter: blur(20px) !important; */
}

.modern-grid .rz-grid-table thead th .rz-column-title {
    color: var(--analytics-text-secondary) !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    color: var(--analytics-text-primary) !important;
    margin: 0 !important;
}

/* Footer styles */
.modern-grid tfoot,
.modern-grid .rz-datatable-tfoot {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    border-radius: 0 0 12px 12px !important;
    overflow: hidden !important;
    background-color:rgb(22, 27, 51) !important;
  
}

.modern-grid tfoot tr:last-child td:first-child,
.modern-grid .rz-datatable-tfoot tr:last-child td:first-child {
    border-bottom-left-radius: 12px !important;
    overflow: hidden !important;
}

.modern-grid tfoot tr:last-child td:last-child,
.modern-grid .rz-datatable-tfoot tr:last-child td:last-child {
    border-bottom-right-radius: 12px !important;
    overflow: hidden !important;
}

.modern-grid tfoot td,
.modern-grid .rz-datatable-tfoot td {
    /* background: rgba(10, 10, 35, 0.95) !important; */
    color: var(--analytics-text-primary) !important;
    font-weight: 500 !important;
    padding: 0.75rem 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-bottom: none !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

/* No hover effect on grid header/footer */
.modern-grid thead tr:hover,
.modern-grid tfoot tr:hover,
.modern-grid .rz-datatable-tfoot tr:hover {
    cursor: default !important;
}

.modern-grid thead tr:hover th,
.modern-grid tfoot tr:hover td,
.modern-grid .rz-datatable-tfoot tr:hover td {
    background-color:rgb(22, 27, 51) !important;
}

.modern-grid .rz-datatable-data td .rz-column-footer,
.rz-grid-table td .rz-column-footer {
    color: var(--analytics-text-primary) !important;
}

.modern-grid .rz-data-row {
    /* transition: all 0.2s ease; */
    background: transparent !important;
}

.modern-grid .rz-data-row td {
    background: transparent !important;
    color: var(--analytics-text-primary) !important;
}

/* Hover sulle righe delle datagrid Radzen */
.modern-grid .rz-data-row:hover td {
    background: rgba(100, 181, 246, 0.10) !important;
    /* azzurro chiaro trasparente */
    transition: background 0.2s;
    cursor: pointer;
}

.modern-grid .rz-state-highlight {
    background: rgba(100, 181, 246, 0.40) !important;
}

/* .modern-grid .rz-data-row:hover td {
    background: rgba(255, 255, 255, 0.03) !important;
} */

.modern-grid .rz-cell {
    padding: 1rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--analytics-text-primary) !important;
    font-size: 0.95rem !important;
    text-align: left !important;
    background: transparent !important;
}

.modern-grid .rz-datatable-data td .rz-cell-data,
.modern-grid .rz-grid-table td .rz-cell-data {
    color: var(--analytics-text-primary) !important;
}

.modern-grid .rz-row-expander {
    display: none;
}

.modern-grid .rz-grid-pager {
    background: transparent !important;
    border: none !important;
    padding: 0;
}

.modern-grid {
    /* height: 100% !important; */
    overflow: hidden !important;
}

.rz-data-grid-data::-webkit-scrollbar {
    width: 8px;
}

.rz-data-grid-data::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.rz-data-grid-data::-webkit-scrollbar-track {
    background-color: transparent;
}

.grid-budget-istruttori {
    height: calc(100vh - 330px);
}

/* ====================================== */
/* Product Card */
/* ====================================== */

.product-card {
    /* background: var(--analytics-glass-bg); */
    border: 1px solid var(--analytics-glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    max-height: 360px;;
}

.product-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.product-trend {
    font-size: 0.75rem;
    color: #4ade80;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--analytics-text-primary);
    margin: 0.5rem 0;
}

.product-name {
    font-size: 0.85rem;
    color: var(--analytics-text-secondary);
}

/* ====================================== */
/* Video List */
/* ====================================== */

.video-list {
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    /* backdrop-filter: var(--analytics-blur);
    -webkit-backdrop-filter: var(--analytics-blur); */
}

.video-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.video-list-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--analytics-text-primary);
    margin: 0;
}

.video-filter {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 8px;
    color: var(--analytics-text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.video-table {
    width: 100%;
}

.video-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--analytics-glass-border);
    margin-bottom: 1rem;
}

.video-table-header span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--analytics-text-secondary);
    letter-spacing: 1px;
}

.video-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    /* transition: all 0.2s ease; */
}

/* .video-item:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 10px;
}

.video-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--analytics-text-primary);
    margin: 0 0 0.25rem 0;
}

.video-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--analytics-text-secondary);
}

.video-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--analytics-text-secondary);
}

.video-duration {
    font-size: 0.85rem;
    color: var(--analytics-text-secondary);
}

.video-chart {
    width: 60px;
    height: 30px;
}

/* ====================================== */
/* Dashboard Grid Layout */
/* ====================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.grid-col-span-3 {
    grid-column: span 3;
}

.grid-col-span-4 {
    grid-column: span 4;
}

.grid-col-span-6 {
    grid-column: span 6;
}

.grid-col-span-8 {
    grid-column: span 8;
}

.grid-col-span-12 {
    grid-column: span 12;
}

/* ====================================== */
/* Utilities */
/* ====================================== */

.text-muted {
    color: var(--analytics-text-secondary);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* ====================================== */
/* Responsive */
/* ====================================== */

@media (max-width: 1200px) {

    .grid-col-span-3,
    .grid-col-span-4 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .analytics-dashboard {
        padding: 1rem;
    }

    .hero-section {
        padding: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-col-span-3,
    .grid-col-span-4,
    .grid-col-span-6,
    .grid-col-span-8 {
        grid-column: span 12;
    }

    .video-table-header,
    .video-item {
        grid-template-columns: 1fr;
    }

    .video-views,
    .video-duration {
        display: none;
    }
}

/* ====================================== */
/* Animations */
/* ====================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ====================================== */
/* Modern Sidebar */
/* ====================================== */

.modern-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 80px;
    background: rgb(15 26 58 / 80%);
    border-right: 1px solid var(--analytics-glass-border);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    transition: width 0.2s ease;
    overflow: visible;
    transform: translateZ(0);
    will-change: transform;
}

.sidebar-logo {
    width: 70px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    cursor: pointer;
    /* transition: all 0.3s ease; */
}

/* .sidebar-logo:hover {
    transform: scale(1.1);
} */

.sidebar-logo span {
    color: white;
    font-size: 24px;
}

.sidebar-logo-img {
    width: 70px;
    height: 40px;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    padding: 0 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    /* Scrollbar sottile */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* Collapsed: overflow visible in modo che il tooltip label possa uscire dal contenitore */
.modern-sidebar:not(.expanded) .sidebar-nav {
    overflow: visible;
    scrollbar-width: none;
}

.modern-sidebar:not(.expanded) .sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-item {
    width: 48px;
    height: 28px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--analytics-text-secondary);
    font-size: 20px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    position: relative;
    text-decoration: none;
}

.sidebar-item:hover {
    color: var(--analytics-primary);
}

/* .sidebar-item:hover,
.sidebar-item.active {
    background: var(--analytics-glass-bg);
    color: var(--analytics-primary);
    transform: translateX(5px);
} */

.sidebar-item.active {
    background: var(--analytics-glass-bg);
    color: var(--analytics-primary);
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: -1rem;
    width: 3px;
    height: 0;
    background: var(--analytics-primary);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.sidebar-item.active::before {
    height: 24px;
}

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

.sidebar-notification {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #FF6B35;
    border-radius: 50%;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--analytics-glass-border);
    background: var(--analytics-glass-bg);
    color: var(--analytics-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 1rem;
    transition: color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    color: var(--analytics-primary);
    background: rgba(38, 82, 247, 0.15);
}

/* Sidebar label — collapsed: tooltip, expanded: inline label */
.sidebar-item-label {
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(15, 22, 42);
    padding: 0.45rem 1rem;
    border-radius: 10px;
    color: var(--analytics-text-primary);
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    border: 1px solid var(--analytics-glass-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    z-index: 10001;
}

.sidebar-item:hover .sidebar-item-label {
    opacity: 1;
}

/* Collapsed: nasconde le label senza transizione per evitare il flash durante la chiusura */
.modern-sidebar:not(.expanded) .sidebar-item-label {
    transition: none;
}

.modern-sidebar:not(.expanded) .sidebar-item:hover .sidebar-item-label {
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Expanded Sidebar */
.modern-sidebar.expanded {
    width: 240px;
    align-items: flex-start;
    overflow: hidden;
}

.modern-sidebar.expanded .sidebar-item {
    width: 100%;
    justify-content: flex-start;
    padding-left: 1rem;
}

.modern-sidebar.expanded .sidebar-item-label {
    position: static;
    transform: none;
    background: none;
    border: none;
    padding: 0;
    opacity: 1;
    pointer-events: auto;
    font-size: 0.9rem;
    color: var(--analytics-text-secondary);
    margin-left: 0.75rem;
    overflow: hidden;
}

.modern-sidebar.expanded .sidebar-item:hover,
.modern-sidebar.expanded .sidebar-item:hover .sidebar-item-label,
.modern-sidebar.expanded .sidebar-item.active .sidebar-item-label {
    color: var(--analytics-primary);
}

.modern-sidebar.expanded .sidebar-toggle-btn {
    align-self: flex-end;
    margin-right: 1.25rem;
}

/* --- Nav Section Divider --- */
/* Collapsed: linea orizzontale sottile */
.nav-section-divider {
    width: 36px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0.6rem auto;
    border-radius: 1px;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-section-label {
    display: none;
}

/* Expanded: etichetta testo della sezione */
.modern-sidebar.expanded .nav-section-divider {
    width: 100%;
    height: auto;
    background: transparent;
    margin: 1rem 0 0.15rem;
    padding: 0 1rem;
    overflow: visible;
}

.modern-sidebar.expanded .nav-section-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

/* ====================================== */
/* Modern Form Controls - Glass Design */
/* ====================================== */

/* Custom Input Box with Floating Label */
.input_box {
    position: relative;

}

.input_box input,
.input_box textarea,
.input_box select {
    width: 100%;
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 12px;
    padding: 1.25rem 1rem 0.5rem 1rem;
    font-size: 0.90rem;
    font-family: var(--font-family);
    color: var(--analytics-text-primary);
    /* backdrop-filter: var(--analytics-blur);
    -webkit-backdrop-filter: var(--analytics-blur); */
    /* transition: all 0.3s ease; */
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.input_box input {
    height: 53px;
}

/* Nasconde le frecce su/giù degli input numerici */
.input_box input[type="number"]::-webkit-outer-spin-button,
.input_box input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input_box input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.input_box input:-webkit-autofill,
.input_box input:-webkit-autofill:hover,
.input_box input:-webkit-autofill:focus,
.input_box input:-internal-autofill-selected {
    -webkit-text-fill-color: var(--analytics-text-primary) !important;
    box-shadow: 0 0 0px 1000px var(--analytics-glass-bg) inset !important;
    border: 1px solid var(--analytics-glass-border) !important;
    border-radius: 12px !important;
    transition: background-color 9999s ease-in-out 0s;
}

.input_box textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 1.5rem;
}

/* .input_box input:hover,
.input_box textarea:hover,
.input_box select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
} */

.input_box input:focus,
.input_box textarea:focus,
.input_box select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--analytics-focus-color);
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

/* Floating Label */
.input_box .floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--analytics-text-secondary);
    font-size: 0.95rem;
    pointer-events: none;
    transition: 0.2s ease all;
    background: transparent;

}

.input_box textarea~.floating-label {
    top: 1.5rem;
    transform: translateY(0);
    transition: 0.2s ease all;
}

/* Floating Label - Active State */
.input_box input:focus~.floating-label,
.input_box input:not(:placeholder-shown)~.floating-label,
.input_box textarea:focus~.floating-label,
.input_box textarea:not(:placeholder-shown)~.floating-label,
.input_box select:focus~.floating-label,
.input_box select:not([value=""])~.floating-label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: var(--analytics-focus-color);
    font-weight: 600;
}

/* Select - Always Float Label */
.input_box select~.floating-label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Placeholder */
.input_box input::placeholder,
.input_box textarea::placeholder {
    color: transparent;
}

.input_box input:focus::placeholder,
.input_box textarea:focus::placeholder {
    color: var(--analytics-text-secondary);
}

/* Autofill override — blocca lo sfondo bianco di Edge/Chrome */
.input_box input:-webkit-autofill,
.input_box input:-webkit-autofill:hover,
.input_box input:-webkit-autofill:focus,
.input_box input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #211e2c inset !important;
    box-shadow: 0 0 0 1000px #211e2c inset !important;
    -webkit-text-fill-color: var(--analytics-text-primary) !important;
    caret-color: var(--analytics-text-primary);
    border-color: var(--analytics-glass-border) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ====================================== */
/* Radzen Dialog - Glass Design */
/* ====================================== */

.rz-dialog {
    background: rgba(15, 22, 42, 0.97) !important;
    /* background: linear-gradient(145deg, rgba(16, 24, 44, 0.97) 0%, rgba(23, 34, 58, 0.95) 100%) !important; */
    border: 1px solid rgba(148, 170, 210, 0.2) !important;
    box-shadow: 0 14px 40px rgba(5, 10, 24, 0.5) !important;
    border-radius: 20px !important;
    min-height: auto !important;
}

.rz-dialog-mask {
background-color: transparent !important;
}



.rz-dialog-title {
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    text-transform: none !important;
}

.rz-dialog-titlebar {
    padding: 15px !important;
    background: linear-gradient(180deg, rgba(44, 64, 108, 0.42) 0%, rgba(33, 49, 84, 0.28) 100%) !important;
    border-bottom: 1px solid rgba(148, 170, 210, 0.22) !important;
    color: #FFFFFF !important;
    border-radius: 20px 20px 0 0 !important;
    display: none !important;
}

.rz-dialog-content {
    padding: 15px !important;
    background: transparent !important;
    border-radius: 0 0 20px 20px !important;
    color: var(--analytics-text-primary) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.rz-dialog-content::-webkit-scrollbar {
    width: 8px;
}

.rz-dialog-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.rz-dialog-content::-webkit-scrollbar-track {
    background-color: transparent;
}

.rz-dialog-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.rz-dialog-titlebar-close {
    color: #FFFFFF !important;
}

.rz-dialog-titlebar-close .rzi-times {
    color: #FFFFFF !important;
}

.rz-dialog-confirm-message,
.rz-dialog-alert-message {
    color: #FFFFFF !important;
}

/* ───── Toast notifications: nascoste, vengono mostrate come Alert modali ───── */
.rz-notification,
.rz-notifications {
    display: none !important;
}

/* ───── Pulsanti dei dialog Confirm / Alert: stile progetto ───── */
.rz-dialog-confirm-buttons,
.rz-dialog-alert-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    padding-top: 0.5rem !important;
}

/* ── Bottoni Radzen dentro dialog (confirm, alert, content) ── */
.rz-dialog-confirm-buttons .rz-button,
.rz-dialog-alert-buttons .rz-button,
.rz-dialog-content .rz-button {
    appearance: none;
    -webkit-appearance: none;
    background: var(--analytics-glass-bg) !important;
    border: 1px solid var(--analytics-glass-border) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.95rem !important;
    font-family: var(--font-family) !important;
    font-weight: 600 !important;
    color: var(--analytics-text-primary) !important;
    box-shadow: none !important;
    cursor: pointer !important;
    outline: none !important;
    transition: none !important;
    min-width: auto !important;
    line-height: 1.2 !important;
}

.rz-dialog-confirm-buttons .rz-button .rz-button-text,
.rz-dialog-alert-buttons .rz-button .rz-button-text,
.rz-dialog-content .rz-button .rz-button-text {
    color: inherit !important;
    font-weight: inherit !important;
}

.rz-dialog-confirm-buttons .rz-button .rzi,
.rz-dialog-alert-buttons .rz-button .rzi {
    display: none !important;
}

.rz-dialog-confirm-buttons .rz-button:hover,
.rz-dialog-alert-buttons .rz-button:hover,
.rz-dialog-content .rz-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Primario (primo bottone = OK/Conferma) */
.rz-dialog-confirm-buttons .rz-button:first-child,
.rz-dialog-alert-buttons .rz-button:first-child,
.rz-dialog-content .rz-button.rz-primary,
.rz-dialog-content .rz-button.rz-shade-default:not(.rz-secondary):not(.rz-danger):not(.rz-warning):not(.rz-info):not(.rz-success):not(.rz-light) {
    border: 1px solid var(--analytics-primary) !important;
    color: #ffffff !important;
}

.rz-dialog-confirm-buttons .rz-button:first-child:hover,
.rz-dialog-alert-buttons .rz-button:first-child:hover,
.rz-dialog-content .rz-button.rz-primary:hover {
    border: 1px solid var(--analytics-primary) !important;
    color: #ffffff !important;
}

/* Secondario / Annulla (rosso come elimina) */
.rz-dialog-confirm-buttons .rz-button:last-child:not(:first-child),
.rz-dialog-content .rz-button.rz-secondary,
.rz-dialog-content .rz-button.rz-light {
    background: rgba(220, 53, 69, 0.08) !important;
    border: 1px solid rgba(255, 120, 137, 0.65) !important;
    color: #dc3545 !important;
}

.rz-dialog-confirm-buttons .rz-button:last-child:not(:first-child):hover,
.rz-dialog-content .rz-button.rz-secondary:hover,
.rz-dialog-content .rz-button.rz-light:hover {
    background: linear-gradient(135deg, rgba(185, 39, 59, 0.95) 0%, rgba(231, 84, 103, 0.88) 100%) !important;
    border: 1px solid rgba(255, 144, 158, 0.9) !important;
    color: #ffffff !important;
}

/* Danger nei dialog */
.rz-dialog-content .rz-button.rz-danger {
    background: rgba(220, 53, 69, 0.08) !important;
    border: 1px solid rgba(255, 120, 137, 0.65) !important;
    color: #dc3545 !important;
}

.rz-dialog-content .rz-button.rz-danger:hover {
    background: linear-gradient(135deg, rgba(185, 39, 59, 0.95) 0%, rgba(231, 84, 103, 0.88) 100%) !important;
    border: 1px solid rgba(255, 144, 158, 0.9) !important;
    color: #ffffff !important;
}

/* Contratto dialog layout */
.contratto-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
}

.contratto-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.contratto-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0rem;
}

/* Dropdown ricerca socio (riutilizzabile) */
.socio-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgb(15, 25, 50);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 2px;
}

.socio-search-dropdown::-webkit-scrollbar {
    width: 4px;
}

.socio-search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* ── Layout base (page / main / blazor error) ────────────────────────── */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Toggle button navigazione (on/off) ─────────────────────────────── */
.nav-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.nav-toggle-btn:hover {
    opacity: 0.82;
}

.nav-toggle-on {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.40);
    color: #4ade80;
}

.nav-toggle-off {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #f87171;
}

/* ── Panel header (riutilizzabile nei widget panel) ──────────────────── */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--analytics-text-primary);
}

.panel-header__right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.panel-header__count {
    font-size: 0.75rem;
    color: var(--analytics-text-secondary);
}

/* ── Panel empty state ───────────────────────────────────────────────── */
.panel-empty {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 220px;
    border: 1px dashed var(--analytics-glass-border);
    border-radius: 20px;
    color: rgba(255, 255, 255, .2);
}

.panel-empty__actions {
    position: absolute;
    top: .6rem;
    right: .6rem;
}

.panel-empty__icon {
    font-size: 2.5rem;
}

.panel-empty__text {
    font-size: .85rem;
    letter-spacing: .04em;
}

/* ── Panel picker ────────────────────────────────────────────────────── */
.panel-btn {
    text-align: left;
}

.panel-picker-divider {
    border-color: rgba(255, 255, 255, .12);
    margin: .5rem 0;
}

/* ── Pulsante icona ─────────────────────────────────────────────────── */
.btn-icon {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.btn-icon:hover {
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.1);
    border-color: rgba(100, 181, 246, 0.4);
}

/* ── Pulsante icona danger ───────────────────────────────────────────── */
.btn-icon-danger {
    background: transparent;
    border: none;
    color: rgba(248, 113, 113, 0.7);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
}

.btn-icon-danger:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* Shadow and visual depth */
.input_box input:focus,
.input_box textarea:focus,
.input_box select:focus {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 107, 53, 0.15);
}

/* Select specific styles */
.input_box select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Disabled state */
.input_box input:disabled,
.input_box textarea:disabled,
.input_box select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

/* Legacy .inputbox class for standalone inputs/selects */
.inputbox {
    width: 100%;
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    color: var(--analytics-text-primary);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

select.inputbox {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.inputbox:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--analytics-focus-color);
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

.inputbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.inputbox-search-input {
    padding-right: 38px !important;
}

.inputbox-search-button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6b7280;
    padding: 0;
    line-height: 1;
    z-index: 2;
}

.inputbox-search-button:hover {
    color: #111827;
}

.inputbox-search-readonly input[readonly] {
    pointer-events: none;
    user-select: none;
}

/* Select / Dropdown */
select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 12px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    color: var(--analytics-text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

select:hover,
.form-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

select:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--analytics-focus-color);
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

select:disabled,
.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.02);
}

/* Option elements */
select option {
    background: #1a1625;
    color: #ffffff;
    padding: 0.5rem;
}

/* Input Fields */
/* input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
.form-control {
    appearance: none;
    -webkit-appearance: none;
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    color: var(--analytics-text-primary);
    backdrop-filter: var(--analytics-blur);
    -webkit-backdrop-filter: var(--analytics-blur);
    transition: all 0.3s ease;
    outline: none;
} */

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
textarea:hover,
.form-control:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--analytics-focus-color);
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--analytics-text-secondary);
}

/* Textarea specific */
textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */

.btn {
    appearance: none;
    -webkit-appearance: none;
    background: var(--analytics-glass-bg);
    border: 1px solid var(--analytics-glass-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--analytics-text-primary);
    /* backdrop-filter: var(--analytics-blur);
    -webkit-backdrop-filter: var(--analytics-blur); */
    transition: none; /* all 0.3s ease;*/
    cursor: pointer;
    outline: none;
}


.btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

button:active,
.btn:active {
    transform: translateY(0);
}

/* Primary Button */
.btn-primary,
button.primary {
    /* background-color: var(--analytics-glass-bg-strong) !important; */
    border-color: var(--analytics-primary);
    color: #ffffff;
}

.btn-primary:hover,
button.primary:hover {
    /* background: linear-gradient(135deg, #434140 0%, var(--analytics-primary) 100%); */
    /* box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4); */
      border-color: var(--analytics-primary);
}

/* Secondary Button */
.btn-secondary,
button.secondary {
    background: var(--analytics-glass-bg);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.btn-selected {
    background-color: var(--analytics-glass-bg-strong) !important;
    border-color: var(--analytics-primary) !important;
    color: #fff !important;
    /* box-shadow: 0 4px 20px rgba(48, 47, 47, 0.4); */
}

.btn-selected:hover {
    background: linear-gradient(135deg, #434140 0%, var(--analytics-primary) 100%);
    border-color: var(--analytics-primary) !important;
    color: #ffffff !important;
    /* box-shadow: 0 4px 24px rgba(255, 107, 53, 0.5); */
}

/* Outline Secondary Button */
.btn-outline-secondary {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15) !important;
}

.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.3) !important;
}

.btn-outline-danger {
    background: rgba(220, 53, 69, 0.08) !important;
    border-color: rgba(255, 120, 137, 0.65) !important;
    color: #dc3545 !important;
    /* box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 14px rgba(46, 10, 18, 0.2); */
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, rgba(185, 39, 59, 0.95) 0%, rgba(231, 84, 103, 0.88) 100%) !important;
    border-color: rgba(255, 144, 158, 0.9) !important;
    color: #ffffff !important;
    /* box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 24px rgba(70, 10, 22, 0.34); */
}

.btn-outline-danger:focus,
.btn-outline-danger:active {
    border-color: rgba(255, 144, 158, 0.95) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.18), 0 10px 24px rgba(70, 10, 22, 0.28) !important;
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--analytics-glass-border);
    border-radius: 4px;
    background: var(--analytics-glass-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--analytics-primary);
    border-color: var(--analytics-primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Bootstrap form-check-input: usa il blu Bootstrap invece di --analytics-primary (bianco) */
.form-check-input[type="checkbox"]:checked,
.form-check-input[type="radio"]:checked {
    background-color: transparent;
    border-color: #ffffff;
    border-width: 1px;
}
.form-check-input[type="checkbox"]:checked::after {
    display: none; /* Bootstrap usa background-image SVG, non ::after */
}

/* Label */
label {
    color: var(--analytics-text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Validation States */
.form-control.is-invalid,
input.is-invalid,
select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid,
input.is-valid,
select.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: #28a745;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===== Socio Info Styles ===== */
.socio-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.socio-name {
    font-weight: 500;
    color: var(--analytics-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.socio-address {
    font-size: 0.875rem;
    color: var(--analytics-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Badge Styles ===== */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.25);
}

.badge-success:hover {
    background: rgba(40, 167, 69, 0.25);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.25);
}

.badge-danger:hover {
    background: rgba(220, 53, 69, 0.25);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.badge-warning:hover {
    background: rgba(255, 193, 7, 0.25);
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.25);
}

.badge-secondary:hover {
    background: rgba(108, 117, 125, 0.25);
}

.badge-attivo {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    padding: 0px 10px;
}

.badge-attivo:hover {
    background: rgba(74, 222, 128, 0.25);
}

.badge-archiviato {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

.badge-archiviato:hover {
    background: rgba(156, 163, 175, 0.25);
}

/*======Radzen=========*/
.rz-view-header {

    background-color: transparent !important;
}

.rz-scheduler {

    border: none !important;
    background: transparent !important;
    padding: 0px 15px 0 15px !important;

}

.rz-tabview.rz-tabview-top>.rz-tabview-nav .rz-tabview-selected {

    border-bottom: 2px solid var(--analytics-primary) !important;
}

.rz-tabview-nav .rz-tabview-selected {

    color: #ffffff !important;

}

.rz-tabview-nav li:hover:not(.rz-tabview-selected):not(.rz-state-disabled) {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Plan */
.planbox-col {
    padding: 6px;
}

.PlanBox {
    min-height: 210px;
    padding: 10px;
    display: flex;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 10px 24px rgba(5, 12, 30, 0.35);
    /* backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); */
}

.PlanBox .Centro {
    background: rgba(15, 72, 129, 0.22);
    border: 1px solid rgba(96, 180, 255, 0.3);
    border-radius: 8px;
    padding: 5px 8px;
    text-align: center;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #d8ebff;
}

.PlanBox .Titolo {
    text-align: center;
    text-transform: uppercase;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

.planbox-title-btn,
.planbox-instructor-btn {
    color: #ffffff;
    text-decoration: none;
    border: none;
    background-color: transparent;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
    width: 100%;
    padding: 0;
}

.planbox-title-btn {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.planbox-instructor-btn {
    font-size: 10px;
    opacity: 0.92;
}

.planbox-instructor-btn.missing {
    color: #ffd3d3;
}

.PlanBox .Orario {
    text-align: center;
    text-transform: uppercase;
    color: #f4f9ff;
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.planbox-stats-row {
    margin-top: 12px;
}

.planbox-stat-col {
    text-align: center;
    text-transform: uppercase;
    font-size: 10px;
    color: rgba(235, 243, 255, 0.8);
    letter-spacing: 0.05em;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.planbox-stat-col:last-child {
    border-right: none;
}

.PlanBox .PostiDisponibili,
.PlanBox .PostiRiserva {
    display: inline-block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
}

.PlanBox .PostiDisponibili.planbox-clickable {
    cursor: pointer;
    transition: opacity 0.15s;
}

.PlanBox .PostiDisponibili.planbox-clickable:hover {
    opacity: 0.75;
}

/* Il col-12 interno diventa flex-column per spingere il footer in fondo */
.PlanBox > .col-12 {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.PlanBox .planbox-footer-row {
    margin-top: auto;
    padding-top: 10px;
    padding-bottom: 2px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.PlanBox .planbox-prenotati-link {
    background: none;
    border: none;
    color: rgba(235, 243, 255, 0.65);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
}

.PlanBox .planbox-prenotati-link:hover {
    color: rgba(235, 243, 255, 0.95);
}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
    display: none !important;
}


/*Datepicker*/

.rz-datepicker-inline {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    width: 100%;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    box-shadow: 0 8px 22px rgba(5, 12, 30, 0.26);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px;
}

.rz-calendar-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.rz-calendar-inline-container {
    border: none !important;
    width: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.rz-calendar-title .rz-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06) !important;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #e8f2ff;
    padding: 10px 9px;
}

.rz-calendar-view th {
    color: #ffffff !important;
}

.rz-calendar-view td {
    border: none !important;
}

.rz-calendar-view td .rz-state-active {
    background: linear-gradient(135deg, #0F4881 0%, #2f79c4 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 14px rgba(15, 72, 129, 0.45);
}

.rz-calendar-view td .rz-state-default.rz-state-focused,
.rz-calendar-view td .rz-state-default:hover {

    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;

}

.rz-calendar-view td .rz-state-default {
    border-radius: 10px !important;
    width: 100% !important;
    box-shadow: none !important;
    color: #e7efff !important;
    font-weight: 500;
    transition: background-color 0.15s ease;

}

.rz-calendar-view td .rz-state-default:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.rz-datepicker-calendar td a.rz-state-default,
.rz-datepicker-calendar td span.rz-state-default,
.rz-datepicker-calendar th a.rz-state-default,
.rz-datepicker-calendar th span.rz-state-default {
    width: 100% !important;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rz-calendar-header .rz-button.rz-secondary.rz-shade-default {
    background-color: transparent !important;
    color: #d8e9ff !important;
    border-radius: 10px;

}

.rz-calendar-prev-icon,
.rz-calendar-next-icon {
    display: flex;
    align-items: center;
    font-size: 24px !important;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

}

/* ── Spotlight Dialog ─────────────────────────────────────── */
.spotlight-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 19, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1099;
}

.spotlight-dialog {
    position: fixed;
    top: 8vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(860px, 92vw);
    max-height: 78vh;
    background: rgba(15, 25, 50, 0.72);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    padding: 14px;
    z-index: 1100;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.spotlight-results {
    overflow-y: auto;
    max-height: calc(78vh - 80px);
    padding: 4px 2px 2px;
}

.spotlight-group {
    margin-top: 12px;
}

.spotlight-group:first-child {
    margin-top: 2px;
}

.spotlight-group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: rgba(148, 180, 255, 0.70);
    font-weight: 700;
    padding: 0 10px 6px;
}

.spotlight-result-item {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.spotlight-result-item:hover,
.spotlight-result-item.selected {
    background: rgba(99, 149, 255, 0.18);
}

.spotlight-title {
    color: #e8f0ff;
    font-weight: 600;
    font-size: 14px;
}

.spotlight-desc {
    color: rgba(200, 215, 255, 0.65);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-loading,
.spotlight-noresults {
    padding: 10px;
    color: rgba(200, 215, 255, 0.70);
    font-size: 13px;
}

/* TabView */
.rz-tabview-panel {
    padding: 10px 0px !important;
    overflow-x: hidden;
    max-width: 100%;
}

/* Inactive tabs — dimmed */
.rz-tabview-nav li a,
.rz-tabview-nav li a:not([href]):not([class]),
.rz-tabview-nav li button {
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 500;
    transition: color 0.18s ease;
}

/* Active tab — white + bold */
.rz-tabview-nav .rz-tabview-selected a,
.rz-tabview-nav .rz-tabview-selected a:not([href]):not([class]),
.rz-tabview-nav .rz-tabview-selected button {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Hover on inactive */
.rz-tabview-nav li:hover:not(.rz-tabview-selected):not(.rz-state-disabled) a,
.rz-tabview-nav li:hover:not(.rz-tabview-selected):not(.rz-state-disabled) button {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ── Nav Customize Toggle Buttons ────────────────────────── */
.nav-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    background: none;
    transition: opacity 0.15s ease;
}

.nav-toggle-btn:hover {
    opacity: 0.75;
}

.nav-toggle-on {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.40);
    color: #4ade80;
}

.nav-toggle-off {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #f87171;
}

/* ====================================== */
/* Dashboard — Overlay / Modal condivisi  */
/* ====================================== */

.db-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-modal {
    background: #1a2035;
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}

/* larghezze predefinite */
.db-modal--sm   { width: min(380px, 92vw); }
.db-modal--lg   { width: min(440px, 92vw); max-height: 82vh; overflow-y: auto; }

.db-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.db-modal__title {
    margin: 0;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.db-modal__desc {
    font-size: .8rem;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 1rem;
}

/* Pulsante ⚙ configurazione panel — globale perché renderizzato           */
/* come RenderFragment dentro componenti figli (CSS scoped non raggiunge). */
.btn-panel-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: rgba(255, 255, 255, .35);
    font-size: .85rem;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
    padding: 0;
    flex-shrink: 0;
}

.btn-panel-settings:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .4);
}

/* ── Area Live: fullscreen — nasconde sidebar e topbar ────────────────── */
:fullscreen .modern-sidebar,
:-webkit-full-screen .modern-sidebar,
:fullscreen .analytics-header,
:-webkit-full-screen .analytics-header {
    display: none !important;
}
:fullscreen .analytics-dashboard,
:-webkit-full-screen .analytics-dashboard {
    margin-left: 0 !important;
    padding-left: 0 !important;
}
:fullscreen .analytics-content,
:-webkit-full-screen .analytics-content {
    padding-top: 0 !important;
}

/* ========== PlanSalaCorsi — Calendario mensile ========== */
.plan-calendar {
    padding: 0;
    overflow: hidden;
}

.plan-cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(38, 82, 247, 0.08);
}

.plan-cal-header > div {
    padding: 8px 4px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--analytics-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-cal-day {
    max-height: 250px;
    min-height: 100px;
    padding: 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plan-cal-day:last-child {
    border-right: none;
}

.plan-cal-day-other {
    opacity: 0.3;
}

.plan-cal-day-today {
}

.plan-cal-day-num {
    display: inline-block;
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--analytics-text-secondary);
    margin-bottom: 3px;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.5;
}

.plan-cal-day-num-holiday {
    background: #e03e3e;
    color: #fff;
    border-radius: 25%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: 400;
}

.plan-cal-day-num-today {
    background: #888;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-weight: 700;
}

.plan-cal-holiday-name {
    font-size: 0.80rem;
    color: #e03e3e;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.plan-cal-event {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 5px;
    margin-bottom: 3px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.15s, transform 0.1s;
    overflow: hidden;
    min-height: 36px;
}

.plan-cal-event:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

.plan-cal-event-dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-top: 4px;
}

.plan-cal-event-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.plan-cal-event-row1 {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.3;
}

.plan-cal-event-time {
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.plan-cal-event-corso {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-cal-event-istruttore {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.plan-cal-show-more {
    margin-top: auto;
    padding: 1px 4px;
    font-size: 0.62rem;
    color: var(--analytics-primary);
    background: rgba(38, 82, 247, 0.12);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    line-height: 1.5;
    width: 100%;
    transition: background 0.15s;
}

.plan-cal-show-more:hover {
    background: rgba(38, 82, 247, 0.22);
}

/* ---- Dialog "mostra altri" ---- */
.cal-dlg-container {
    display: flex;
    flex-direction: column;
    min-width: 380px;
}

.cal-dlg-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.cal-dlg-scroll {
    overflow-y: auto;
    max-height: 445px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 2px 6px 2px;
}
.cal-dlg-event {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    min-height: 50px;
    flex-shrink: 0;
    transition: background 0.15s;
    overflow: hidden;
}

.cal-dlg-event:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cal-dlg-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.cal-dlg-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.cal-dlg-row1 {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.cal-dlg-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.cal-dlg-corso {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-dlg-istruttore {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-dlg-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rz-tick-line {
    display: none;
}

.rz-tick-line {
    display: none;
}

.consulente-toolbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #7c4dff;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 8px;
    padding: 1px 4px;
    min-width: 14px;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
}

/* Campagne */

.card{
    background-color: transparent;
    color:white;
}

.card-body{
    background-color: transparent;
}