﻿/* ============================================================
   RESET & REGOLE DI BASE
   ============================================================ */

/* Reset generale - prevale la prima definizione */
* {
    border-radius: 0px !important;
}

/* ============================================================
   CLASSI GENERICHE
   ============================================================ */

.ToolBar {
    font-family: Tahoma;
    font-size: 10px;
    color: Black;
    background-image: url(Immagini/VToolBar.gif);
    width: 100%;
    height: 32px;
    background-repeat: repeat-x;
    vertical-align: middle;
}

.EtichetteDati {
    font-family: Tahoma;
    font-size: 10px;
    color: #006AB4;
    vertical-align: middle;
}

.Titoli {
    font-family: Tahoma;
    font-size: 10px;
    color: #006AB4;
    font-weight: bold;
    vertical-align: middle;
    text-align: justify;
}

.Titoli_Big {
    font-family: Tahoma;
    font-size: 20px;
    color: #006AB4;
    font-weight: bold;
    vertical-align: middle;
    text-align: justify;
}

.OggettiDati {
    font-family: Tahoma;
    font-size: x-small;
    margin-left: 0px;
    color: Black;
    vertical-align: middle;
}

.OggettiDati2 {
    font-family: Tahoma;
    font-size: small;
    margin-left: 0px;
    color: Black;
    vertical-align: middle;
}

.OggettiDatiObbl {
    font-family: Tahoma;
    font-size: x-small;
    background-color: #BBDDFF;
    vertical-align: middle;
}

.GrigliaDati {
    font-family: Tahoma;
    font-size: x-small;
    width: 100%;
}

.Messaggio {
    font-family: Tahoma;
    font-size: small;
    font-weight: bold;
    color: #FF0000;
}

.Bottoni {
    font-family: Tahoma;
    font-size: x-small;
    font-weight: bold;
    text-align: center;
    color: #255294;
    height: 20px;
}

.AttesaDati {
    font-family: Tahoma;
    font-size: x-small;
    color: #006AB4;
    font-weight: bold;
}

.MsgBox {
    font-family: Tahoma;
    font-size: 12px;
    color: #006AB4;
}

.doc_fieldset {
    border-color: lightgray;
    border-style: solid;
}

legend {
    color: #255294;
}

.uppercase {
    text-transform: uppercase;
}

/* ============================================================
   CONTROLLI TELERIK / RAD - BORDER-RADIUS 0
   ============================================================ */

span.rounded-0 > span,
.RadComboBox.RadComboBox_Bootstrap.rounded-0 > .rcbInner,
.RadPicker.RadPicker_Bootstrap.rounded-0 > div > input,
.t-button.rgActionButton.rgFilter,
.rgFilterBox,
.RadGrid_Bootstrap .rgFilterRow .riTextBox,
.RadComboBox.RadComboBox_Bootstrap > .rcbInner,
.RadPicker.RadPicker_Bootstrap > div > input {
    border-radius: 0px !important;
}

span.rtbButton.rtbSplitButton.rtbExpandDown {
    background-color: whitesmoke !important;
}

.ruButton {
    width: 100px !important;
}

span.rtbSplBtnActivator,
span.rtbArrow {
    background-color: white;
}

span.radIcon.radIconDown {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    font-size: 25px !important;
}

/* ============================================================
   AJAX TOOLKIT - MODAL POPUP
   ============================================================ */

.modalBackground {
    background-color: #C0C0C0;
    filter: alpha(opacity=70);
    opacity: 0.7;
}

.rwTitleBar {
    background-color: #255294 !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 0px !important;
}

/* ============================================================
   DASHBOARD CARDS
   ============================================================ */

