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

body {
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#root {
  width: 100%;
  height: 100%;
}

.app {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Canvas — занимает всё доступное пространство */
.canvas-container {
  flex: 1;
  height: 100%;
  position: relative;
  z-index: 1;
}

.canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Панель расчетов — поверх canvas слева */
.calculation-panel {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 330px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

/* Правое меню — фиксированная ширина */
.controls {
  width: 350px;
  min-width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 20px;
  z-index: 10;
  position: relative;
}

.calculation-header {
  padding: 12px 16px;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 8px 8px 0 0;
}

.calculation-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.calculation-content {
  padding: 16px;
}

.calculate-button {
  width: 100%;
  padding: 12px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.calculate-button:hover:not(:disabled) {
  background: #45a049;
}

.calculate-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.price-result {
  margin-top: 16px;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f0f8f0;
  border-radius: 6px;
}

.total-price span {
  font-size: 14px;
  color: #666;
}

.total-price strong {
  font-size: 20px;
  color: #2e7d32;
}

.toggle-details {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  color: #666;
}

.toggle-details:hover {
  background: #f5f5f5;
}

.price-details {
  margin-top: 12px;
}

.details-section {
  margin-bottom: 12px;
}

.details-section h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #666;
}

.detail-total {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  margin-top: 4px;
  border-top: 1px solid #eee;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* ===== ПРАВОЕ МЕНЮ (CONTROLS) ===== */
.controls {
  position: absolute;
  right: 0;
  top: 0;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 20px;
  z-index: 10;
}

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

.controls-header h3 {
  font-size: 18px;
  color: #333;
}

.section {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  width: 100%;
  padding: 15px;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  transition: background 0.3s;
}

.section-header:hover {
  background: #e9ecef;
}

.arrow {
  font-size: 12px;
}

.section-content {
  padding: 15px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

.control-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.menu-button {
  padding: 10px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s;
}

.menu-button:hover {
  background: #5a67d8;
}

.menu-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.expand-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 14px;
  z-index: 10;
}

/* ===== ГЛОБАЛЬНОЕ МЕНЮ ===== */
.global-menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.global-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.global-section h4 {
  margin: 0;
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wall-dimensions {
  display: flex;
  gap: 10px;
}

.dimension-field {
  flex: 0 0 auto;
  display: flex;
  width: auto;
  flex-direction: column;
  gap: 4px;
}
.dimension-field input {
  width: 133px;
}

.dimension-field label {
  font-size: 11px;
  color: #888;
}

/* Убрать стрелки из number input */
.dimension-field input[type="number"]::-webkit-inner-spin-button,
.dimension-field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dimension-field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.rebuild-buttons {
  display: flex;
  gap: 10px;
}

.rebuild-button {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}


.countertop-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.countertop-toggle {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
}

/* ===== МЕНЮ МОДУЛЕЙ ===== */
.module-menu {
  margin-bottom: 15px;
}

.module-category-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.category-tab {
  flex: 1;
  padding: 8px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.category-tab.active {
  background: #667eea;
  color: white;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}


.countertop-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.countertop-toggle {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
}

/* ===== МЕНЮ МОДУЛЕЙ ===== */
.module-menu {
  margin-bottom: 15px;
}

.module-category-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.category-tab {
  flex: 1;
  padding: 8px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.category-tab.active {
  background: #667eea;
  color: white;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.module-item:hover {
  background: #e9ecef;
}

.module-item.selected {
  background: #e3f2fd;
  border-color: #90caf9;
}

.module-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.module-icon {
  font-size: 20px;
}

.module-name {
  flex: 1;
  font-size: 14px;
  color: #333;
}

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

.module-add-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-label {
  font-size: 14px;
  color: #333;
}

/* ===== СВОЙСТВА МОДУЛЯ ===== */
.width-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.width-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.width-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #666;
}

.width-btn {
  padding: 8px 12px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.3s;
}
.width-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #eee;
}

.width-btn:hover {
  background: #e0e0e0;
}

.expand-left, .expand-right {
  background: #e8f5e9;
  border-color: #4caf50;
}

.shrink-left, .shrink-right {
  background: #fff3e0;
  border-color: #ff9800;
}

.snap-left, .snap-right {
  background: #e3f2fd;
  border-color: #2196f3;
  flex: 1;
}

.compact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 12px;
  color: #666;
}

.toggle-open-button {
  padding: 10px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.drawer-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-btn {
  padding: 10px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.drawer-btn.active {
  background: #667eea;
  color: white;
}

.gaps-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
}

.gap-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #333;
}

/* ===== СПИСОК МОДУЛЕЙ ===== */
.cabinet-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cabinet-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s;
}

.cabinet-item.selected {
  background: #e3f2fd;
  border: 1px solid #90caf9;
}
/* Кнопки PDF генератора */
.pdf-generator-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pdf-generate-button {
  background: #dc3545;  /* Красная */
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.pdf-generate-button:hover {
  background: #c82333;  /* Тёмно-красная */
}

.pdf-generate-button:disabled {
  background: #f8d7da;
  color: #721c24;
  cursor: not-allowed;
}

.pdf-save-button {
  background: #fd7e14;  /* Оранжевая */
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.pdf-save-button:hover {
  background: #e06b0d;  /* Тёмно-оранжевая */
}

.pdf-save-button:disabled {
  background: #ffe5d0;
  color: #856404;
  cursor: not-allowed;
}

/* Модальное окно — по центру экрана */
.pdf-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.pdf-preview-content {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 900px;
  height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.pdf-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.pdf-preview-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.pdf-preview-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.pdf-preview-close:hover {
  background: #f0f0f0;
  color: #333;
}

.pdf-preview-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.pdf-download-button {
  flex: 1;
  padding: 12px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.pdf-download-button:hover {
  background: #45a049;
}

.pdf-saved-info {
  margin-top: 12px;
  padding: 10px;
  background: #e8f5e9;
  border-radius: 8px;
  font-size: 18px;
  color: #2e7d32;
  text-align: center;
}

.pdf-save-error {
  margin-top: 12px;
  padding: 10px;
  background: #ffebee;
  border-radius: 4px;
  font-size: 13px;
  color: #c62828;
  text-align: center;
}
.apply-button {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Кнопка прозрачности */
.transparent-section {
  margin-bottom: 10px;
}

.transparent-button {
  width: 100%;
  padding: 12px;
  background: #f0f0f0;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: all 0.3s ease;
}

.transparent-button:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

.transparent-button.active {
  background: #4CAF50;
  border-color: #45a049;
  color: white;
}

.transparent-button.active:hover {
  background: #45a049;
  border-color: #3d8b40;
}

.transparent-icon {
  font-size: 18px;
}

.apply-button:hover {
  background: #45a049;
}
.replace-module-menu {
  animation: fadeIn 0.2s ease;
}

.replace-menu-item:hover {
  background: #f0f0f0;
}

.camera-info {
  padding: 10px;
  background: #f9f9f9;
  border-radius: 6px;
  font-family: monospace;
}

.camera-info h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.camera-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}

.camera-info-label {
  color: #888;
  font-weight: 500;
}

.camera-info-value {
  color: #333;
  font-weight: 600;
  background: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.camera-info {
  padding: 10px;
  background: #f9f9f9;
  border-radius: 6px;
  font-family: monospace;
}

.camera-info h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.camera-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}

.camera-info-label {
  color: #888;
  font-weight: 500;
}

.camera-info-value {
  color: #333;
  font-weight: 600;
  background: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
}

.camera-setting-group {
  margin-bottom: 10px;
}

.camera-setting-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #555;
}

.camera-setting-group input[type="range"] {
  width: 100%;
  margin: 0;
}

.camera-setting-group input[type="number"] {
  width: 100%;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
}

.camera-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.camera-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.apply-camera-button {
  width: 100%;
  padding: 8px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 10px;
}

.apply-camera-button:hover {
  background: #45a049;
}

.reset-camera-button {
  width: 100%;
  padding: 8px;
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 5px;
}

.reset-camera-button:hover {
  background: #e0e0e0;
}

.min-price-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 10px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
}
.advantages-section {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border-radius: 20px;
  padding: 14px;
 box-shadow: 
  10px 10px 20px rgba(180, 100, 40, 0.15),
  -10px -10px 20px rgba(255, 255, 255, 0.35),  /* ← Уменьшено с 0.8 до 0.35 */
  inset 1px 1px 2px rgba(255, 255, 255, 0.3),
  inset -1px -1px 2px rgba(180, 100, 40, 0.1);
}

.advantages-title {
  font-size: 14px;
  font-weight: 700;
  color: #8B4513;
  margin: 0 0 10px 0;
  text-align: center;
  letter-spacing: 0.5px;
}

.advantages-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.advantage-card {
  background: linear-gradient(145deg, #FFF8F0, #FFE4CC);
  border: none;
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 110px;
  text-align: center;
  position: relative;
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.2),      /* Тёмная тень справа-снизу */
    -8px -8px 16px rgba(255, 255, 255, 0.6),   /* Светлая тень слева-сверху */
    inset 2px 2px 4px rgba(255, 255, 255, 0.7), /* Внутренняя светлая сверху */
    inset -2px -2px 4px rgba(180, 100, 40, 0.15); /* Внутренняя тёмная снизу */
}

.advantage-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(145deg, #FFF0E0, #FFDCC0);
  box-shadow: 
    12px 12px 24px rgba(180, 100, 40, 0.25),    /* Усиленная тёмная */
    -12px -12px 24px rgba(255, 255, 255, 0.7),  /* Усиленная светлая */
    inset 3px 3px 6px rgba(255, 255, 255, 0.8), /* Усиленная внутренняя светлая */
    inset -3px -3px 6px rgba(180, 100, 40, 0.2); /* Усиленная внутренняя тёмная */
}

.advantage-card:active {
  transform: translateY(1px);
  box-shadow: 
    inset 4px 4px 8px rgba(180, 100, 40, 0.25),  /* Вдавленный эффект */
    inset -4px -4px 8px rgba(255, 255, 255, 0.5);
}

.advantage-card.active {
  background: linear-gradient(145deg, #FFDCC0, #F0C8A0);
  box-shadow: 
    inset 3px 3px 6px rgba(180, 100, 40, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.advantage-icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.advantage-title {
  font-size: 11px;
  font-weight: 700;
  color: #8B4513;
  margin: 0 0 4px 0;
}

.advantage-description {
  font-size: 9px;
  color: #A0522D;
  margin: 0;
  line-height: 1.3;
}

.advantage-video-container {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 250px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.3),
    -6px -6px 12px rgba(255, 255, 255, 0.5);
}

.advantage-video {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПРЕИМУЩЕСТВ ===== */

/* Tablet */
@media (max-width: 1024px) {
  .advantages-section {
    padding: 12px;
    border-radius: 16px;
  }
  
  .advantages-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .advantage-card {
    width: 100px;
    padding: 8px 6px;
  }
  
  .advantage-icon {
    font-size: 20px;
  }
  
  .advantage-title {
    font-size: 10px;
  }
  
  .advantage-description {
    font-size: 8px;
  }
}

.unfold-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unfold-container {
  background: white;
  border-radius: 8px;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
}

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

.unfold-header h2 {
  margin: 0;
  font-size: 18px;
}

.unfold-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.unfold-close:hover {
  color: #f44336;
}

.unfold-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 10px 16px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  z-index: 100;
}

.unfold-button:hover {
  background: #1976D2;
}
.unfold-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unfold-container {
  background: white;
  border-radius: 8px;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.unfold-header h2 {
  margin: 0;
  font-size: 18px;
}

.unfold-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.unfold-close:hover {
  color: #f44336;
}

.unfold-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

.unfold-content canvas {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

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

/* Большие мониторы (1920px+) */
@media (min-width: 1920px) {
  .controls {
    width: 320px;
  }
  
  .calculation-panel {
    width: 300px;
  }
}

/* Стандартные мониторы (1366px - 1919px) */
@media (min-width: 1366px) and (max-width: 1919px) {
  .controls {
    width: 280px;
  }
  
  .calculation-panel {
    width: 260px;
  }
}

/* Ноутбуки (1024px - 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
  .controls {
    width: 240px;
    font-size: 12px;
  }
  
  .calculation-panel {
    width: 220px;
    font-size: 12px;
  }
  
  .canvas-container {
    flex: 1;
  }
}

/* Планшеты (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .controls {
    width: 200px;
    font-size: 11px;
  }
  
  .calculation-panel {
    width: 200px;
    font-size: 11px;
  }
  
  .section-header {
    font-size: 12px;
  }
}

/* Мобильные (< 768px) */
@media (max-width: 767px) {
  .app {
    flex-direction: column;
  }
  
  .canvas-container {
    order: 1;
    height: 50vh;
  }
  
  .controls {
    order: 2;
    width: 100%;
    max-height: 30vh;
    overflow-y: auto;
    font-size: 11px;
  }
  
  .calculation-panel {
    order: 3;
    width: 100%;
    max-height: 20vh;
    overflow-y: auto;
    font-size: 11px;
  }
  

  
  .menu-button {
    padding: 6px 10px;
    font-size: 11px;
  }
}
.transparent-button.active {
  background: #2196F3;
  border-color: #1976D2;
  color: white;
}
/* Кнопки цветов фасадов */
.color-section {
  margin-bottom: 10px;
}

.color-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px 0;
}






/* ===== ЦВЕТА ФАСАДОВ, GOLA, СТОЛЕШНИЦЫ ===== */




.countertop-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.countertop-toggle {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
}
/* ===== ЦВЕТА ФАСАДОВ, GOLA, СТОЛЕШНИЦЫ ===== */

.color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.color-input {
  width: 40px;
  height: 40px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
  background: white;
  transition: border-color 0.2s;
}

.color-input:hover {
  border-color: #2196F3;
}

.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 2px solid #ddd;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: #999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-swatch.active {
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.4);
}

.color-swatch.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.toggle-open-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #ccc;
}

/* ===== НЕЙРОМОРФИЗМ ПАНЕЛЬ РАСЧЕТА ===== */

.calculation-panel {
  position: absolute;
  left: 30px;
  top: 30px;
  width: 320px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border-radius: 24px;
  box-shadow: 
    12px 12px 24px rgba(180, 100, 40, 0.15),
    -12px -12px 24px rgba(255, 255, 255, 0.8),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -1px -1px 2px rgba(180, 100, 40, 0.1);
  z-index: 100;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}

.calculation-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #8B4513;
  text-align: center;
  letter-spacing: 0.5px;
}

.calculate-button {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(145deg, #FF8C42, #F97316);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.2),
    -4px -4px 8px rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.calculate-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.25),
    -6px -6px 12px rgba(255, 255, 255, 0.8);
  background: linear-gradient(145deg, #FF7A2F, #E8650F);
}

.calculate-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 
    4px 4px 8px rgba(180, 100, 40, 0.2),
    -2px -2px 4px rgba(255, 255, 255, 0.6);
}

.calculate-button:disabled {
  background: linear-gradient(145deg, #D4A574, #C8956C);
  cursor: not-allowed;
  opacity: 0.7;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(145deg, #FFF8F0, #FFE4CC);
  border-radius: 16px;
  box-shadow: 
    inset 4px 4px 8px rgba(180, 100, 40, 0.1),
    inset -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.total-price span {
  font-size: 14px;
  color: #A0522D;
  font-weight: 600;
}

.total-price strong {
  font-size: 24px;
  color: #E8650F;
  font-weight: 800;
}

.pdf-generator {
  width: 100%;
}

.pdf-generator-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}

.pdf-generate-button,
.pdf-save-button {
  flex: 1;
  min-width: 0;
  padding: 14px 10px;
  border: none;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-generate-button {
  background: linear-gradient(145deg, #FFB347, #FF9500);
  color: white;
  box-shadow: 
    6px 6px 12px rgba(180, 100, 40, 0.2),
    -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.pdf-generate-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #FFA235, #F58900);
}

.pdf-save-button {
  background: linear-gradient(145deg, #FF6B35, #F5561E);
  color: white;
  box-shadow: 
    6px 6px 12px rgba(180, 100, 40, 0.25),
    -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.pdf-save-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #FF5A24, #E54A12);
}

.pdf-generate-button:disabled,
.pdf-save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.min-price-warning {
  background: linear-gradient(145deg, #FFF3E0, #FFE0B2);
  border: 1px solid #FF9800;
  color: #E65100;
  padding: 12px;
  border-radius: 12px;
  margin: 0;
  font-size: 13px;
  text-align: center;
  font-weight: 600;
}

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

/* Desktop (1080px+) */
@media (min-width: 1081px) {
  .calculation-panel {
    width: 330px;
    padding: 24px;
  }
}

/* Laptop (≤1080px) */
@media (max-width: 1080px) {
  .calculation-panel {
    width: 280px;
    padding: 20px;
    left: 20px;
    top: 20px;
    gap: 14px;
  }
  
  .calculate-button {
    padding: 14px 20px;
    font-size: 14px;
  }
  
  .total-price strong {
    font-size: 20px;
  }
  
  .pdf-generate-button,
  .pdf-save-button {
    padding: 12px 8px;
    font-size: 11px;
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .calculation-panel {
    width: 260px;
    padding: 16px;
    left: 16px;
    top: 16px;
    border-radius: 20px;
    gap: 12px;
  }
  
  .calculation-title {
    font-size: 16px;
  }
  
  .calculate-button {
    padding: 12px 16px;
    font-size: 13px;
  }
  
  .total-price {
    padding: 16px;
  }
  
  .total-price strong {
    font-size: 18px;
  }
  
  .pdf-generator-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .pdf-generate-button,
  .pdf-save-button {
    padding: 10px 12px;
    font-size: 12px;
    width: 100%;
  }
}

/* ===== НОВЫЙ САЙДБАР ===== */

.sidebar {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  max-height: 90vh;
}

/* Иконки сайдбара */
.sidebar-icons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 12px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border-radius: 20px;
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.15),
    -10px -10px 20px rgba(255, 255, 255, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.sidebar-icon {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFF8F0, #FFE4CC);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 
    6px 6px 12px rgba(180, 100, 40, 0.2),
    -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.sidebar-icon:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #FFF0E0, #FFDCC0);
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.25),
    -5px -5px 10px rgba(255, 255, 255, 0.8);
}

.sidebar-icon:active {
  transform: translateY(1px);
  box-shadow: 
    inset 4px 4px 8px rgba(180, 100, 40, 0.25),
    inset -2px -2px 4px rgba(255, 255, 255, 0.5);
}

.sidebar-icon.active {
  background: linear-gradient(145deg, #FFDCC0, #F0C8A0);
  box-shadow: 
    inset 4px 4px 8px rgba(180, 100, 40, 0.3),
    inset -2px -2px 4px rgba(255, 255, 255, 0.6);
}

/* Содержимое сайдбара */
.sidebar-content {
  width: 340px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border-radius: 20px;
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.15),
    -10px -10px 20px rgba(255, 255, 255, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #8B4513;
  text-align: center;
  letter-spacing: 0.5px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-group label {
  font-size: 12px;
  font-weight: 700;
  color: #A0522D;
  letter-spacing: 0.3px;
}

.sidebar-text {
  margin: 0;
  font-size: 13px;
  color: #8B4513;
  font-weight: 600;
  text-align: center;
  padding: 20px 0;
}

/* Кнопка раскрытия */
.expand-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 20px;
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border: none;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 
    5px 5px 10px rgba(180, 100, 40, 0.2),
    -3px -3px 6px rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.expand-button:hover {
  transform: translateY(-50%) translateY(-2px);
  box-shadow: 
    7px 7px 14px rgba(180, 100, 40, 0.25),
    -4px -4px 8px rgba(255, 255, 255, 0.8);
}

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

/* Desktop (1920px+) */
@media (min-width: 1920px) {
  .sidebar {
    right: 30px;
    gap: 16px;
  }
  
  .sidebar-content {
    width: 380px;
    padding: 24px;
  }
  
  .sidebar-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

/* Laptop (1081px - 1919px) */
@media (min-width: 1081px) and (max-width: 1919px) {
  .sidebar {
    right: 20px;
  }
  
  .sidebar-content {
    width: 340px;
  }
}

/* Small Laptop (1025px - 1080px) */
@media (min-width: 1025px) and (max-width: 1080px) {
  .sidebar {
    right: 15px;
    gap: 10px;
  }
  
  .sidebar-content {
    width: 300px;
    padding: 16px;
  }
  
  .sidebar-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .sidebar {
    right: 10px;
    gap: 8px;
  }
  
  .sidebar-icons {
    padding: 12px 8px;
    gap: 8px;
    border-radius: 16px;
  }
  
  .sidebar-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 10px;
  }
  
  .sidebar-content {
    width: 280px;
    max-height: 80vh;
    padding: 14px;
    border-radius: 16px;
    gap: 12px;
  }
  
  .sidebar-section h3 {
    font-size: 14px;
  }
  
  .sidebar-section {
    gap: 10px;
  }
  
  .sidebar-group {
    gap: 6px;
  }
  
  .sidebar-group label {
    font-size: 11px;
  }
}


.panel-collapse-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(145deg, #FFE8D6, #F5D5B8);
  color: #8B4513;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 
    4px 4px 8px rgba(180, 100, 40, 0.2),
    -3px -3px 6px rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.panel-collapse-btn:hover {
  background: linear-gradient(145deg, #FFDCC0, #F0C8A0);
  transform: scale(1.1);
}

.panel-collapse-btn:active {
  box-shadow: 
    inset 3px 3px 6px rgba(180, 100, 40, 0.25),
    inset -2px -2px 4px rgba(255, 255, 255, 0.5);
  transform: scale(0.95);
}

/* Свёрнутая панель расчета */
.calculation-collapsed {
  position: absolute;
  left: 30px;
  top: 30px;
  padding: 12px 20px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #8B4513;
  cursor: pointer;
  z-index: 100;
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.15),
    -8px -8px 16px rgba(255, 255, 255, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.calculation-collapsed:hover {
  transform: translateY(-2px);
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.2),
    -10px -10px 20px rgba(255, 255, 255, 0.4);
}

/* Свёрнутая панель преимуществ */
.advantages-collapsed {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #8B4513;
  cursor: pointer;
  z-index: 90;
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.15),
    -8px -8px 16px rgba(255, 255, 255, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.advantages-collapsed:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.2),
    -10px -10px 20px rgba(255, 255, 255, 0.4);
}

/* ===== АДАПТИВНОСТЬ ПАНЕЛИ РАСЧЕТА ===== */

/* Desktop (1920px+) */
@media (min-width: 1920px) {
  .calculation-panel {
    width: 380px;
    padding: 28px;
    left: 40px;
    top: 40px;
  }
  
  .calculation-title {
    font-size: 20px;
  }
  
  .calculate-button {
    padding: 18px 28px;
    font-size: 16px;
  }
  
  .total-price strong {
    font-size: 28px;
  }
  
  .calculation-collapsed {
    left: 40px;
    top: 40px;
  }
}

/* Standard Desktop (1366px - 1919px) */
@media (min-width: 1366px) and (max-width: 1919px) {
  .calculation-panel {
    width: 340px;
  }
}

/* Laptop (1025px - 1365px) */
@media (min-width: 1025px) and (max-width: 1365px) {
  .calculation-panel {
    width: 300px;
    padding: 20px;
    left: 20px;
    top: 20px;
    gap: 14px;
  }
  
  .calculation-title {
    font-size: 16px;
  }
  
  .calculate-button {
    padding: 14px 20px;
    font-size: 14px;
  }
  
  .total-price strong {
    font-size: 20px;
  }
  
 /* Свёрнутая панель расчета */
.calculation-collapsed {
  position: absolute;
  left: 30px;
  top: 30px;
  padding: 12px 20px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #8B4513;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.15),
    -8px -8px 16px rgba(255, 255, 255, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.calculation-collapsed:hover {
  transform: translateY(-2px);
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.2),
    -10px -10px 20px rgba(255, 255, 255, 0.4);
}

.calculation-collapsed:active {
  transform: translateY(0);
  box-shadow: 
    inset 4px 4px 8px rgba(180, 100, 40, 0.15),
    inset -2px -2px 4px rgba(255, 255, 255, 0.5);
}

/* Свёрнутая панель преимуществ */
.advantages-collapsed {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #8B4513;
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 
    8px 8px 16px rgba(180, 100, 40, 0.15),
    -8px -8px 16px rgba(255, 255, 255, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.advantages-collapsed:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 
    10px 10px 20px rgba(180, 100, 40, 0.2),
    -10px -10px 20px rgba(255, 255, 255, 0.4);
}

.advantages-collapsed:active {
  transform: translateX(-50%) translateY(0);
  box-shadow: 
    inset 4px 4px 8px rgba(180, 100, 40, 0.15),
    inset -2px -2px 4px rgba(255, 255, 255, 0.5);
}
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .calculation-panel {
    width: 260px;
    padding: 16px;
    left: 16px;
    top: 16px;
    border-radius: 20px;
    gap: 12px;
  }
  
  .calculation-title {
    font-size: 14px;
  }
  
  .calculate-button {
    padding: 12px 16px;
    font-size: 13px;
  }
  
  .total-price {
    padding: 14px;
  }
  
  .total-price span {
    font-size: 12px;
  }
  
  .total-price strong {
    font-size: 18px;
  }
  
  .pdf-generator-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .pdf-generate-button,
  .pdf-save-button {
    padding: 10px 12px;
    font-size: 12px;
    width: 100%;
  }
  
  .calculation-collapsed {
    left: 16px;
    top: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }
}


/* ===== АДАПТИВНОСТЬ ПАНЕЛИ ПРЕИМУЩЕСТВ ===== */

/* Desktop (1920px+) */
@media (min-width: 1920px) {
  .advantages-section {
    padding: 20px;
    border-radius: 24px;
  }
  
  .advantages-title {
    font-size: 16px;
    margin-bottom: 14px;
  }
  
  .advantage-card {
    width: 130px;
    padding: 12px 10px;
  }
  
  .advantage-icon {
    font-size: 26px;
  }
  
  .advantage-title {
    font-size: 13px;
  }
  
  .advantage-description {
    font-size: 10px;
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .advantages-section {
    padding: 12px;
    border-radius: 16px;
    bottom: 16px;
  }
  
  .advantages-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .advantage-card {
    width: 100px;
    padding: 8px 6px;
  }
  
  .advantage-icon {
    font-size: 20px;
  }
  
  .advantage-title {
    font-size: 10px;
  }
  
  .advantage-description {
    font-size: 8px;
  }
  
  .advantages-collapsed {
    padding: 10px 18px;
    font-size: 13px;
  }
}

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

html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ МЕНЕДЖЕРА (/manager) ===== */

.manager-page {
  min-height: 100vh;
  background: #f5f5f5;
  overflow-y: auto;
}

.manager-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: #2c3e50;
  color: #fff;
}

.manager-page-header h1 {
  margin: 0;
  font-size: 24px;
}

.manager-back {
  padding: 8px 16px;
  background: #34495e;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.manager-back:hover {
  background: #3d566e;
}

.manager-page-content {
  display: flex;
  height: calc(100vh - 80px);
}

/* Сайдбар со списком заказов */
.manager-sidebar {
  width: 350px;
  min-width: 350px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 20px;
  overflow-y: auto;
}

.manager-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.manager-filters select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.manager-refresh {
  padding: 8px 12px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.manager-refresh:hover {
  background: #2980b9;
}

.manager-error {
  padding: 10px;
  background: #ffebee;
  border-radius: 4px;
  color: #c62828;
  font-size: 13px;
  margin-bottom: 12px;
}

.manager-loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

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

.manager-empty {
  text-align: center;
  padding: 40px;
  color: #999;
}

.manager-order-item {
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.manager-order-item:hover {
  border-color: #3498db;
  background: #f8f9fa;
}

.manager-order-item.selected {
  border-color: #3498db;
  background: #e3f2fd;
}

.manager-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.manager-order-number {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.manager-order-status {
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.manager-order-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}

/* Основная область с деталями */
.manager-main {
  flex: 1;
  padding: 20px 40px;
  overflow-y: auto;
}

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

.manager-order-details-header {
  margin-bottom: 20px;
}

.manager-order-details-header h2 {
  margin: 0;
  font-size: 22px;
  color: #333;
}

.manager-order-details-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
}

.manager-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.manager-detail-row select {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.manager-config {
  margin-top: 20px;
}

.manager-config h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #555;
}

.manager-table {
  width: 100%;
  border-collapse: collapse;
}

.manager-table th,
.manager-table td {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  text-align: left;
  font-size: 13px;
}

.manager-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.manager-details-actions {
  margin-top: 20px;
}

.manager-download-pdf {
  width: 100%;
  padding: 12px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.manager-download-pdf:hover {
  background: #229954;
}

/* Страница "Доступ запрещен" */
.manager-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background: #f5f5f5;
}

.manager-denied h1 {
  font-size: 36px;
  color: #c62828;
  margin-bottom: 16px;
}

.manager-denied p {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
}

.manager-denied button {
  padding: 12px 24px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.manager-denied button:hover {
  background: #34495e;
}
.manager-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 13px;
}

.manager-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #ddd;
  display: inline-block;
}/* src/styles/mobile.css */
/* ===== МОБИЛЬНАЯ ВЕРСИЯ (< 768px) ===== */

@media (max-width: 767px) {
  
  /* Canvas на весь экран */
  .app {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .canvas-container {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100% !important;
    z-index: 1;
  }
  
  /* Все панели поверх canvas */
  .calculation-panel,
  .calculation-collapsed,
  .advantages-section,
  .advantages-collapsed,
  .sidebar,
  .expand-button,
  .mobile-contours-btn,
  .mobile-transparent-btn {
    position: fixed !important;
    z-index: 100;
  }
  
  /* ===== SIDEBAR → BOTTOM NAVIGATION BAR ===== */
  
  .sidebar {
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    transform: none;
    flex-direction: column-reverse;
    gap: 0;
    max-height: none;
    align-items: stretch;
    z-index: 100;
  }
  
  .sidebar-icons {
    display: flex;
    flex-direction: row;
    padding: 8px 6px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    gap: 6px;
    border-radius: 20px 20px 0 0;
    justify-content: space-around;
    align-items: center;
    flex-wrap: nowrap;
    background: linear-gradient(180deg, #FFE8D6, #F5D5B8);
    box-shadow: 
      0 -6px 16px rgba(180, 100, 40, 0.15),
      inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  }
  
  /* Скрываем иконки контуров, прозрачности и камеры в навигации */
  .sidebar-icon.icon-contours,
  .sidebar-icon.icon-transparent,
  .sidebar-icon.icon-camera {
    display: none !important;
  }
  
  .sidebar-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 22px;
    border-radius: 14px;
    flex-shrink: 0;
  }
  
  /* Меню - половина экрана */
  .sidebar-content {
    width: 100%;
    max-height: 50vh;
    padding: 16px;
    border-radius: 20px 20px 0 0;
    box-shadow: 
      0 -8px 24px rgba(180, 100, 40, 0.25);
    margin-right: 0;
    margin-bottom: -1px;
  }
  
  .sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  
  .sidebar-section {
    gap: 12px;
  }
  
  .sidebar-group {
    gap: 8px;
  }
  
  .sidebar-group label {
    font-size: 12px;
  }
  
  .sidebar-button {
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 12px;
    min-height: 44px;
  }
  
  .sidebar-module-item {
    padding: 12px 14px;
    font-size: 13px;
    min-height: 44px;
  }
  
  .sidebar-color {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  
  .sidebar-buttons-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .sidebar-buttons-row {
    gap: 8px;
  }
  
  .sidebar-inputs input {
    padding: 12px 10px;
    font-size: 14px;
    min-height: 44px;
  }
  
  /* ===== ВЕРХНИЕ КРУГЛЫЕ КНОПКИ - ПРАВЫЙ ВЕРХ ===== */
  
  .mobile-contours-btn {
    position: fixed !important;
    top: max(16px, env(safe-area-inset-top));
    right: 78px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
    color: #8B4513;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
      6px 6px 12px rgba(180, 100, 40, 0.2),
      -4px -4px 8px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 200;
  }
  
  .mobile-contours-btn.active {
    background: linear-gradient(145deg, #FFDCC0, #F0C8A0);
    box-shadow: 
      inset 4px 4px 8px rgba(180, 100, 40, 0.3),
      inset -2px -2px 4px rgba(255, 255, 255, 0.6);
  }
  
  .mobile-transparent-btn {
    position: fixed !important;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
    color: #8B4513;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
      6px 6px 12px rgba(180, 100, 40, 0.2),
      -4px -4px 8px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 200;
  }
  
  .mobile-transparent-btn.active {
    background: linear-gradient(145deg, #FFDCC0, #F0C8A0);
    box-shadow: 
      inset 4px 4px 8px rgba(180, 100, 40, 0.3),
      inset -2px -2px 4px rgba(255, 255, 255, 0.6);
  }
  
  /* ===== СВЁРНУТЫЕ КНОПКИ В ЛЕВОМ ВЕРХНЕМ УГЛУ ===== */
  
  .calculation-collapsed {
    position: fixed !important;
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
    bottom: auto;
    right: auto;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
    color: #8B4513;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
      6px 6px 12px rgba(180, 100, 40, 0.2),
      -4px -4px 8px rgba(255, 255, 255, 0.7);
    overflow: hidden;
    padding: 0;
    transform: none;
    z-index: 200;
  }
  
  .calculation-collapsed .collapse-text {
    display: none;
  }
  
  .advantages-collapsed {
    position: fixed !important;
    top: max(16px, env(safe-area-inset-top));
    left: 78px;
    bottom: auto;
    right: auto;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFF5EE, #FFE8D6);
    color: #8B4513;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
      6px 6px 12px rgba(180, 100, 40, 0.2),
      -4px -4px 8px rgba(255, 255, 255, 0.7);
    overflow: hidden;
    padding: 0;
    transform: none;
    z-index: 200;
  }
  
  .advantages-collapsed .collapse-text {
    display: none;
  }
  
  /* ===== КНОПКА РАСКРЫТИЯ САЙДБАРА ===== */
  
  .expand-button {
    position: fixed !important;
    top: auto;
    bottom: 80px;
    right: 16px;
    transform: none;
    width: 48px;
    height: 48px;
    font-size: 22px;
    border-radius: 14px;
    z-index: 99;
  }
  
  /* ===== РАЗВЁРНУТАЯ ПАНЕЛЬ РАСЧЕТА ===== */
  
  .calculation-panel {
    position: fixed !important;
    bottom: 72px;
    left: 8px;
    right: 8px;
    top: auto;
    width: auto;
    border-radius: 20px;
    padding: 16px;
    gap: 10px;
    max-height: 45vh;
    overflow-y: auto;
    z-index: 95;
  }
  
  .calculation-title {
    font-size: 15px;
  }
  
  .calculate-button {
    padding: 14px 16px;
    font-size: 14px;
    min-height: 48px;
  }
  
  .total-price {
    padding: 14px;
  }
  
  .total-price span {
    font-size: 13px;
  }
  
  .total-price strong {
    font-size: 20px;
  }
  
  .pdf-generator-buttons {
    flex-direction: row;
    gap: 8px;
  }
  
  .pdf-generate-button,
  .pdf-save-button {
    padding: 12px 8px;
    font-size: 12px;
    min-height: 44px;
    border-radius: 12px;
  }
  
  /* ===== РАЗВЁРНУТАЯ ПАНЕЛЬ ПРЕИМУЩЕСТВ ===== */
  
  .advantages-section {
    position: fixed !important;
    bottom: 72px;
    left: 8px;
    right: 8px;
    top: auto;
    transform: none;
    width: auto;
    padding: 12px;
    border-radius: 20px;
    max-height: 45vh;
    overflow-y: auto;
    z-index: 95;
  }
  
  .advantages-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .advantages-grid {
    gap: 6px;
  }
  
  .advantage-card {
    width: calc(50% - 3px);
    padding: 10px 8px;
    border-radius: 12px;
    min-height: 60px;
  }
  
  .advantage-icon {
    font-size: 20px;
    margin-bottom: 4px;
  }
  
  .advantage-title {
    font-size: 11px;
    margin-bottom: 2px;
  }
  
  .advantage-description {
    display: none;
  }
  
  /* ===== ВИДЕО ПРЕИМУЩЕСТВ НА МОБИЛЬНЫХ ===== */
  
  .advantage-video-container {
    position: fixed !important;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 340px;
    z-index: 1000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
      0 12px 32px rgba(180, 100, 40, 0.4);
  }
  
  .advantage-video {
    width: 100%;
    height: auto;
    display: block;
  }
  
  /* ===== КНОПКИ СВОРАЧИВАНИЯ ===== */
  
  .panel-collapse-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 12px;
    border-radius: 8px;
  }
  
 /* ===== МОДАЛЬНОЕ ОКНО PDF (МОБИЛЬНЫЕ) ===== */

.pdf-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;  /* ← Центрируем по вертикали */
  justify-content: center;
  z-index: 10000;
  padding: 12px;
  padding-top: max(80px, calc(env(safe-area-inset-top) + 64px)); /* ← Отступ сверху */
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.pdf-preview-content {
  width: 100%;
  max-width: 500px;
  height: auto;
  max-height: none;  /* ← Убираем ограничение по высоте */
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;  /* ← Отступ снизу */
}

.pdf-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 0;
}

.pdf-preview-header h3 {
  font-size: 16px;
  margin: 0;
}

.pdf-preview-close {
  width: 32px;
  height: 32px;
  font-size: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

/* iframe с PDF */
.pdf-preview-content iframe {
  width: 100% !important;
  height: 300px !important;  /* ← Фиксированная высота */
  border: none;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

/* Кнопка скачивания - ВСЕГДА ВИДНА */
.pdf-preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  flex-shrink: 0;  /* ← Не сжимается */
}

.pdf-download-button {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  min-height: 48px;
  background: #4CAF50;
  color: #fff;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.pdf-download-button:active {
  background: #3d8b40;
}
}