﻿html,
body {
    height: 100vh;
    overflow: hidden;
}

@keyframes lg_anim1 {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0%);
    }
}

.h10 {
    height: 10vh !important;
}

.h20 {
    height: 20vh !important;
}

.hauto {
    height: auto !important;
}

.sn_placeholder {
    background-color: #ffffff;
}

.sn_bg_white {
    background-color: white;
}

.sn_bg_danger {
    background-color: red;
}

.sn_bg_warning {
    background-color: yellow;
}

#ul_plan {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.w-10 {
    width: 10% !important;
}

.w-20 {
    width: 20% !important;
}

.w-30 {
    width: 30% !important;
}

.w-40 {
    width: 40% !important;
}

.w-60 {
    width: 60% !important;
}

.w-70 {
    width: 70% !important;
}

.w-90 {
    width: 90% !important;
}

.w1 {
    width: 1vw !important;
}

.w10 {
    width: 10vw !important;
}

.w15 {
    width: 15vw !important;
}

.w20 {
    width: 20vw !important;
}

.w80 {
    width: 80vw !important;
}

.w82 {
    width: 82vw !important;
}

.w83 {
    width: 83vw !important;
}

.sn_handle {
}

.SN_Gray1 {
    background-color: #fafafa !important;
}

.SN_ps0 {
    padding-left: 3px !important;
    padding-right: 3px !important;
}

.SN_me-6 {
    margin-right: 6rem !important;
}

.SN_mb-10 {
    margin-top: -5rem !important;
}

.sn_hor_tab {
    overflow: auto !important;
    white-space: nowrap !important;
    border-bottom: 1px solid lightsteelblue;
}

.sn_hor_tab_span {
    display: inline-block !important;
    text-align: center;
    text-decoration: none;
    cursor: default;
    height: 7vh;
}

.sn_active {
    /*color: blue;*/
    text-decoration: underline !important;
    font-weight: 700 !important;
}

.sn_drop_begin {
    height: 1vh;
}

.sn_drop_end {
    height: 9vh;
    background-color: lightsteelblue;
    opacity: 0.5;
}

input[type="file"] {
    display: none;
}

datalist {
    display: block;
}

.sn_file_upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}

#dv_plan_st {
    height: 5vh;
}

#dv_plan_se {
    height: 5vh;
}

#dv_plan_b {
    height: 85vh;
    overflow: auto;
    margin-top: 6px;
}

#dv_plan_a {
    overflow: hidden;
}

#tx_cli_code {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#tx_torr_code {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#tx_torr_code2 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#dv_list {
    height: 87vh;
    overflow: auto;
    margin-top: 6px;
}

#dv_loader {
    display: none;
    position: fixed;
    margin: 0px;
    padding: 0px;
    right: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 30001;
    opacity: 0.8;
}

#dv_find_body {
    height: 80vh;
    margin-top: 6px;
}

#dv_find_list {
    height: 72vh;
    overflow: auto;
    margin-top: 6px;
}

#dv_plan_seltech_body0 {
    height: 20vh;
    margin-top: 6px;
}

#cv1 {
    background-color: #dae9f8;
    /*border: 1px solid black;*/
}

#obj_pdf {
    width: 90vw;
    height: 80vh;
}

.sn-fg-white {
    color: white !important;
}

.sn_hidden {
    display: none;
}

.loader_img {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 32px;
    width: auto;
}

.login-form {
    margin-top: 0px !important;
    max-width: 330px;
    padding: 1rem;
    animation: lg_anim1 ease-in 0.25s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

    .login-form .form-floating:focus-within {
        z-index: 2;
    }

    .login-form input[type="text"] {
        margin-bottom: -1px;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    .login-form input[type="password"] {
        margin-bottom: 10px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

#bx_SaveAll {
    display: none;
}

#bx_SaveAll2 {
    display: none;
}

#bx_SaveAll3 {
    display: none;
}

.select-small-font {
    font-size: 11px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    height: auto !important;
}

.th-wrap {
    white-space: normal !important;
    word-wrap: break-word;
    line-height: 1.1;
}

input[type="date"] {
    max-width: 150px;
}

