/* =====================================================
   V2_DASH_USER.CSS
   Dashboard utente plain, veloce e leggibile.
===================================================== */

:root {
    --page-bg:#f4f7fb;
    --panel:#ffffff;
    --panel-soft:#f8fafc;
    --text:#172033;
    --muted:#657084;
    --line:#dce3ec;
    --blue:#2f80ed;
    --aqua:#45c7df;
    --orange:#f2994a;
    --green:#2eaf68;
    --yellow:#d99a16;
    --red:#d94b42;
}

* {
    box-sizing:border-box;
}

body.v2-dash-user {
    margin:0;
    padding:28px;
    min-height:100vh;
    background:var(--page-bg);
    color:var(--text);
    font-family:"Manrope", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.v2-dash-user a {
    color:var(--blue);
    font-weight:800;
    text-decoration:none;
}

.v2-dash-user a:hover {
    text-decoration:underline;
}

.v2-dash-user .glass-card {
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:none;
}

.v2-dash-user > .glass-card:not(.unified-dashboard-card) {
    padding:2px;
    overflow:hidden;
}

.v2-dash-user .dashboard-table-card {
    margin-top:48px;
    overflow:hidden;
}

.v2-dash-user .global-sales-filter-card {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    margin-bottom:28px;
    padding:28px;
}

.v2-dash-user .global-sales-filter-header {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    padding:5px;
    margin:0;
}

.v2-dash-user .global-sales-filter-header h3 {
    margin:0;
    color:var(--muted);
    font-size:13px;
    font-weight:900;
    letter-spacing:.08em;
    text-align:center;
    text-transform:uppercase;
}

.v2-dash-user .global-sales-reset-row {
    display:none;
    align-items:center;
    justify-content:center;
    width:100%;
    padding:5px;
    min-height:0;
    margin:0;
}

.v2-dash-user .global-sales-filter-card.is-filtered .global-sales-reset-row {
    display:flex;
}

.v2-dash-user .global-sales-filter-list {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:14px;
    row-gap:14px;
    width:100%;
    padding:5px;
}

.v2-dash-user .global-sales-filter-card .referente-filter {
    align-items:center;
    justify-content:center;
    padding:11px 18px;
}

.v2-dash-user .global-sales-filter-card.is-filtered .global-sales-filter-list {
    display:none;
}

.v2-dash-user .global-sales-filter-card + .dashboard-table-card {
    margin-top:0;
}

.v2-dash-user table {
    width:100%;
    border-collapse:collapse;
    background:var(--panel);
}

.v2-dash-user thead th {
    position:sticky;
    top:0;
    z-index:1;
    padding:13px 14px;
    background:#edf2f7;
    color:var(--muted);
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
    text-align:left;
    text-transform:uppercase;
    border-bottom:1px solid var(--line);
}

.v2-dash-user thead th:nth-child(5),
.v2-dash-user thead th:nth-child(6),
.v2-dash-user thead th:nth-child(7) {
    text-align:center;
}

.v2-dash-user tbody td {
    padding:13px 14px;
    color:var(--text);
    font-size:13px;
    font-weight:700;
    text-transform:uppercase;
    border-bottom:1px solid var(--line);
    vertical-align:middle;
}

.v2-dash-user tbody td:nth-child(5),
.v2-dash-user tbody td:nth-child(6),
.v2-dash-user tbody td:nth-child(7) {
    text-align:center;
}

.v2-dash-user .global-update-table-card thead th:nth-child(8),
.v2-dash-user .global-update-table-card tbody td:nth-child(8) {
    text-align:center;
}

.v2-dash-user tbody tr:nth-child(even) {
    background:#fbfcfe;
}

@media (hover:hover) {
    .v2-dash-user tbody tr {
        transition:background .16s ease, box-shadow .16s ease, transform .16s ease;
    }

    .v2-dash-user tbody tr:hover {
        position:relative;
        z-index:1;
        background:#f3f9ff;
        box-shadow:0 10px 24px rgba(23,32,51,.10);
        transform:translateY(-1px);
    }
}

.v2-dash-user .row-number {
    width:52px;
    color:var(--muted);
    font-weight:900;
}

.v2-dash-user .row-articles {
    width:88px;
    color:var(--text);
    font-weight:900;
    text-align:center;
}

.v2-dash-user .sviluppo-grafico,
.v2-dash-user .status-glass {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:104px;
    min-height:28px;
    padding:5px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
    white-space:nowrap;
}

.v2-dash-user .sviluppo-grafico.interno {
    color:#ffffff;
    background:var(--orange);
    border:1px solid var(--orange);
}

.v2-dash-user .sviluppo-grafico.esterno {
    color:#07343d;
    background:var(--aqua);
    border:1px solid var(--aqua);
}

.v2-dash-user .sviluppo-grafico.dettagli {
    color:#174f9a;
    background:#eaf2ff;
    border:1px solid #bcd5ff;
}

.v2-dash-user .sviluppo-grafico.aggiorna {
    color:#ffffff;
    background:var(--red);
    border:1px solid var(--red);
}

.v2-dash-user .status-glass.green {
    color:#176339;
    background:#e8f7ef;
    border:1px solid #b9e6cd;
}

.v2-dash-user .status-glass.yellow {
    color:#7a5200;
    background:#fff6df;
    border:1px solid #f2d48c;
}

.v2-dash-user .status-glass.red {
    color:#8b2721;
    background:#ffeded;
    border:1px solid #f1b8b5;
}

.v2-dash-user .status-glass.update-ok {
    color:#176339;
    background:#e8f7ef;
    border:1px solid #b9e6cd;
}

.v2-dash-user .status-glass.update-warning {
    color:#ffffff;
    background:var(--red);
    border:1px solid var(--red);
}

.v2-dash-user .update-all-container {
    display:flex;
    justify-content:flex-end;
    padding:18px;
}

.v2-dash-user .update-all-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:8px 14px;
    border:1px solid var(--red);
    border-radius:999px;
    background:var(--red);
    color:#ffffff;
    font-size:12px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
    text-decoration:none;
}

