/* ═══════════ Мастерская мероприятия (.ws-) ═══════════ */

/* ───────── Список мероприятий ───────── */
.ws-list-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ws-list-bar .search-wrap { flex: 1 1 260px; max-width: 420px; }
.ws-list-bar .search { width: 100%; min-width: 0; }
.ws-evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ws-ev { --ev: var(--blue); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; background: color-mix(in srgb, var(--ev) 6%, var(--card)); border: 1px solid color-mix(in srgb, var(--ev) 35%, var(--line)); border-radius: var(--radius); color: var(--ink); overflow: hidden; transition: border-color .15s, transform .15s; min-width: 0; }
.ws-ev:hover { text-decoration: none; border-color: var(--ink); transform: translateY(-1px); }
.ws-ev-past { background: var(--paper-2); border-color: var(--line); }
.ws-ev .ws-ev-kind { display: inline-flex; align-items: center; gap: 7px; }
.ws-ev .ws-ev-kind::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--ev); flex: none; }
.ws-ev-past .ws-ev-kind::before { opacity: .5; }
.ws-ev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-ev-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--blue); font-weight: 700; }
.ws-ev-title { font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.ws-ev-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.ws-ev-cd { font-size: 12px; color: var(--blue-dk); background: var(--blue-soft); border-radius: 99px; padding: 1px 8px; }
.ws-ev-owner { font-size: 13px; color: var(--muted); }
.ws-ev-prog { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ws-ev-pct { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--blue-dk); line-height: 1; min-width: 58px; }
.ws-ev-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ws-ev-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.ws-ev-over { color: var(--red); font-weight: 600; }
.ws-ev-emptyline { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }

/* ───────── Шапка мастерской ───────── */
.ws-back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.ws-back:hover { color: var(--ink); text-decoration: none; }
.ws-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; padding: 22px 24px; margin-bottom: 14px;
  border: 1.5px solid var(--ink); border-radius: 14px;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(36,56,200,.07) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(36,56,200,.07) 23px 24px),
    var(--paper-2);
}
.ws-head-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ws-head-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-title { font-size: 34px; overflow-wrap: anywhere; }
.ws-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 18px; margin: 4px 0 0; }
.ws-fact { min-width: 0; }
.ws-fact dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ws-fact dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.ws-head-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ws-ready { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.ws-ready-top { display: flex; align-items: flex-end; gap: 14px; }
.ws-pct { font-family: var(--display); font-size: 64px; font-weight: 600; line-height: .9; color: var(--blue-dk); }
.ws-pct span { font-size: 30px; margin-left: 2px; color: var(--blue); }
.ws-ready-cap { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.ws-ready-cap b { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
.ws-ready-cap span { font-size: 13px; color: var(--muted); }
.ws-ready .progress { height: 10px; }
.ws-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.ws-cnt { --c: var(--ink-2); display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 8px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); cursor: pointer; font: inherit; text-align: left; color: var(--ink-2); }
.ws-cnt b { font-family: var(--display); font-size: 20px; color: var(--c); line-height: 1; }
.ws-cnt span { font-size: 11px; line-height: 1.2; }
.ws-cnt:hover { border-color: var(--c); }
.ws-cnt.zero { opacity: .55; }
.ws-overdue-btn { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--card)); color: var(--red); font: 600 14px var(--font); cursor: pointer; }
.ws-overdue-btn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.ws-overdue-btn .ic { margin-left: auto; }
.ws-ok-line { font-size: 13px; color: var(--green); }

.ws-banner { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 14px; border: 1px dashed color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--blue) 6%, var(--card)); }
.ws-banner > div:first-child { flex: 1 1 360px; min-width: 0; }
.ws-banner h3 { margin-bottom: 4px; }
.ws-banner p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 760px; }
.ws-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-tabs { position: sticky; top: 0; z-index: 5; background: var(--paper); margin: 0 -4px; padding: 0 4px; }
.ws-tabs .tabs { margin-bottom: 14px; }
.ws-body { min-width: 0; }
.ws-body input[type=date].cell:invalid:not(:focus) { color: var(--line); }

