/* Штаб — виды задач (список/доска/неделя/Гант проекта) и календарь.
   Цвета и размеры — из макетов Project, ProjectList, ProjectWeek, ProjectGantt, Calendar (canvas/project). */

/* ---------- переключатель видов и фильтры ---------- */
.vbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.seg { display: flex; padding: 3px; background: var(--card); border-radius: 20px; }
.seg-item { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px; font-weight: 500; }
.seg-item.is-on { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.vfilters { display: flex; flex-wrap: wrap; gap: 6px; }
.vbtn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--card); cursor: pointer; list-style: none; white-space: nowrap;
}
.vbtn::-webkit-details-marker { display: none; }
.vbtn.is-on { background: #E4E7FF; color: #2C3BC4; }
.dd { position: relative; }
.dd-menu {
  position: absolute; z-index: 5; top: 38px; left: 0; min-width: 180px; max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; padding: 6px; background: var(--card); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}
.dd-item { padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.dd-item:hover { background: #F0F2F5; }
.dd-item.is-on { font-weight: 600; }
.vhint { margin: 0; color: var(--muted); font-size: 12px; }

/* стрелки периода ‹ › и «Сегодня» */
.pnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pnav-title { margin: 0 6px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
h1.pnav-title { font-size: 28px; }
.nbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  background: var(--card); border: 1px solid #D5DAE2; border-radius: 9px;
}
.nbtn--text { width: auto; padding: 0 12px; }

/* ---------- доска ---------- */
.board-wrap { overflow-x: auto; }
.board { min-width: 960px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bcol { display: flex; flex-direction: column; gap: 8px; min-height: 520px; padding: 12px; background: #E3E6EC; border-radius: 24px; }
.bcol.is-over, .wcell.is-over { outline: 2px dashed var(--link); outline-offset: -2px; }
.bcol-head { display: flex; justify-content: space-between; padding: 2px 4px 6px; }
.bcol-title { margin: 0; font-size: 14px; font-weight: 700; }
.bcol-n { color: var(--muted); font-size: 13px; }
.bcol-empty { margin: 0; padding: 12px; color: var(--muted-2); font-size: 13px; text-align: center; }
.bcard {
  display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); cursor: grab;
}
.bcard-title { font-weight: 500; line-height: 1.35; }
.bcard.is-done .bcard-title { color: #7A7D86; text-decoration: line-through; }
.bcard-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.bdue { padding: 2px 7px; border-radius: 5px; background: #F0F2F5; color: #3A4150; }
.bdue.is-late { background: #FDEBDC; color: #A4500C; }
.bcard-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.bcard-from { font-size: 12px; color: var(--muted-2); }

/* ---------- неделя ---------- */
.wstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wcell { display: flex; flex-direction: column; gap: 6px; min-height: 96px; padding: 10px; border-radius: 18px; background: var(--card); }
.wcell.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.wcell.is-selected { background: var(--ink); color: #FFFFFF; }
.wcell-top { display: flex; justify-content: space-between; font-size: 12px; }
.wcell-n { font-weight: 700; font-size: 16px; }
.wcell-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.wdot { width: 10px; height: 10px; border-radius: 3px; background: #5B6CFF; }
.wdot--late { background: #FF8A3D; }
.wdot--today { background: var(--accent); }
.wdot--done { background: #A6DDBF; }
.wcell-label { font-size: 12px; opacity: 0.85; }
.wbox { background: var(--card); border-radius: 24px; overflow: hidden; }
.wbox-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.wbox-empty { padding: 0 18px 16px; }
.drag-row { cursor: grab; }
.drag-row .trow { border-top: 1px solid #F0F1F4; }
.ring--sm { width: 52px; height: 52px; background: conic-gradient(#3BB273 0 var(--pct), #E6E8EE var(--pct) 100%); }
.ring--sm .ring-in { width: 40px; height: 40px; background: var(--card); font-size: 12px; }
details.overdue-box summary { cursor: pointer; list-style: none; }
details.overdue-box summary::-webkit-details-marker { display: none; }

/* ---------- Гант ---------- */
.gantt-wrap { background: var(--card); border-radius: 24px; overflow-x: auto; }
.gantt { min-width: 1000px; }
.grow { display: grid; grid-template-columns: 300px repeat(14, minmax(0, 1fr)); align-items: center; min-height: 48px; border-top: 1px solid #F0F1F4; }
.grow > * { grid-row: 1; }
.grow--head { border-top: 0; border-bottom: 1px solid #E6E8EE; }
.gname { grid-column: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 16px; min-width: 0; }
.gname a { font-weight: 500; }
.gname span { font-size: 12px; color: var(--muted-2); }
.gname--head { padding: 12px 16px; font-weight: 600; color: #5A5D66; }
.gday { display: flex; flex-direction: column; align-items: center; padding: 8px 0; font-size: 12px; color: #5A5D66; border-left: 1px solid #F0F1F4; }
.gday b { font-size: 14px; }
.gday.is-weekend { background: #FAFAFB; }
.gday.is-today { background: #E4E7FF; color: #2C3BC4; }
.ggroup { padding: 10px 16px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5A5D66; background: #FAFAFB; }
.gtoday { grid-column: var(--s); align-self: stretch; background: #F3F5FF; }
.gbar {
  grid-column: var(--s) / span var(--n); z-index: 1; height: 28px; margin: 0 3px; padding: 0 10px; border-radius: 8px;
  display: flex; align-items: center; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden;
}
.gbar--work { background: #3F4FD8; color: #FFFFFF; }
.gbar--plan { background: #DCE1FF; color: #1E2A9E; }
.gbar--late { background: #FFB98A; color: #4A1D00; }
.gbar--done { background: #D5F2E3; color: #0F4D2E; }
.gantt-empty { padding: 16px; }
.glegend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #5A5D66; }
.glegend-item { display: flex; align-items: center; gap: 6px; }
.gswatch { width: 14px; height: 10px; border-radius: 3px; }

/* ---------- календарь ---------- */
.layers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.layer {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; background: var(--card);
  border: 1px solid #D5DAE2; border-radius: 16px; font-size: 13px;
}
.layer-box { width: 14px; height: 14px; border-radius: 4px; border: 2px solid #9AA2B1; }
.layer.is-on .layer-box { background: #E07A1F; border-color: #E07A1F; }
.layer.is-soon { color: var(--muted-2); cursor: not-allowed; }
.layer small { font-size: 11px; }
.cal-wrap { overflow-x: auto; background: var(--card); border-radius: 24px; }
.cal-week { min-width: 900px; display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-corner { padding: 10px 8px 0 0; text-align: right; font-size: 11px; color: var(--muted-2); border-bottom: 1px solid var(--line); }
.cal-head { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); border-left: 1px solid #EEF0F3; min-width: 0; }
.cal-head.is-today, .cal-day.is-today { background-color: #F3F5FF; }
.cal-wd { font-size: 12px; color: var(--muted); }
.cal-wd b { font-size: 16px; color: var(--ink); }
.cal-chip {
  padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--p) 22%, #FFFFFF); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip.is-done, .cal-block.is-done, .cal-item.is-done { opacity: 0.55; text-decoration: line-through; }
.cal-hours span { display: block; height: var(--hour); padding: 4px 8px 0 0; text-align: right; font-size: 12px; color: var(--muted-2); }
.cal-day {
  position: relative; height: var(--grid); border-left: 1px solid #EEF0F3;
  background-image: repeating-linear-gradient(transparent 0 calc(var(--hour) - 1px), #F1F3F6 calc(var(--hour) - 1px) var(--hour));
}
.cal-block {
  position: absolute; top: var(--top); height: calc(var(--hour) - 4px); overflow: hidden;
  left: calc(4px + (100% - 8px) * var(--lane) / var(--lanes)); width: calc((100% - 8px) / var(--lanes));
  display: flex; flex-direction: column; padding: 5px 7px; border-radius: 8px; font-size: 12px;
  background: color-mix(in srgb, var(--p) 22%, #FFFFFF); border-left: 3px solid var(--p);
}
.cal-block span { color: #3A4150; white-space: nowrap; }
.cal-now { position: absolute; left: 0; right: 0; top: var(--top); height: 2px; background: #E5484D; z-index: 2; }
.cal-month { min-width: 760px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mhead { padding: 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-cell { display: flex; flex-direction: column; gap: 3px; min-height: 110px; min-width: 0; padding: 8px; border-top: 1px solid #EEF0F3; border-left: 1px solid #EEF0F3; }
.cal-cell.is-out { background: #FAFAFB; color: var(--muted-2); }
.cal-cell.is-today { background: #F3F5FF; }
.cal-cell-n { font-weight: 700; }
.cal-cell.is-today .cal-cell-n { color: #2C3BC4; }
.cal-item { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item .pdot { width: 8px; height: 8px; }
.cal-more { font-size: 12px; color: var(--muted-2); }
.nodue { display: flex; flex-wrap: wrap; gap: 6px; }
.nodue-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #F0F2F5; border-radius: 8px; font-size: 13px; }

@media (max-width: 700px) {
  .wstrip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pnav-title, h1.pnav-title { font-size: 20px; }
}