.dashboard-header {
    padding: 20px 20px 0 20px;
    max-width: 90%;
    margin: 0 auto;
}

    .dashboard-header h2 {
        color: #255294;
        font-weight: 600;
        font-size: 22px;
        margin: 0;
    }

    .dashboard-header p {
        color: #6b7a8a;
        margin: 4px 0 0 0;
        font-size: 14px;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 90%;
    margin: 0 auto;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px !important;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 5px solid #255294;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

    .stat-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 30px rgba(37, 82, 148, 0.15);
    }

    .stat-card .icon-wrapper {
        width: 48px;
        height: 48px;
        background: rgba(37, 82, 148, 0.08);
        border-radius: 12px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin-bottom: 12px;
        color: #255294;
    }

    .stat-card .stat-number {
        font-size: 32px;
        font-weight: 700;
        color: #1a2a3a;
        line-height: 1.2;
        margin-bottom: 4px;
    }

    .stat-card .stat-label {
        font-size: 14px;
        color: #6b7a8a;
        font-weight: 500;
        letter-spacing: 0.3px;
    }

    .stat-card .stat-sub {
        font-size: 12px;
        color: #9aa8b8;
        margin-top: 6px;
    }

    .stat-card .card-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(37, 82, 148, 0.08);
        color: #255294;
        font-size: 10px;
        font-weight: 600;
        padding: 4px 10px;
        border-radius: 20px !important;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

    /* Colori per ogni card */
    .stat-card.blue {
        border-left-color: #255294;
    }

        .stat-card.blue .icon-wrapper {
            background: rgba(37, 82, 148, 0.08);
            color: #255294;
        }

    .stat-card.green {
        border-left-color: #2ecc71;
    }

        .stat-card.green .icon-wrapper {
            background: rgba(46, 204, 113, 0.08);
            color: #2ecc71;
        }

    .stat-card.orange {
        border-left-color: #f39c12;
    }

        .stat-card.orange .icon-wrapper {
            background: rgba(243, 156, 18, 0.08);
            color: #f39c12;
        }

    .stat-card.red {
        border-left-color: #e74c3c;
    }

        .stat-card.red .icon-wrapper {
            background: rgba(231, 76, 60, 0.08);
            color: #e74c3c;
        }

    .stat-card.purple {
        border-left-color: #9b59b6;
    }

        .stat-card.purple .icon-wrapper {
            background: rgba(155, 89, 182, 0.08);
            color: #9b59b6;
        }

    .stat-card.teal {
        border-left-color: #1abc9c;
    }

        .stat-card.teal .icon-wrapper {
            background: rgba(26, 188, 156, 0.08);
            color: #1abc9c;
        }

/* ============================================================
   MESSAGES SECTION
   ============================================================ */

