/* UniDesk — раздел «Проекты»: список, диаграмма Ганта, канбан, направления.
   Токены — из codeclub.css и слоя кабинета (dashboard.html). */

.pj-i { flex: none; }
.pj-muted { color: var(--t3); font-size: .84rem; line-height: 1.5; }
.pj-grow { flex: 1; }

/* ---------- Кнопки ---------- */
.pj-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 11px;
  border: 1px solid var(--line-strong, var(--line)); background: var(--card); color: var(--t1); font: inherit;
  font-size: .86rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.pj-btn:hover { border-color: var(--primary); color: var(--primary); }
.pj-btn:active { transform: translateY(1px); }
a.pj-btn { text-decoration: none; }
.pj-btn:disabled { opacity: .55; cursor: progress; }
.pj-btn.sm { height: 32px; padding: 0 11px; font-size: .8rem; }
.pj-btn-primary { background: linear-gradient(135deg, var(--primary-2), var(--primary)); border-color: transparent; color: #fff;
  box-shadow: var(--shadow-primary); }
.pj-btn-primary:hover { color: #fff; border-color: transparent; filter: brightness(1.05); }
.pj-btn-ghost { background: transparent; border-color: transparent; color: var(--t2); }
.pj-btn-ghost:hover { background: var(--bg-2); border-color: transparent; }
.pj-btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.pj-btn-danger:hover { color: #fff; border-color: var(--danger); filter: brightness(.95); }
.pj-btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.pj-btn-danger-ghost:hover { background: var(--danger-tint); border-color: transparent; color: var(--danger); }
.pj-icon-btn { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px; background: var(--bg-2); color: var(--t2); cursor: pointer; }
.pj-icon-btn:hover { color: var(--t1); }
.pj-icon-btn.danger:hover { background: var(--danger-tint); color: var(--danger); }

/* ---------- Список проектов ---------- */
.pj-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.pj-h { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.pj-sub { color: var(--t2); font-size: .9rem; margin-top: 4px; max-width: 620px; line-height: 1.5; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pj-section-label { margin: 30px 0 12px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t3); }
.pj-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 18px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); cursor: pointer; overflow: hidden;
  text-align: left; font: inherit; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; }
.pj-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--pc); }
.pj-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pc) 18%, transparent), transparent 70%); pointer-events: none; }
.pj-card:hover, .pj-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-pop); border-color: color-mix(in srgb, var(--pc) 35%, var(--line)); outline: none; }
.pj-card.is-archived { opacity: .7; }
.pj-card h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.pj-card-top { display: flex; align-items: center; justify-content: space-between; }
.pj-mark { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
  background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); font-weight: 800; font-size: .85rem; letter-spacing: .02em; }
.pj-mark.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 1.05rem; }
.pj-role { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t3);
  padding: 3px 9px; border-radius: 999px; background: var(--bg-2); }
.pj-card-desc { color: var(--t2); font-size: .86rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pj-card-desc.is-ph { color: var(--t3); font-style: italic; }
.pj-card-dates { font-size: .78rem; color: var(--t2); }
.pj-progress { height: 7px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-top: 4px; }
.pj-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pc), color-mix(in srgb, var(--pc) 70%, #fff)); transition: width .5s cubic-bezier(.2,.7,.3,1); }
.pj-card-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--t2); }
.pj-card-meta b { color: var(--t1); }
.pj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-chip { font-size: .72rem; font-weight: 600; color: var(--t2); background: var(--bg-2); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pj-chip.is-bad { color: var(--danger); background: var(--danger-tint); }
.pj-chip.is-soft { color: var(--primary); background: var(--primary-tint); }
.pj-card-new { align-items: center; justify-content: center; min-height: 210px; border: 2px dashed var(--line-strong, var(--line)); background: transparent;
  box-shadow: none; color: var(--t3); font-weight: 600; gap: 10px; }
.pj-card-new::before, .pj-card-new::after { display: none; }
.pj-card-new .pj-i { width: 28px; height: 28px; padding: 6px; border-radius: 10px; background: var(--bg-2); box-sizing: content-box; }
.pj-card-new:hover { color: var(--primary); border-color: var(--primary); }

.pj-hero-empty { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 34px; align-items: center; padding: 34px;
  border-radius: 22px; border: 1px solid var(--line); background:
  radial-gradient(120% 140% at 0% 0%, var(--primary-tint), transparent 60%), var(--card); }
.pj-hero-art { aspect-ratio: 120/84; color: var(--t2); padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.pj-hero-empty h3 { font-size: 1.2rem; margin-bottom: 10px; }
.pj-hero-empty ol { margin: 0 0 18px 18px; color: var(--t2); font-size: .92rem; line-height: 1.8; }

.pj-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 20px;
  border: 1px dashed var(--line-strong, var(--line)); border-radius: 18px; color: var(--t2); font-size: .9rem; }
.pj-empty b { color: var(--t1); font-size: 1rem; }
.pj-empty .pj-btn { margin-top: 10px; }

.pj-skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pj-skel { height: 210px; border-radius: 18px; background: linear-gradient(90deg, var(--bg-2), var(--card-2), var(--bg-2)); background-size: 200% 100%; animation: pj-shimmer 1.2s linear infinite; }
.pj-skel-wide { height: 130px; margin-bottom: 16px; }
.pj-skel-tall { height: 420px; }
@keyframes pj-shimmer { to { background-position: -200% 0; } }

/* ---------- Шапка проекта ---------- */
.pj-head { position: relative; padding: 18px 22px 20px; border-radius: 20px; border: 1px solid var(--line); margin-bottom: 16px; overflow: hidden;
  background: radial-gradient(110% 160% at 100% 0%, color-mix(in srgb, var(--pc) 14%, transparent), transparent 55%), var(--card-2); }
.pj-head::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pc); }
.pj-back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 2px; margin-bottom: 10px; border: none; background: none;
  color: var(--t3); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; border-radius: 8px; }