.col-data {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

.select-large {
    min-width: 220px;
}

input.input-totale {
    width: 60px;
    font-weight: bold;
    text-align: center;
    background: transparent;
    border: 1px solid #aaa;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

.residuo-input {
    width: 60px;
    text-align: center;
    font-weight: bold;
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 4px;
}


/* ── GRIGLIA WA — stile light coerente col progetto ── */
.wa-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid lightsteelblue;
}

    .wa-topbar h5 {
        margin: 0;
        margin-right: auto;
        font-weight: 700;
    }

/* filtri chip */
.wa-filter-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.wa-chip {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    color: #666;
    font-family: inherit;
    transition: all .15s;
    white-space: nowrap;
}

    .wa-chip:hover {
        border-color: steelblue;
        color: steelblue;
    }

    .wa-chip.active {
        background: #dae9f8;
        border-color: steelblue;
        color: steelblue;
        font-weight: 600;
    }

    .wa-chip.f-nonInv.active {
        background: #fff8e1;
        border-color: #f0ad4e;
        color: #856404;
    }

    .wa-chip.f-risp.active {
        background: #e8f5e9;
        border-color: #28a745;
        color: #155724;
    }

    .wa-chip.f-ind.active {
        background: #dae9f8;
        border-color: steelblue;
        color: steelblue;
    }

    .wa-chip.f-con.active {
        background: #e8f5e9;
        border-color: #28a745;
        color: #155724;
    }

.wa-chip-count {
    font-size: 10px;
    background: #eee;
    border-radius: 10px;
    padding: 0 5px;
    margin-left: 3px;
}

.wa-chip.active .wa-chip-count {
    background: rgba(0,0,0,.1);
}

.wa-sep {
    width: 1px;
    height: 18px;
    background: #ddd;
    margin: 0 3px;
}

/* progress */
.wa-prog-wrap {
    display: none;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 160px;
}

.wa-prog-bg {
    flex: 1;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.wa-prog-fill {
    height: 4px;
    background: #28a745;
    border-radius: 2px;
    width: 0%;
    transition: width .25s;
}

.wa-prog-lbl {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

.wa-summary {
    display: none;
    gap: 8px;
    align-items: center;
}

.wa-pill-ok {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #155724;
}

.wa-pill-err {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    background: #fdecea;
    color: #721c24;
}

/* griglia */
.wa-grid-wrap {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: auto;
    background: #fff;
}

#gvWA {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
    font-size: 13px;
}

    #gvWA thead tr {
        background: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

    #gvWA th {
        font-size: 10px;
        font-weight: 700;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: .05em;
        padding: 9px 10px;
        text-align: left;
        white-space: nowrap;
        border: none;
    }

        #gvWA th:first-child {
            padding-left: 14px;
        }

    #gvWA tbody tr {
        border-bottom: 1px solid #f0f0f0;
        transition: background .1s;
    }

        #gvWA tbody tr:last-child {
            border-bottom: none;
        }

        #gvWA tbody tr:hover {
            background: #f8f9fa;
        }

    #gvWA td {
        padding: 7px 10px;
        vertical-align: middle;
        border: none;
    }

        #gvWA td:first-child {
            padding-left: 14px;
        }

.wa-ref {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
}

.wa-tel {
    font-size: 10px;
    color: #aaa;
    font-family: monospace;
    margin-top: 1px;
}

.wa-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.b-ind {
    background: #dae9f8;
    color: steelblue;
}

.b-con {
    background: #e8f5e9;
    color: #28a745;
}

.wa-ta {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 6px 9px;
    font-size: 12px;
    font-family: 'Segoe UI', sans-serif;
    resize: none;
    height: 52px;
    outline: none;
    line-height: 1.5;
    transition: border-color .15s, height .2s;
    background: #fff;
}

    .wa-ta:focus {
        border-color: steelblue;
        height: 84px;
    }

    .wa-ta:disabled {
        background: #f8f9fa;
        color: #aaa;
        cursor: not-allowed;
    }

.wa-btn-riga {
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    background: #28a745;
    color: #fff;
    transition: background .15s;
}

    .wa-btn-riga:hover {
        background: #218838;
    }

    .wa-btn-riga:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

    .wa-btn-riga.sent {
        background: #e9ecef;
        color: #888;
        border: 1px solid #dee2e6;
        cursor: default;
    }

