/**
 * components.css
 * Компонентные стили: база данных, поставщики, аналитика,
 * планирование, календарь, share dropdown, tooltips, анимации, print
 */

/* ===== DATABASE LIST ===== */
/* ===== КАРТОЧКИ ПОСТАВЩИКОВ ===== */
.supplier-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  background: white;
}
.supplier-card:hover {
  box-shadow: var(--shadow);
}
.supplier-card-info { flex: 1; min-width: 0; }
.supplier-card-name {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.supplier-card-fullname {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.supplier-card-contacts {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.supplier-contact-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #999;
  font-weight: 600;
}
.supplier-contact-badge.filled-whatsapp {
  background: #dcf8c6;
  color: #25D366;
}
.supplier-contact-badge.filled-telegram {
  background: #d6eefb;
  color: #0088cc;
}
.supplier-contact-badge.filled-viber {
  background: #ece6fd;
  color: #7360f2;
}
.supplier-contact-badge.filled-email {
  background: #fdf0e0;
  color: #c77800;
}
.supplier-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

#databaseList, #supplierList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.db-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  background: white;
}

.db-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.db-card-info {
  flex: 1;
  min-width: 0;
}

.db-card-sku {
  font-weight: 700;
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.3px;
}

.db-card-name {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  margin: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-card-supplier {
  font-size: 11px;
  color: var(--text-muted);
}

.db-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  #databaseList, #supplierList {
    grid-template-columns: 1fr;
  }
}

/* ===== Z-INDEX FIX (confirm поверх database modal) ===== */
#confirmModal {
  z-index: 10000;
}

#databaseModal {
  z-index: 9998;
}

#editCardModal {
  z-index: 9999;
}
#editSupplierModal {
  z-index: 9999;
}
/* Кнопка календаря встроенная в инпут */
.safety-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.safety-input-wrap input {
  width: 100%;
  padding-right: 38px;
}

.safety-calendar-icon {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  opacity: 0.6;
}

.safety-calendar-icon:hover {
  background: rgba(245,166,35,0.15);
  opacity: 1;
}
/* ========================================
   СТИЛИ ДЛЯ АНАЛИТИКИ v1.6.0
   ======================================== */

.analytics-container {
  padding: 20px 0;
}

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

.stat-card {
  background: linear-gradient(135deg, #F5A623 0%, #ff8c42 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
}

.chart-section {
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e8e3db;
}

.chart-section h3 {
  margin: 0 0 20px 0;
  color: #5A2D0C;
  font-size: 18px;
}

.simple-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 10px 0;
  border-bottom: 2px solid #e8e3db;
}

.chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(to top, #F5A623, #ffb366);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  transition: all 0.3s;
  cursor: pointer;
}

.chart-bar:hover {
  background: linear-gradient(to top, #ff8c42, #ffcc99);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.chart-value {
  font-size: 11px;
  font-weight: bold;
  color: #5A2D0C;
}

.chart-label {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

.suppliers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.supplier-row {
  display: grid;
  grid-template-columns: 200px 180px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fdf9f3;
  border-radius: 6px;
  transition: background 0.2s;
}

.supplier-row:hover {
  background: #f5efe5;
}

.supplier-name {
  font-weight: 600;
  color: #5A2D0C;
}

.supplier-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #666;
}

.supplier-bar {
  height: 24px;
  background: #fdf9f3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e3db;
}

.supplier-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F5A623, #ff8c42);
  border-radius: 12px;
  transition: width 0.5s ease;
}

.analytics-section {
  margin-top: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e8e3db;
}

.analytics-section h3 {
  margin: 0 0 20px 0;
  color: #5A2D0C;
  font-size: 18px;
}

.top-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-row {
  display: grid;
  grid-template-columns: 40px 1fr 150px 200px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fdf9f3;
  border-radius: 6px;
  transition: all 0.2s;
}

.product-row:hover {
  background: #f5efe5;
  transform: translateX(4px);
}

.product-rank {
  width: 32px;
  height: 32px;
  background: #F5A623;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-weight: 600;
  color: #5A2D0C;
  font-size: 14px;
}

.product-sku {
  font-size: 12px;
  color: #999;
}

.product-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.product-boxes {
  font-weight: 600;
  color: #5A2D0C;
  font-size: 14px;
}

.product-orders {
  font-size: 12px;
  color: #666;
}

.product-bar {
  height: 20px;
  background: #fdf9f3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e3db;
}

.product-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #4caf50);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.analytics-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
  background: #fdf9f3;
  border-radius: 8px;
}

.analytics-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .supplier-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .product-row {
    grid-template-columns: 40px 1fr;
  }
  
  .product-stats,
  .product-bar {
    grid-column: 1 / -1;
  }
}

/* ═══════════════════════════════════════════
   UPGRADES v2.0 — BK Style Enhanced
   ═══════════════════════════════════════════ */

/* ── Tooltips (стилизованные) ── */
.tooltip-wrap {
  position: relative;
}

