:root {
  --bg: #f8fafc; --surface: #ffffff; --text: #0f172a;
  --primary: #2563eb; --primary-hover: #1d4ed8;
  --green: #10b981; --yellow: #f59e0b; --red: #ef4444;
  --green-bg: #d1fae5; --yellow-bg: #fef3c7; --red-bg: #fee2e2;
  --border: #e2e8f0; --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); padding: 20px; user-select: none; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.controls { display: flex; gap: 10px; align-items: center; }
select, input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.btn { padding: 10px 18px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; transition: 0.2s; background: #f1f5f9; color: var(--text); }
.btn.primary { background: var(--primary); color: white; }
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }

/* Подсветка фона ячеек со стоимостью */
.cost-green { 
  background-color: var(--green-bg); 
  color: #065f46;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
}
.cost-yellow { 
  background-color: var(--yellow-bg); 
  color: #92400e;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
}
.cost-red { 
  background-color: var(--red-bg); 
  color: #991b1b;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
}

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px); justify-content: center; align-items: center; z-index: 100; }
.modal.active { display: flex; }
.modal-content { background: var(--surface); padding: 28px; border-radius: 14px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.modal-content h2 { margin-bottom: 20px; font-size: 20px; }
.modal-content label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 14px; }
.modal-content input { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
#toastContainer { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { padding: 12px 20px; border-radius: 8px; color: white; font-weight: 500; animation: slideIn 0.3s ease; box-shadow: var(--shadow); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 768px) { table { display: block; overflow-x: auto; } th, td { min-width: 120px; } }