/* ===== СТИЛИ ДЛЯ ВСЕГО ПРИЛОЖЕНИЯ GlassLine Wardrobe Constructor ===== */

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

body {
    font-family: 'Arial', sans-serif;
    background: white;
    color: #2c3e50;
    line-height: 1.4;
    font-size: 12px;
}

.container {
    display: grid;
    grid-template-columns: 280px 1fr 260px;
    gap: 10px;
    padding: 10px;
    min-height: 100vh;
    align-items: start;
    max-width: 100%;
    margin: 30px auto;
}

/* Хедер на всю ширину */
.logo {
    height: 90px;
}

h1 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Левая колонка - Параметры */
.left-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 12px;
}

/* Центральная колонка - Канвас и 3D */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visualizer-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.view-toggle-buttons {
    display: flex;
    gap: 4px;
}

.view-toggle-buttons button {
    width: auto;
    min-width: 80px;
    font-size: 11px;
    padding: 3px 6px;
    height: 24px;
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
}

.view-toggle-buttons button.selected {
    background: #495057;
}

.zoom-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.zoom-controls button {
    width: auto;
    padding: 3px 8px;
    height: 24px;
    min-width: 40px;
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
}

/* Контейнер канваса */
.canvas-container {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    position: relative;
    overflow: auto;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#construction-canvas {
    background: white;
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 100%;
}

/* FIXED: 3D вьюпорт с базовыми стилями */
#view-3d {
    width: 100%;
    min-height: 500px; /* Запретить коллапс контейнера */
    height: 900px;
    background: #222222;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

/* FIXED: Canvas 3D с минимальными размерами */
#canvas-3d {
    min-height: 400px;
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#canvas-3d:active {
    cursor: grabbing;
}

/* Правая колонка - Модули */
.right-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 12px;
}

/* Общие стили секций */
.control-section {
    background: white;
    border: 1px solid #dee2e6;
    padding: 12px;
}

.control-title {
    font-size: 13px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 6px;
}

.control-group {
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

/* Формы и инпуты */
label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 11px;
    text-transform: uppercase;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 3px 6px;
    border: 1px solid #dee2e6;
    font-size: 11px;
    background: white;
    color: #2c3e50;
    height: 24px;
    line-height: 18px;
    margin-bottom: 8px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #495057;
}

/* Кнопки */
button {
    background: #495057;
    color: white;
    border: none;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    height: 24px;
    line-height: 18px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 100%;
    transition: background 0.2s;
    margin-bottom: 4px;
}

button:hover {
    background: #343a40;
}

.button-danger {
    background: #dc3545;
}

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

.button-success {
    background: #28a745;
}

.button-success:hover {
    background: #218838;
}

.button-secondary {
    background: #6c757d;
}

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

.button-warning {
    background: #ffc107;
    color: #212529;
}

.button-warning:hover {
    background: #e0a800;
}

/* Выбор типа модуля (правая колонка) */
.module-type {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin: 8px 0;
}

.module-btn {
    background: white;
    border: 1px solid #dee2e6;
    padding: 4px 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: #2c3e50;
    font-weight: 500;
    font-size: 11px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.module-btn:hover {
    border-color: #495057;
    background: #f8f9fa;
}

.module-btn.selected {
    border-color: #2c3e50;
    background: #2c3e50;
    color: white;
}

/* Управление секциями (левая колонка) */
.section-width-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    padding: 3px;
    background: #f8f9fa;
    font-size: 11px;
    color: #2c3e50;
}

.section-width-input {
    width: 60px;
    padding: 2px 4px;
    border: 1px solid #dee2e6;
    font-size: 11px;
    height: 22px;
}

/* Опции крепления (правая колонка) */
.mounting-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin: 8px 0;
}

.mounting-btn {
    background: white;
    border: 1px solid #dee2e6;
    padding: 4px 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: #2c3e50;
    font-weight: 500;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-transform: uppercase;
}

.mounting-btn:hover {
    border-color: #495057;
    background: #f8f9fa;
}

.mounting-btn.selected {
    border-color: #2c3e50;
    background: #2c3e50;
    color: white;
}

/* Чекбоксы */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    color: #2c3e50;
    font-size: 11px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Сводка размеров */
.dimension-summary {
    background: white;
    border: 1px solid #dee2e6;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: #2c3e50;
}

.calculation-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 6px;
    margin-top: 4px;
    font-size: 10px;
    color: #2c3e50;
}

/* Обменный курс */
.exchange-rate {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px;
    margin-bottom: 8px;
    font-size: 11px;
    color: #2c3e50;
}

.exchange-rate input {
    width: 80px;
    padding: 2px 4px;
    border: 1px solid #dee2e6;
    font-size: 11px;
    height: 22px;
    margin-left: 6px;
}

/* Кнопки управления проектами */
.project-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.project-buttons button {
    height: 24px;
}

/* ===== СТИЛИ ДЛЯ 2D РЕДАКТОРА ===== */

/* Улучшенные стили для кнопок 2D редактора */
#edit-toolbar-2d {
    position: absolute;
    bottom: 50px;
    left: 85%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

