﻿:root {
    --divider-top: 84px; /* distanza dal top (sotto il logo) */
    --divider-bottom: 120px; /* quanto lasciare libero prima del footer */
}

/* 3) linea laterale controllata */
@media (min-width: 769px) {
    .sidebar::after {
        content: "";
        position: absolute;
        right: 0;
        top: var(--divider-top);
        bottom: var(--divider-bottom);
        width: 1px;
        background: #1c1c1c;
        pointer-events: none;
    }
}

/* Mobile: nascondi la linea se la sidebar è overlay */
@media (max-width: 768px) {
    .sidebar::after {
        display: none;
    }
}
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding: 12px 16px 24px 16px; /* ← spazio a sinistra/destra */
        border-left: none;
    }
}


body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", Helvetica, Arial, sans-serif;
    font: 400 13px/14px "Roboto", sans-serif; /* <— dimensione come nel mock */
    background-color: #0d0d0d;
    color: rgba(255, 255, 255, 0.87);
    line-height: 1.5;
}
.dashboard-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}
    .dashboard-container::before {
        content: "";
        position: fixed;
        left: var(--sidebar-w, 220px); /* stessa larghezza sidebar */
        top: var(--divider-top);
        width: 1px;
        background: #1c1c1c;
        pointer-events: none;
        z-index: 10000; /* sopra al background, sotto ai contenuti */
    }
/* dashboard.css */

.section-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 20px;
    color: white;
}

.project-level,
.use-case-level {
    margin-bottom: 50px;
}

.card {
    background-color: #1c1c1c;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.metrics-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 200px;
}

.vertical-separator {
    width: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 20px;
}

.right-grid,
.right-grid-2col {
    display: grid;
    gap: 20px;
    flex: 1;
}

.right-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.right-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .metric h3 {
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 30px;
        display: flex;
        align-items: center;
        color: white;
    }

.metric-value {
    width: 30%;
    background-color: #54a7ff;
    color: #000;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    display: inline-block;
    text-align: center;
}

.progress-track {
    position: relative;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    margin-top: 30px;
}

    .progress-track.alt {
        background-color: rgba(240, 192, 140, 0.3);
    }

    .progress-track.altblu {
        background-color: #5a92e54d;
    }

.progress-filled {
    position: absolute;
    height: 2px;
    top: 0;
    left: 0;
    background-color: #03DAC5;
    z-index: 0;
}

.custom-marker {
    position: absolute;
    top: -56px;
    transform: translateX(-50%);
    width: 30px;
    height: 60px;
}

.questionnaire-dots {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(240, 192, 140, 0.25);
    position: relative;
    z-index: 1;
}

    .dot.active {
        background-color: #f0c08c;
    }

.questionnaire-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.usecase-selector {
    display: flex;
    flex-direction: column;
    color: white;
}

    .usecase-selector label {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .usecase-selector select {
        background-color: #333;
        color: white;
        padding: 8px;
        border: 1px solid #555;
        border-radius: 6px;
        font-size: 14px;
    }

.tooltip-wrapper {
    left: 10px;
    position: relative;
    display: inline-block;
}

    .tooltip-wrapper .tooltip-text {
        visibility: hidden;
        width: max-content;
        background-color: white;
        color: black;
        text-align: left;
        padding: 15px 10px;
        border-radius: 4px;
        position: absolute;
        z-index: 10;
        top: 125%;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        transition: opacity 0.3s;
        font-size: 12px;
    }

    .tooltip-wrapper:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

.hidden {
    display: none;
}

    /* Exploitation Page */
/* =============================
   CHART + LEGENDA
   ============================= */
.chart-card {
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 1rem 0;
}

    .chart-card canvas {
        width: 200px; /* forzi una dimensione fissa */
        height: 200px;
        flex: 0 0 auto;
    }

.chart-legend {
    width: fit-content;
    flex: 1;
    margin-top: 90px;
}

    .chart-legend ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .chart-legend li {
        display: flex;
        align-items: center;
        cursor: pointer;
        color: #ccc;
        margin-bottom: 0.75rem;
    }

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

    .dot.gov {
        background-color: #F5B46B;
    }

    .dot.ind {
        background-color: #4A90E2;
    }

    .dot.aca {
        background-color: #DB4646;
    }

    .dot.civ {
        background-color: #43A055;
    }

/* =============================
   DETAIL CARD
   ============================= */
.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .detail-list li {
        padding: 0.75rem 1rem;
        /*border-bottom: 1px solid rgba(255,255,255,0.1);*/
        color: #eee;
    }
/* Posiziona la “X” */
.detail-card {
    position: relative; /* rende possibile l’assoluto */
}

/* Stile del bottone di chiusura */
.detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

    /* Hover/focus per accessibilità */
    .detail-close:hover,
    .detail-close:focus {
        color: #fff;
        outline: none;
    }   

    /* Dissemination */
/* FILTRI */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .filters select {
        background: #333;
        color: #ccc;
        border: 1px solid #555;
        border-radius: 6px;
        padding: 6px 8px;
    }

/* DETAIL-CONTENT: lista + pie side by side */
.detail-content {
    display: flex;
    gap: 2rem;
}
/* Dettaglio pie identico a .chart-card */
.detail-chart-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 350px; /* → imposta il max desiderato */
    width: 100%;
    padding: 1rem 0;
}

    .detail-chart-card canvas {
        flex: 0 0 auto; /* togli flessibilità */
        width: 180px; /* fissa larghezza */
        height: 180px; /* fissa altezza */
    }

