﻿.dx-card:has(.dx-datagrid) {
    min-height: 70vh !important;
    display: flex;
    flex-direction: column;
    transition: height 0.2s ease-in-out;
}

.dx-datagrid-rowsview {
    min-height: 300px;
}

.dx-card {
    border-radius: 8px;
    background-color: #ffffff;
    padding: 0;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.dx-datagrid-header-panel {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

    .dx-datagrid-header-panel .dx-toolbar {
        margin: 0 !important;
        padding: 4px 12px 4px 8px !important;
        height: 56px !important;
        min-height: 56px !important;
        background-color: transparent !important;
        display: flex;
        align-items: center;
    }

.grid-header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e293b;
    display: flex;
    align-items: center;
    line-height: 1;
}

    .grid-header-title i,
    .dx-toolbar-item.dx-toolbar-button .grid-header-title i.grid-header-icon {
        font-size: 18px !important;
        width: 38px !important;
        height: 38px !important;
        line-height: 38px !important;
        margin-left: 0 !important;
        margin-right: 12px !important;
        color: #337ab7 !important;
        background-color: #f1f5f9 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

.dx-toolbar-item .dx-dropdowneditor.dx-editor-outlined,
.dx-toolbar-item .dx-textbox.dx-editor-outlined {
    height: 32px !important;
    border-radius: 20px !important;
}

    .dx-toolbar-item .dx-dropdowneditor.dx-editor-outlined .dx-texteditor-input,
    .dx-toolbar-item .dx-textbox.dx-editor-outlined .dx-texteditor-input {
        min-height: 32px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: flex;
        align-items: center;
    }

.dx-toolbar i.fa-solid,
.dx-toolbar i.fa-regular,
.dx-toolbar i.fa-light,
.dx-toolbar i.fa-brands {
    width: 1em !important;
    height: 1em !important;
    font-size: 16px !important;
}

.dx-toolbar i svg {
    width: 1em !important;
    height: 1em !important;
}

.btn-toolbar-grid-pill {
    border-radius: 50px !important;
    background-color: #337ab7 !important;
    color: #ffffff !important;
    border: none !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease !important;
    margin-left: 10px;
    white-space: nowrap;
}

    .btn-toolbar-grid-pill:hover {
        background-color: #286090 !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
    }

    .btn-toolbar-grid-pill .dx-icon {
        color: #ffffff !important;
        font-size: 16px !important;
        margin-right: 6px !important;
    }

.dx-datagrid-headers {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

    .dx-datagrid-headers .dx-header-row > td {
        padding: 8px !important;
        vertical-align: middle;
        text-align: center !important;
    }

    .dx-datagrid-headers .dx-datagrid-text-content {
        font-size: 0.85rem;
        font-weight: 600;
        color: #475569;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

.dx-datagrid-rowsview .dx-data-row {
    height: 38px !important;
}

    .dx-datagrid-rowsview .dx-data-row > td {
        padding: 0 8px !important;
        height: 38px !important;
        max-height: 38px !important;
        vertical-align: middle !important;
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 14px !important;
        color: #334155;
        overflow: hidden;
        transition: all 0.2s ease;
    }

.dx-datagrid-rowsview .dx-row.dx-data-row:hover > td:not([class*="dx-command"]):not(:has(.btn-custom-pill)) {
    background-color: #e2e8f0 !important;
}

.dx-datagrid-rowsview .dx-row.dx-data-row:hover > td,
.dx-datagrid-rowsview .dx-row.dx-data-row:hover > td .rosso,
.dx-datagrid-rowsview .dx-row.dx-data-row:hover > td .verde {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.dx-row-alt:not(:hover) > td:not([class*="dx-command"]):not(:has(.btn-custom-pill)) {
    background-color: #f3f4f6 !important;
}

.btn-custom-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    height: 30px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-custom-pill i {
        color: #337ab7;
        margin-right: 8px;
        font-size: 14px;
    }

    .btn-custom-pill:hover {
        background-color: #1e293b !important;
        color: #ffffff !important;
        border-color: #0f172a !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.15);
        transform: translateY(-1px);
    }

        .btn-custom-pill:hover i {
            color: #ffffff !important;
        }

.dx-command-edit .dx-link {
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.2s;
}

.dx-command-edit .dx-link-icon.dx-icon-edit:hover {
    color: #337ab7 !important;
}

.dx-command-edit .dx-link-icon.dx-icon-trash:hover {
    color: #dc2626 !important;
}

.dx-row.dx-data-row .rosso {
    color: #bf4e6a;
    font-weight: 700;
}

.dx-row.dx-data-row .verde {
    color: #4a7a56;
    font-weight: 500;
}

.dx-row.dx-data-row .blu {
    color: #587da3;
    font-weight: 500;
}

.dx-popup-title {
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 12px 20px !important;
}

    .dx-popup-title .dx-toolbar-label {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #1e293b !important;
    }

.dx-popup-content .dx-button-mode-contained.dx-button-default {
    background-color: #337ab7 !important;
    border-radius: 6px !important;
    height: 40px !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

    .dx-popup-content .dx-button-mode-contained.dx-button-default:hover {
        background-color: #286090 !important;
    }

.btn-upload-custom:hover {
    background-color: #286090 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

.dx-command-edit .dx-link-icon.dx-icon-doc:hover {
    color: #337ab7 !important;
}