#edit-toolbar-2d:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
    transform: translateX(-50%) translateY(-2px);
}

.edit-tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.edit-tool-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.edit-tool-btn:active {
    transform: scale(0.95);
}

.edit-tool-btn.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

.edit-tool-btn:disabled {
    background: linear-gradient(135deg, #adb5bd, #6c757d);
    cursor: not-allowed;
    opacity: 0.6;
}

.edit-tool-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Эффект ripple при клике */
.edit-tool-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.edit-tool-btn:active::after {
    width: 100px;
    height: 100px;
}

/* Подсказки при наведении */
.edit-tool-btn[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.edit-tool-btn[title]:hover::before {
    opacity: 1;
}

/* Индикатор выбора */
#selection-indicator {
    position: absolute;
    border: 2px dashed #3498db;
    background: rgba(52, 152, 219, 0.1);
    pointer-events: none;
    display: none;
    z-index: 999;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#selection-indicator.active {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

/* ===== СТИЛИ ДЛЯ ВИЗУАЛЬНОГО РЕДАКТОРА ===== */

/* Визуальный редактор */
#visual-editor-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 12px;
    min-width: 280px;
    max-width: 350px;
}

#visual-editor-panel h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #2c3e50;
}

#visual-editor-panel label {
    font-size: 11px;
    font-weight: 600;
}

#visual-editor-panel input[type="range"] {
    width: 100%;
    margin: 5px 0;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
}

#visual-editor-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

#visual-editor-panel select {
    width: 100%;
    padding: 6px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 11px;
}

/* Подсказки */
.module-info-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 200px;
}

.module-info-tooltip.show {
    opacity: 1;
}

.module-info-tooltip strong {
    color: #3498db;
}

/* Клавиши быстрого доступа */
#shortcuts-panel kbd {
    background: #495057;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 10px;
}

/* Улучшенная подсветка */
#selection-indicator {
    position: absolute;
    border: 3px dashed #3498db;
    background: rgba(52, 152, 219, 0.1);
    pointer-events: none;
    display: none;
    z-index: 999;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

#selection-indicator.active {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.7);
}

/* Анимация для режима выбора */
#select-mode-btn.active {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    animation: selectModePulse 2s infinite;
}

@keyframes selectModePulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
    }
}

/* Анимация для новых элементов */
@keyframes newElementAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.new-module-animation {
    animation: newElementAppear 0.5s ease-out;
}

/* Улучшенный контур профиля при подсветке */
.profile-highlight {
    stroke: #3498db !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 5px rgba(52, 152, 219, 0.7));
}

/* Анимация для кнопок отмены/повтора */
@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.undo-redo-active {
    animation: buttonPulse 0.3s ease;
}

/* Стили для режима редактирования */
.editor-mode-active {
    background: rgba(52, 152, 219, 0.1) !important;
    border-color: #3498db !important;
}

/* Улучшенная видимость выбранных элементов */
.selected-module-glow {
    filter: drop-shadow(0 0 10px rgba(52, 152, 219, 0.8)) brightness(1.1);
}

/* ===== СТИЛИ ДЛЯ ПРЕВЬЮ МОДУЛЕЙ С ФОТОГРАФИЯМИ ===== */

/* Контейнер превью */
.module-preview {
    width: 100%;
    height: 80px; /* Увеличиваем высоту для фото */
    border: 1px solid #dee2e6;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Стили для изображения */
.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Изображение заполняет контейнер */
    transition: transform 0.3s ease;
}

.preview-img:hover {
    transform: scale(1.02);
}

/* Наложение с информацией о компоненте */
.module-preview::before {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    z-index: 1;
}

/* Для адаптивности */
@media (max-width: 768px) {
    .module-preview {
        height: 60px;
    }
}

/* ===== СТИЛИ ДЛЯ СПЕЦИФИКАЦИИ ===== */

/* Спецификации (нижняя часть) */
.specification-section {
    grid-column: 1 / -1;
    margin-top: 15px;
}

.specification-box {
    background: white;
    border: 1px solid #dee2e6;
    padding: 14px;
    overflow-x: auto;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    font-size: 11px;
    min-width: 800px;
}

.spec-table th {
    background: #495057;
    color: white;
    padding: 6px 8px;
    text-align: left;
    border: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

.spec-table td {
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    text-align: left;
    font-size: 11px;
    color: #2c3e50;
}

.spec-table tr:nth-child(even) {
    background: #f8f9fa;
}

.spec-table tr:hover {
    background: #e9ecef;
}

.total-row {
    background: #343a40;
    color: white;
    font-weight: bold;
}

.total-row td {
    border-color: #343a40;
}

.spec-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.spec-actions button {
    width: auto;
    flex: 1;
    min-width: 120px;
    height: 26px;
}

/* ===== СТИЛИ ДЛЯ 3D ВИЗУАЛИЗАЦИИ ===== */

/* Действия с 3D */
.view-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 100;
}

.view-controls button {
    width: auto;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 10px;
    height: 22px;
    min-width: auto;
}