/* —— pulsanti “download / save / cancel” ——— */
.btn-green {
    background: #1dd095;
    border: 0;
    color: #000;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 13px;
}

.btn-dark {
    background: #252525;
    border: 1px solid #3d3d3d;
    color: #eee;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 13px;
}

.btn-green:hover {
    filter: brightness(1.1)
}

.btn-dark:hover {
    background: #2e2e2e
}


/* —— tab‑bar (upload/data list) ————————— */
.tab-bar {
    display: inline-flex;
    background: #1a1a1a;
    border-radius: 4px;
    margin: 30px 0 40px;
}

    .tab-bar button {
        background: transparent;
        border: 0;
        padding: 10px 35px;
        color: #eee;
        font-size: 14px;
        letter-spacing: .05em;
    }

        .tab-bar button.active {
            color: #1dd095;
            position: relative;
        }

            .tab-bar button.active::after {
                content: "";
                position: absolute;
                left: 12px;
                right: 12px;
                bottom: 0;
                height: 2px;
                background: #1dd095;
            }

/* —— form elements (select) ——————— */
select.custom-select {
    background: #252525 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='%23aaa' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right .75rem center/10px;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    padding: 10px 38px 10px 14px;
    color: #eee;
    font-size: 14px;
    appearance: none;
    width: 200px;
}
.upload-box {
    position: relative;
    border: 1px dashed #3d3d3d;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
    /* etichetta “Upload” sul bordo */
    .upload-box::before {
        content: "Upload";
        position: absolute;
        top: -10px;
        left: 14px;
        background: #0d0d0d;
        padding: 0 6px;
        font-size: 11px;
        color: #888;
        letter-spacing: .02em;
    }

.file-info-wrapper {
    display: flex;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid #1dd095; /* linea verde come nel mock‑up */
    padding-bottom: 4px;
    min-width: 220px;
}

.file-name {
    font-size: 14px;
    color: #eee; /* testo bianco */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    background: transparent;
    border: 0;
    color: #1dd095;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

    .btn-icon:hover {
        color: #1af7b0;
    }

/* Radio filled green */
.form-check-input:checked[type="radio"] {
    background-color: #1dd095;
    border-color: #1dd095;
}

    .form-check-input:checked[type="radio"]:focus {
        box-shadow: 0 0 0 .25rem rgba(29,208,149,.25);
    }

/* Toast accent bar */
.toast-success {
    background: #1a1a1a;
    color: #eee;
    position: relative;
}

    .toast-success::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 6px;
        background: #1dd095;
        border-top-left-radius: .25rem;
        border-bottom-left-radius: .25rem;
    }

.page-topbar {
    margin-top: 1.5rem
}
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        padding: 12px 16px 24px 16px; /* ← spazio a sinistra/destra */
        border-left: none;
    }
}
/* La linea verticale del layout: non serve su mobile, z-index più basso su desktop */
.dashboard-container::before {
    z-index: 10;
}
/* era 10000 */
@media (max-width: 768px) {
    .dashboard-container::before {
        display: none;
    }
}