.softfile-error {
    color: red;
    background: #ffeeee;
    border: 1px solid #cc0000;
    padding: 6px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* ======= Общие настройки ======= */
#soft-list-form {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.6fr 0.6fr auto;
    width: 100%;
    row-gap: 4px; /* было 6px — чуть плотнее */
    font-size: 14px;
    color: #1f2937;
}

/* ======= Заголовок ======= */
.soft-header {
    display: contents;
}

.soft-header > .col {
    background: #f3f4f6;
    border-bottom: 2px solid #d1d5db;
    font-weight: 600;
    padding: 6px 8px; /* было 8px 10px — чуть меньше */
    border-radius: 6px 6px 0 0;
    text-align: left;
    color: #374151;
}

/* ======= Строки ======= */
.soft-item-inline {
    display: contents;
}

.soft-field,
.soft-buttons {
    padding: 4px 6px; /* было 6px 8px */
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    min-height: 28px; /* гарантирует удобную кликабельность */
}

/* Инпуты и селекты */
.soft-field:focus,
.soft-field:hover {
    border-color: #60a5fa;
    background-color: #f0f9ff;
    outline: none;
}

/* Чередование строк */
.soft-item-inline:nth-of-type(even) .soft-field,
.soft-item-inline:nth-of-type(even) .soft-buttons {
    background-color: #f9fafb;
}

/* ======= Кнопки ======= */
.soft-buttons {
    display: flex;
    align-items: center;
    gap: 6px; /* было 8px */
    justify-content: center;
    border: none;
}

.soft-buttons button {
    border: none;
    background: none;
    padding: 3px; /* было 4px */
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
}

.soft-buttons button:hover {
    transform: scale(1.08);
    background-color: #e5e7eb;
}

.soft-buttons img {
    width: 18px; /* было 20px */
    height: 18px;
}

/*!* ======= Пагинация ======= *!*/
/*.pagination-container {*/
/*    margin-top: 8px; !* было 10px *!*/
/*    display: flex;*/
/*    justify-content: space-between;*/
/*    align-items: center;*/
/*    padding: 6px;*/
/*    border-top: 1px solid #e5e7eb;*/
/*}*/

/* ======= Адаптивность ======= */
@media (max-width: 900px) {
    #soft-list-form {
        grid-template-columns: 1fr;
    }

    .soft-header {
        display: none;
    }

    .soft-field,
    .soft-buttons {
        margin-bottom: 4px;
    }

    .soft-buttons.actions {
        justify-content: flex-end;
    }

    .soft-item-inline {
        display: block;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
}





/* === Модальное окно управления изображениями === */
.softimg-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.softimg-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.softimg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.softimg-item {
    position: relative;
    width: 120px;
    height: 120px;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    transition: transform 0.2s ease;
}

.softimg-item:hover {
    transform: scale(1.03);
}

.softimg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.softimg-btn-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;      /* было 24px */
    height: 32px;     /* было 24px */
    font-size: 20px;  /* добавлено для увеличенного крестика */
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.softimg-btn-delete:hover {
    background: rgba(255, 0, 0, 0.8); /* подсветка при наведении */
    transform: scale(1.1);
}

.softimg-item.add-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 48px;
    color: #888;
    border: 2px dashed #aaa;
    background: #fafafa;
    transition: background 0.2s ease;
}

.softimg-item.add-slot:hover {
    background: #f0f0f0;
}

.softimg-modal-close {
    cursor: pointer;
    font-size: 24px;
    float: right;
    color: #555;
    transition: color 0.2s;
}

.softimg-modal-close:hover {
    color: #000;
}


/* === Модальное окно управления архивами === */
.softfile-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.softfile-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Заголовок и кнопка закрытия */
.softfile-modal-close {
    cursor: pointer;
    font-size: 24px;
    float: right;
    color: #555;
    transition: color 0.2s;
}

.softfile-modal-close:hover {
    color: #000;
}

/* Контейнер для списка файлов */
.softfile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
}

/* Один элемент списка */
.softfile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 15px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.softfile-item:hover {
    background: #f0f0f0;
    transform: scale(1.01);
}

/* Имя файла */
.softfile-name {
    flex-grow: 1;
    font-size: 15px;
    color: #333;
    word-break: break-all;
}

/* Блок с кнопками */
.softfile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.softfile-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.softfile-actions button:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.softfile-actions img {
    width: 22px;
    height: 22px;
}

/* Кнопка "Добавить файл" */
.softfile-add {
    margin-top: 20px;
    text-align: right;
}

.softfile-add button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.softfile-add button:hover {
    background: #e8e8e8;
    transform: scale(1.03);
}

.softfile-add img {
    width: 20px;
    height: 20px;
}