.pj-back:hover { color: var(--primary); }
.pj-head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pj-head-main { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 340px; }
.pj-head-main > div { min-width: 0; }
.pj-head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.pj-head-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: .82rem; color: var(--t2); }
.pj-head-sub > span { display: inline-flex; align-items: center; gap: 5px; }
.pj-head-desc { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block !important; }
.pj-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.pj-stat { position: relative; min-width: 104px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1px; }
.pj-stat b { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.pj-stat span { font-size: .72rem; color: var(--t3); font-weight: 600; }
.pj-stat.is-bad b { color: var(--danger); }
.pj-stat:has(.pj-ring) { padding-left: 54px; }
.pj-ring { position: absolute; left: 12px; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%;
  background: conic-gradient(var(--pc) calc(var(--p) * 1%), var(--bg-2) 0); }
.pj-ring::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); }

/* ---------- Панель инструментов ---------- */
.pj-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pj-bar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pj-seg { display: inline-flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); }
.pj-seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border: none; border-radius: 9px; background: transparent;
  color: var(--t2); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pj-seg button:hover { color: var(--t1); }
.pj-seg button.on { background: var(--card); color: var(--primary); box-shadow: 0 1px 3px rgba(20,30,60,.12); }
.pj-seg.sm button { height: 28px; padding: 0 10px; font-size: .78rem; }
.pj-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--t2); cursor: pointer; user-select: none; }
.pj-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pj-toggle i { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong, var(--line)); transition: background .15s; flex: none; }
.pj-toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.pj-toggle input:checked + i { background: var(--primary); }
.pj-toggle input:checked + i::after { transform: translateX(14px); }
.pj-toggle input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.pj-toggle.big { font-size: .9rem; color: var(--t1); margin: 4px 0 6px; }

/* ---------- Диаграмма Ганта ---------- */
.gx { --lw: 310px; position: relative; }
.gx-scroll { max-height: calc(100vh - 330px); min-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  overscroll-behavior: contain; }
.gx-inner { position: relative; min-width: 100%; }
.gx-head { position: sticky; top: 0; z-index: 6; display: flex; height: 54px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.gx-corner { position: sticky; left: 0; z-index: 7; width: var(--lw); flex: none; display: flex; align-items: flex-end; padding: 0 16px 9px;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); background: var(--card-2); border-right: 1px solid var(--line); }
.gx-scale { position: relative; flex: none; }
.gx-scale-top, .gx-scale-bot { position: relative; height: 27px; }
.gx-tick-top { position: absolute; top: 7px; padding-left: 8px; font-size: .74rem; font-weight: 700; color: var(--t2); white-space: nowrap; border-left: 1px solid var(--line-strong, var(--line)); line-height: 20px; margin-top: -2px; }
.gx-tick { position: absolute; top: 0; height: 27px; display: flex; align-items: center; padding-left: 6px; font-size: .7rem; color: var(--t3);
  white-space: nowrap; overflow: hidden; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.gx-tick.day { justify-content: center; padding: 0; }
.gx-tick.we { color: color-mix(in srgb, var(--danger) 65%, var(--t3)); }
.gx-tick.now { color: #fff; font-weight: 700; }
.gx-tick.now::before { content: ''; position: absolute; inset: 4px 3px; border-radius: 7px; background: var(--primary); z-index: -1; }
.gx-rows { position: relative; }
.gx-layer { position: absolute; left: var(--lw); top: 0; z-index: 0; pointer-events: none; }
.gx-grid { position: relative; }
.gx-we { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.gx-vl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2, var(--line)); }
.gx-vl.strong { background: var(--line); }
.gx-pl { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed color-mix(in srgb, var(--t3) 55%, transparent); }
.gx-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--primary); opacity: .75; }
.gx-now { position: absolute; top: 5px; z-index: 1; transform: translateX(-50%); padding: 0 7px; height: 17px; line-height: 17px; border-radius: 99px;
  background: var(--primary); color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.gx-links { position: absolute; left: var(--lw); top: 0; z-index: 3; pointer-events: none; overflow: visible; color: color-mix(in srgb, var(--t2) 75%, transparent); }
.gx-link .ln { fill: none; stroke: currentColor; stroke-width: 1.6; }
.gx-link .hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: pointer; }
.gx-link:hover { color: var(--primary); }
.gx-link:hover .ln { stroke-width: 2.4; }
.gx-link.bad .ln { stroke: var(--danger); stroke-dasharray: 4 3; }
.gx-temp { fill: none; stroke: var(--primary); stroke-width: 2; stroke-dasharray: 5 4; }

.gx-row { position: relative; z-index: 1; display: flex; height: var(--rh); }
.gx-row:hover .gx-cell, .gx-row:hover .gx-tl { background-color: color-mix(in srgb, var(--primary) 4%, transparent); }
.gx-row:hover .gx-cell { background-color: color-mix(in srgb, var(--primary) 4%, var(--card)); }
.gx-cell { position: sticky; left: 0; z-index: 4; width: var(--lw); flex: none; display: flex; align-items: center; gap: 7px;
  padding: 0 10px 0 calc(12px + var(--ind, 0) * 18px); background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2, var(--line)); min-width: 0; }
.gx-cell.muted { color: var(--t3); font-size: .86rem; }
.gx-tl { position: relative; flex: none; border-bottom: 1px solid var(--line-2, var(--line)); }
.gx-row.dir .gx-cell { background: var(--card-2); font-weight: 700; }
.gx-row.dir .gx-tl, .gx-row.none .gx-tl { background: color-mix(in srgb, var(--card-2) 55%, transparent); }
.gx-cell.dir.is-over, .gx-cell.dir.none.is-over { background: var(--primary-tint); box-shadow: inset 0 0 0 2px var(--primary); }
.gx-cell.task.is-dragging { opacity: .45; }
.gx-tog { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 6px;
  background: transparent; color: var(--t3); cursor: pointer; transition: transform .15s; }