/* ───────── Общие куски вкладок ───────── */
.ws-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ws-tool-note { font-size: 13px; color: var(--muted); }
.ws-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ws-small { font-size: 13px; }
.ws-center { justify-content: center; margin-top: 12px; }
.ws-gap { margin: 14px 0; }
.ws-hint { font-size: 14px; color: var(--muted); margin: -4px 0 14px; max-width: 760px; }
.ws-note { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.ws-body .ws-mob { display: none; }

/* ───────── Задачи ───────── */
.ws-quick { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) 150px auto; gap: 8px; margin-bottom: 12px; padding: 10px; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); }
.ws-quick input { min-width: 0; border: 1px solid var(--line); background: var(--paper-2); border-radius: 7px; padding: 8px 10px; font-size: 14px; }
.ws-quick input:focus { border-color: var(--blue); background: #fff; outline: none; }
.ws-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ws-fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-fchip { --c: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: var(--card); color: var(--c); font: 500 13px var(--font); cursor: pointer; }
.ws-fchip.on { background: var(--c); color: #fff; border-color: var(--c); }
.ws-fchip-n { font-size: 11px; padding: 0 6px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.ws-fchip.on .ws-fchip-n { background: rgba(255,255,255,.25); }
.ws-frow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-fsel { font-size: 14px; max-width: 220px; }
.ws-fsearch { min-width: 180px; flex: 1 1 180px; max-width: 280px; font-size: 14px; }
.ws-fcheck { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.ws-fcheck input { width: 16px; height: 16px; }
.ws-found { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.ws-group { margin-bottom: 18px; }
.ws-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.ws-group-head h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.ws-group-n { font-size: 12px; color: var(--muted); }
.ws-group-bar { width: 90px; }
.ws-group-over { font-size: 12px; color: var(--red); font-weight: 600; }
.ws-ttable { min-width: 1560px; table-layout: fixed; }
.ws-ttable th:nth-child(1) { width: 230px; }
.ws-ttable th:nth-child(2) { width: 140px; }
.ws-ttable th:nth-child(3) { width: 140px; }
.ws-ttable th:nth-child(4), .ws-ttable th:nth-child(5) { width: 128px; }
.ws-ttable th:nth-child(6) { width: 54px; }
.ws-ttable th:nth-child(7) { width: 134px; }
.ws-ttable th:nth-child(9), .ws-ttable th:nth-child(10) { width: 230px; }
.ws-ttable th:nth-child(8) { width: 104px; }
.ws-ttable th:nth-child(11) { width: 40px; }
.ws-ttable .cell { min-width: 0; }
.ws-ttable select.cell { font-weight: 600; }
.ws-ttable td:first-child, .ws-ttable th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line-2); }
.ws-ttable th:first-child { background: var(--paper-2); }
.ws-ttable td.ws-c-title .cell { font-weight: 600; }
.ws-dur { display: inline-block; padding: 7px 4px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.ws-ttable tr.ws-overdue td { background: color-mix(in srgb, var(--red) 6%, var(--card)); }
.ws-ttable tr.ws-overdue td.ws-c-title { padding-left: 16px; }
.ws-ttable tr.ws-overdue td.ws-c-title::after { content: ''; position: absolute; left: 6px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.ws-ttable tr.ws-overdue td.ws-c-date:nth-child(5) .cell { color: var(--red); font-weight: 600; }
.ws-ttable tr.ws-done td.ws-c-title .cell { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--green) 60%, transparent); }

/* ───────── Команды ───────── */
.ws-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ws-team { display: flex; flex-direction: column; gap: 9px; padding: 14px 14px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.ws-team-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ws-team-head h3 { font-size: 18px; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.ws-team-leader { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ws-team-leader b { font-weight: 600; }
.ws-team-people { display: flex; flex-wrap: wrap; gap: 5px; }
.ws-person { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--blue-soft); color: var(--blue-dk); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-person-txt { background: transparent; color: var(--ink-2); border: 1px dashed var(--line); }
.ws-team-need { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.ws-team-line { font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.ws-team-comment { font-size: 13px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.ws-team-foot { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line-2); }
.ws-pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow-y: auto; }
.ws-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.ws-pick-box { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: transparent; flex: none; }
.ws-pick.on { border-color: var(--blue); background: var(--blue-soft); }
.ws-pick.on .ws-pick-box { background: var(--blue); border-color: var(--blue); color: #fff; }
.ws-pick-main { display: flex; flex-direction: column; min-width: 0; }
.ws-pick-main small { overflow: hidden; text-overflow: ellipsis; }

/* ───────── Копирование ───────── */
.ws-copy-sel { width: 100%; }
.ws-copy-info { font-size: 14px; color: var(--ink-2); margin: 0; }
.ws-copy-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ws-copy-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ws-copy-check input { width: 17px; height: 17px; }

/* ───────── Расписание: сетка ───────── */
.ws-sg-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.ws-sg { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(170px, 1fr)); min-width: calc(56px + var(--days) * 170px); }
.ws-sg-corner { border-bottom: 1.5px solid var(--ink); background: var(--paper-2); position: sticky; top: 0; }
.ws-sg-dayhead { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 10px 8px 8px; border-bottom: 1.5px solid var(--ink); border-left: 1px solid var(--line); background: var(--paper-2); position: relative; min-width: 0; }
.ws-sg-dayhead b { font-family: var(--display); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; padding-right: 28px; }
.ws-sg-add { position: absolute; top: 8px; right: 6px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink-2); cursor: pointer; }
.ws-sg-add:hover { border-color: var(--blue); color: var(--blue); }
.ws-sg-allday { font: 500 12px var(--font); text-align: left; color: var(--blue-dk); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); border-radius: 6px; padding: 3px 7px; cursor: pointer; max-width: 100%; }
.ws-sg-axis { position: relative; border-right: 1px solid var(--line); }
.ws-sg-axis span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ws-sg-axis span:first-child { transform: none; }
.ws-sg-col {
  position: relative; border-left: 1px solid var(--line); cursor: copy;
  background:
    repeating-linear-gradient(180deg, rgba(36,56,200,.16) 0 1px, transparent 1px var(--hour)),
    repeating-linear-gradient(180deg, rgba(36,56,200,.06) 0 1px, transparent 1px var(--q));
}
.ws-sg-col:hover { background-color: color-mix(in srgb, var(--blue) 3%, transparent); }
.ws-sg-item { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 0; overflow: hidden; padding: 3px 6px; text-align: left; font: 12px/1.25 var(--font); color: var(--ink); background: color-mix(in srgb, var(--blue) 6%, var(--card)); border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line)); border-radius: 5px; cursor: pointer; box-shadow: 0 1px 2px rgba(18,16,12,.06); }
.ws-sg-item:hover { border-color: var(--blue); z-index: 2; box-shadow: var(--shadow); }
.ws-sg-item.alt { background: color-mix(in srgb, var(--amber) 8%, var(--card)); border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.ws-sg-item.tight { flex-direction: row; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.ws-sg-time { font-size: 10.5px; color: var(--blue-dk); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ws-sg-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ws-sg-item.tight .ws-sg-title { white-space: nowrap; }
.ws-sg-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ws-sg-item.tight .ws-sg-meta { display: none; }

/* ───────── Расписание: список ───────── */
.ws-sl { display: flex; flex-direction: column; gap: 16px; }
.ws-sl-day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ws-sl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); }
.ws-sl-head h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .03em; }
.ws-sl-allday { display: flex; flex-direction: column; gap: 1px; width: calc(100% - 20px); margin: 10px 10px 0; padding: 7px 10px; text-align: left; font: 600 14px var(--font); color: var(--blue-dk); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent); border-radius: 8px; cursor: pointer; }
.ws-sl-allday small { font-weight: 400; color: var(--ink-2); }
.ws-sl-list { display: flex; flex-direction: column; padding: 4px 0; }
.ws-sl-item { display: flex; gap: 12px; align-items: flex-start; padding: 9px 12px; border: none; border-bottom: 1px solid var(--line-2); background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ws-sl-item:last-child { border-bottom: none; }
.ws-sl-item:hover { background: var(--paper-2); }
.ws-sl-time { flex: 0 0 50px; display: flex; flex-direction: column; font-family: var(--display); font-size: 16px; color: var(--blue-dk); line-height: 1.15; font-variant-numeric: tabular-nums; }
.ws-sl-time small { font-family: var(--font); font-size: 11px; color: var(--muted); }
.ws-sl-main { display: flex; flex-direction: column; min-width: 0; }
.ws-sl-main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ws-sl-none { padding: 10px 12px; margin: 0; }

/* ───────── Бюджет ───────── */
.ws-bsum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ws-bcard { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.ws-bcard span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.ws-bcard b { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.1; overflow-wrap: anywhere; }
.ws-bcard small { font-size: 13px; }
.ws-bcard.pos b { color: var(--green); }
.ws-bcard.neg b { color: var(--red); }
.ws-btable { min-width: 1100px; table-layout: fixed; }
.ws-btable th:nth-child(1) { width: 150px; }
.ws-btable th:nth-child(2) { width: 180px; }
.ws-btable th:nth-child(3) { width: 64px; }
.ws-btable th:nth-child(4), .ws-btable th:nth-child(5), .ws-btable th:nth-child(6) { width: 96px; }
.ws-btable th:nth-child(7) { width: 84px; }
.ws-btable th:nth-child(8) { width: 110px; }
.ws-btable th:nth-child(10) { width: 40px; }
.ws-btable .cell { min-width: 0; }
.ws-btable td.ws-c-num .cell { text-align: right; font-variant-numeric: tabular-nums; }
.ws-cats { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.ws-cat { display: grid; grid-template-columns: 150px minmax(0, 1fr) 140px; gap: 12px; align-items: center; }
.ws-cat-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.ws-cat-bars { display: flex; flex-direction: column; gap: 3px; }
.ws-cat-bar { height: 8px; border-radius: 99px; }
.ws-cat-bar.plan, .ws-cat-legend .plan::before { background: var(--blue); }
.ws-cat-bar.fact, .ws-cat-legend .fact::before { background: var(--amber); }
.ws-cat-sum { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; display: flex; flex-direction: column; }
.ws-cat-sum small { font-weight: 400; }
.ws-cat-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ws-cat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ws-cat-legend span::before { content: ''; width: 14px; height: 6px; border-radius: 99px; }
.ws-calc { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; padding: 16px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(36,56,200,.06) 23px 24px), var(--paper-2); }
.ws-calc-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
.ws-calc-in > .btn { align-self: center; justify-self: start; white-space: normal; text-align: left; }
.ws-calc-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ws-calc-field > span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.ws-calc-field input { width: 100%; font-size: 16px; }
.ws-calc-field b { font-family: var(--display); font-size: 20px; padding: 4px 0; }
.ws-calc-out { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ws-calc-price { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.ws-calc-price span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-weight: 700; }
.ws-calc-price b { font-family: var(--display); font-size: 44px; color: var(--blue-dk); line-height: 1; }
.ws-calc-dl { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.ws-calc-dl .ws-fact { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ws-calc-dl dt { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.ws-calc-dl dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ───────── Свободные таблицы ───────── */
.ws-tbl-bar { justify-content: space-between; }
.ws-tbl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-tbl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: 500 14px var(--font); color: var(--ink-2); cursor: pointer; }
.ws-tbl-chip span { font-size: 11px; color: var(--muted); }
.ws-tbl-chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ws-tbl-chip.on span { color: var(--line); }
.ws-tpls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -4px 0 14px; }
.ws-tpls .ws-lbl { margin-right: 4px; }
.ws-ftable-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ws-ftable-head h3 { font-size: 18px; text-transform: uppercase; }
.ws-ftable .cell { min-width: 110px; }
.ws-th { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.ws-th .ic { opacity: .45; }
.ws-th:hover { color: var(--blue); }
.ws-th:hover .ic { opacity: 1; }
.ws-th-add { width: 26px; height: 26px; justify-content: center; border: 1px dashed var(--line); border-radius: 6px; }
.ws-urlcell { display: flex; align-items: center; gap: 4px; }
.ws-urlcell a { flex: none; color: var(--blue); padding: 4px; }

/* ───────── Админ: чек-лист ───────── */
.ws-ck-top { flex: 1 1 260px; }
.ws-ck-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-ck-sum b { font-family: var(--display); font-size: 24px; color: var(--green); }
.ws-ck-sum span { color: var(--muted); font-size: 14px; }
.ws-ck-bar { flex: 1 1 140px; max-width: 260px; }
.ws-ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.ws-ck-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.ws-ck-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); }
.ws-ck-head h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.ws-ck-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ws-ck-list { display: flex; flex-direction: column; }
.ws-ck { display: flex; align-items: flex-start; gap: 8px; padding: 6px 6px 6px 10px; border-bottom: 1px solid var(--line-2); }
.ws-ck-cb { width: 19px; height: 19px; margin-top: 7px; flex: none; accent-color: var(--green); cursor: pointer; }
.ws-ck-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-ck .cell { width: 100%; border: 1px solid transparent; background: transparent; padding: 5px 6px; border-radius: 5px; font: inherit; font-size: 14px; resize: none; overflow: hidden; min-width: 0; }
.ws-ck .cell:hover { border-color: var(--line); }
.ws-ck .cell:focus { border-color: var(--blue); background: #fff; outline: none; }
.ws-ck-title { font-weight: 500; }
.ws-ck-meta { display: flex; gap: 6px; }
.ws-ck-meta .cell { font-size: 12.5px; color: var(--ink-2); padding: 3px 6px; }
.ws-ck-owner { flex: 1 1 auto; }
.ws-ck-due { flex: 0 0 136px; width: 136px; }
.ws-ck.done .ws-ck-title { text-decoration: line-through; color: var(--muted); }
.ws-ck.late .ws-ck-due { color: var(--red); font-weight: 600; }
.ws-ck.late { background: color-mix(in srgb, var(--red) 6%, var(--card)); }
.ws-ck-add { display: flex; gap: 4px; padding: 8px 6px 8px 10px; margin-top: auto; }
.ws-ck-addinp { flex: 1; min-width: 0; border: 1px dashed var(--line); background: var(--paper-2); border-radius: 7px; padding: 7px 9px; font-size: 14px; }
.ws-ck-addinp:focus { border-style: solid; border-color: var(--blue); background: #fff; outline: none; }

/* ───────── Ссылки ───────── */
.ws-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ws-link { --c: var(--blue); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 0; background: var(--card); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); border-radius: var(--radius); min-width: 0; }
.ws-link-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 12px; min-width: 0; color: var(--ink); }
.ws-link-main:hover { text-decoration: none; }
.ws-link-main:hover b { color: var(--blue); }
.ws-link-ic { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); flex: none; }
.ws-link-text { display: flex; flex-direction: column; min-width: 0; }
.ws-link-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-link-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── Адаптив ───────── */
@media (max-width: 1100px) {
  .ws-head { grid-template-columns: 1fr; }
  .ws-ready { max-width: 520px; }
  .ws-bsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-calc { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ws-body .ws-desk { display: none; }
  .ws-body .ws-mob { display: flex; }
  .ws-tabs { position: static; }
  .ws-quick { grid-template-columns: 1fr 1fr; }
  .ws-quick .ws-q-title { grid-column: 1 / -1; }
  .ws-quick .btn { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .ws-title { font-size: 26px; }
  .ws-head { padding: 16px 14px; gap: 14px; }
  .ws-pct { font-size: 52px; }
  .ws-facts { grid-template-columns: 1fr 1fr; }
  .ws-ttable, .ws-btable { min-width: 0; table-layout: auto; }
  .ws-ttable tr, .ws-btable tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; padding: 10px 10px 8px; position: relative; }
  .ws-ttable td, .ws-btable td { flex-direction: column; align-items: stretch; gap: 0; padding: 0; min-width: 0; }
  .ws-ttable td::before, .ws-btable td::before { flex: none; font-size: 10px; padding-left: 5px; }
  .ws-ttable td.ws-c-title, .ws-ttable td.ws-c-long, .ws-btable td.ws-c-item, .ws-btable td.ws-c-long { grid-column: 1 / -1; }
  .ws-ttable td.ws-c-title { position: relative; z-index: auto; background: transparent; padding-right: 36px; box-shadow: none; }
  .ws-ttable td.ws-c-title::before { display: none; }
  .ws-ttable td.ws-c-dur { display: none; }
  .ws-ttable td.col-act, .ws-btable td.col-act { position: absolute; top: 6px; right: 4px; width: auto; padding: 0; }
  .ws-btable td.ws-c-chk { flex-direction: row; align-items: center; }
  .ws-btable td.ws-c-chk::before { flex: 0 0 auto; margin-right: 4px; }
  .ws-ttable .cell, .ws-btable .cell { padding: 4px 5px; }
  .ws-ttable .cell, .ws-btable .cell { border-bottom-color: var(--line-2); border-radius: 5px 5px 0 0; }
  .ws-ttable tr.ws-overdue td { background: transparent; }
  .ws-ttable tr.ws-overdue td.ws-c-title { padding-left: 12px; }
  .ws-ttable tr.ws-overdue td.ws-c-title::after { left: 0; top: 13px; }
  .ws-ttable tr.ws-overdue { background: color-mix(in srgb, var(--red) 6%, var(--card)); }
  .ws-ttable td.ws-c-title .cell { font-size: 15px; }
  .ws-ftable .cell { min-width: 0; }
  .ws-ck-grid { grid-template-columns: 1fr; }
  .ws-cat { grid-template-columns: 100px minmax(0, 1fr) 96px; gap: 8px; }
  .ws-calc-in { grid-template-columns: 1fr 1fr; }
  .ws-fsel, .ws-fsearch { flex: 1 1 calc(50% - 4px); max-width: none; min-width: 0; }
  .ws-teams, .ws-links, .ws-evgrid { grid-template-columns: 1fr; }
  .ws-calc-price b { font-size: 36px; }
}
@media (max-width: 420px) {
  .ws-bsum { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ws-bcard b { font-size: 20px; }
  .ws-calc-in { grid-template-columns: 1fr; }
}
.ws-calc-cap { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ws-calc-field .ws-calc-cap input { width: auto; font-size: 14px; }
