/* Стили для админ-панели */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Визуальный редактор в стиле Tilda */
.visual-editor-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.toolbar-section {
    display: flex;
    gap: 10px;
}

.toolbar-btn {
    background: #34495e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: background 0.2s;
}

.toolbar-btn:hover {
    background: #4a90e2;
}

.visual-editor-container {
    margin-top: 50px;
    width: 100%;
    height: calc(100vh - 50px);
    border: none;
}

.visual-editor-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Модальное окно выбора блоков */
.block-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.category-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -12px;
    transition: color 0.2s;
}

.category-tab:hover {
    color: #4a90e2;
}

.category-tab.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.block-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.block-card:hover {
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.block-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.block-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.btn-visual-editor {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-visual-editor:hover {
    background: #357abd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Экран входа */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.login-container p {
    margin-bottom: 30px;
    color: #666;
    text-align: center;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-container input:focus {
    outline: none;
    border-color: #667eea;
}

.login-container button {
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #5568d3;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

/* Шапка админ-панели */
.admin-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-right: 15px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.admin-logo-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.admin-logo-icon {
    display: block;
    width: 32px;
    height: 32px;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .header-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-header h1 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.go-to-site-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.go-to-site-link:hover {
    background: #667eea;
    color: white;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Кнопки */
.btn-primary {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

/* Layout */
.admin-layout {
    display: flex;
    height: calc(100vh - 80px);
}

/* Боковая панель */
.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.sidebar h3 {
    margin-bottom: 12px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

/* Поиск страниц */
.pages-search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.pages-search-input {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #f8f9fa;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.pages-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pages-search-input::placeholder {
    color: #999;
}

.pages-search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.pages-search-no-results p {
    margin: 0;
}

/* Заголовок и поиск модулей */
.modules-list-header {
    margin-bottom: 16px;
}

.modules-list-header h3 {
    margin-bottom: 12px;
}

.modules-search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.modules-search-input {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #f8f9fa;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modules-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modules-search-input::placeholder {
    color: #999;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.clear-search-btn:hover {
    background: #c82333;
    transform: translateY(-50%) scale(1.1);
}

.modules-search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.modules-search-no-results p {
    margin: 0;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.module-item {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.module-item.enabled {
    border-left: 4px solid #28a745;
}

.module-item.disabled {
    border-left: 4px solid #dc3545;
    opacity: 0.6;
}

.module-item.active {
    border: 2px solid #000000 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.module-item-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.module-drag-handle {
    cursor: grab;
    color: #999;
    font-size: 16px;
    line-height: 1;
    user-select: none;
    padding: 4px;
    margin-right: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.module-drag-handle:hover {
    color: #667eea;
}

.module-drag-handle:active {
    cursor: grabbing;
}

.module-item-content > .module-name {
    flex: 1;
    min-width: 0;
}

.module-name {
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-order {
    font-size: 12px;
    color: #666;
}

.module-status {
    font-size: 18px;
    font-weight: bold;
}

/* Drag-and-drop стили */
.module-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.module-item.drag-over-top {
    border-top: 3px solid #667eea;
    padding-top: 12px;
}

.module-item.drag-over-bottom {
    border-bottom: 3px solid #667eea;
    padding-bottom: 12px;
}

/* Область редактирования */
.editor-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #999;
    font-size: 18px;
}

.module-editor {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.editor-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.editor-header h2 {
    color: #333;
    text-transform: capitalize;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
    width: 40px;
    height: 20px;
    cursor: pointer;
}

.editor-actions input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 80px;
}

.editor-content {
    padding: 30px;
}

/* Переключатель режимов */
.editor-mode-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.mode-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    color: #666;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.mode-btn:hover {
    background: #e9ecef;
    color: #333;
}

.mode-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* JSON редактор */
.json-editor {
    width: 100%;
}

#jsonTextarea {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

#jsonTextarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Визуальный редактор */
.visual-editor {
    width: 100%;
    max-height: 600px;
    overflow-y: auto;
}

.visual-field-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.visual-field-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: capitalize;
}

.quill-editor-container {
    background: white;
    border-radius: 4px;
    min-height: 150px;
}

.quill-editor-container .ql-editor {
    min-height: 150px;
    font-size: 14px;
    line-height: 1.6;
}

.quill-editor-container .ql-container {
    border-radius: 4px;
    border: 1px solid #ddd;
}

.quill-editor-container .ql-container.ql-snow {
    border: 1px solid #ddd;
}

.quill-editor-container .ql-toolbar.ql-snow {
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    background: #fafafa;
}

/* Список страниц */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    margin: 0;
}

.btn-add-page {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-add-page:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.pages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.page-item {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.page-item.enabled {
    border-left: 4px solid #28a745;
}

.page-item.disabled {
    border-left: 4px solid #dc3545;
    opacity: 0.6;
}

.page-item.active {
    border: 2px solid #000000 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.page-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-name {
    font-weight: 600;
    color: #333;
}

.page-slug {
    font-size: 12px;
    color: #666;
}

.page-status {
    font-size: 18px;
    font-weight: bold;
}

#modulesListContainer h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

/* Редактор страницы */
.page-editor {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.page-info-section,
.seo-section,
.modules-selection-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.page-info-section h3,
.seo-section h3,
.modules-selection-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group select {
    background: white;
    cursor: pointer;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Чекбоксы модулей */
.modules-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.module-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.module-checkbox-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.module-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.module-checkbox-item label {
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    flex: 1;
}

/* Обязательные модули (header, footer, seo) */
.module-checkbox-item.required-module {
    background: #f0f7ff;
    border-color: #667eea;
    cursor: not-allowed;
}

.module-checkbox-item.required-module:hover {
    background: #f0f7ff;
    border-color: #667eea;
}

.module-checkbox-item.required-module input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0.7;
}

.module-checkbox-item.required-module label {
    cursor: not-allowed;
    color: #333;
}

.required-badge {
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

/* Раздел заявок на обратный звонок */
.sidebar-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sidebar-link {
    width: 100%;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.sidebar-link:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.badge {
    background: #dc3545;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

.header-actions .badge {
    margin-left: 8px;
}

.content-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h2 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.stat-card.stat-new {
    border-color: #ffc107;
    background: #fff8e1;
}

.stat-card.stat-called {
    border-color: #17a2b8;
    background: #e0f7fa;
}

.stat-card.stat-completed {
    border-color: #28a745;
    background: #e8f5e9;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.request-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.request-card.status-new {
    border-left: 4px solid #ffc107;
}

.request-card.status-called {
    border-left: 4px solid #17a2b8;
}

.request-card.status-completed {
    border-left: 4px solid #28a745;
}

.request-card.status-cancelled {
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.request-phone {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.request-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.request-status.status-new {
    background: #fff8e1;
    color: #f57c00;
}

.request-status.status-called {
    background: #e0f7fa;
    color: #00838f;
}

.request-status.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.request-status.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.request-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.request-notes {
    margin: 15px 0;
    padding: 10px;
    background: white;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.status-select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.request-notes-input {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .editor-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modules-checkbox-list {
        grid-template-columns: 1fr;
    }
}

