/* Задачи АНТ — оформление. Светлая тема — стандарт (решение владельца 06.12.2026). */

:root {
  /* бумага */
  --fon: #F4F1EA;
  --panel: #FCFBF8;
  --panel2: #F0EBE1;
  --panel3: #F7F4ED;
  /* линии */
  --linia: #E6E0D4;
  --linia2: #D8D2C6;
  --linia3: #C9C2B4;
  /* текст */
  --tekst: #2A2F36;
  --tekst-yar: #14181C;
  --tihiy: #575E6B;
  --tihiy2: #646A76;
  /* бирюза */
  --brand: #3F8F88;
  --brand-h: #2E6F6A;
  --brand-d: #2E6F6A;
  --brand-s: #2E6F6A;
  --na-brand: #FFFFFF;
  /* смысловые */
  --uspeh: #2E7D4F;
  --oshibka: #9B3A3F;
  --vnimanie: #9A6B14;
  --topbar: rgba(244, 241, 234, .92);
  --ten: 0 1px 2px rgba(60, 50, 30, .05);
  --ten-krup: 0 14px 34px rgba(60, 50, 30, .10);
  --z: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --t: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --m: 'IBM Plex Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--t);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--tekst);
  background: var(--fon);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 460px at 50% -140px, rgba(63, 143, 136, .10), transparent 70%),
    radial-gradient(620px 420px at 100% 100%, rgba(169, 124, 46, .05), transparent 70%);
}

a { color: var(--brand-s); text-decoration: none; }
a:hover { color: var(--brand-h); text-decoration: underline; }

h1, h2, h3 { margin: 0; color: var(--tekst-yar); }

.mono { font-family: var(--m); }
.tihiy { color: var(--tihiy2); }
.small { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.wrap { white-space: normal; }
.right { text-align: right; }
.hint { font-size: 12px; color: var(--tihiy2); margin: 10px 2px 0; }
em.tihiy { font-style: normal; }
.card > .props:first-child { border-top: 0; padding-top: 0; }

/* ---------- знак ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 54px; height: 40px; border-radius: 12px;
  background: #0B0D11;
  display: grid; place-items: center; flex: none;
}
.brand-mark img { width: 40px; height: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b {
  font-family: var(--z); font-weight: 600; font-size: 14px; letter-spacing: .4px; color: var(--tekst-yar);
}
.brand-text i {
  font-style: normal; font-size: 9.5px; letter-spacing: 1.6px; color: var(--tihiy2);
}
.brand-small .brand-mark { width: 46px; height: 34px; border-radius: 10px; }
.brand-small .brand-mark img { width: 34px; }
.brand-small .brand-text b { font-size: 12.5px; }

/* ---------- вход ---------- */
.auth-body {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 18px;
}
.auth-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 24, 28, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 28, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(600px 520px at 50% 30%, #000, transparent 78%);
  mask-image: radial-gradient(600px 520px at 50% 30%, #000, transparent 78%);
}
.auth-wrap { width: 100%; max-width: 404px; }
.auth-card {
  margin-top: 26px;
  background: var(--panel);
  border: 1px solid var(--linia2);
  border-radius: 22px;
  padding: 26px 26px 24px;
  box-shadow: var(--ten-krup);
}
.auth-card h1 { font-family: var(--z); font-size: 27px; font-weight: 600; letter-spacing: -.4px; margin: 0 0 6px; }
.lead { color: var(--tihiy); font-size: 13px; margin: 0 0 20px; }
.auth-foot { text-align: center; font-size: 11px; color: var(--tihiy2); margin: 20px 0 0; letter-spacing: .3px; }

.nadzag {
  display: flex; align-items: center; gap: 8px;
  font-size: 9.5px; letter-spacing: 1.7px; text-transform: uppercase;
  color: var(--brand-h); font-weight: 600; margin-bottom: 8px;
}
.nadzag::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--brand); flex: none; }

