.ves-container {
    padding: 40px 0; /* Убран левый паддинг */
    max-width: 1360px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

.ves-calc-block {
    background: var(--BG-Gray, #F3F4F5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

.ves-calc-header, .ves-calc-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.ves-calc-header > div {
    font-weight: 600;
    color: var(--Text-Dark, #292A2A);
    font-size: 16px;
    line-height: 20.80px;
}

.ves-col-1 { flex: 0 0 224px; }
.ves-col-2 { flex: 0 0 224px; }
.ves-col-3 { flex: 0 0 100px; }
.ves-col-4 { flex: 0 0 100px; }
.ves-col-5 { flex: 0 0 224px; }
.ves-col-6 { flex: 0 0 140px; }
.ves-col-7 { flex: 0 0 100px; }
.ves-col-8 { flex: 0 0 100px; }
.ves-col-9 { width: 48px; text-align: center; flex-shrink: 0; position: relative; right: 14px;}

/* Обертка для селектов (чтобы поставить стрелочку) */
.ves-select-wrapper {
    position: relative;
    width: 100%;
}

.ves-calc-row select, .ves-calc-row input {
    height: 48px;
    border: 1px solid var(--Gray, #DEE2E3);
    border-radius: 8px;
    padding: 0 40px 0 16px;
    width: 100%;
    background: var(--White, white);
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--Text-Dark, #292A2A);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* Иконка стрелочки */
.ves-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

/* Стили для выпадающего списка (работает в некоторых браузерах) */
.ves-calc-row select option {
    font-family: 'Inter', sans-serif;
    padding: 10px;
}
.ves-calc-row select option:checked, 
.ves-calc-row select option:hover {
    background-color: var(--Accent-Default, #00B1BA) !important;
    color: white !important;
}

.ves-calc-row input[type="number"], .ves-calc-row input[type="text"] {
    padding-right: 16px;
    cursor: default;
}

/* Убираем синюю рамку Bootstrap при фокусе */
.ves-calc-row select:focus, 
.ves-calc-row input:focus,
.ves-form-row input:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: var(--Accent-Default, #00B1BA) !important;
}

.ves-calc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.btn-add-row {
    background: transparent;
    border: none;
    color: var(--Accent-Default, #00B1BA);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remove-row {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s;
}
.btn-remove-row:hover { opacity: 0.7; }

/* Выравнивание общего веса по правому краю колонки веса */
.ves-total-weight {
    font-size: 16px;
    color: var(--Text-Dark-Gray, #878D91);
    text-align: right; 
    flex-shrink: 0;
    margin-right: 26px;
}
.ves-total-weight span {
    color: var(--Text-Dark, #292A2A);
    font-weight: 500;
}

/* Блок формы по макету Figma */
.ves-form-block {
    background: #3D4042;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Изменено с 32px на 20px */
}

.ves-form-left {
    width: 562px;
    flex-shrink: 0;
}

.ves-form-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ves-form-title {
    color: var(--White, white) !important;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.ves-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.ves-form-row input {
    flex: 1 1 auto;
    max-width: 220px; /* Одинаковая ширина с кнопкой */
    height: 48px;
    border: 1px solid var(--Gray, #DEE2E3);
    border-radius: 8px;
    padding: 12px 16px; /* Обновленный паддинг */
    background: var(--White, white);
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--Text-Dark, #292A2A);
}

.ves-form-actions {
    display: flex;
    gap: 20px; /* Изменено с 24px на 20px */
    align-items: center;
}

.btn-submit {
    background: var(--Accent-Default, #00B1BA);
    color: var(--White, white);
    border: none;
    height: 48px;
    width: 220px; /* Одинаковая ширина с инпутами */
    max-width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Кастомный чекбокс */
.ves-checkbox {
    color: var(--Text-Light-Gray, #CACCD0);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.ves-checkbox a { color: var(--Text-Light-Gray, #CACCD0); text-decoration: underline; }
.ves-checkbox input { display: none; }
.ves-checkmark {
    width: 24px;
    height: 24px;
    background-color: transparent;
    border: 1px solid var(--Text-Light-Gray, #CACCD0);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
}
.ves-checkbox input:checked + .ves-checkmark {
    background-color: var(--Accent-Default, #00B1BA);
    border-color: var(--Accent-Default, #00B1BA);
}
.ves-checkbox input:checked + .ves-checkmark::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ves-calc-row select:disabled {
    background-color: #e9ecef !important;
    color: #878D91 !important;
    cursor: not-allowed;
    opacity: 0.7;
}


/* =========================================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (ТОП УРОВЕНЬ)
   ========================================= */
@media (max-width: 768px) {
    .ves-container {
        padding: 20px 16px;
    }

    .ves-calc-block {
        padding: 12px;
        background: transparent;
    }

    /* Прячем шапку таблицы */
    .ves-calc-header {
        display: none;
    }

    /* Превращаем строку в карточку */
    .ves-calc-row {
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px 16px 16px 16px;
        background: var(--White, white);
        border-radius: 12px;
        margin-bottom: 16px;
        position: relative;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    /* Распределение колонок внутри карточки */
    .ves-col-1, .ves-col-2, .ves-col-5 {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .ves-col-3, .ves-col-4, .ves-col-6, .ves-col-7, .ves-col-8 {
        flex: 1 1 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }

    /* Добавляем заголовки полей через CSS */
    .ves-col-1::before, .ves-col-2::before, .ves-col-3::before, .ves-col-4::before, 
    .ves-col-5::before, .ves-col-6::before, .ves-col-7::before, .ves-col-8::before {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        color: var(--Text-Dark-Gray, #878D91);
        font-weight: 500;
    }
    .ves-col-1::before { content: "Тип метизов"; }
    .ves-col-2::before { content: "Стандарт"; }
    .ves-col-3::before { content: "Диаметр"; }
    .ves-col-4::before { content: "Длина"; }
    .ves-col-5::before { content: "Тип покрытия"; }
    .ves-col-6::before { content: "Класс прочности"; }
    .ves-col-7::before { content: "Кол-во, шт"; }
    .ves-col-8::before { content: "Вес, кг"; }

    /* Иконка корзины (правки пользователя) */
    .ves-col-9 {
        position: absolute;
        top: 0px;
        right: 20px;
        width: 32px;
        height: 32px;
        margin: 0;
    }
    .btn-remove-row svg {
        width: 24px;
        height: 24px;
    }

    .ves-calc-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-top: 8px;
    }

    /* Общий вес на всю ширину */
    .ves-total-weight {
        text-align: left;
        width: 100%;
        margin-right: 0;
        font-size: 18px;
        padding-top: 16px;
        border-top: 1px solid var(--Gray, #DEE2E3);
    }

    /* Форма вертикально */
    .ves-form-block {
        flex-direction: column;
        padding: 24px 20px;
        gap: 24px;
        align-items: stretch;
    }

    .ves-form-left {
        width: 100%;
        text-align: center;
    }

    .ves-form-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .ves-form-right {
        width: 100%;
    }

    /* Поля ввода вертикально */
    .ves-form-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 0;
    }
    
    /* На мобилках поля на всю ширину */
    .ves-form-row input {
        max-width: 100%;
        padding: 12px 16px; /* Паддинг для моб */
    }

    .ves-form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    /* Кнопка на всю ширину */
    .btn-submit {
        width: 100%;
        margin-top:14px;
    }

    /* Чекбокс слева сверху */
    .ves-checkbox {
        align-items: flex-start;
        text-align: left;
    }
    
    /* Текстовый блок под формой */
    .ves-text-block {
        font-size: 14px;
        line-height: 1.5;
    }
}