.gx-tog:hover { background: var(--bg-2); color: var(--t1); }
.gx-tog.open { transform: rotate(90deg); }
.gx-dsw { width: 10px; height: 10px; flex: none; border-radius: 3px; background: var(--dc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc) 22%, transparent); }
.gx-dtitle { flex: 1; min-width: 0; padding: 0; border: none; background: none; font: inherit; font-size: .88rem; color: var(--t1); text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.gx-dtitle.muted { color: var(--t3); cursor: default; }
button.gx-dtitle:hover { color: var(--primary); }
.gx-cnt { flex: none; font-size: .72rem; font-weight: 700; color: var(--t3); background: var(--bg-2); padding: 1px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.gx-add { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 7px;
  background: transparent; color: var(--t3); cursor: pointer; opacity: 0; transition: opacity .15s; }
.gx-row:hover .gx-add, .gx-add:focus-visible { opacity: 1; }
.gx-add:hover { background: var(--primary-tint); color: var(--primary); }
.gx-cell.task { font-size: .87rem; cursor: grab; }
.gx-cell.task:active { cursor: grabbing; }
.gx-title { flex: 1; min-width: 0; padding: 0; border: none; background: none; font: inherit; color: var(--t1); text-align: left; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.gx-title:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.gx-cell.is-done .gx-title { color: var(--t3); text-decoration: line-through; }
.gx-chk { position: relative; flex: none; width: 18px; height: 18px; cursor: pointer; }
.gx-chk input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gx-chk i { position: absolute; inset: 0; border-radius: 6px; border: 1.7px solid var(--line-strong, var(--t3)); background: var(--card); transition: all .15s; }
.gx-chk input:checked + i { background: var(--success); border-color: var(--success); }
.gx-chk input:checked + i::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.gx-chk input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.gx-chk input:disabled { cursor: default; }
.gx-prio { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.gx-prio.p1 { background: #2f9e44; }
.gx-prio.p2 { background: #f59f00; }
.gx-prio.p3 { background: #e03131; box-shadow: 0 0 0 3px rgba(224,49,49,.18); }
.gx-av { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--primary-tint); color: var(--primary); font-size: .62rem; font-weight: 800; letter-spacing: .02em; }
.gx-av.lg { width: 36px; height: 36px; font-size: .78rem; }
.gx-plan { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .74rem; color: var(--t3); opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
.gx-row.task:hover .gx-plan { opacity: 1; }
.gx-row.task .gx-tl:has(.gx-plan) { cursor: copy; }

.gx-bar { position: absolute; top: 7px; height: calc(var(--rh) - 14px); border-radius: 9px; display: flex; align-items: center; padding: 0 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 88%, #fff), var(--bc)); color: #fff; font-size: .76rem; font-weight: 600;
  box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--bc) 70%, transparent); cursor: grab; user-select: none; touch-action: none;
  transition: box-shadow .15s, filter .15s; }
.gx-bar:hover { filter: brightness(1.06); box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--bc) 80%, transparent); z-index: 2; }
.gx-bar.is-drag { cursor: grabbing; z-index: 5; box-shadow: 0 10px 24px -6px rgba(0,0,0,.35); transition: none; }
.gx-bar.is-done { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--bc) 30%, var(--card)) 0 6px, color-mix(in srgb, var(--bc) 20%, var(--card)) 6px 12px);
  color: var(--t2); box-shadow: none; }
.gx-bar.is-late { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--danger); }
.gx-bar.gx-target, .gx-ms.gx-target { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--primary); }
.gx-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.gx-h { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 1; }
.gx-h.l { left: -3px; }
.gx-h.r { right: -3px; }
.gx-h::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 3.5px; width: 3px; border-radius: 2px; background: rgba(255,255,255,.85); opacity: 0; transition: opacity .15s; }
.gx-bar:hover .gx-h::after, .gx-dbar:hover .gx-h::after { opacity: 1; }
/* Даты у краёв полосы: слева — начало, справа — срок */
.gx-d { position: absolute; top: 50%; transform: translateY(-50%); font-size: .68rem; font-weight: 600; color: var(--t3); white-space: nowrap; pointer-events: none;
  font-variant-numeric: tabular-nums; }
.gx-d.l { right: calc(100% + 6px); }
.gx-d.r { left: calc(100% + 13px); }
.gx-d.r.with-title { color: var(--t2); max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.gx-bar.is-late .gx-d.r { color: var(--danger); }
.gx-bar.is-inbox { opacity: .75; background: repeating-linear-gradient(-45deg, var(--t3) 0 6px, color-mix(in srgb, var(--t3) 80%, var(--card)) 6px 12px); }
/* Кружок связи: наполовину на конце полосы */
.gx-c { position: absolute; right: -7px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%; background: var(--card); z-index: 2;
  border: 2.5px solid var(--bc); cursor: crosshair; opacity: 0; transition: opacity .15s, transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.gx-bar:hover .gx-c, .gx-ms:hover .gx-c { opacity: 1; }
.gx-c:hover { transform: scale(1.3); background: var(--bc); }
/* Только срок: флажок на дне срока */
.gx-ms { position: absolute; top: 0; height: var(--rh); width: 0; cursor: grab; touch-action: none; user-select: none; }
.gx-ms-pin { position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--bc); }
.gx-ms-row { position: absolute; left: 1px; top: 8px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.gx-ms-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px 0 6px; border-radius: 0 7px 7px 0;
  background: var(--bc); color: #fff; font-size: .68rem; font-weight: 700; box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--bc) 70%, transparent); }
.gx-ms-tag .pj-i { width: 12px; height: 12px; }
.gx-ms .gx-bl { font-size: .76rem; font-weight: 600; color: var(--t2); max-width: 260px; }
.gx-ms .gx-c { right: auto; left: -6.5px; top: auto; bottom: 0; margin: 0; }
.gx-ms.is-done .gx-ms-tag, .gx-ms.is-done .gx-ms-pin { background: color-mix(in srgb, var(--bc) 40%, var(--card)); color: var(--t2); box-shadow: none; }
.gx-ms.is-late .gx-ms-tag { background: var(--danger); }
.gx-ms.is-late .gx-ms-pin { background: var(--danger); }
.gx-ms.gx-target .gx-ms-tag { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--primary); }
/* Направление: тонкая полоса периода с заполнением по готовности */
.gx-dbar { position: absolute; top: calc(50% - 5px); height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--dc) 20%, var(--card));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--dc) 55%, transparent); overflow: visible; user-select: none; touch-action: none; }
.gx-dbar:not(.own) { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--dc) 45%, transparent); }
.gx-dbar:not(.own) .gx-dfill { opacity: .55; }
.gx-dbar.own { cursor: grab; }
.gx-dbar.is-drag { cursor: grabbing; }
.gx-dfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--dc); }
.gx-dbar .gx-h { top: -6px; bottom: -6px; }
.gx-dbar .gx-h::after { background: var(--dc); top: 6px; bottom: 6px; }
.gx-dbar .gx-d { font-weight: 700; color: color-mix(in srgb, var(--dc) 75%, var(--t2)); }
.gx-hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: .78rem; color: var(--t3); line-height: 1.45; }
.gx-hint .pj-i { margin-top: 1px; }
#gx-tip { position: fixed; z-index: 3000; display: none; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 8px; background: var(--t1);
  color: var(--card); font-size: .74rem; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-pop); }