.v2-dash-user .dashboard-right .progress-fill {
    background:var(--blue);
}

.v2-dash-user .summary-task-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:18px;
    width:100%;
}

.v2-dash-user .summary-task-card {
    min-width:0;
    padding:18px;
    border:1px solid var(--line);
    border-radius:18px;
    background:var(--panel);
}

@media (hover:hover) {
    .v2-dash-user .summary-task-card {
        transition:background .16s ease, box-shadow .16s ease, transform .16s ease;
    }

    .v2-dash-user .summary-task-card:hover {
        background:#f3f9ff;
        box-shadow:0 10px 24px rgba(23,32,51,.10);
        transform:translateY(-1px);
    }
}

.v2-dash-user .summary-task-title {
    overflow:hidden;
    margin-bottom:14px;
    color:var(--text);
    font-size:14px;
    font-weight:900;
    line-height:1.25;
    text-overflow:ellipsis;
    text-transform:uppercase;
    white-space:nowrap;
}

.v2-dash-user .summary-task-info {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:8px 0;
    border-top:1px solid var(--line);
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
}

.v2-dash-user .summary-task-info b {
    color:var(--text);
    font-weight:900;
}

.v2-dash-user .summary-badge {
    min-width:0;
    background:#eaf2ff;
    border:1px solid #bcd5ff;
    color:#174f9a;
}

.v2-dash-user .summary-report-table-card thead th:nth-child(3),
.v2-dash-user .summary-report-table-card thead th:nth-child(4),
.v2-dash-user .summary-report-table-card thead th:nth-child(5),
.v2-dash-user .summary-report-table-card tbody td:nth-child(3),
.v2-dash-user .summary-report-table-card tbody td:nth-child(4),
.v2-dash-user .summary-report-table-card tbody td:nth-child(5) {
    text-align:center;
}

@media(max-width:980px) {
    body.v2-dash-user {
        padding:14px;
    }

    .v2-dash-user > .glass-card:not(.unified-dashboard-card) {
        overflow:auto;
    }
}