.messages-section {
    padding: 20px;
    max-width: 90%;
    margin: 0 auto;
}

    .messages-section .section-title {
        color: #255294;
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .messages-section .section-title::after {
            content: '';
            flex: 1;
            height: 1px;
            background: #e8ecf0;
        }

/* Override RadGrid per dashboard */
.RadGrid_Dashboard {
    border: 0 none !important;
}

    .RadGrid_Dashboard .rgHeader {
        background: #f8f9fa !important;
        color: #255294 !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        border-bottom: 2px solid #e8ecf0 !important;
    }

    .RadGrid_Dashboard .rgRow td,
    .RadGrid_Dashboard .rgAltRow td {
        padding: 10px 12px !important;
        font-size: 13px !important;
        border-bottom: 1px solid #f0f2f5 !important;
    }

    .RadGrid_Dashboard .rgRow:hover td,
    .RadGrid_Dashboard .rgAltRow:hover td {
        background: #f8faff !important;
    }

/* ============================================================
   PERIZIE - HEADER
   ============================================================ */

.perizie-header {
    padding: 16px 20px 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

    .perizie-header h2 {
        color: #255294;
        font-weight: 600;
        font-size: 20px;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .perizie-header h2 small {
            font-size: 14px;
            font-weight: 400;
            color: #6b7a8a;
        }

.perizie-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

    .perizie-stats .stat-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: #4a5a6a;
    }

        .perizie-stats .stat-item .number {
            font-weight: 700;
            color: #255294;
            font-size: 16px;
        }

        .perizie-stats .stat-item .label {
            color: #6b7a8a;
        }

        /* ============================================================
            STATI - COLORI PERSONALIZZATI PER I CONTATORI
        ============================================================ */

        .perizie-stats .stat-item.conferma .number {
            color: #255294;
        }

        .perizie-stats .stat-item.prevalutazione .number {
            color: #21AB68;
        }

        .perizie-stats .stat-item.perizia .number {
            color: #e65100;
        }

        .perizie-stats .stat-item.attesa .number {
            color: #f57f17;
        }


/* ============================================================
   PERIZIE - TOOLBAR (unificata)
   ============================================================ */

.perizie-toolbar {
    padding: 8px 20px;
    background: #fafbfc;
    border-bottom: 1px solid #e8ecf0;
    /*margin-bottom: 4px;*/
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

    .perizie-toolbar .RadToolBar {
        border: 0 none !important;
        background: transparent !important;
    }

    .perizie-toolbar .rtbItem {
        font-size: 13px !important;
        border-radius: 6px !important;
        transition: all 0.2s ease;
    }

        .perizie-toolbar .rtbItem:hover {
            background: rgba(37, 82, 148, 0.06) !important;
        }

        .perizie-toolbar .rtbItem .rtbText {
            font-weight: 500 !important;
            color: #255294 !important;
        }

        .perizie-toolbar .rtbItem .rtbImage {
            margin-right: 6px !important;
        }

/* ============================================================
   PERIZIE - FILTRO STATO (rimuovi animazione hover)
   ============================================================ */

.filter-stato-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 4px 12px 4px 16px;
    border: 1px solid #dce1e8;
    transition: border-color 0.2s ease;
}

    .filter-stato-wrapper:focus-within {
        border-color: #255294;
        box-shadow: 0 0 0 3px rgba(37, 82, 148, 0.1);
    }

    .filter-stato-wrapper label {
        font-size: 12px;
        font-weight: 600;
        color: #255294;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }

    .filter-stato-wrapper .RadComboBox .rcbInput {
        border: 0 none !important;
        padding: 6px 4px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #1a2a3a !important;
        width: 120px !important;
    }

    .filter-stato-wrapper .RadComboBox .rcbArrow {
        border: 0 none !important;
    }

        .filter-stato-wrapper .RadComboBox .rcbArrow .rcbInner {
            border: 0 none !important;
        }

        .filter-stato-wrapper .RadComboBox .rcbArrow .rcbReadOnly {
            color: #255294 !important;
        }

/* Dropdown - rimuovi hover effect */
.rcbList {
    padding: 4px 0 !important;
    border-radius: 4px !important;
}

    .rcbList .rcbItem {
        padding: 8px 16px !important;
        font-size: 13px !important;
        color: #1a2a3a !important;
        transition: none !important; /* Rimuove animazione hover */
    }

        .rcbList .rcbItem:hover {
            padding: 8px 16px !important;
            background: transparent !important; /* Nessun effetto hover */
            color: #1a2a3a !important;
        }

    .rcbList .rcbSelected {
        padding: 8px 16px !important;
        background: rgba(37, 82, 148, 0.12) !important;
        color: #255294 !important;
        font-weight: 600 !important;
    }

    .rcbList .rcbHovered {
        padding: 8px 16px !important;
        background: transparent !important; /* Nessun effetto hover */
    }

span.rcbFocused {
    background-color: white !important;
}


/* Dropdown */
.rcbList {
    padding: 4px 0 !important;
}

    .rcbList .rcbItem {
        padding: 8px 16px !important;
        font-size: 13px !important;
        color: #1a2a3a !important;
        transition: all 0.15s ease;
    }

    .rcbList .rcbSelected {
        background: rgba(37, 82, 148, 0.12) !important;
        color: #255294 !important;
        font-weight: 600 !important;
    }

/* ============================================================
   PERIZIE - GRIGLIA
   ============================================================ */

.perizie-grid-wrapper {
    padding: 0 20px 20px 20px;
}

.RadGrid_Perizie {
    border: 0 none !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

    .RadGrid_Perizie .rgHeader {
        background: #f8faff !important;
        color: #255294 !important;
        font-weight: 600 !important;
        font-size: 12px !important;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        padding: 6px 4px !important;
        border-bottom: 2px solid #e8ecf0 !important;
        border-top: 0 none !important;
        border-left: 0 none !important;
        border-right: 0 none !important;
    }

        .RadGrid_Perizie .rgHeader .rgSort {
            color: #255294 !important;
        }

    .RadGrid_Perizie .rgRow td,
    .RadGrid_Perizie .rgAltRow td {
        padding: 10px 10px !important;
        font-size: 13px !important;
        border-bottom: 1px solid #f0f2f5 !important;
        color: #1a2a3a;
        vertical-align: middle;
    }

    .RadGrid_Perizie .rgRow:hover td,
    .RadGrid_Perizie .rgAltRow:hover td {
        background: #f8faff !important;
    }

    .RadGrid_Perizie .rgRow:last-child td,
    .RadGrid_Perizie .rgAltRow:last-child td {
        border-bottom: 0 none !important;
    }

    /* Pulsanti nella griglia */
    .RadGrid_Perizie .rgButton {
        border: 0 none !important;
        background: transparent !important;
        padding: 4px 6px !important;
        border-radius: 6px !important;
        transition: all 0.2s ease;
    }

        .RadGrid_Perizie .rgButton:hover {
            background: rgba(37, 82, 148, 0.08) !important;
        }

        .RadGrid_Perizie .rgButton img {
            opacity: 0.7;
            transition: opacity 0.2s ease;
        }

        .RadGrid_Perizie .rgButton:hover img {
            opacity: 1;
        }

    /* Paginazione */
    .RadGrid_Perizie .rgPager {
        background: #fafbfc !important;
        padding: 10px 12px !important;
        border-top: 1px solid #e8ecf0 !important;
        font-size: 13px !important;
    }

        .RadGrid_Perizie .rgPager .rgCurrentPage {
            background: #255294 !important;
            color: white !important;
            border-radius: 4px !important;
            padding: 2px 10px !important;
            font-weight: 600 !important;
        }

        .RadGrid_Perizie .rgPager a {
            color: #255294 !important;
            padding: 2px 8px !important;
            border-radius: 4px !important;
        }

            .RadGrid_Perizie .rgPager a:hover {
                background: rgba(37, 82, 148, 0.08) !important;
            }

    /* Filtri */
    .RadGrid_Perizie .rgFilterRow td {
        background: #fafbfc !important;
        padding: 6px 10px !important;
        border-bottom: 1px solid #e8ecf0 !important;
    }

    .RadGrid_Perizie .rgFilterRow .riTextBox,
    .RadGrid_Perizie !.RadComboBox .rgFilterRow .rcbInput {
        border-radius: 4px !important;
        border: 1px solid #dce1e8 !important;
        padding: 4px 8px !important;
        font-size: 12px !important;
        height: 28px !important;
    }

        .RadGrid_Perizie .rgFilterRow .riTextBox:focus,
        .RadGrid_Perizie .rgFilterRow .rcbInput:focus {
            border-color: #255294 !important;
            outline: none !important;
        }

    .RadGrid_Perizie .rgFilterRow .rgFilter {
        background: #255294 !important;
        color: white !important;
        border: 0 none !important;
        border-radius: 4px !important;
        padding: 2px 10px !important;
        font-size: 12px !important;
        cursor: pointer !important;
    }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
        padding: 12px;
    }

    .stat-card {
        padding: 16px 14px;
    }

        .stat-card .stat-number {
            font-size: 24px;
        }

        .stat-card .icon-wrapper {
            width: 40px;
            height: 40px;
            font-size: 20px;
        }

    .dashboard-header h2 {
        font-size: 18px;
    }

    .perizie-header {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 0 16px;
    }

        .perizie-header h2 {
            font-size: 17px;
        }

    .perizie-stats {
        gap: 8px;
    }

        .perizie-stats .stat-item {
            font-size: 12px;
            padding: 4px 10px;
        }

            .perizie-stats .stat-item .number {
                font-size: 14px;
            }

    .perizie-toolbar {
        padding: 8px 12px;
        flex-direction: column;
        align-items: stretch;
    }

        .perizie-toolbar .RadToolBar {
            overflow-x: auto;
            padding-bottom: 4px;
        }

    .filter-stato-wrapper {
        padding: 2px 12px 2px 16px;
        width: 100%;
        justify-content: space-between;
    }

        .filter-stato-wrapper .RadComboBox .rcbInput {
            width: 100% !important;
            min-width: 120px;
        }

    .perizie-grid-wrapper {
        padding: 0 12px 12px 12px;
        overflow-x: auto;
    }

    .RadGrid_Perizie .rgHeader {
        font-size: 10px !important;
        padding: 8px 6px !important;
    }

    .RadGrid_Perizie .rgRow td,
    .RadGrid_Perizie .rgAltRow td {
        font-size: 12px !important;
        padding: 8px 6px !important;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
    }

    .stat-card .stat-label {
        font-size: 12px;
    }

    .stat-card .stat-number {
        font-size: 20px;
    }

    .stat-card .card-badge {
        display: none;
    }

    .perizie-stats .stat-item {
        font-size: 11px;
        padding: 3px 8px;
    }

        .perizie-stats .stat-item .number {
            font-size: 13px;
        }

    .filter-stato-wrapper label {
        font-size: 11px;
    }
}
