/* График работ план/факт — стили приложения */
:root {
  --bg: #f4f5f7;
  --bar: #2c3440;
  --st-plan: #97a1ad;
  --st-waiting: #d9a62e;
  --st-in_work: #3f7bd6;
  --st-urgent: #d64545;
  --st-done: #2e9e5b;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; color: #1f2630; background: var(--bg); }
.muted { color: #7b838e; }

#topbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--bar); color: #fff; flex-wrap: wrap; }
#topbar .brand { font-weight: 600; font-size: 15px; white-space: nowrap; }
#topbar .brand .muted { font-weight: 400; font-size: 12px; color: #aab4c0; }
#projectSelect { max-width: 280px; padding: 5px 8px; border-radius: 6px; border: none; }
#topbar button, #topbar a.deal { padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; font-size: 13px; }
#topbar button.primary { background: #3f7bd6; color: #fff; }
#topbar button.primary:hover { background: #3a70c6; }
#topbar button.ghost { background: transparent; color: #cfd6df; border-color: #4a5462; }
#topbar button.ghost:hover { background: #3a434f; }
#topbar .zoom button { background: #3a434f; color: #cfd6df; }
#topbar .zoom button.active { background: #5a6575; color: #fff; }
#topbar a.deal { background: #2e9e5b; color: #fff; text-decoration: none; }
#topbar .spacer { flex: 1; }
#userName { color: #cfd6df; }
#syncState { font-size: 12px; color: #aab4c0; }

.legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legend .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #dfe4ea; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

#ganttWrap { position: relative; height: calc(100vh - 47px); }
#ganttHere { width: 100%; height: 100%; }
#emptyState { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); }

/* Статусы карточек на диаграмме */
.gantt_task_line.st-plan    { background: var(--st-plan); border-color: #7f8895; }
.gantt_task_line.st-waiting { background: var(--st-waiting); border-color: #b8871f; }
.gantt_task_line.st-in_work { background: var(--st-in_work); border-color: #3568ba; }
.gantt_task_line.st-urgent  { background: var(--st-urgent); border-color: #b83333; box-shadow: 0 0 0 2px rgba(214, 69, 69, .35); }
.gantt_task_line.st-done    { background: var(--st-done); border-color: #237c47; }
.gantt_task_line .gantt_task_content { color: #fff; font-size: 12px; }
.gantt_task_line.st-done .gantt_task_text { text-decoration: line-through; opacity: .85; }

/* Текст статуса в гриде цветной */
.cell-status { font-weight: 600; }
.cell-plan { color: #6d7683; } .cell-waiting { color: #b8871f; }
.cell-in_work { color: #3263b3; } .cell-urgent { color: #c23a3a; }
.cell-done { color: #237c47; }

/* Логин */
#loginOverlay { position: fixed; inset: 0; background: rgba(31, 38, 48, .92); display: flex; align-items: center; justify-content: center; z-index: 1000; }
#loginOverlay[hidden], #emptyState[hidden] { display: none; }
#loginForm { background: #fff; border-radius: 12px; padding: 28px 32px; width: 320px; display: flex; flex-direction: column; gap: 14px; }
#loginForm h1 { margin: 0; font-size: 20px; } #loginForm h1 span { font-size: 13px; color: #7b838e; font-weight: 400; }
#loginForm label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #4a5462; }
#loginForm input { padding: 8px 10px; border: 1px solid #c9d0d9; border-radius: 6px; font-size: 14px; }
#loginForm button.primary { background: #3f7bd6; color: #fff; border: none; border-radius: 6px; padding: 10px; font-size: 14px; cursor: pointer; }
.error { color: #c23a3a; font-size: 13px; }

/* Мелочи dhtmlx */
.gantt_grid_head_cell { background: #eceff3; }
.gantt_scale_line { background: #eceff3; }
.gantt_marker.today .gantt_marker_content { color: #c23a3a; font-weight: 600; }
.weekend .gantt_cell, .gantt_scale_cell.weekend, .gantt_task_cell.weekend { background: #eef0f4; }
.gantt_scale_cell.today, .gantt_task_cell.today { background: #fdeeee; box-shadow: inset 0 0 0 1px #f3c9c9; }