.tooltip-wrap::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  padding: 7px 14px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9000;
  box-shadow: 0 4px 16px rgba(90,45,12,0.22);
  max-width: 360px;
  min-width: 200px;
  white-space: normal;
  text-align: center;
  width: max-content;
  text-transform: none;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tooltip-wrap::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  border: 5px solid transparent;
  border-top-color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9000;
}

.tooltip-wrap:hover::after,
.tooltip-wrap:hover::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ── Плавное появление секций ── */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.18s; }

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

/* ── Пульсация на кнопке "Сформировать заказ" ── */
#buildOrder {
  position: relative;
  overflow: hidden;
}

#buildOrder::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#buildOrder:hover::after {
  opacity: 1;
  animation: shimmer 1.2s ease-in-out;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Улучшенные инпуты в таблице ── */
td input[type="number"]:not(:placeholder-shown) {
  background: #fff;
}

td input[type="number"]:focus {
  position: relative;
  z-index: 2;
}

/* ── Кнопки undo/redo ── */
#undoBtn, #redoBtn {
  font-size: 16px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

#undoBtn:not(:disabled):hover,
#redoBtn:not(:disabled):hover {
  background: var(--orange);
  color: var(--text);
  border-color: var(--orange);
  transform: scale(1.08);
}

#undoBtn:disabled, #redoBtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Кнопка Excel ── */
#exportExcelBtn {
  transition: all 0.2s ease;
}

#exportExcelBtn:hover {
  background: #43A047 !important;
  box-shadow: 0 3px 10px rgba(76,175,80,0.3);
}

/* ── Drag handle + номер строки ── */
td:first-child {
  cursor: grab;
  user-select: none;
  font-size: 11px;
  color: var(--border-light);
  font-weight: 600;
}

td:first-child:active {
  cursor: grabbing;
}
tbody tr {
  animation: rowFadeIn 0.2s ease both;
}

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

/* ── Кнопка "В заказ всё" — акцентная ── */
#allToOrderBtn {
  position: relative;
  font-weight: 700;
}

/* ── Скроллбар в таблице — BK-цвета ── */
.table-wrap::-webkit-scrollbar-thumb {
  background: #e0c9a8;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ── Фокус-кольцо для select (accessibility) ── */
select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

/* ── Счётчик позиций — badge-стиль ── */
#itemsCounter:not(:empty) {
  background: rgba(245,166,35,0.15);
  color: var(--text);
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12.5px;
  margin-left: 6px;
  display: inline-block;
}

/* ── Кнопка "Очистить" — осторожная ── */
#clearOrder:hover {
  background: #ffebee !important;
  color: var(--error) !important;
  border-color: var(--error) !important;
}

/* ── История заказов — badge дата ── */
.history-header span b {
  color: var(--text);
}

/* ── Пустое состояние таблицы ── */
tbody tr td[colspan] {
  color: var(--text-muted);
}

/* ── Нижняя панель действий с заказом ── */
.order-bottom-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.order-bottom-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* ── Print styles ── */
@media print {
  .sidebar, .topbar, .actions, .search, .footer,
  .btn, #undoBtn, #redoBtn, #allToOrderBtn,
  #clearOrder, #exportExcelBtn, td.delete-cell,
  .table-toolbar, .order-bottom-bar, .order-bottom-actions { 
    display: none !important; 
  }
  
  .app-layout { display: block; }
  .main-area { overflow: visible; }
  .content-area { overflow: visible; }
  
  .card { 
    box-shadow: none; 
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  
  .table-wrap {
    max-height: none;
    overflow: visible;
  }
  
  body { background: white; }
  .container { margin: 0; padding: 0; }
  .hidden { display: none !important; }
}
/* ═══════════════════════════════════════════
   ПЛАНИРОВАНИЕ ЗАКАЗОВ
   ═══════════════════════════════════════════ */

.plan-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 800px;
  background: white;
}

.plan-table thead {
  background: linear-gradient(90deg, #4e2709, var(--text), #4e2709);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.plan-table th {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
}

.plan-th-name {
  text-align: left !important;
  padding-left: 10px !important;
  min-width: 200px;
  position: sticky;
  left: 0;
  z-index: 12;
  background: linear-gradient(90deg, #4e2709, var(--text));
}

.plan-th-num {
  width: 80px;
}

.plan-th-month {
  min-width: 100px;
  background: rgba(255,255,255,0.06);
}


.plan-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
  vertical-align: top;
}

.plan-td-name {
  text-align: left !important;
  padding-left: 14px !important;
  position: sticky;
  left: 0;
  z-index: 2;
  background: white;
  border-right: 1px solid var(--border-light);
}

.plan-table tbody tr:hover .plan-td-name {
  background: #fffbf0;
}

.plan-td-input {
  padding: 4px !important;
  position: relative;
}

/* Подсказка расхода за неделю */
.plan-hint {
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  color: var(--orange);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  margin-top: 2px;
}

.plan-input {
  width: 70px !important;
  text-align: center !important;
  padding: 4px 3px !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  border: 1.5px solid var(--border) !important;
  background: #fafaf8 !important;
  font-weight: 500 !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  margin: 0 auto !important;
}

.plan-input:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 2px rgba(245,166,35,0.18) !important;
  background: white !important;
}

