/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

/* ===== СТРАНИЦА АВТОРИЗАЦИИ (login.html) ===== */
body.login-page {
    background: #053C3C !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh;
    padding: 20px;
}


.logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 420px;
    gap: 12px;
}

.login-nav-links {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.btn-back-site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.btn-back-site:hover {
    color: var(--color-primary-light, #00966a);
}

.auth-card {
    background: #ffffff;
    width: 100%;
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.auth-form h2 {
    font-size: 20px;
    color: #053C3C;
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.4;
}

.input-group {
    position: relative;
    margin-bottom: 14px;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.input-group input:focus {
    border-color: var(--color-primary-light, #00966a);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.btn-auth {
    width: 100%;
    height: 46px;
    background: var(--color-primary, #053c3c);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth:hover {
    background: var(--color-primary-light, #00966a);
}

/* ===== ДАШБОРД (dashboard.html) ===== */
#dashboard {
    display: flex;
    flex-direction: column;
    background: var(--color-primary-light, #00966a);
}

.admin-header {
    background: #053C3C;
    color: #ffffff;
    padding: 16px 32px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-left: calc(32px + env(safe-area-inset-left));
    padding-right: calc(32px + env(safe-area-inset-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.btn-back-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-back-header:hover {
    background: var(--color-primary, #053c3c);
    background: var(--color-primary-light, #00966a);
}

.logout-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.logout-btn:hover {
    background: #dc2626;
}

.admin-container {
    max-width: 1050px;
    width: 100%;
    margin: 28px auto;
    padding: 0 20px;
}

.edit-section {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.edit-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: #053C3C;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-desc {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 18px;
}

.edit-section label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    margin-top: 12px;
}

/* Поля ввода, select и date */
.edit-section input[type="text"],
.edit-section input[type="email"],
.edit-section input[type="tel"],
.edit-section input[type="date"],
.edit-section select,
.edit-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    color: #1e293b;
    font-family: inherit;
    transition: all 0.2s ease;
}

.edit-section textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.edit-section select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.edit-section input:focus,
.edit-section select:focus,
.edit-section textarea:focus {
    border-color: var(--color-primary-light, #00966a);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

@media (max-width: 680px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.input-with-action {
    display: flex;
    gap: 8px;
}

.input-with-action input {
    flex: 1;
}

.btn-inline-action {
    padding: 0 14px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-inline-action:hover {
    background: var(--color-primary, #053c3c);
    border-color: var(--color-primary-light, #00966a);
    color: #ffffff;
}

.save-btn {
    width: 100%;
    height: 48px;
    background: var(--color-primary, #053c3c);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.save-btn:hover {
    background: var(--color-primary-light, #00966a);
}

/* КАРТОЧКА ВЫДАЧИ ДАННЫХ КЛИЕНТУ */
.credentials-card {
    margin-top: 22px;
    background: #053C3C;
    color: #ffffff;
    border-radius: 12px;
    padding: 20px;
}

.credentials-card h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.credentials-card pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 14px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.btn-copy {
    margin-top: 12px;
    width: 100%;
    padding: 12px;
    background: var(--color-primary, #053c3c);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.btn-copy:hover {
    background: var(--color-primary-light, #00966a);
}

/* ТАБЛИЦА КЛИЕНТОВ */
.table-responsive {
    
    overflow-x: auto;
    margin-top: 14px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.admin-table th,
.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.admin-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
}

.admin-table code {
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 4px;
    color: #053C3C;
    font-weight: 600;
}

.badge-product {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-radius: 10px;
    font-weight: 700;
    font-size: 10px;
    margin-top: 3px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-expired {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.btn-sm {
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 4px;
    transition: opacity 0.2s;
}

.btn-sm:hover {
    opacity: 0.85;
}

.btn-renew {
    background: #0284c7;
    color: #ffffff;
    font-weight: 600;
}

.btn-renew:hover {
    background: #0369a1;
}

.btn-copy-one {
    background: #053C3C;
    color: #ffffff;
}

.btn-del {
    background: #ef4444;
    color: #ffffff;
}

/* УВЕДОМЛЕНИЯ (TOAST) */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #053C3C;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
}

/* Кнопка "Редактировать" в таблице */
.btn-edit {
    background: var(--color-primary, #053c3c);
    color: #ffffff;
    font-weight: 600;
}

.btn-edit:hover {
    background: var(--color-primary-light, #00966a);
}

/* Модальное окно редактирования клиента */
.admin-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 60, 60, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal-box {
    background: #ffffff;
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    animation: modalFadeIn 0.2s ease-out;
}

/* Принудительно расширяем модальное окно редактирования новости на ПК */
#editNewsModal .admin-modal-box {
    width: 95vw !important;
    max-width: 1200px !important;
    margin: 20px auto !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-modal-header h3 {
    font-size: 18px;
    color: #053C3C;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #ef4444;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.btn-cancel-modal {
    padding: 0 20px;
    height: 48px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-modal:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Сетка множественного выбора продукции */
.product-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    margin-top: 4px;
}

.product-check-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    transition: all 0.15s ease;
}

.product-check-item:hover {
    border-color: var(--color-accent-teal);
    color: #0369a1;
    background: var(--color-primary-light, #00966a);
}

.product-check-item:has(input[type="checkbox"]:checked) {
    border-color: var(--color-primary-light, #00966a);
    background: #fff7ed;
    color: #b45309 !important;
    font-weight: 700 !important;
}

.product-check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-teal);
    cursor: pointer;
    accent-color: var(--color-primary-light, #00966a);
    margin-top: 3px;
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== СЕТКА КНОПОК ДЕЙСТВИЙ В ТАБЛИЦЕ (2 КОЛОНКИ, 2 СТРОКИ) ===== */
.table-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 6px;
    width: max-content;
    min-width: 90px;
}

.table-actions-grid .btn-sm {
    margin: 0;
    width: 100%;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
}

/* Базовый контейнер кнопок шапки */
.admin-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===================================================
   ПАНЕЛЬ ПЕРЕКЛЮЧЕНИЯ ВКЛАДОК (ТАБЫ)
   =================================================== */

.admin-tabs-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab-btn i {
    font-size: 15px;
    color: #00966a;
}

.admin-tab-btn:hover {
    background: #f1f5f9;
    color: #053c3c;
    border-color: #94a3b8;
}

.admin-tab-btn.active {
    background: #053c3c;
    color: #ffffff;
    border-color: #053c3c;
}

.admin-tab-btn.active i {
    color: #2edba5;
}

/* Скрытие неактивных и отображение активной вкладки */
.admin-tab-pane {
    display: none;
    animation: fadeInPane 0.25s ease-out forwards;
}

.admin-tab-pane.active {
    display: block;
}

@keyframes fadeInPane {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Кнопка «Редактировать вакансию» ===== */
.btn-edit-vacancy {
    background: var(--color-primary, #053c3c);
    color: #ffffff;
    font-weight: 600;
}

.btn-edit-vacancy:hover {
    background: var(--color-primary-light, #00966a);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1;
}

.status-new {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.status-in_progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-done {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}



.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1;
}

.status-new {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.status-confirmed {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.status-in_progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-done {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}


/* ===== ФИКС: иконки внутри кнопок не перехватывают клики ===== */
.btn-sm i,
.btn-edit i,
.btn-renew i,
.btn-del i,
.btn-copy-one i,
.btn-edit-manager i,
.btn-edit-news i,
.btn-edit-vacancy i,
.btn-del-news i,
.btn-del-vacancy i,
button i,
button svg {
    pointer-events: none;
}

/* ===================================================
   МОДАЛКИ ВОССТАНОВЛЕНИЯ ПАРОЛЯ (login.html)
   =================================================== */

#forgotModal.admin-modal-backdrop,
#resetModal.admin-modal-backdrop {
    z-index: 2000;
}

#forgotModal .admin-modal-box,
#resetModal .admin-modal-box {
    width: 100% !important;
    max-width: 440px !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
}

/* Успешные состояния внутри модалок */
#forgotSuccess,
#rpSuccess,
#rpError,
#rpLoading {
    text-align: center;
    padding: 16px 4px;
}

#forgotSuccess h3,
#rpSuccess h3,
#rpError h3 {
    font-size: 18px;
    color: #053c3c;
    margin-bottom: 8px;
    font-weight: 700;
}

#forgotSuccess p,
#rpSuccess p,
#rpError p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

#forgotSuccess .success-icon,
#rpSuccess .success-icon,
#rpError .error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

#forgotSuccess .success-icon,
#rpSuccess .success-icon {
    color: #00966a;
}

#rpError .error-icon {
    color: #ef4444;
}

/* ===== СКРЫТЫЕ ЭЛЕМЕНТЫ (ДЛЯ ДОСТУПНОСТИ) ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* ===== СБРОС СТИЛЕЙ FIELDSET/LECEND ===== */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

fieldset legend {
    padding: 0;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: block;
}

/* ==========================================================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ (≤768px)
   ⚠️ ВАЖНО: весь блок должен быть в самом КОНЦЕ файла
   ========================================================== */
@media (max-width: 768px) {

    .admin-modal-box label {
        font-size: 12px;
    }

    /* =====================================================
       1. ГЛОБАЛЬНОЕ
       ===================================================== */
    body {
        overflow-x: hidden;
    }

    input {
        width: 100%;
    }

    /* =====================================================
       2. ADMIN-HEADER: одна строка, компактные кнопки
       ===================================================== */
    .admin-header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top));
        padding-left: calc(12px + env(safe-area-inset-left));
        padding-right: calc(12px + env(safe-area-inset-right));
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .admin-header .logo {
        height: 24px;
        flex-shrink: 0;
    }

    .admin-header h2 {
        display: none;
    }

    .admin-header-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .btn-back-header,
    .logout-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        line-height: 0;
        flex-shrink: 0;
    }

    .btn-back-header i,
    .logout-btn i {
        font-size: 15px;
        line-height: 1;
        margin: 0;
    }

    /* =====================================================
       3. КОНТЕЙНЕР И СЕКЦИИ
       ===================================================== */
    .admin-container {
        margin-top: 16px;
        padding: 0 12px;
    }

    .edit-section {
        padding: 18px 14px;
        margin-bottom: 16px;
    }

    /* Заголовки внутри вкладок — компактнее */
    .admin-tab-pane h1,
    .admin-tab-pane h2 {
        font-size: 18px !important;
        line-height: 1.3;
        margin-bottom: 12px !important;
    }

    .edit-section h3 {
        font-size: 15px !important;
        line-height: 1.3;
    }

    .section-desc {
        font-size: 12px !important;
        margin-bottom: 14px !important;
    }

    /* Кнопки «Создать ...» на всю ширину */
    button[id^="btnCreate"] {
        width: 100%;
        justify-content: center;
    }

    /* =====================================================
       4. ТАБЫ: горизонтальный скролл
       ===================================================== */
    .admin-tabs-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
        margin-bottom: 16px;
        border-bottom: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .admin-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .admin-tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 12px;
        padding: 8px 14px;
        scroll-snap-align: start;
    }

    .admin-tab-btn i {
        font-size: 13px;
    }

    /* =====================================================
       5. ФОРМА: одна колонка
       ===================================================== */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    /* =====================================================
       6. МОДАЛКИ
       ===================================================== */
    .admin-modal-box {
        width: 100%;
        padding: 20px 16px;
        border-radius: 12px;
    }

    /* =====================================================
       7. ТАБЛИЦА → КАРТОЧКИ (все поля в одну колонку)
       ===================================================== */
    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    /* Карточка */
    .admin-table tr {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 14px 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }

    .admin-table tr:last-child {
        margin-bottom: 0;
    }

    /* Каждое поле — блок в одну колонку */
    .admin-table td {
        display: block;
        padding: 0;
        border-bottom: none;
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .admin-table td:last-child {
        margin-bottom: 0;
    }

    /* Подпись поля — сверху */
    .admin-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #64748b;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-bottom: 4px;
    }

    /* Если у td нет data-label — не показываем подпись */
    .admin-table td[data-label=""]::before,
    .admin-table td:not([data-label])::before {
        display: none;
    }

    /* Блок «Действия» — отдельная секция */
    .admin-table td[data-label="Действия"] {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px dashed #cbd5e1;
        margin-bottom: 0;
    }

    .admin-table td[data-label="Действия"]::before {
        margin-bottom: 8px;
    }

    /* Кнопки действий — сетка в ряд */
    .admin-table td[data-label="Действия"] .table-actions-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .admin-table td[data-label="Действия"] .btn-sm {
        height: 42px;
        margin: 0;
        font-size: 14px;
        width: 100%;
    }

    /* Убираем горизонтальный скролл для карточек */
    .table-responsive {
        overflow-x: visible;
        margin-top: 0;
        -webkit-overflow-scrolling: touch;
    }
}