/* Секция отображения */
.section-display {
    display: flex;
    gap: 4px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.section-pill {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    cursor: pointer;
    height: 22px;
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    text-transform: uppercase;
}

.section-pill.active {
    background: #dc3545;
}

/* Индикатор загрузки */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    z-index: 1000;
    text-align: center;
    background: rgba(0,0,0,0.7);
    padding: 10px;
}

.loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto 6px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== АНИМАЦИИ И ЭФФЕКТЫ ===== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.price-table tr {
    animation: fadeIn 0.3s ease;
}

/* Панель истории */
.history-panel {
    margin-top: 24px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    background: #f8f9fc;
}

.history-item {
    padding: 12px;
    border-left: 3px solid #dee2e6;
    margin-bottom: 8px;
    background: white;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    background: rgba(52, 152, 219, 0.05);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item.type-update { border-left-color: #3498db; }
.history-item.type-upload { border-left-color: #27ae60; }
.history-item.type-error { border-left-color: #e74c3c; }

.history-content {
    flex: 1;
}

.history-action {
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
}

.history-time {
    font-size: 11px;
    color: #7f8c8d;
    white-space: nowrap;
    margin-left: 12px;
}

/* Статусные индикаторы */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-active { 
    background: #27ae60;
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.3);
}

.status-warning { 
    background: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

.status-error { 
    background: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}

.header-contacts{
    font-size: 16px;
}

header,footer{
    font-family: "Raleway", sans-serif;
    font-size: 16px;
}

/* Компоненты */
.component-code {
    font-family: 'Courier New', monospace;
    background: rgba(52, 73, 94, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #2c3e50;
}

/* Категории и статусы */
.category-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    color: white;
}

.profiles { background: #3498db; }
.shelves { background: #2ecc71; }
.rods { background: #9b59b6; }
.drawers { background: #e67e22; }
.mounting { background: #e74c3c; }
.hardware { background: #34495e; }
.lighting { background: #f1c40f; color: #2c3e50; }
.other { background: #95a5a6; }

/* ===== АДАПТИВНОСТЬ ===== */

/* Маленькие ноутбуки */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 260px 1fr 240px;
    }
}

/* Планшеты */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 220px 1fr 200px;
        gap: 8px;
        padding: 8px;
    }
    
    #view-3d {
        height: 500px;
    }
}

/* Большие телефоны */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .left-panel,
    .center-panel,
    .right-panel {
        width: 100%;
    }
    
    #view-3d {
        height: 400px;
    }
    
    .canvas-container {
        min-height: 400px;
    }

}

/* Телефоны */
@media (max-width: 576px) {
    .container {
        padding: 6px;
        gap: 6px;
    }
    
    .left-panel,
    .right-panel,
    .control-section {
        padding: 10px;
    }
    
    .module-type,
    .mounting-options {
        grid-template-columns: 1fr;
    }
    
    #view-3d {
        height: 350px;
    }
    
    .canvas-container {
        min-height: 350px;
    }
    
    .spec-actions {
        flex-direction: column;
    }
    
    .spec-actions button {
        width: 100%;
    }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
    #view-3d {
        height: 300px;
    }
    
    .canvas-container {
        min-height: 300px;
    }
    
    h1 {
        font-size: 16px;
    }
    
    .control-title {
        font-size: 12px;
    }
}

/* Touch устройства */
@media (hover: none) and (pointer: coarse) {
    button,
    .module-btn,
    .mounting-btn {
        height: 28px;
        padding: 6px;
        font-size: 12px;
    }
    
    input,
    select {
        height: 28px;
        font-size: 12px;
        padding: 4px 6px;
    }
    
    .section-pill {
        height: 24px;
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Печать */
@media print {
    .left-panel,
    .right-panel,
    .visualizer-controls,
    .spec-actions,
    button,
    .logo {
        display: none !important;
    }
    
    .container {
        grid-template-columns: 1fr;
    }
    
    .center-panel {
        grid-column: 1;
    }
    
    .specification-box {
        border: 1px solid #000;
    }
    
    .spec-table th {
        background: #000 !important;
        color: white !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ СТИЛИ ===== */

.small-input {
    padding: 8px 12px;
    font-size: 13px;
    height: 36px;
}

.small-select {
    padding: 8px 12px;
    font-size: 13px;
    height: 36px;
}

/* Табличные кнопки (для действий в таблице) */
.table-action-btn {
    padding: 4px 8px;
    font-size: 10px;
    height: 22px;
    min-width: 60px;
    margin: 2px;
}

/* Кнопки с иконками без текста */
.btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px !important;
    padding: 0 !important;
    justify-content: center;
}

.btn-icon-sm {
    width: 26px;
    height: 26px;
    min-width: 26px !important;
    padding: 0 !important;
    justify-content: center;
}

.btn-icon-xs {
    width: 22px;
    height: 22px;
    min-width: 22px !important;
    padding: 0 !important;
    justify-content: center;
    font-size: 9px !important;
}

/* Стили для загрузки */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

/* Custom scrollbar */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Уведомления */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 10000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    transform: translateX(400px);
}

.custom-notification.show {
    transform: translateX(0);
}

/* Скрытые элементы */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

/* Утилиты */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.pull-left { float: left; }
.pull-right { float: right; }
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}