.wa-esito {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.e-ok {
    background: #e8f5e9;
    color: #155724;
}

.e-fail {
    background: #fdecea;
    color: #721c24;
}

.e-wait {
    background: #f8f9fa;
    color: #aaa;
}

.e-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    display: inline-block;
}

.wa-risp {
    font-size: 12px;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.wa-risp-ora {
    font-size: 10px;
    color: #aaa;
    font-family: monospace;
    margin-top: 1px;
}

.wa-no-risp {
    font-size: 11px;
    color: #bbb;
    font-style: italic;
}

.wa-empty {
    padding: 32px;
    text-align: center;
    color: #aaa;
    font-size: 13px;
}

::-webkit-scrollbar {
    width: 4px;
    height: 10px; /* prova 8-12px, regola a piacere */
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.wa-date {
    display: block !important;
    width: 160px !important;
    opacity: 1 !important;
}


.f-refresh {
    background: #e7f1ff;
    color: #0b5ed7;
}

.ta-msg {
    width: 100%;
    min-height: 52px;
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafafa;
    box-sizing: border-box;
}

.input-readonly {
    background: #eee !important;
    border: 1px solid #ccc !important;
}

.input-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.select-disabled {
    background: #eee !important;
    cursor: not-allowed;
}

.row-toggle-widths th {
    background: #f8f9fa;
    padding: 1px 2px !important;
}
.row-toggle-widths .toggle-col {
    font-size: 10px;
    line-height: 1;
    min-width: 20px;
}

.col-start-hidden {
    max-width: 22px !important;
    min-width: 22px !important;
    width: 22px !important;
    overflow: hidden !important;
    padding: 1px !important;
}

.col-start-hidden > *:not(.toggle-col) {
    display: none !important;
}

/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.frozen-col-1, .frozen-col-2 {
    position: sticky;
    background-color: #fff;
    z-index: 2;
}
.frozen-col-1 { left: 0; width: 120px; }
.frozen-col-2 { left: 120px; }

table.hide-mp-tipo .col-inte,
table.hide-mp-tipo .col-mp,
table.hide-mp-tipo .col-tipo {
    display: none;
}

.topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.badge-info-piano {
    background: #f0f4ff;
    border: 1px solid #c5d0e8;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-info-piano .lbl-info {
    color: #6c757d;
    font-weight: 500;
}
.badge-info-piano .val-info {
    color: #1a3a6b;
    font-weight: 700;
}
.badge-info-piano .val-info-bio {
    color: #2e7d32;
    font-weight: 700;
}
.badge-info-piano .val-info-li {
    color: #1565c0;
    font-weight: 700;
}
.badge-info-piano .val-info-pom {
    color: #c62828;
    font-weight: 700;
}

.dot-inviato {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #00ff00;
    border: 1px solid #128a12;
    box-shadow: 0 0 4px #00ff00;
    margin-right: 5px;
    vertical-align: middle;
}

.filter-bar-piano {
    position: sticky;
    top: 0;
    z-index: 1020; /* sopra la tabella */
    background: #fff; /* evita trasparenze */
    padding-top: 6px;
    padding-bottom: 6px;
}

.bg-readonly-light {
    background-color: #f5f5f5 !important;
    opacity: 1;
}

table thead th {
    position: sticky;
    top: 40px; /* altezza della tua filter-bar-piano */
    background: #fff;
    z-index: 1010;
}

#tblPianificazione thead tr.riga-intestazione th,
#tblPianificazione thead tr.riga-totale th,
#tblPianificazione thead tr.riga-residuo th {
    position: sticky;
    background: #fff;
    z-index: 50;
}

#tblPianificazione thead tr.riga-intestazione th,
#tblPianificazione thead tr.riga-totale th,
#tblPianificazione thead tr.riga-residuo th,
#tblPianificazione thead tr.riga-vdefinitivi th {
    box-shadow: 0 3px 0 0 #fff;
}

.chip {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.chip:hover {
    background-color: #f0f0f0;
}

.chip.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}