/* ---------- Канбан ---------- */
.pj-fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pj-fchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--card); color: var(--t2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.pj-fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); }
.pj-fchip:hover { color: var(--t1); border-color: var(--t3); }
.pj-fchip.on { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.kb-col { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.kb-col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.kb-col header b { font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-n { margin-left: auto; font-size: .76rem; font-weight: 700; color: var(--t3); }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-card { position: relative; padding: 11px 12px 11px 15px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 1px 2px rgba(20,30,60,.05); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.kb-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--dc); }
.kb-card:hover, .kb-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-card); outline: none; }
.kb-card.is-done { opacity: .6; }
.kb-card.is-done .kb-title { text-decoration: line-through; }
.kb-top { display: flex; align-items: baseline; gap: 8px; }
.kb-top .gx-prio { transform: translateY(-1px); }
.kb-title { font-size: .88rem; font-weight: 600; line-height: 1.35; word-break: break-word; }
.kb-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: .74rem; color: var(--t2); }
.kb-meta .gx-av { margin-left: auto; }
.kb-dir { display: inline-flex; align-items: center; gap: 5px; }
.kb-dir i { width: 7px; height: 7px; border-radius: 2px; background: var(--dc); }
.kb-due { display: inline-flex; align-items: center; gap: 4px; }
.kb-due .pj-i { width: 13px; height: 13px; }
.kb-due.is-late { color: var(--danger); font-weight: 700; }
.kb-empty { padding: 18px 8px; text-align: center; font-size: .8rem; color: var(--t3); }
.kb-add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 1px dashed var(--line-strong, var(--line)); border-radius: 11px;
  background: transparent; color: var(--t3); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.kb-add:hover { color: var(--primary); border-color: var(--primary); background: var(--card); }

/* ---------- Направления ---------- */
.dt { max-width: 1040px; }
.dt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dt-head h3 { font-size: 1.05rem; margin-bottom: 3px; }
.dt-head p { max-width: 620px; }
.dt-item { position: relative; }
.dt-kids { margin-left: 26px; padding-left: 14px; border-left: 2px solid var(--line); }
.dt-node { display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin-bottom: 8px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--card); box-shadow: 0 1px 2px rgba(20,30,60,.04); position: relative; flex-wrap: wrap; }
.dt-node::before { content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--dc); }
.dt-node.is-over { box-shadow: 0 0 0 2px var(--primary); background: var(--primary-tint); }
.dt-node.is-dragging { opacity: .45; }
.dt-grip { color: var(--t3); cursor: grab; display: inline-flex; }
.dt-sw { width: 22px; height: 22px; flex: none; border-radius: 7px; border: none; background: var(--dc); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.dt-sw.inherit { background: repeating-linear-gradient(45deg, var(--dc) 0 3px, color-mix(in srgb, var(--dc) 40%, var(--card)) 3px 6px); }
.dt-sw:disabled { cursor: default; }
.dt-title { flex: 1 1 200px; min-width: 120px; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: var(--t1); font: inherit; font-size: .92rem; font-weight: 600; outline: none; }
.dt-title:hover:not([readonly]) { border-color: var(--line); }
.dt-title:focus { border-color: var(--primary); background: var(--bg-2); }
.dt-count { font-size: .76rem; color: var(--t3); white-space: nowrap; }
.dt-dates { display: inline-flex; align-items: center; gap: 4px; color: var(--t3); }
.dt-date { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--t1); font: inherit; font-size: .8rem; width: 136px; }
.dt-date:focus { outline: none; border-color: var(--primary); }
.dt-acts { display: inline-flex; gap: 2px; }
.dt-acts button { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: transparent; color: var(--t3); cursor: pointer; }
.dt-acts button:hover { background: var(--bg-2); color: var(--t1); }
.dt-acts button.danger:hover { background: var(--danger-tint); color: var(--danger); }
.dt-root-drop { margin-top: 6px; padding: 14px; border: 2px dashed var(--line); border-radius: 13px; text-align: center; font-size: .8rem; color: var(--t3); }
.dt-root-drop.is-over { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.pj-pop { position: absolute; z-index: 2500; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-pop); width: 214px; }
.pj-pop-clear { width: 100%; margin-top: 8px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--t2); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.pj-pop-clear:hover { color: var(--t1); }

