.login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 25px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.login-button {
    margin-top: 20px;
    width: 100%;
}

.login-info {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #555;
}

.robot-check {
    margin-top: 25px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

    .robot-check:hover {
        background: #f8f8f8;
    }

    .robot-check input {
        transform: scale(1.3);
        cursor: pointer;
    }

.captcha-panel {
    margin-top: 15px;
    display: none;
    padding: 15px;
    border-radius: 10px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.captcha-box canvas {
    border-radius: 6px;
    background: rgba(240, 240, 240, 0.7);
}

.captcha-refresh-btn {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: #0d6efd;
}

    .captcha-refresh-btn:hover {
        color: #0a58ca;
    }

.garanzia-ok {
    color: #15803d;
    font-weight: 600;
}

.garanzia-ko {
    color: #b91c1c;
    font-weight: 600;
}

.foto-preview {
    display: inline-block;
    position: relative;
    margin-right: 10px;
    margin-bottom: 10px;
}

    .foto-preview img {
        width: 90px;
        height: 90px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

.delete-foto-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    line-height: 22px;
}

#allegatiPopup .dx-popup-content {
    padding: 16px;
}

#allegatiList {
    margin-top: 8px;
}

    #allegatiList .dx-list-item {
        padding: 0;
        border: none;
        background: transparent;
    }

.allegato-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 12px;
    border-left: 5px solid #1976D2;
    border-radius: 8px;
    background-color: #f9fafc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

#allegatiList .dx-list-item:nth-child(even) .allegato-item {
    background-color: #f1f5fb;
}

.allegato-item:hover {
    background-color: #eef4ff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.allegato-nome {
    font-weight: 600;
    font-size: 14px;
    color: #263238;
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.allegato-action {
    cursor: pointer;
    color: #1976D2;
    font-size: 18px;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

    .allegato-action:hover {
        background-color: rgba(25, 118, 210, 0.12);
        color: #0D47A1;
        transform: scale(1.15);
    }

#allegatiList .dx-empty-message {
    padding: 24px;
    text-align: center;
    font-style: italic;
    color: #757575;
}

.assistenza-help {
    font-size: 13px;
    background-color: #f1f5fb;
    border-left: 4px solid #1976D2;
    color: #37474F;
    padding-left: 18px;
}

    .assistenza-help .dx-icon-info {
        margin-right: 10px;
        margin-left: 4px;
    }

@media (max-width: 768px) {

    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        margin: 0;
        padding: 0;
    }

    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

    .grid-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .dx-datagrid,
    .dx-datagrid-content,
    .dx-datagrid-rowsview,
    .dx-datagrid-headers,
    .dx-datagrid-pager,
    .dx-scrollable-wrapper,
    .dx-scrollable-container,
    .dx-scrollable-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
        right: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .dx-datagrid-table,
    .dx-datagrid-table-fixed {
        width: 100% !important;
        table-layout: fixed !important;
        margin-left: 0 !important;
    }

    .dx-datagrid-fixed-container {
        display: none !important;
    }

    .dx-datagrid .dx-row > td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 8px;
        padding-right: 8px;
    }

    .dx-datagrid .dx-command-fixed {
        position: static !important;
        width: auto !important;
    }

    .dx-toolbar {
        padding: 6px 8px !important;
        justify-content: center !important;
    }

    .dx-toolbar-items-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .dx-toolbar .dx-texteditor {
        width: 100% !important;
    }

    .dx-datagrid-pager {
        display: flex;
        justify-content: right;
        font-size: 12px;
    }

    .dx-page-size,
    .dx-info {
        display: none !important;
    }

    .dx-overlay-wrapper {
        padding: 0 !important;
    }

    .responsive-popup .dx-overlay-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        border: none !important;
        transform: none !important;
    }

    .responsive-popup .dx-popup {
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .responsive-popup .dx-popup-title {
        flex-shrink: 0;
        text-align: center;
        font-size: 1.1rem;
        padding: 12px;
    }

    .responsive-popup .dx-popup-content {
        flex: 1 1 auto;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    .responsive-popup .dx-popup-bottom {
        flex-shrink: 0;
        padding: 10px;
        border-top: 1px solid #e0e0e0;
        background: #fff;
    }

    .dx-datagrid::-webkit-scrollbar,
    .dx-scrollable-scrollbar,
    .dx-scrollable-scrollbar-horizontal,
    .dx-scrollable-scrollbar-vertical {
        display: none !important;
    }
}