﻿/* Estilos específicos para la página de Empeño de Autos */
.empeno-root {
    min-height: 100vh;
    background: #f3f6fb;
    color: #1f2937;
    width: 100%;
    display: flex;
}

    /* --- ESTILOS REUTILIZADOS DE SIDEBAR Y HEADER --- */
    .empeno-root .sidebar {
        width: 250px;
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        color: white;
        padding: 20px 0;
        position: fixed;
        height: 100vh;
        z-index: 100;
        transition: all 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .empeno-root .sidebar-header {
        padding: 0 20px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .empeno-root .logo {
        font-size: 2rem;
        font-weight: 700;
        text-decoration: none;
        background: linear-gradient(45deg, #ffffff, #f0f9ff, #dbeafe);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .empeno-root .sidebar-nav {
        padding: 20px 0;
    }

    .empeno-root .nav-item {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: all 0.3s ease;
        border-left: 4px solid transparent;
        cursor: pointer;
    }

        .empeno-root .nav-item:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border-left-color: rgba(255, 255, 255, 0.3);
        }

        .empeno-root .nav-item.active {
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border-left-color: white;
        }

    .empeno-root .nav-icon {
        font-size: 1.2rem;
        margin-right: 15px;
        width: 24px;
        text-align: center;
    }

    .empeno-root .nav-text {
        font-size: 0.95rem;
        font-weight: 500;
    }

    .empeno-root .main-content-wrapper {
        flex: 1;
        margin-left: 250px;
        transition: all 0.3s ease;
    }

    .empeno-root .header {
        background: white;
        padding: 15px 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .empeno-root .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .empeno-root .sidebar-toggle {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #1e3a8a;
        display: none;
        padding: 5px 10px;
    }

    .empeno-root .user-info-container {
        display: flex;
        justify-content: flex-end;
        margin-left: auto;
    }

    .empeno-root .user-info {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .empeno-root .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(45deg, #059669, #10b981);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1.1rem;
        color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

        .empeno-root .user-avatar:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
        }

    .empeno-root .user-details {
        text-align: right;
    }

    .empeno-root .user-name {
        font-weight: 600;
        font-size: 0.95rem;
    }

    .empeno-root .user-role {
        font-size: 0.85rem;
        opacity: 0.8;
    }

    .empeno-root .return-btn {
        background: rgba(220, 38, 38, 0.1);
        border: 1px solid rgba(220, 38, 38, 0.2);
        color: #dc2626;
        padding: 8px 16px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

        .empeno-root .return-btn:hover {
            background: rgba(220, 38, 38, 0.2);
            transform: translateY(-2px);
        }

    .empeno-root .main-content {
        padding: 30px 0;
    }

    .empeno-root .container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .empeno-root .admin-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding: 30px 40px;
        border-bottom: none;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .empeno-root .admin-title-content {
        max-width: 70%;
    }

    .empeno-root .admin-title {
        font-size: 2.2rem;
        font-weight: 700;
        color: #1e3a8a;
        margin-bottom: 10px;
    }

    .empeno-root .admin-subtitle {
        font-size: 1.1rem;
        color: #64748b;
    }

    .empeno-root .tabs-section {
        margin-bottom: 30px;
    }

    .empeno-root .tabs-container {
        display: flex;
        border-bottom: 2px solid #e2e8f0;
    }

    .empeno-root .tab {
        padding: 12px 25px;
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        font-weight: 600;
        color: #64748b;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: all 0.3s ease;
    }

        .empeno-root .tab.active {
            color: #2563eb;
            border-bottom-color: #2563eb;
        }

        .empeno-root .tab:hover:not(.active) {
            color: #1e40af;
            border-bottom-color: #cbd5e1;
        }

    .empeno-root .tab-icon {
        font-size: 1.1rem;
    }

    .empeno-root .tab-text {
        font-size: 0.95rem;
    }

    .empeno-root .tab-content {
        background: white;
        border-radius: 20px;
        padding: 30px 40px;
        box-shadow: 0 10px 40px rgba(220, 225, 240, 0.7);
        border: 1px solid #e2e8f0;
        margin-bottom: 40px;
    }

    .empeno-root .form-section {
        margin-bottom: 35px;
        padding-bottom: 25px;
        border-bottom: 2px solid #f1f5f9;
    }

        .empeno-root .form-section:last-of-type {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

    .empeno-root .form-section-header h2 {
        font-size: 1.4rem;
        font-weight: 600;
        color: #1e3a8a;
        margin: 0;
    }

    /* --- ESTILOS DE FORMULARIO --- */
    .empeno-root .form-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px 25px;
        align-items: flex-end;
    }

    .empeno-root .form-column {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .empeno-root .form-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

        .empeno-root .form-group label {
            font-size: 0.9rem;
            color: #374151;
            font-weight: 600;
        }

    .empeno-root .form-input,
    .empeno-root .form-select,
    .empeno-root .form-textarea {
        padding: 12px 16px;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        font-size: 0.95rem;
        background-color: #f9fafb;
        transition: all 0.3s ease;
        font-family: inherit;
        width: 100%;
        box-sizing: border-box;
    }

        .empeno-root .form-input:read-only {
            background-color: #f3f4f6;
            color: #6b7280;
            cursor: not-allowed;
            border-color: #e5e7eb;
        }

            .empeno-root .form-input:read-only:focus {
                box-shadow: none;
                border-color: #e5e7eb;
            }

    .empeno-root .form-textarea {
        resize: vertical;
        min-height: 80px;
    }

        .empeno-root .form-input:focus,
        .empeno-root .form-select:focus,
        .empeno-root .form-textarea:focus {
            background-color: white;
            border-color: #2563eb;
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
            outline: none;
        }

/* --- Dropdown de Búsqueda --- */
.search-client-container {
    position: relative;
    display: flex;
}

    .search-client-container .form-input {
        flex-grow: 1;
    }

.search-btn {
    background: #eef2ff;
    color: #4338ca;
    border: 2px solid #e0e7ff;
    padding: 0 15px;
    border-radius: 0 10px 10px 0;
    margin-left: -2px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .search-btn:hover {
        background: #e0e7ff;
    }

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 5px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    padding: 8px;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

    .search-dropdown li {
        padding: 12px 16px;
        cursor: pointer;
        border-radius: 8px;
        font-size: 0.95rem;
        color: #374151;
        transition: background-color 0.2s ease;
    }

        .search-dropdown li:hover {
            background-color: #f3f6fb;
            color: #1e3a8a;
        }

.selected-client-details {
    margin-top: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.change-client-btn {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    text-decoration: underline;
    padding-left: 10px;
    font-weight: 600;
}

/* --- Botones de Acción --- */
.empeno-root .client-action-buttons, .empeno-root .cotitular-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.empeno-root .add-client-btn, .empeno-root .client-action-btn {
    padding: 0 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    height: 48.5px;
    border: 2px solid;
    box-sizing: border-box;
    flex-grow: 1;
    flex-basis: 120px;
}

.empeno-root .add-client-btn {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #dcfce7;
}

    .empeno-root .add-client-btn:hover {
        background: #dcfce7;
    }

    .empeno-root .add-client-btn span {
        font-size: 1.3rem;
    }

.empeno-root .alert-btn {
    background: #fffbeb;
    color: #b45309;
    border-color: #fef3c7;
}

    .empeno-root .alert-btn:hover {
        background: #fef3c7;
    }

.empeno-root .history-btn {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

    .empeno-root .history-btn:hover {
        background: #dbeafe;
    }

.empeno-root .edit-btn {
    background: #faf5ff;
    color: #7e22ce;
    border-color: #f3e8ff;
}

    .empeno-root .edit-btn:hover {
        background: #f3e8ff;
    }

/* --- Sección Vehículo y Documentos --- */
.empeno-root .vehicle-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 25px;
    align-items: start;
}

    .empeno-root .vehicle-details-grid > .form-column {
        display: contents;
    }

.empeno-root .vehicle-status-section {
    grid-column: 1 / -1;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.empeno-root .status-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.empeno-root .status-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.empeno-root .status-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    .empeno-root .status-checkbox:hover {
        border-color: #93c5fd;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(147, 197, 253, 0.3);
    }

    .empeno-root .status-checkbox input[type="checkbox"] {
        display: none;
    }

.empeno-root .checkmark {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.empeno-root .status-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
}

.empeno-root .status-checkbox:has(input:checked) {
    background-color: #eef2ff;
    border-color: #3b82f6;
}

    .empeno-root .status-checkbox:has(input:checked) .status-text,
    .empeno-root .status-checkbox:has(input:checked) .checkmark {
        color: #1e3a8a;
    }

.empeno-root .additional-info-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px 25px;
    align-items: start;
}

    .empeno-root .additional-info-grid > .form-column {
        grid-column: auto !important;
    }

        .empeno-root .additional-info-grid > .form-column:nth-child(2n) {
            grid-column: 2 / 3;
        }

/* --- Botones Finales --- */
.empeno-root .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 25px;
    margin-top: 15px;
    border-top: 2px solid #f1f5f9;
}

.empeno-root .cancel-btn {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .empeno-root .cancel-btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.empeno-root .submit-btn {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

    .empeno-root .submit-btn:hover {
        background: linear-gradient(135deg, #1e40af, #2563eb);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    }


/* --- ESTILOS PARA TODOS LOS MODALES --- */
.modal-overlay, .cot-modal-overlay, .pf-modal-overlay, .history-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 41, 59, 0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-container, .cot-modal-container, .pf-modal-container, .history-modal-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Posición base centrada */
    animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cot-modal-container {
    max-width: 900px;
}

.pf-modal-container {
    max-width: 1200px;
}

.modal-header, .cot-modal-header, .pf-modal-header, .history-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title, .cot-modal-title, .pf-modal-title, .history-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.modal-close, .cot-modal-close, .pf-modal-close, .history-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .modal-close:hover, .cot-modal-close:hover, .pf-modal-close:hover, .history-modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

.modal-body, .cot-modal-body, .pf-modal-body, .history-modal-body {
    padding: 30px;
    overflow-y: auto;
}

/* --- ESTILOS DE TABLA (AÑADIDOS PARA EL MODAL DE HISTORIAL) --- */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* Aumenta espacio vertical */
    font-size: 0.95rem;
}

    .admin-table th {
        text-align: left;
        padding: 15px 20px;
        background: transparent;
        color: #64748b;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        border-bottom: 2px solid #e2e8f0;
    }

    .admin-table td {
        padding: 15px 20px; /* Ajuste de padding vertical */
        border: none;
        color: #334155;
        vertical-align: middle;
    }

    .admin-table tr.data-row {
        transition: all 0.2s ease-in-out;
        border-radius: 12px;
        background: #fdfdff;
        box-shadow: 0 2px 10px -2px rgba(220, 225, 240, 0.6);
        border: 1px solid #f0f3f8;
    }

        .admin-table tr.data-row:hover {
            transform: translateY(-3px);
            background: #ffffff;
            box-shadow: 0 10px 20px -5px rgba(200, 205, 220, 0.8);
        }

    .admin-table tr td:first-child {
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
    }

    .admin-table tr td:last-child {
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
    }

.text-center {
    text-align: center;
}


/* --- ESTILOS MODAL DE COTIZACIÓN --- */
.cot-form .cot-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

    .cot-form .cot-section:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

.cot-section {
    display: grid;
    gap: 20px 25px;
    grid-template-columns: repeat(3, 1fr);
}

.cot-details-grid {
    grid-template-columns: repeat(4, 1fr);
}

.cot-additional-costs-grid {
    grid-template-columns: 1fr 1fr;
}

.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: flex-end;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-top: 8px;
}

    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
        border: 2px solid #cbd5e1;
        border-radius: 6px;
        appearance: none;
        -webkit-appearance: none;
        cursor: pointer;
        background-color: #f9fafb;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

        .checkbox-group input[type="checkbox"]:checked {
            background-color: #2563eb;
            border-color: #2563eb;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3e%3cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3e%3c/svg%3e");
            background-size: 100% 100%;
            background-position: center;
            background-repeat: no-repeat;
        }

    .checkbox-group label {
        cursor: pointer;
        margin-bottom: 0;
        color: #4b5563;
        font-weight: 500;
    }

.cot-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 30px;
    margin-top: 20px;
    border-top: 2px solid #f1f5f9;
    flex-shrink: 0;
}

.cot-btn-secondary, .cot-btn-primary, .cot-btn-success {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cot-btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.cot-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.cot-btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* --- AJUSTES MODAL HISTORIAL (TAMAÑO MEDIANO) --- */
.history-modal-container {
    max-width: 800px; /* Reducido a tamaño mediano */
}

.history-modal-body {
    flex-grow: 0; /* Evita que el cuerpo se estire innecesariamente */
}

.history-client-info {
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

    .history-client-info span {
        font-weight: 400;
        color: #475569;
    }

.history-modal-footer {
    padding: 15px 30px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #f8fafc;
}

.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .status-tag.vigente, .status-tag.activo {
        background-color: #ecfdf5;
        color: #059669;
    }

    .status-tag.vencido {
        background-color: #fef2f2;
        color: #b91c1c;
    }

    .status-tag.finiquitado {
        background-color: #eff6ff;
        color: #1d4ed8;
    }

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalPopIn {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .empeno-root .vehicle-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .empeno-root .vehicle-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-section:last-of-type > .form-grid {
        grid-template-columns: 1fr;
    }

    .cot-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .empeno-root .sidebar {
        transform: translateX(-100%);
    }

        .empeno-root .sidebar.active {
            transform: translateX(0);
        }

    .empeno-root .main-content-wrapper {
        margin-left: 0;
    }

    .empeno-root .sidebar-toggle {
        display: block;
    }

    .empeno-root .user-details {
        display: none;
    }

    .empeno-root .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .empeno-root .admin-title-content {
        max-width: 100%;
    }

    .empeno-root .form-grid, .empeno-root .vehicle-details-grid {
        grid-template-columns: 1fr;
    }

    .empeno-root .tabs-container {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .empeno-root .client-action-buttons, .empeno-root .cotitular-action-buttons {
        flex-direction: row;
    }

    .cot-modal-container, .pf-modal-container, .history-modal-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .cot-modal-body, .pf-modal-body, .history-modal-body {
        max-height: calc(100vh - 120px);
    }

    .cot-section, .cot-details-grid, .cot-additional-costs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .empeno-root .client-action-buttons, .empeno-root .cotitular-action-buttons {
        flex-direction: column;
    }
}