/* ---------- Настройки ---------- */
.ps { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ps-card { padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.ps-card h3 { font-size: 1rem; margin-bottom: 6px; }
.ps-card > .pj-muted { margin-bottom: 14px; }
.ps-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.ps-list { display: flex; flex-direction: column; gap: 6px; }
.ps-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.ps-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-main b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-main small { color: var(--t3); font-size: .76rem; }
.ps-ico { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-tint); color: var(--primary); }
.ps-ico.team { background: var(--cyan-tint); color: var(--cyan); }
.ps-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ps-add .pj-in { flex: 1 1 180px; }

/* ---------- Поля ---------- */
.pj-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.pj-field > span { font-size: .76rem; font-weight: 700; color: var(--t2); letter-spacing: .01em; }
.pj-in { width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-strong, var(--line)); background: var(--bg-2);
  color: var(--t1); font: inherit; font-size: .9rem; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.pj-in:focus { border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.pj-in[readonly], .pj-in:disabled { opacity: .75; }
.pj-in.sm { flex: 0 0 auto; width: auto; min-height: 34px; padding: 5px 10px; font-size: .82rem; }
textarea.pj-in { resize: vertical; line-height: 1.5; }
select.pj-in { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239AA1B4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.pj-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pj-row3 { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 10px; }
.pj-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-sw { width: 28px; height: 28px; border-radius: 9px; border: none; background: var(--c); cursor: pointer; transition: transform .12s;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.pj-sw:hover { transform: scale(1.1); }
.pj-sw.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
.pj-checks { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.pj-check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); cursor: pointer; }
.pj-check:hover { border-color: var(--primary); }
.pj-check:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.pj-check input { width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.pj-check span { display: flex; flex-direction: column; min-width: 0; }
.pj-check b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-check small { font-size: .74rem; color: var(--t3); }

/* ---------- Модальные окна ---------- */
.pj-modal-ov { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(12,16,30,.48); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.pj-modal-ov.open { opacity: 1; }
.pj-modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-radius: 20px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-pop); transform: translateY(12px) scale(.98); transition: transform .18s; }
.pj-modal-ov.open .pj-modal { transform: none; }
.pj-modal-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 18px; }
.pj-modal-text { color: var(--t2); font-size: .9rem; line-height: 1.55; }
.pj-modal-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Карточка задачи ---------- */
.td-ov { position: fixed; inset: 0; z-index: 1900; background: rgba(12,16,30,.32); opacity: 0; transition: opacity .2s; }
.td-ov.open { opacity: 1; }
.td-ov:not(.open), .pj-modal-ov:not(.open) { pointer-events: none; }
.td { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(480px, calc(100vw - 24px)); display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-pop); transform: translateX(30px); transition: transform .22s cubic-bezier(.2,.7,.3,1); }
.td-ov.open .td { transform: none; }
.td-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.td-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.td-body { flex: 1; overflow: auto; padding: 6px 18px 12px; }
.td-title { width: 100%; padding: 6px 0 10px; margin-bottom: 8px; border: none; border-bottom: 1px solid var(--line); background: transparent; color: var(--t1);
  font: inherit; font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.35; resize: none; outline: none; overflow: hidden; }
.td-title:focus { border-color: var(--primary); }
.td-prio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); }
.td-prio button { height: 32px; border: none; border-radius: 9px; background: transparent; color: var(--t2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.td-prio button.on { background: var(--card); color: var(--t1); box-shadow: 0 1px 3px rgba(20,30,60,.12); }
.td-prio button.p1.on { color: #2f9e44; }
.td-prio button.p2.on { color: #e67700; }
.td-prio button.p3.on { color: #e03131; }
.td-prio button:disabled { cursor: default; }
.td-links { display: flex; flex-direction: column; gap: 12px; padding: 14px; margin-top: 6px; border-radius: 14px; background: var(--bg-2); }
.td-lbl { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); margin-bottom: 6px; }
.td-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.td-link { display: inline-flex; align-items: center; border-radius: 99px; background: var(--card); border: 1px solid var(--line); max-width: 100%; }
.td-link button { border: none; background: none; font: inherit; font-size: .8rem; color: var(--t1); cursor: pointer; padding: 4px 4px 4px 11px; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-link button:hover { color: var(--primary); }
.td-link button.x { padding: 4px 8px 4px 2px; color: var(--t3); display: inline-flex; }
.td-link button.x .pj-i { width: 13px; height: 13px; }
.td-link button.x:hover { color: var(--danger); }
.td-addlink { display: flex; gap: 6px; flex-wrap: wrap; }
.td-addlink .pj-in:first-child { flex: 1 1 180px; }
.td-meta { margin-top: 14px; font-size: .76rem; color: var(--t3); }
.td-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }

/* ---------- Уведомления ---------- */
#pj-toasts { position: fixed; z-index: 4000; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.pj-toast { padding: 11px 18px; border-radius: 12px; background: var(--t1); color: var(--card); font-size: .86rem; font-weight: 600; box-shadow: var(--shadow-pop);
  animation: pj-in .2s ease-out; transition: opacity .3s, transform .3s; max-width: calc(100vw - 32px); }
.pj-toast.is-err { background: var(--danger); color: #fff; }
.pj-toast.out { opacity: 0; transform: translateY(8px); }
@keyframes pj-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Узкий экран ---------- */
@media (max-width: 860px) {
  .gx { --lw: 190px; }
  .gx-scroll { max-height: 70vh; }
  .pj-hero-empty { grid-template-columns: 1fr; padding: 22px; }
  .pj-head-row { flex-direction: column; align-items: stretch; }
  .pj-head-main { flex: none; }
  .pj-head-desc { white-space: normal; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .pj-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .pj-stat { min-width: 0; }
}
@media (max-width: 560px) {
  .gx { --lw: 150px; }
  .gx-cell { padding-left: calc(8px + var(--ind, 0) * 10px); gap: 5px; }
  .gx-av, .gx-cnt { display: none; }
  .pj-bar { align-items: stretch; }
  .pj-seg { overflow-x: auto; max-width: 100%; }
  .pj-row3 { grid-template-columns: 1fr 1fr; }
  .pj-row2 { grid-template-columns: 1fr; }
  .dt-kids { margin-left: 10px; padding-left: 10px; }
  .dt-dates { width: 100%; }
  .dt-date { flex: 1; width: auto; }
  .ps { grid-template-columns: 1fr; }
  .td { top: auto; right: 0; left: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; transform: translateY(30px); }
}

/* ==================== Проекты 2: легенда, входящие, агенты, карточка ==================== */
.gx-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; padding: 9px 14px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--line); font-size: .76rem; color: var(--t2); }
.gx-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.gx-legend b { color: var(--t1); font-weight: 600; }
.gx-legend i { display: inline-block; flex: none; }
.lg-bar { position: relative; width: 34px; height: 12px; border-radius: 5px; background: var(--primary); }
.lg-ms { width: 26px; height: 14px; border-left: 2px solid var(--primary); background: linear-gradient(var(--primary), var(--primary)) 0 1px / 18px 10px no-repeat; border-radius: 0 4px 4px 0; }
.lg-dir { width: 34px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--violet, #7c5cff) 45%, color-mix(in srgb, var(--violet, #7c5cff) 20%, var(--card)) 45%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--violet, #7c5cff) 55%, transparent); }
.lg-link { width: 26px; height: 10px; border: 1.6px solid var(--t2); border-left: none; border-bottom: none; border-radius: 0 3px 0 0; position: relative; }
.lg-link::after { content: ''; position: absolute; right: -4px; bottom: -5px; border: 4px solid transparent; border-top: 5px solid var(--t2); }
.lg-late { width: 22px; height: 12px; border-radius: 5px; box-shadow: 0 0 0 2px var(--danger); background: var(--danger-tint); }
.lg-agent { color: var(--violet, #7c5cff); display: inline-flex !important; }
.lg-agent .pj-i { width: 15px; height: 15px; }

.gx-cell.inbox { background: color-mix(in srgb, var(--warning-tint) 70%, var(--card)) !important; }
.gx-inbox-ico { display: inline-flex; color: var(--warning); }
.gx-row.inbox .gx-tl { background: color-mix(in srgb, var(--warning-tint) 35%, transparent); }
.gx-take { flex: none; height: 22px; padding: 0 8px; border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--line)); border-radius: 7px; background: var(--card);
  color: var(--warning); font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer; }
.gx-take:hover { background: var(--warning); color: #fff; }
.gx-rep { display: inline-flex; color: var(--t3); flex: none; }
.gx-rep .pj-i { width: 13px; height: 13px; }
.gx-av.agent { background: color-mix(in srgb, var(--violet, #7c5cff) 15%, transparent); color: var(--violet, #7c5cff); }
.gx-av.agent .pj-i { width: 14px; height: 14px; }
.gx-av.agent.is-working { background: var(--violet, #7c5cff); color: #fff; animation: pj-pulse 1.6s ease-in-out infinite; }
.gx-av.agent.is-failed { background: var(--danger-tint); color: var(--danger); }
@keyframes pj-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet, #7c5cff) 25%, transparent); } }
.gx-plan { display: inline-flex; align-items: center; gap: 5px; }
.gx-plan .pj-i { width: 13px; height: 13px; }
.kb-rep { display: inline-flex; color: var(--t3); }
.kb-rep .pj-i { width: 13px; height: 13px; }
.kb-inbox { font-size: .66rem; font-weight: 700; color: var(--warning); background: var(--warning-tint); padding: 1px 7px; border-radius: 99px; }
.pj-stat.is-soft b { color: var(--warning); }
.pj-lock { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--warning-tint);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); color: var(--t1); font-size: .86rem; }
.pj-lock > .pj-i { color: var(--warning); width: 20px; height: 20px; }
.pj-lock > div { flex: 1; display: flex; flex-direction: column; }
.pj-lock span { color: var(--t2); font-size: .8rem; }
.pj-plan-points { list-style: none; margin: 14px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.pj-plan-points li { display: flex; align-items: center; gap: 10px; color: var(--t1); font-size: .9rem; }
.pj-plan-points .pj-i { width: 28px; height: 28px; padding: 6px; border-radius: 9px; background: var(--primary-tint); color: var(--primary); box-sizing: border-box; }
.pj-modal .pj-plan-points { margin-bottom: 4px; }

/* Агенты */
.ag-intro { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 18px; align-items: start; margin-bottom: 16px; padding: 18px 20px; border-radius: 18px;
  border: 1px solid var(--line); background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--violet, #7c5cff) 12%, transparent), transparent 60%), var(--card); }
.ag-intro h3 { font-size: 1.05rem; margin-bottom: 6px; }
.ag-mcp { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); }
.ag-mcp span { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); }
.ag-mcp code { font-size: .82rem; word-break: break-all; color: var(--t1); user-select: all; }
.ag-mcp small { font-size: .76rem; color: var(--t2); line-height: 1.45; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.ag-card { border-radius: 18px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.ag-card header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 10%, transparent), transparent); }
.ag-ico { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--ac); color: #fff; box-shadow: 0 8px 16px -8px var(--ac); }
.ag-ico .pj-i { width: 20px; height: 20px; }
.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-main b { font-size: .95rem; }
.ag-main small { color: var(--t3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ag-list { display: flex; flex-direction: column; }
.ag-task { display: flex; flex-direction: column; gap: 3px; padding: 11px 16px; border: none; border-bottom: 1px solid var(--line-2, var(--line)); background: none;
  text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ag-task:last-child { border-bottom: none; }
.ag-task:hover { background: var(--bg-2); }
.ag-t { font-size: .88rem; font-weight: 600; }
.ag-meta { font-size: .74rem; color: var(--t3); }
.ag-res { font-size: .78rem; color: var(--t2); background: var(--bg-2); border-radius: 8px; padding: 6px 9px; margin-top: 4px; white-space: pre-wrap;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ag-st { align-self: flex-start; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px;
  background: var(--bg-2); color: var(--t3); }
.ag-st.s-working { background: color-mix(in srgb, var(--violet, #7c5cff) 15%, transparent); color: var(--violet, #7c5cff); }
.ag-st.s-failed { background: var(--danger-tint); color: var(--danger); }
.ag-empty { padding: 18px 16px; font-size: .82rem; color: var(--t3); }

/* Карточка задачи 2 */
.td { width: min(540px, calc(100vw - 24px)); }
.td-head { padding: 14px 16px 8px 20px; border-bottom: 1px solid var(--line); }
.td-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: .78rem; font-weight: 600; color: var(--t3); }
.td-crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-crumbs .pj-i { width: 12px; height: 12px; flex: none; }
.td-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--pc); flex: none; }
.td-new { margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: var(--primary-tint); color: var(--primary); font-size: .68rem; }
.td-body { padding: 14px 20px 16px; }
.td-title { font-size: 1.3rem; padding: 2px 0 8px; margin-bottom: 12px; border-bottom: 2px solid transparent; }
.td-title:hover:not(:disabled) { border-bottom-color: var(--line); }
.td-title:focus { border-bottom-color: var(--primary); }
.td-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.td-done { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: 11px; border: 1.5px solid var(--line-strong, var(--line));
  background: var(--card); color: var(--t2); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.td-done .pj-i { width: 18px; height: 18px; padding: 2px; border-radius: 6px; border: 1.5px solid currentColor; box-sizing: border-box; }
.td-done:hover:not(:disabled) { border-color: var(--success); color: var(--success); }
.td-done.on { background: var(--success); border-color: var(--success); color: #fff; }
.td-done.on .pj-i { border-color: #fff; }
.td-prio { flex: 1 1 100%; }
.td-prio button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.td-prio button i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong, var(--t3)); }
.td-prio button.p1 i { background: #2f9e44; }
.td-prio button.p2 i { background: #f59f00; }
.td-prio button.p3 i { background: #e03131; }
.td-sec { padding: 14px 0 4px; border-top: 1px solid var(--line-2, var(--line)); margin-top: 10px; }
.td-sec h4 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); }
.td-sec h4 .pj-i { width: 15px; height: 15px; }
.td-sec .pj-field { margin-bottom: 10px; }
.td-dates { display: grid; grid-template-columns: 1fr auto 1fr .75fr; gap: 8px; align-items: end; }
.td-arrow { display: inline-flex; padding-bottom: 21px; color: var(--t3); }
.td-dur { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: -2px 0 10px; }
.td-dur-text { font-size: .8rem; font-weight: 600; color: var(--t2); }
.td-dur-text.is-bad { color: var(--danger); }
.td-quick { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.td-quick button { height: 26px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--t2); font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; }
.td-quick button:hover { border-color: var(--primary); color: var(--primary); }
.td-repeat { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.td-repeat .pj-field { flex: 1 1 200px; margin-bottom: 6px; }
.td-repeat .pj-field > span { display: inline-flex; align-items: center; gap: 5px; }
.td-repeat .pj-field > span .pj-i { width: 13px; height: 13px; }
.td-wd { display: inline-flex; gap: 3px; margin-bottom: 6px; }
.td-wd.hidden { display: none; }
.td-wd button { width: 34px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--t2); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; }
.td-wd button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.td-rep-hint { display: block; margin-bottom: 4px; font-size: .74rem; }
.td-static { min-height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: 11px; background: var(--bg-2); color: var(--t2); font-size: .9rem; }
.td-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.td-who .pj-in { flex: 1 1 200px; }
.td-agent-note small { display: block; margin-top: 6px; font-size: .76rem; }
.td-agent-work { margin-top: 10px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--violet, #7c5cff) 7%, var(--bg-2)); display: flex; flex-direction: column; gap: 8px; }
.td-agent-res b { font-size: .76rem; color: var(--t2); }
.td-agent-res p { margin-top: 4px; font-size: .86rem; color: var(--t1); white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.td-inbox { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: 13px; background: var(--warning-tint);
  border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); }
.td-inbox > .pj-i { color: var(--warning); width: 20px; height: 20px; flex: none; }
.td-inbox > div { flex: 1; display: flex; flex-direction: column; font-size: .84rem; }
.td-inbox span { color: var(--t2); font-size: .78rem; }
.td-links { margin-top: 0; }
.td-addlink .pj-in:first-child { flex: 0 0 auto; width: auto; }
.td-addlink .pj-in:nth-child(2) { flex: 1 1 160px; }
.td-foot { padding: 12px 16px 14px 20px; }
@media (max-width: 560px) {
  .td-dates { grid-template-columns: 1fr 1fr; }
  .td-arrow { display: none; }
  .ag-intro { grid-template-columns: 1fr; }
  .ag-grid { grid-template-columns: 1fr; }
  .td-prio { min-width: 0; width: 100%; }
  .td-foot { flex-wrap: wrap; padding: 10px 14px 14px; }
  .td-foot .pj-grow { display: none; }
  .td-foot .pj-btn-primary { flex: 1 1 100%; justify-content: center; order: 5; }
  .td-foot [data-close] { flex: 1; justify-content: center; }
}

/* ==================== Спокойное оформление ====================
   Без градиентов, свечений и «прыгающих» карточек: плоские поверхности,
   тонкие рамки, один акцентный цвет. */
.pj-btn { border-radius: 8px; height: 36px; }
.pj-btn-primary, .pj-btn-primary:hover { background: var(--primary); box-shadow: none; filter: none; }
.pj-btn-primary:hover { background: var(--primary-2); }
.pj-card { border-radius: 12px; box-shadow: none; padding: 18px; gap: 8px; }
.pj-card::before, .pj-card::after { display: none; }
.pj-card:hover, .pj-card:focus-visible { transform: none; box-shadow: none; border-color: var(--line-strong, var(--t3)); }
.pj-card-new { min-height: 180px; border-width: 1px; }
.pj-card-new .pj-i { background: none; padding: 0; width: 22px; height: 22px; }
.pj-mark { border-radius: 8px; width: 34px; height: 34px; }
.pj-mark.lg { border-radius: 10px; width: 44px; height: 44px; }
.pj-role { letter-spacing: .02em; text-transform: none; font-size: .74rem; font-weight: 600; }
.pj-progress { height: 5px; }
.pj-progress i { background: var(--pc); }
.pj-hero-empty { background: var(--card); border-radius: 12px; padding: 26px; }
.pj-hero-art { box-shadow: none; border-radius: 10px; }
.pj-head { background: var(--card); border-radius: 12px; padding: 16px 18px; }
.pj-head::before { display: none; }
.pj-head h2 { font-size: 1.3rem; font-weight: 700; }
.pj-stat { border-radius: 10px; background: var(--card-2); }
.pj-seg { border-radius: 9px; padding: 3px; }
.pj-seg button { border-radius: 6px; }
.pj-seg button.on { box-shadow: 0 0 0 1px var(--line); }
.pj-fchip { border-radius: 8px; }
.pj-chip { border-radius: 6px; }
.gx-legend { border-radius: 10px; background: var(--card); }
.gx-scroll { border-radius: 12px; }
.gx-bar { background: var(--bc); box-shadow: none; border-radius: 6px; }
.gx-bar:hover { filter: brightness(1.05); box-shadow: none; }
.gx-bar.is-drag { box-shadow: 0 4px 12px -4px rgba(0,0,0,.3); }
.gx-ms-tag { box-shadow: none; border-radius: 0 5px 5px 0; }
.gx-c { box-shadow: none; }
.gx-av.agent.is-working { animation: none; }
.kb-col { border-radius: 10px; }
.kb-card { border-radius: 8px; box-shadow: none; }
.kb-card:hover, .kb-card:focus-visible { transform: none; box-shadow: none; border-color: var(--line-strong, var(--t3)); }
.kb-add { border-radius: 8px; }
.dt-node { border-radius: 8px; box-shadow: none; }
.ps-card { border-radius: 12px; }
.ps-row { border-radius: 8px; }
.pj-in { border-radius: 8px; }
.pj-check { border-radius: 8px; }
.pj-sw { border-radius: 6px; box-shadow: none; }
.pj-modal-ov { backdrop-filter: none; background: rgba(12,16,30,.4); }
.pj-modal { border-radius: 14px; }
.td { border-radius: 14px; }
.td-done { border-radius: 8px; }
.td-prio { border-radius: 9px; }
.td-prio button { border-radius: 6px; }
.td-inbox, .pj-lock, .td-agent-work { border-radius: 10px; }
.ag-intro { background: var(--card); border-radius: 12px; }
.ag-card { border-radius: 12px; }
.ag-card header { background: none; }
.ag-ico { background: var(--bg-2); color: var(--ac); box-shadow: none; border-radius: 9px; width: 36px; height: 36px; }
.ag-mcp { border-radius: 8px; }
.pj-plan-points .pj-i { background: none; padding: 0; width: 18px; height: 18px; color: var(--t3); }
.pj-toast { border-radius: 8px; }

/* Телефон: панели прокручиваются в одну строку, канбан листается колонками */
@media (max-width: 860px) {
  .pj-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .pj-bar > .pj-seg, .pj-bar-right { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .pj-bar-right::-webkit-scrollbar, .pj-bar > .pj-seg::-webkit-scrollbar { display: none; }
  .pj-bar-right > * { flex: none; }
  .gx-legend { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .gx-legend::-webkit-scrollbar { display: none; }
  .gx-hint { display: none; }
  .kb { grid-auto-columns: 84%; scroll-snap-type: x mandatory; }
  .kb-col { scroll-snap-align: start; }
  .pj-head { padding: 14px; }
  .pj-head h2 { font-size: 1.15rem; }
  .pj-stats { gap: 6px; }
  .pj-stat { padding: 8px 10px; }
  .pj-stat b { font-size: 1.05rem; }
  .pj-toolbar { align-items: center; margin-bottom: 14px; }
  .ag-intro { grid-template-columns: 1fr; padding: 14px; }
}
@media (max-width: 560px) {
  .gx { --lw: 140px; }
  .gx-scroll { max-height: 64vh; min-height: 300px; }
  .gx-cell .gx-chk, .gx-cell .gx-prio, .gx-cell .gx-rep { display: none; }
  .gx-take { padding: 0 6px; }
  .pj-stat:has(.pj-ring) { padding-left: 48px; }
  .td-sec { padding-top: 12px; }
  .td-quick { width: 100%; }
}

@media (max-width: 560px) {
  .pj-stats { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .pj-stats::-webkit-scrollbar { display: none; }
  .pj-stat { flex: none; min-width: 96px; }
  .pj-head-main { gap: 12px; }
}

/* Цвет проекта: полоса слева у карточки и шапки, отметки по смыслу */
.pj-card { border-left: 4px solid var(--pc); }
.pj-card-new { border-left-width: 1px; }
.pj-head { border-left: 4px solid var(--pc); }
.pj-mark { background: var(--pc); color: #fff; }
.pj-chip.is-soft { color: #2b8a3e; background: color-mix(in srgb, #2b8a3e 12%, transparent); }
.pj-stat:first-child b { color: var(--pc); }
.pj-seg button.on { color: var(--t1); box-shadow: inset 0 -2px 0 var(--pc, var(--primary)), 0 0 0 1px var(--line); }
.gx-legend { border-left: 3px solid var(--line-strong, var(--line)); }
.kb-col header b::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 2px; background: var(--pc, var(--primary)); }
.ag-card { border-top: 3px solid var(--ac); }
.ag-ico { background: color-mix(in srgb, var(--ac) 14%, transparent); }
.ps-card h3::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--pc, var(--primary)); }
.dt-node::before { width: 4px; }