.plan-td-result {
  font-size: 12px;
  min-width: 100px;
  transition: background 0.15s;
}

.plan-td-result.plan-has-value {
  background: #fff8f0;
}

.plan-result-value {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.plan-result-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.plan-result-zero {
  color: var(--text-muted);
  font-size: 10px;
}

/* Totals row */
.plan-totals {
  background: #fdf9f2;
  border-top: 2px solid var(--orange);
}

.plan-totals td {
  padding: 10px 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.plan-total-cell.plan-has-value {
  background: rgba(245,166,35,0.12);
  color: var(--accent);
  font-size: 15px;
}

/* Hover rows */
.plan-table tbody tr {
  transition: background 0.1s;
}

.plan-table tbody tr:hover {
  background: #fffbf0;
}

.plan-table tbody tr:last-child td {
  border-bottom: none;
}

/* Planning modal z-index */
#planningModal {
  z-index: 9998;
}

/* ═══════════════════════════════════════════
   КАЛЕНДАРЬ ПОСТАВОК
   ═══════════════════════════════════════════ */


/* ═══════ CALENDAR ═══════ */

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 6px 0 10px;
}

.cal-nav-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  min-width: 170px;
  text-align: center;
}

.cal-nav-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--text);
}

.cal-nav-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 8px;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.3;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.cal-legend-urgent {
  background: #ffebee;
  color: #c62828;
  font-weight: 600;
}

.cal-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cal-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.cal-cell {
  min-height: 80px;
  padding: 4px 5px;
  position: relative;
  background: white;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}

.cal-cell:nth-child(7n) { border-right: none; }

.cal-cell:hover { background: #FFFAF5; }

.cal-empty { background: #FAFAF8; }

.cal-past { opacity: 0.5; }

.cal-today {
  border: 2px solid var(--accent) !important;
  background: #FFF5F0 !important;
  opacity: 1 !important;
}

.cal-today .cal-day-num {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.cal-day-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.cal-has-orders { background: #FEFDF7; }

.cal-orders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

.cal-order-tag {
  font-size: 7px;
  font-weight: 600;
  padding: 1px 3px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  cursor: pointer;
  display: block;
}

.cal-order-tag:hover {
  filter: brightness(0.85);
  text-decoration: underline;
}

.cal-overdue {
  margin-top: 8px;
  padding: 8px 12px;
  background: #FFF3E0;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}

#calendarModal { z-index: auto; }

.modal.page-modal #calendarContainer {
  display: flex;
  flex-direction: column;
  padding: 0 20px 16px;
}

@media (max-width: 900px) {
  .cal-cell { min-height: 56px; padding: 3px; }
  .cal-order-tag { font-size: 7px; padding: 0 2px; }
  .cal-day-num { font-size: 10px; }
  .cal-legend { font-size: 10px; gap: 3px 6px; }
}


/* #8 Убираем стрелки из number inputs в таблице заказа */
.table-wrap input[type="number"]::-webkit-inner-spin-button,
.table-wrap input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.table-wrap input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Подсветка невалидного расхода */
.consumption-warning {
  color: #d32f2f !important;
  font-weight: 700 !important;
  border-color: #d32f2f !important;
  background: #ffebee !important;
}

/* #14 Кнопка округления до паллеты */
.plan-pallet-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10px;
  padding: 1px 5px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
  margin-left: 4px;
}
.plan-pallet-btn:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* Locked ячейки планирования */
.plan-cell-locked {
  background: #fff8e1 !important;
  border: 1px dashed var(--orange) !important;
}
.plan-result-value.plan-cell-locked {
  color: #e65100;
}

/* Паллеты и сброс поколоночно */
.plan-pallet-period, .plan-reset-cell {
  display: inline-block;
  font-size: 10px;
  cursor: pointer;
  margin-left: 2px;
  opacity: 0.5;
  transition: opacity 0.15s;
  vertical-align: middle;
}
.plan-pallet-period:hover, .plan-reset-cell:hover {
  opacity: 1;
}
.plan-reset-cell {
  color: #d32f2f;
  font-weight: 700;
}

/* Ячейка результата — курсор для dblclick */
td.plan-td-result {
  cursor: pointer;
}
td.plan-td-result:hover {
  background: #fdf9f3;
}

/* ============= Дропдаун отправки заказа ============= */
.share-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: var(--card);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  min-width: 160px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.share-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}
.share-dropdown button:hover {
  background: var(--bg);
}
.share-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* #9 Кнопка Очистить — красный фон при hover */
.btn-clear-order:hover {
  background: #d32f2f !important;
  color: white !important;
  border-color: #c62828 !important;
}