/* ---------- приложение ---------- */
.app-body { background: var(--fon); }
.side {
  position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 30;
  background: var(--panel); border-right: 1px solid var(--linia2);
  padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 18px;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav::-webkit-scrollbar { display: none; }
.nav { scrollbar-width: none; }
.snav {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 11px;
  color: var(--tihiy); font-size: 13.5px; font-weight: 500;
}
.snav:hover { background: var(--panel3); color: var(--tekst); text-decoration: none; }
.snav.on { background: var(--brand-h); color: var(--na-brand); }
.snav.on:hover { background: var(--brand-h); color: var(--na-brand); }
.snav svg { flex: none; }
.snav .cnt {
  margin-left: auto; font-family: var(--m); font-size: 10.5px; line-height: 1;
  padding: 3px 6px; border-radius: 7px; background: rgba(63, 143, 136, .14); color: var(--brand-h);
}
.snav.on .cnt { background: rgba(255, 255, 255, .2); color: #fff; }

.side-foot { margin-top: auto; border-top: 1px solid var(--linia); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-text b { font-size: 12.5px; font-weight: 600; color: var(--tekst-yar); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { font-size: 10.5px; color: var(--tihiy2); }

.ava {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: #EAF1EF; border: 1px solid #CFE0DC;
  font-family: var(--m); font-size: 11px; color: var(--brand-h);
}
.ava.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; }

.btn-quiet {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; border: 1px solid var(--linia2); color: var(--tihiy);
  border-radius: 10px; padding: 9px 10px; font-family: var(--t); font-size: 12px; cursor: pointer;
}
.btn-quiet:hover { color: var(--tekst); border-color: var(--linia3); background: var(--panel3); }

.main { margin-left: 232px; max-width: 1180px; min-height: 100dvh; }
.top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 22px 28px 16px;
}
.top h1 { font-family: var(--z); font-size: 25px; font-weight: 600; letter-spacing: -.4px; margin: 0; }
.sub { color: var(--tihiy2); font-size: 12px; margin: 4px 0 0; }
.page { padding: 0 28px 56px; }

/* ---------- карточки ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--linia2);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--ten);
}
.card.p0 { padding: 0; overflow: hidden; }
.block { margin-top: 24px; }
.block-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 2px; }
.block-head::before { content: ""; width: 18px; height: 2px; background: var(--brand); border-radius: 2px; }
.block-head h2 { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--tihiy); font-weight: 600; margin: 0; }
.block-head .link { margin-left: auto; font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; }
.block-head .count { margin-left: auto; font-family: var(--m); font-size: 11px; color: var(--tihiy2); }

.tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--linia2); border: 1px solid var(--linia2);
  border-radius: 16px; overflow: hidden;
}
.tile { background: var(--panel); padding: 15px 16px; }
.tile .lbl { font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tihiy2); margin-bottom: 8px; }
.tile .val { font-family: var(--m); font-size: 26px; line-height: 1; color: var(--tekst-yar); }
.tile .val.ok { color: var(--uspeh); }
.tile .val.bad { color: var(--oshibka); }

.note p { margin: 0 0 10px; font-size: 13px; color: var(--tekst); }
.note p:last-child { margin-bottom: 0; }

/* ---------- таблицы ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--tihiy2); font-weight: 600; background: var(--panel2);
  padding: 11px 14px; border-bottom: 1px solid var(--linia2); white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--linia); vertical-align: middle; overflow-wrap: break-word; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(63, 143, 136, .04); }
.row-off td { opacity: .55; }
.empty { padding: 26px 16px !important; text-align: center; color: var(--tihiy2); }

.person { display: flex; align-items: center; gap: 10px; }
.person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.person b { font-weight: 600; color: var(--tekst-yar); font-size: 13px; }
.person b a { color: inherit; }
.person b a:hover { color: var(--brand-h); }

/* ---------- значки ---------- */
.badge {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .4px;
  padding: 3px 8px; border-radius: 7px; white-space: nowrap;
}
.b-root { color: var(--brand-h); background: rgba(63, 143, 136, .12); border: 1px solid rgba(63, 143, 136, .3); }
.b-admin { color: var(--brand-h); background: rgba(63, 143, 136, .08); border: 1px solid rgba(63, 143, 136, .22); }
.b-user { color: var(--tihiy); background: rgba(87, 94, 107, .08); border: 1px solid rgba(87, 94, 107, .18); }
.b-head { color: #245B57; background: rgba(63, 143, 136, .16); border: 1px solid rgba(63, 143, 136, .28); }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: var(--uspeh); }
.dot.bad { background: var(--oshibka); }

/* ---------- формы ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--tihiy2); font-weight: 600; margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 13px;
  background: #FFFFFF; border: 1px solid var(--linia2); border-radius: 11px;
  color: var(--tekst); font-family: var(--t); font-size: 14px; outline: none;
}
.field textarea { height: auto; padding: 12px 13px; min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9AA0AA; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(63, 143, 136, .14);
}
.field input:disabled, .field input[readonly] { background: var(--panel3); color: var(--tihiy); }
.form-card { max-width: 760px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checks { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--tekst); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------- кнопки ---------- */
.btn-main, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 11px;
  font-family: var(--t); font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn-main { background: var(--brand-h); color: var(--na-brand); border-color: var(--brand-h); }
.btn-main:hover { background: var(--brand); border-color: var(--brand); color: var(--na-brand); text-decoration: none; }
.btn { background: #FFFFFF; color: var(--tekst); border-color: var(--linia2); }
.btn:hover { border-color: var(--linia3); color: var(--tekst-yar); background: var(--panel3); text-decoration: none; }
.btn.small, .btn-main.small { height: 34px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.top-btn { flex: none; }
.actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- сообщения ---------- */
.alert { border-radius: 11px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-bad { background: rgba(155, 58, 63, .07); border-color: rgba(155, 58, 63, .3); color: #8E3439; }
.alert-ok { background: rgba(46, 125, 79, .07); border-color: rgba(46, 125, 79, .3); color: #2A7047; }

.pager { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pager .tihiy { margin-right: auto; font-size: 11.5px; }

/* ---------- поручения ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--tihiy); font-size: 12.5px; margin-bottom: 12px; }
.back:hover { color: var(--tekst); text-decoration: none; }
.back svg { transform: rotate(180deg); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  background: var(--panel2); color: var(--tihiy); font-size: 12.5px; font-weight: 500;
  border: 1px solid transparent; flex: none; white-space: nowrap;
}
.chip:hover { color: var(--tekst); border-color: var(--linia3); text-decoration: none; }
.chip.on { background: #FFFFFF; color: var(--tekst-yar); border-color: var(--brand); box-shadow: var(--ten); }
.chip .n { font-family: var(--m); font-size: 10.5px; opacity: .75; }

.status-form { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.status-form label { font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tihiy2); font-weight: 600; }
.status-form select {
  height: 38px; padding: 0 36px 0 12px; border-radius: 10px;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23646A76' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  border: 1px solid var(--linia2); color: var(--tekst);
  font-family: var(--t); font-size: 13px; appearance: none; cursor: pointer;
}
.status-form select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(63, 143, 136, .14); }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-row {
  display: flex; gap: 12px; align-items: stretch; padding: 13px 14px 13px 0;
  background: var(--panel); border: 1px solid var(--linia2); border-radius: 15px;
  color: inherit; text-decoration: none; box-shadow: var(--ten);
}
.task-row:hover { border-color: var(--brand); background: #FFFFFF; color: inherit; text-decoration: none; }
.pr-line { width: 3px; border-radius: 3px; margin-left: 10px; flex: none; background: var(--tihiy2); }
.prio-nizkiy { background: #9AA0AA; }
.prio-obychnyy { background: #6E7480; }
.prio-vysokiy { background: #C08A1E; }
.prio-kriticheskiy { background: #B0454B; }
.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.task-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-num { font-family: var(--m); font-size: 10.5px; color: var(--tihiy2); }
.task-title { font-size: 14.5px; font-weight: 500; color: var(--tekst-yar); line-height: 1.35; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11.5px; color: var(--tihiy2); }
.task-meta .wait { color: var(--brand-h); }
.task-meta .due { margin-left: auto; }
.chev { align-self: center; color: var(--tihiy2); display: flex; flex: none; }

.st { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.st-new { color: #2E6F6A; background: rgba(63, 143, 136, .12); }
.st-accepted { color: #575E6B; background: rgba(87, 94, 107, .10); }
.st-progress { color: #8A5A00; background: rgba(169, 124, 46, .14); }
.st-review { color: #245B57; background: rgba(63, 143, 136, .18); }
.st-done { color: #2E7D4F; background: rgba(46, 125, 79, .12); }
.st-returned { color: #9B3A3F; background: rgba(155, 58, 63, .12); }
.st-cancelled { color: #6E7480; background: rgba(87, 94, 107, .08); }

.prio-tag { font-size: 10.5px; color: var(--tihiy); display: inline-flex; align-items: center; gap: 5px; }
.prio-tag i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.due { font-family: var(--m); font-size: 10.5px; color: var(--tihiy); white-space: nowrap; }
.due.over { color: var(--oshibka); }

.empty-card { border: 1px dashed var(--linia3); border-radius: 15px; padding: 30px 20px; text-align: center; color: var(--tihiy2); font-size: 13px; background: rgba(255, 255, 255, .35); }
.empty-card b { display: block; color: var(--tekst); font-size: 14px; margin-bottom: 4px; }

.task-card { padding: 20px 22px; }
.t-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.t-head .due { margin-left: auto; }
.t-title { font-family: var(--z); font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.2px; margin: 0 0 14px; }
.props { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; border-top: 1px solid var(--linia); padding-top: 14px; }
.prop span { display: block; font-size: 9.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--tihiy2); margin-bottom: 3px; }
.prop b { font-size: 12.5px; font-weight: 500; color: var(--tekst); }
.prop b.over { color: var(--oshibka); }
.prop .left { display: block; margin-top: 2px; font-family: var(--t); font-size: 11px; font-weight: 400; color: var(--tihiy2); text-transform: none; letter-spacing: 0; }
.prop .left.over { color: var(--oshibka); }
.prop .left.soon { color: var(--vnimanie); }
.prop-link { color: var(--tekst); border-bottom: 1px dotted var(--linia3); }
.prop-link:hover { color: var(--brand-h); border-bottom-color: var(--brand); text-decoration: none; }
.desc { margin: 16px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--tekst); }
.result { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(46, 125, 79, .07); border: 1px solid rgba(46, 125, 79, .22); }
.result span { display: block; font-size: 9.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--uspeh); margin-bottom: 4px; }
.result p { margin: 0; font-size: 13px; }

.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.file-row .file-list { margin-top: 0; }
.file-row .upload { margin-top: 0; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--linia2); font-size: 12px; color: var(--tekst); max-width: 100%; box-sizing: border-box; }
.file-chip:hover { border-color: var(--brand); color: var(--tekst-yar); text-decoration: none; background: #FFFFFF; }
.file-chip svg { color: var(--brand-h); flex: none; }
.file-chip .file-name { color: inherit; border-bottom: 1px dotted var(--linia3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .file-name:hover { color: var(--brand-h); border-bottom-color: var(--brand); text-decoration: none; }
.file-dl { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 2px; border-radius: 8px; color: var(--tihiy); flex: none; }
.file-dl:hover { background: var(--panel3); color: var(--brand-h); text-decoration: none; }
.file-dl svg { color: currentColor; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip i { font-style: normal; font-family: var(--m); font-size: 10px; color: var(--tihiy2); }
.upload { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.upload input[type=file] { font-size: 12px; color: var(--tihiy); max-width: 100%; }
.upload input[type=file]::file-selector-button {
  background: #FFFFFF; color: var(--tekst); border: 1px solid var(--linia2);
  border-radius: 9px; padding: 8px 12px; margin-right: 10px;
  font-family: var(--t); font-size: 12px; font-weight: 500; cursor: pointer;
}
.upload input[type=file]::file-selector-button:hover { border-color: var(--brand); }

.file-pick { display: flex; align-items: center; gap: 11px; }
.file-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 12px; background: #FFFFFF; border: 1px solid var(--linia2);
  color: var(--brand-h); cursor: pointer;
}
.file-btn:hover { border-color: var(--brand); background: var(--panel3); color: var(--brand-h); }
.file-btn:active { transform: scale(.97); }
.file-note { font-size: 12px; color: var(--tihiy2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-note.chosen { color: var(--tekst); }

.act-box { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.act-row { display: flex; gap: 10px; flex-wrap: wrap; }
.act-row .act { flex: 1 1 190px; display: flex; }
.act-row .act .btn-main { width: 100%; }
.btn-return { flex: 1 1 190px; color: var(--oshibka); border-color: rgba(155, 58, 63, .35); background: #FFFFFF; }
.btn-return:hover { background: rgba(155, 58, 63, .06); border-color: rgba(155, 58, 63, .55); color: var(--oshibka); text-decoration: none; }
.icon-ghost {
  width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none;
  border-radius: 9px; border: 1px solid transparent; color: var(--tihiy2);
}
.icon-ghost:hover { color: var(--oshibka); border-color: rgba(155, 58, 63, .35); background: rgba(155, 58, 63, .05); text-decoration: none; }
.act { margin: 0; }
.act-stack { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--linia2); border-radius: 14px; padding: 14px; }
.act-stack .field textarea { min-height: 84px; }
.danger { background: var(--panel); border: 1px solid var(--linia2); border-radius: 14px; padding: 12px 14px; }
.danger summary { cursor: pointer; font-size: 12.5px; color: var(--oshibka); list-style: none; }
.danger summary::-webkit-details-marker { display: none; }
.danger summary::before { content: "▸ "; }
.danger[open] summary::before { content: "▾ "; }
.danger form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.danger-icon { width: fit-content; padding: 0; border: 0; background: transparent; }
.danger-icon > summary {
  width: 40px; height: 40px; display: grid; place-items: center; list-style: none;
  border-radius: 11px; border: 1px solid var(--linia2); background: #FFFFFF; color: var(--oshibka);
}
.danger-icon > summary::-webkit-details-marker { display: none; }
.danger-icon > summary::before { content: none; }
.danger-icon > summary:hover { border-color: rgba(155, 58, 63, .45); background: rgba(155, 58, 63, .06); }
.danger-icon[open] { width: 100%; padding: 12px 14px; border: 1px solid var(--linia2); background: var(--panel); border-radius: 14px; }
.danger-icon[open] > summary { margin-bottom: 10px; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid rgba(155, 58, 63, .45); background: #FFFFFF; color: var(--oshibka); font-family: var(--t); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.btn-danger:hover { background: rgba(155, 58, 63, .07); }
.assign-row { display: flex; gap: 8px; }
.assign-row select { flex: 1; height: 44px; background: #FFFFFF; border: 1px solid var(--linia2); border-radius: 11px; color: var(--tekst); font-family: var(--t); font-size: 13px; padding: 0 10px; }

.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.c-body { flex: 1; min-width: 0; }
.c-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.c-top b { font-size: 12px; font-weight: 600; color: var(--tekst); }
.c-top time { font-family: var(--m); font-size: 10px; color: var(--tihiy2); }
.c-text { background: var(--panel3); border: 1px solid var(--linia); border-radius: 4px 12px 12px 12px; padding: 9px 12px; font-size: 12.5px; line-height: 1.5; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.comment-form textarea { width: 100%; min-height: 70px; background: #FFFFFF; border: 1px solid var(--linia2); border-radius: 11px; color: var(--tekst); font-family: var(--t); font-size: 13px; padding: 10px 12px; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(63, 143, 136, .14); }
.comment-form button { align-self: auto; }
.comment-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-tools .file-btn { width: 44px; height: 44px; }
.comment-tools .file-note { flex: 1; min-width: 80px; }
.comment .file-list { margin-top: 8px; }
.c-text + .file-list { margin-top: 8px; }

.log { display: flex; flex-direction: column; gap: 9px; }
.log-row { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: var(--tihiy); }
.log-row time { font-family: var(--m); font-size: 10px; width: 96px; flex: none; color: var(--tihiy2); white-space: nowrap; }
.log-row b { color: var(--tekst); font-weight: 600; }

.prio-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prio-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 8px; border-radius: 11px; background: #FFFFFF; border: 1px solid var(--linia2); font-size: 12px; color: var(--tihiy); cursor: pointer; text-align: center; }
.prio-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.prio-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.prio-opt:has(input:checked) { border-color: var(--brand); color: var(--tekst-yar); background: var(--panel3); box-shadow: 0 0 0 2px rgba(63, 143, 136, .12); font-weight: 600; }
.prio-opt.kriticheskiy:has(input:checked) { border-color: rgba(155, 58, 63, .5); box-shadow: 0 0 0 2px rgba(155, 58, 63, .1); }

/* ---------- кабинет ---------- */
.who { text-decoration: none; color: inherit; border-radius: 12px; }
.who:hover { background: var(--panel3); text-decoration: none; color: inherit; }
img.ava { object-fit: cover; display: block; padding: 0; background: var(--panel2); }
.ava.xl { width: 66px; height: 66px; border-radius: 20px; font-size: 19px; }
.profile-card { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.profile-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.profile-info b { font-family: var(--z); font-size: 18px; font-weight: 600; color: var(--tekst-yar); }
.profile-info > span { font-size: 12.5px; color: var(--tihiy); }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.setline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linia); font-size: 13px; color: var(--tihiy); }
.setline:last-child { border-bottom: 0; }
.setline b { color: var(--tekst-yar); font-weight: 500; }
.avatar-remove { margin-top: 10px; }
.avatar-wrap { flex: none; }
.avatar-form { display: block; }
.avatar-edit { position: relative; display: inline-flex; cursor: pointer; border-radius: 20px; }
.avatar-edit .ava.xl { border: 2px solid transparent; transition: border-color .15s, filter .15s; }
.avatar-edit:hover .ava.xl { border-color: var(--brand); }
.avatar-badge {
  position: absolute; right: -7px; bottom: -7px; width: 26px; height: 26px; border-radius: 9px;
  background: var(--brand-h); color: #fff; display: grid; place-items: center;
  border: 2px solid var(--panel); box-shadow: var(--ten);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.profile-hint { font-size: 11.5px; color: var(--tihiy2); margin-top: 2px; }
.avatar-form noscript .btn { margin-top: 8px; }

/* ---------- сообщения ---------- */
.dialog-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--linia); color: inherit; }
.dialog-row:last-child { border-bottom: 0; }
.dialog-row:hover { background: rgba(63, 143, 136, .05); text-decoration: none; color: inherit; }
.d-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-body b { font-size: 13.5px; font-weight: 600; color: var(--tekst-yar); }
.d-body span { font-size: 12px; color: var(--tihiy2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.d-right time { font-family: var(--m); font-size: 10px; color: var(--tihiy2); }
.unread { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand-h); color: #fff; font-family: var(--m); font-style: normal; font-size: 10px; }

.msgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.msg { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; position: relative; }
.msg time { display: block; font-family: var(--m); font-size: 9px; opacity: .6; margin-top: 4px; text-align: right; }
.msg.in { background: var(--panel); border: 1px solid var(--linia2); border-bottom-left-radius: 5px; align-self: flex-start; }
.msg.out { background: var(--brand-h); border: 1px solid var(--brand-h); border-bottom-right-radius: 5px; align-self: flex-end; color: #fff; }
.dialog-form { display: flex; gap: 9px; align-items: flex-end; background: var(--panel); border: 1px solid var(--linia2); border-radius: 15px; padding: 10px; box-shadow: var(--ten); }
.dialog-form textarea { flex: 1; min-height: 46px; max-height: 160px; resize: none; background: transparent; border: 0; outline: none; font-family: var(--t); font-size: 13.5px; color: var(--tekst); padding: 8px; }
.dialog-form textarea::placeholder { color: #9AA0AA; }

.new-dialog { margin-bottom: 14px; }
.new-dialog > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--linia2);
  font-size: 12.5px; font-weight: 500; color: var(--tekst);
}
.new-dialog > summary::-webkit-details-marker { display: none; }
.new-dialog > summary::before { content: "+"; font-family: var(--m); color: var(--brand-h); font-size: 15px; line-height: 1; }
.new-dialog[open] > summary::before { content: "−"; }
.new-dialog > summary:hover { border-color: var(--linia3); background: var(--panel3); }
.new-dialog .people-list { margin-top: 10px; max-height: 420px; overflow: auto; }


@media (max-width: 900px) {
  .side {
    position: static; width: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 10px; padding: 12px 14px;
    border-right: 0; border-bottom: 1px solid var(--linia2);
  }
  .brand { margin-right: auto; }
  .brand-text i { display: none; }
  .nav { flex-direction: row; order: 3; width: 100%; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .snav { padding: 7px 9px; font-size: 12px; white-space: nowrap; gap: 8px; }
  .snav svg { width: 16px; height: 16px; }
  .snav .cnt { font-size: 9.5px; padding: 2px 5px; }
  .side-foot { margin: 0; border: 0; padding: 0; flex-direction: row; align-items: center; }
  .who { display: none; }
  .btn-quiet { width: auto; padding: 8px 12px; }
  .main { margin-left: 0; }
  .top { padding: 18px 16px 12px; flex-wrap: wrap; }
  .top h1 { font-size: 21px; }
  .page { padding: 0 16px 40px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .card.p0 { overflow-x: auto; }
  .tbl { min-width: 0; font-size: 12px; }
  .tbl th, .tbl td { padding: 10px; }
  .hide-sm { display: none; }
  .tbl-users th:last-child, .tbl-users td:last-child { display: none; }
  .person-name { color: var(--tekst-yar); }
}

@media (max-width: 700px) {
  .props { grid-template-columns: 1fr; }
  .prio-row { grid-template-columns: 1fr 1fr; }
  .task-card { padding: 16px; }
  .t-title { font-size: 18px; }
  .log-row { gap: 8px; }
  .log-row time { width: 80px; font-size: 9.5px; }
}
