/* ══ Документы 2.0 (19.11.2026): рельс слева, полки папок, объёмные листы, карточка документа с вкладками ══ */
.docs2 { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; align-items: start; }
.drail { position: sticky; top: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }
.rl-g { display: flex; flex-direction: column; gap: 2px; }
.rl-h { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 4px 0 10px; font-size: 12px; color: var(--mut); }
.rl-h .btn-icon { width: 28px; height: 28px; min-height: 28px; }
.rl-it, .tr-name { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 11px; background: transparent;
  font: inherit; font-size: 14px; color: var(--color-text); text-align: left; cursor: pointer; transition: background-color .15s ease; }
.rl-it svg, .tr-name svg { color: var(--mut); flex: none; }
.rl-it span, .tr-name span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-it:hover, .tr-name:hover { background: var(--tint); }
.rl-it.on, .tr-it.on .tr-name { background: var(--card); box-shadow: var(--sh-s); font-weight: 600; }
.rl-it.on svg, .tr-it.on .tr-name svg { color: var(--ac-text); }
.rl-n, .tr-n { font-style: normal; font-size: 12px; font-weight: 600; color: var(--mut); min-width: 22px; text-align: center; }
.rl-n.hot { background: var(--color-accent); color: var(--on-accent); border-radius: 99px; padding: 1px 7px; }
.rl-empty { padding: 6px 10px; font-size: 13px; }
.tr-it { display: flex; align-items: center; padding-left: calc(var(--d) * 14px); }
.tr-chev { width: 22px; height: 30px; flex: none; border: 0; background: transparent; color: var(--mut); display: grid; place-items: center; cursor: pointer; padding: 0; border-radius: 7px; }
.tr-chev svg { transition: transform .2s var(--ease-out); }
.tr-chev.open svg { transform: rotate(90deg); }
.tr-chev:hover { background: var(--tint); color: var(--color-text); }
.tr-name.drop-on, .ftile.drop-on { box-shadow: 0 0 0 2px var(--mark); background: var(--tint-2); }

.dmain { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 20px; min-height: 420px; }
.dtop { display: flex; gap: 12px; align-items: center; }
.dsearch { flex: 1; position: relative; display: flex; align-items: center; }
.dsearch svg { position: absolute; left: 16px; color: var(--mut); pointer-events: none; }
.dsearch .input { height: 48px; padding-left: 46px; border-radius: 14px; font-size: 15px; background: var(--card); box-shadow: var(--sh-s); }
.dtop .seg { height: 48px; align-items: stretch; } .dtop .seg-opt { padding: 0 14px; }
.dtop .btn-primary { min-height: 48px; padding-inline: 20px; border-radius: 14px; }
.dmob { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 36px; font-size: 15px; }
.crumbs > button { border: 0; background: transparent; font: inherit; color: var(--mut); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.crumbs > button:hover { color: var(--color-text); background: var(--tint); }
.crumbs > svg { color: var(--mut); }
.crumbs b { font-size: 20px; font-family: var(--font-heading); padding: 0 6px; }
.cr-acts { margin-left: auto; display: flex; gap: 4px; }
.cr-acts .btn.on { color: var(--ac-text); background: var(--tint-2); }

/* Полка папок: папка с бумагами, передняя створка слегка открывается при наведении. */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; }
.ftile { position: relative; height: 132px; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; font: inherit; color: var(--color-text); perspective: 700px; border-radius: 16px; }
.ft-back { position: absolute; inset: 10px 0 0; border-radius: 14px; background: color-mix(in srgb, var(--anthracite) 80%, var(--color-bg)); }
.ft-back::before { content: ""; position: absolute; top: -10px; left: 0; width: 42%; height: 18px; border-radius: 10px 10px 0 0; background: inherit; }
.ft-paper { position: absolute; left: 12px; right: 14px; top: 16px; height: 70px; border-radius: 6px; background: #fdfdfb; box-shadow: 0 1px 2px rgba(0,0,0,.18); transform: rotate(-2deg); transition: transform .35s var(--ease-out); }
.ft-paper.p2 { left: 18px; right: 10px; top: 20px; transform: rotate(2.5deg); background: #f3f4ef; }
.ft-front { position: absolute; inset: 40px 0 0; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  background: linear-gradient(160deg, #2f3538, #1e2224); color: #f2f3f1; transform-origin: bottom; transition: transform .35s var(--ease-out); box-shadow: 0 -1px 0 rgba(255,255,255,.08) inset, 0 10px 24px -10px rgba(10,14,16,.6); }
.ft-front b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-front span { font-size: 12px; color: rgba(242,243,241,.62); }
.ftile:hover .ft-front, .ftile:focus-visible .ft-front { transform: rotateX(-16deg); }
.ftile:hover .ft-paper { transform: translateY(-10px) rotate(-3deg); }
.ftile:hover .ft-paper.p2 { transform: translateY(-6px) rotate(3.5deg); }
.ft-bell { position: absolute; top: 18px; right: 12px; color: var(--lime); z-index: 1; display: grid; }
[data-theme="dark"] .ft-back { background: #33393c; }

/* Объёмный лист документа: позади стопка по числу версий, наклон за курсором, блик. */
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 28px 20px; }
.dcard { display: flex; flex-direction: column; gap: 12px; cursor: pointer; min-width: 0; outline: none; }
.paper-wrap { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; position: relative; aspect-ratio: 3 / 4; perspective: 900px; }
.paper { position: absolute; inset: 0; border-radius: 6px; background: #fff; overflow: hidden; transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
  box-shadow: 0 1px 1px rgba(20,24,26,.08), 0 calc(var(--stack) * 3px) 0 calc(var(--stack) * -1px) #ecece8, 0 calc(var(--stack) * 6px) 0 calc(var(--stack) * -2px) #dfdfda, 0 18px 30px -16px rgba(20,24,26,.35); }
.paper::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.55), transparent 55%); opacity: 0; transition: opacity .2s ease; }
.dcard:hover .paper, .dcard:focus-visible .paper { box-shadow: 0 1px 1px rgba(20,24,26,.08), 0 calc(var(--stack) * 3px) 0 calc(var(--stack) * -1px) #ecece8, 0 calc(var(--stack) * 6px) 0 calc(var(--stack) * -2px) #dfdfda, 0 28px 44px -18px rgba(20,24,26,.45); }
.dcard:hover .paper::after { opacity: 1; }
.dcard:focus-visible .paper { outline: 2px solid var(--mark); outline-offset: 4px; }
.paper .dd-thumb.lg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; background: #fff; display: block; box-shadow: none; }
.paper .dd-thumb.lg img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.paper-blank { position: absolute; inset: 14% 14% auto; display: flex; flex-direction: column; gap: 8px; }
.paper-blank i { height: 6px; border-radius: 3px; background: #e9e9e4; }
.paper-blank i:first-child { width: 58%; height: 9px; background: #d8d8d2; margin-bottom: 6px; }
.paper-blank i:nth-child(3) { width: 86%; } .paper-blank i:nth-child(5) { width: 64%; }
.ext { position: absolute; left: 10px; bottom: 10px; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--c); padding: 3px 7px; border-radius: 6px; }
.fav { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; z-index: 2;
  background: rgba(255,255,255,.92); color: #8a8f91; box-shadow: 0 1px 4px rgba(0,0,0,.15); opacity: 0; transition: opacity .15s ease, transform .2s var(--spring); }
.dcard:hover .fav, .fav.on, .fav:focus-visible { opacity: 1; }
.fav.on { color: #e0a800; } .fav.on svg { fill: currentColor; }
.fav:hover { transform: scale(1.12); }
.dc-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dc-badges { display: flex; flex-wrap: wrap; gap: 4px; } .dc-badges:empty { display: none; }
.dc-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-meta { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-hit { font-size: 12px; background: color-mix(in srgb, var(--lime) 30%, transparent); border-radius: 6px; padding: 2px 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-theme="dark"] .dc-hit { color: var(--color-text); background: rgba(225,255,0,.14); }
.db { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px solid var(--color-divider); color: var(--mut); white-space: nowrap; }
.db-ack { background: var(--color-accent); color: var(--on-accent); border-color: transparent; }
.db-wait { background: color-mix(in srgb, var(--p-mid) 22%, transparent); color: var(--color-text); border-color: color-mix(in srgb, var(--p-mid) 60%, transparent); }
.db-ok { background: var(--tint-2); color: var(--color-text); border-color: transparent; }
.db-no { background: color-mix(in srgb, var(--p-high) 14%, transparent); color: var(--p-high); border-color: color-mix(in srgb, var(--p-high) 45%, transparent); }
.dlist { padding: 4px 0; }
.drow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 72px 36px; gap: 14px; align-items: center; min-height: 60px; padding: 0 16px; border-top: 1px solid var(--color-divider); cursor: pointer; }
.drow:first-child { border-top: 0; }
.drow:hover { background: var(--inset); }
.drow .fav { position: static; opacity: 1; background: transparent; box-shadow: none; }
.dr-ext { font-size: 10px; font-weight: 800; color: #fff; background: var(--c); border-radius: 7px; height: 40px; display: grid; place-items: center; letter-spacing: .03em; }
/* Обложка в строке списка: чуть меньше плиточной, чтобы строка 60 px оставалась ровной.
   Ярлык формата лежит поверх обложки в углу — как на плитке, только мельче. */
.dr-paper { position: relative; display: block; justify-self: center; }
.drow .dd-thumb { width: 40px; height: 48px; }
.dr-paper .ext { left: 3px; bottom: 3px; padding: 1px 4px; font-size: 8.5px; border-radius: 4px; letter-spacing: .03em; }
.dr-t { display: flex; flex-direction: column; min-width: 0; } .dr-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dr-t .mut { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-b { display: flex; gap: 4px; } .dr-d { font-size: 12px; text-align: right; }
.drop-veil { position: absolute; inset: -8px; border-radius: 22px; border: 2px dashed var(--mark); background: color-mix(in srgb, var(--color-bg) 85%, transparent); backdrop-filter: blur(3px);
  display: none; place-items: center; z-index: 10; }
.drop-veil > div { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--color-text); pointer-events: none; }
.dmain.dropping .drop-veil { display: grid; }
body.doc-dragging .dcard[draggable] .paper { opacity: .7; }
.udrop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--color-divider); border-radius: 16px; cursor: pointer; text-align: center; transition: border-color .15s ease, background-color .15s ease; }
.udrop:hover, .udrop.on { border-color: var(--mark); background: var(--tint); }
.pv-h { font-size: 12px; color: var(--mut); padding: 4px 8px; }
.pv-act { border: 0; background: transparent; font: inherit; color: inherit; text-align: left; border-top: 1px solid var(--color-divider); border-radius: 0 0 10px 10px; }

/* Карточка документа */
.dialog.doc2 { width: min(1240px, 100%); height: min(860px, 100%); padding: 22px 24px; gap: 16px; }
/* Шапка документа: заголовок не сжимается в столбик по буквам — когда рядом не хватает места (телефон),
   значки уходят строкой ниже, а заголовок занимает ширину. */
.doc2 .dh { align-items: flex-start; flex-wrap: wrap; }
.doc2 .d2-acts { margin-left: auto; }
.d2h { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.d2h h3 { font-size: 22px; overflow-wrap: anywhere; }
.d2b { display: flex; gap: 6px; flex-wrap: wrap; } .d2b:empty { display: none; }
.d2-acts { display: flex; gap: 8px; align-items: center; }
.fav2.on { color: #e0a800; } .fav2.on svg { fill: currentColor; }
.d2cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; }
.d2cols .doc-prev { min-height: 0; height: 100%; }
.d2side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
/* Вкладки панели — строкой с подчёркиванием (переключатель-«таблетка» на пять пунктов переносился на две строки). */
.seg.d2tabs { width: 100%; display: flex; gap: 2px; padding: 0; background: transparent; border: 0; border-bottom: 1px solid var(--color-divider); border-radius: 0; overflow-x: auto; scrollbar-width: none; }
.d2tabs::-webkit-scrollbar { display: none; }
.d2tabs .seg-opt { flex: none; padding: 10px 10px 12px; border-radius: 0; font-size: 13px; white-space: nowrap; }
.d2tabs .seg-opt:has(input:checked) { background: transparent; box-shadow: inset 0 -2px 0 var(--mark); color: var(--color-text); }
.d2tabs .cnt { font-size: 11px; margin-left: 2px; color: var(--mut); font-weight: 600; background: none; min-width: 0; padding: 0; }
.d2pane { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 4px; }
.kvs { display: flex; flex-direction: column; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--color-divider); font-size: 14px; align-items: center; }
.kv:first-child { border-top: 0; } .kv > span:first-child { color: var(--mut); } .kv .pv { display: flex; gap: 8px; align-items: center; }
.d2form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
@media (max-width: 760px) { .d2form { grid-template-columns: minmax(0, 1fr); } }
.d2sec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--color-divider); }
.d2sec .btn-primary { align-self: flex-start; }
.small { font-size: 12px; }
.route { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rt { position: relative; display: grid; grid-template-columns: 28px 30px 1fr; gap: 10px; align-items: start; padding: 8px 0 14px; }
.rt:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 38px; bottom: -6px; width: 2px; background: var(--color-divider); }
.rt.ok:not(:last-child)::before { background: var(--mark); }
.rt-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--inset); border: 1.5px solid var(--color-divider); color: var(--mut); }
.rt.ok .rt-dot { background: var(--mark); border-color: var(--mark); color: var(--on-mark); }
.rt.no .rt-dot { background: var(--p-high); border-color: var(--p-high); color: #fff; }
.rt.current .rt-dot { border-color: var(--mark); color: var(--color-text); box-shadow: 0 0 0 4px var(--tint-2); animation: rtPulse 2s ease-in-out infinite; }
@keyframes rtPulse { 50% { box-shadow: 0 0 0 7px var(--tint); } }
.rt-t { display: flex; flex-direction: column; min-width: 0; font-size: 14px; } .rt-t > span { font-size: 12px; color: var(--mut); }
.rt-note { margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--inset); color: var(--color-text) !important; font-size: 13px !important; }
.ackreq { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.ackreq .gv-top > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.ackppl { display: flex; flex-wrap: wrap; gap: 6px; }
.ackp { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border-radius: 99px; background: var(--inset); font-size: 12px; color: var(--mut); border: 1px dashed var(--color-divider); }
.ackp.ok { color: var(--color-text); border-style: solid; background: var(--tint-2); }
.ak-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; } .ak-row .field { flex: 0 0 180px; }
.ackbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: #1f2426; color: #eceded; animation: selIn .35s var(--ease-out); }
.ackbar span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
[data-theme="dark"] .ackbar { background: var(--lime); color: #161718; }
[data-theme="dark"] .ackbar .btn-primary { background: #161718; color: var(--lime); }
.tline { display: flex; flex-direction: column; gap: 12px; }
.tl { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13px; }
.tl-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--inset); color: var(--mut); }
.tl-h { display: flex; gap: 8px; align-items: baseline; } .tl-h .mut { font-size: 11px; }
.tl-t { display: block; color: var(--mut); overflow-wrap: anywhere; }
.tl.cm .tl-t { color: var(--color-text); background: var(--inset); padding: 8px 12px; border-radius: 4px 14px 14px 14px; margin-top: 4px; }
.d2pane .ver-stack .vrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 36px; gap: 10px; align-items: center; }
.vt { display: flex; flex-direction: column; min-width: 0; } .vt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vt .mut { font-size: 11px; }

/* minmax(0, 1fr), а не 1fr: иначе колонка не сжимается ниже содержимого (вкладки документа с nowrap
   и лист PDF раздвигали окно и на телефоне появлялась боковая прокрутка). */
@media (max-width: 1100px) { .d2cols { grid-template-columns: minmax(0, 1fr); } .d2cols .doc-prev { height: 46vh; } .dialog.doc2 { height: auto; } .d2pane { overflow: visible; } }
@media (max-width: 999px) {
  .docs2 { grid-template-columns: 1fr; } .drail { display: none; }
  .dmob { display: block; } .dtop { flex-wrap: wrap; } .dsearch { flex: 1 1 100%; } .dtop .btn-primary { flex: 1; }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .drow { grid-template-columns: 44px minmax(0, 1fr) 30px; } .dr-b, .dr-d { display: none; }
  .fav { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .paper, .ft-front, .ft-paper, .tr-chev svg { transition: none; } .rt.current .rt-dot, .ackbar { animation: none; } }
@media (max-width: 999px) { .crumbs.root, .crumbs:has(> b:only-child) { display: none; } }
[data-theme="dark"] .ft-front { background: linear-gradient(160deg, #3b4246, #2a2f32); }
/* Доступ к папке (19.11.2026): метки в дереве и на полке, кнопка-статус у пути, варианты в окне папки */
.tr-acc { font-style: normal; color: var(--mut); display: grid; margin-left: 2px; flex: none; }
.ft-acc { position: absolute; bottom: 16px; right: 14px; z-index: 2; display: grid; color: rgba(244,245,242,.8); }
.acc-chip { min-height: 34px; padding: 0 10px; gap: 6px; font-size: 13px; font-weight: 500; color: var(--mut); border: 1px solid var(--edge); border-radius: 99px; }
.acc-chip:hover { color: var(--color-text); }
.acc-modes { display: flex; flex-direction: column; gap: 6px; }
.acc-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r-ctl); cursor: pointer; background: var(--card); transition: border-color .15s ease, background-color .15s ease; }
.acc-opt:hover { border-color: color-mix(in srgb, var(--color-text) 30%, var(--edge)); }
.acc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.acc-opt:has(input:checked) { border-color: var(--mark); background: color-mix(in srgb, var(--lime) 8%, var(--card)); box-shadow: 0 0 0 1px var(--mark); }
.acc-opt:has(input:focus-visible) { outline: 2px solid var(--mark); outline-offset: 2px; }
.ao-i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--inset); color: var(--mut); flex: none; }
.acc-opt:has(input:checked) .ao-i { background: var(--mark); color: var(--on-mark); }
.ao-t { display: flex; flex-direction: column; min-width: 0; flex: 1; } .ao-t b { font-size: 14px; font-weight: 600; } .ao-t span { font-size: 12px; color: var(--mut); }
.ao-r { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--edge); flex: none; }
.acc-opt:has(input:checked) .ao-r { border: 5px solid var(--mark); }
.df2 .acc-list { max-height: 200px; overflow: auto; }

/* Подача и согласование (19.11.2026) */
.sd-drop { min-height: 110px; } .sd-drop.has { border-style: solid; border-color: var(--mark); }
.sd-doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r-ctl); background: var(--inset); }
.pp-ord { counter-reset: ap; }
.pp-ord .pp-chip { counter-increment: ap; }
.pp-ord .pp-chip::before { content: counter(ap); min-width: 18px; height: 18px; border-radius: 50%; background: var(--mark); color: var(--on-mark); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; margin-right: 2px; }
.sd:has(input[name=sdm][value=par]:checked) .pp-ord .pp-chip::before { content: none; }
.rt-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rt-chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--inset); color: var(--color-text); }
.rt-chip.bad { background: color-mix(in srgb, var(--p-high) 14%, var(--card)); color: var(--p-high); }
.rt-quote { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2, var(--inset)); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; margin-bottom: 12px; white-space: pre-wrap; }
.route.par .rt-dot:empty::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rt-cc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--color-divider); font-size: 13px; }
.rt-dec textarea { margin-bottom: 8px; }
.rt-own { margin-top: 10px; }
@media (max-width: 760px) { .dtop .btn span { display: none; } .dtop .btn { padding-inline: 12px; } }
.sd .field > .udrop.sd-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--color-text); letter-spacing: 0; text-transform: none; }
.sd .sd-drop .mut { font-size: 12px; }

/* Просмотр документа во весь экран (19.11.2026) */
.backdrop.bd-viewer { padding: 0; background: rgba(14,16,17,.92); backdrop-filter: none; display: block; }
.dviewer { position: absolute; inset: 0; display: flex; flex-direction: column; color: #eceded; }
.dv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #17191a; border-bottom: 1px solid rgba(255,255,255,.08); flex: none; }
.dv-t { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.dv-pages { font-size: 13px; color: rgba(236,237,238,.6); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-zoom { display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,.06); border-radius: 12px; padding: 2px; }
.dv-pct { min-width: 52px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.dviewer .btn-ghost { color: #eceded; } .dviewer .btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.dv-zoom .btn-ghost:not(.btn-icon) { font-size: 13px; min-height: 36px; padding: 0 12px; }
.dv-body { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 32px 48px; outline: none; }
.dv-page, .dv-img { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.8); border-radius: 2px; flex: none; max-width: none; }
.dv-body .doc-loading i { border-color: rgba(255,255,255,.2); border-top-color: var(--lime); }
.dv-body .empty-inline { color: rgba(236,237,238,.7); margin: auto; }
.doc-prev.zoomable canvas, .doc-prev.zoomable img { cursor: zoom-in; }
@media (max-width: 760px) { .dv-zoom .btn-ghost:not(.btn-icon) { display: none; } .dv-body { padding: 12px 8px 32px; } }
.dviewer { background: #101213; }
.dv-zoom .btn-ghost.on { background: rgba(255,255,255,.14); }
/* «+ Добавить документы» и «+ Новая папка» (19.11.2026) */
.dadd { border: 0; background: transparent; padding: 16px; font: inherit; color: var(--color-text); text-align: center; }
.dadd-p { aspect-ratio: 3 / 4; border: 2px dashed var(--edge); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--mut); transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.dadd-p b { font-size: 14px; font-weight: 600; }
.dadd:hover .dadd-p, .dadd:focus-visible .dadd-p { border-color: var(--mark); color: var(--color-text); background: var(--tint); }
.dadd-row { width: 100%; border: 0; background: transparent; font: inherit; color: var(--color-text); cursor: pointer; text-align: left; }
.dadd-ic { background: var(--inset) !important; color: var(--mut) !important; display: grid; place-items: center; }
.dadd-row:hover .dadd-ic { color: var(--color-text) !important; }
.fadd .fadd-p { position: absolute; inset: 14px 0 0; border: 2px dashed var(--edge); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--mut); transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.fadd .fadd-p b { font-size: 14px; font-weight: 600; }
.fadd:hover .fadd-p, .fadd:focus-visible .fadd-p { border-color: var(--mark); color: var(--color-text); background: var(--tint); }
.dadd .dadd-p { position: absolute; inset: 0; aspect-ratio: auto; }
.pv-danger { color: var(--p-high); } .pv-danger.armed { background: var(--p-high); color: var(--p-high-fg); }

/* «Поделиться» документом и подтверждение копирования (19.11.2026) */
.sh-pop { gap: 8px; }
.sh-pop .pv-it { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.sh-pop .pv-it > svg:last-child { color: var(--mut); flex: none; }
.sh-h { font-size: 12px; font-weight: 600; color: var(--mut); padding: 6px 8px 0; border-top: 1px solid var(--color-divider); margin-top: 2px; }
.sh-row { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 8px; border-radius: 10px; background: var(--tint); }
.sh-row .pv-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sh-row .pv-t b { font-size: 14px; font-weight: 600; } .sh-row .pv-t span { font-size: 12px; color: var(--mut); }
.sh-row .btn-icon { width: 34px; min-height: 34px; }
.sh-del { min-height: 34px; padding: 0 10px; font-size: 13px; }
.sh-del.armed { background: var(--p-high); color: var(--p-high-fg); }
.sh-new { display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 4px; }
.sh-days { width: 100%; } .sh-days .seg-opt { flex: 1; justify-content: center; font-size: 13px; }
.db-share { background: color-mix(in srgb, var(--lime, #e1ff00) 35%, transparent); color: var(--color-text); border-color: transparent; }
#dv-share.on { color: var(--ac-text, var(--color-text)); background: var(--tint-2); }
.flash { position: fixed; z-index: 140; padding: 6px 12px; border-radius: 10px; background: #1d2022; color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; white-space: nowrap; animation: flashIn .16s ease-out; transition: opacity .35s ease, transform .35s ease; }
.flash.out { opacity: 0; transform: translateY(-4px); }
@keyframes flashIn { from { opacity: 0; transform: translateY(4px); } }
.flash-ok { color: var(--color-text) !important; background: var(--tint-2) !important; }

/* «+ Документ» в задаче — проводник (19.11.2026; изящная версия: дерево с раскрытием, плитки папок, мягкие переходы) */
.ap-dlg { width: min(920px, 100%); gap: 18px; animation: apDlg .24s cubic-bezier(.22, 1, .36, 1); }
.ap-q { margin: 0; flex: none; min-height: 44px; border-radius: 12px; }
.ap-q .input, .ap-q .input:focus, .ap-q .input:focus-visible { border: 0; box-shadow: none; outline: none; background: transparent; }
.ap-q:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 55%, transparent); }
.ap-body { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 0; min-height: 0; height: min(470px, 56vh); }
.ap-side { overflow: auto; display: flex; flex-direction: column; gap: 2px; padding: 2px 14px 2px 0; border-right: 1px solid var(--color-divider); scrollbar-gutter: stable; }
.ap-places { display: flex; flex-direction: column; gap: 2px; }
.ap-place, .ap-nrow { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--color-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.ap-place:hover, .ap-nrow:hover { background: var(--tint); }
.ap-place.on, .ap-nrow.on { background: var(--tint-2); font-weight: 600; }
.ap-place > svg { flex: none; color: var(--mut); }
.ap-place.on > svg { color: var(--ac-text); }
.ap-sep { height: 1px; background: var(--color-divider); margin: 8px 6px; flex: none; }
.ap-tree { display: flex; flex-direction: column; gap: 1px; }
.ap-node { display: flex; flex-direction: column; gap: 1px; }
.ap-nrow { padding-left: calc(4px + var(--d, 0) * 14px); }
.ap-chev { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border: 0; background: none; color: var(--mut); border-radius: 5px; cursor: pointer; padding: 0; transition: color .15s ease, background-color .15s ease; }
.ap-chev:hover { color: var(--color-text); background: var(--tint-2); }
.ap-chev.ph { pointer-events: none; opacity: 0; }
.ap-chev svg { transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.ap-chev.open svg { transform: rotate(90deg); }
.ap-fic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--lime) 20%, transparent); color: var(--ac-text); transition: background-color .18s ease, transform .18s ease; }
.ap-nrow.on .ap-fic { background: color-mix(in srgb, var(--lime) 52%, transparent); }
.ap-nrow:hover .ap-fic { transform: translateY(-1px); }
.ap-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-n { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; color: var(--mut); font-variant-numeric: tabular-nums; background: var(--inset); border-radius: 99px; padding: 1px 7px; }
/* ветка раскрывается плавно: 0fr → 1fr */
.ap-kids { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s cubic-bezier(.22, 1, .36, 1); }
.ap-kids > div { overflow: hidden; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.ap-kids.open { grid-template-rows: 1fr; }
.ap-mob { display: none; }
.ap-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-left: 18px; }
.ap-crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-height: 30px; font-size: 14px; margin-bottom: 8px; color: var(--mut); flex: none; }
.ap-crumbs b { color: var(--color-text); font-weight: 600; }
.ap-crumbs button { border: 0; background: none; font: inherit; color: var(--mut); cursor: pointer; padding: 3px 6px; border-radius: 7px; transition: background-color .15s ease, color .15s ease; }
.ap-crumbs button:hover { color: var(--color-text); background: var(--tint); }
.ap-cr-i { display: inline-grid; place-items: center; color: var(--mut); margin-right: 2px; }
.ap-cr-s { display: inline-grid; place-items: center; color: var(--mut); opacity: .7; }
.ap-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; flex: 1; scrollbar-gutter: stable; padding-right: 2px; }
/* появление содержимого: строки и плитки всплывают по очереди */
.ap-in .ap-row { animation: apRow .26s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 18ms); }
.ap-in .ap-ftile { animation: apTile .24s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 32ms); }
.ap-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(198px, 1fr)); gap: 8px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--color-divider); }
.ap-ftile { display: flex; align-items: center; gap: 11px; padding: 10px 10px 10px 11px; border: 1px solid var(--edge); border-radius: 14px; background: var(--card); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: transform .18s cubic-bezier(.22, 1, .36, 1), box-shadow .18s ease, border-color .18s ease, background-color .18s ease; }
.ap-ftile:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--lime) 60%, var(--edge)); }
.ap-ftile:active { transform: translateY(0) scale(.99); }
.ap-fg { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--lime) 20%, transparent); color: var(--ac-text); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.ap-ftile:hover .ap-fg { transform: scale(1.06) rotate(-3deg); }
.ap-fn { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ap-fn b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-fn span { font-size: 12px; color: var(--mut); }
.ap-fa { flex: none; color: var(--mut); opacity: 0; transform: translateX(-4px); transition: opacity .18s ease, transform .18s ease; }
.ap-ftile:hover .ap-fa { opacity: 1; transform: none; }
.ap-docs { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 11px; cursor: pointer; position: relative; transition: background-color .15s ease; }
.ap-row:hover { background: var(--tint); }
.ap-row.on { background: var(--tint-2); }
.ap-row.was { cursor: default; opacity: .6; }
.ap-row > input { position: absolute; opacity: 0; pointer-events: none; }
.ap-row .bx { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--edge); display: grid; place-items: center; flex: none; color: transparent; background: var(--card); transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .18s cubic-bezier(.22, 1, .36, 1); }
.ap-row > input:checked + .bx { background: var(--color-accent); border-color: var(--color-accent); color: var(--on-accent); animation: apPop .22s cubic-bezier(.22, 1, .36, 1); }
.ap-row > input:focus-visible + .bx { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ap-row .dr-ext { flex: none; width: 34px; height: 40px; font-size: 9.5px; transition: transform .18s ease; }
.ap-row:hover .dr-ext { transform: translateY(-1px); }
.ap-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ap-t b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-t span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.ap-sel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ap-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; height: 28px; padding: 0 8px 0 10px; border: 1px solid var(--edge); border-radius: 99px; background: var(--card); color: var(--color-text); font: inherit; font-size: 12.5px; cursor: pointer; animation: apChip .2s cubic-bezier(.22, 1, .36, 1); transition: background-color .15s ease, border-color .15s ease; }
.ap-chip > span, .ap-chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-chip svg { flex: none; color: var(--mut); }
.ap-chip:hover { border-color: var(--mut); }
.ap-chip:hover svg { color: var(--color-text); }
.ap-chip.more { cursor: default; color: var(--mut); padding-right: 10px; }
@keyframes apDlg { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes apRow { from { opacity: 0; transform: translateY(6px); } }
@keyframes apTile { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes apChip { from { opacity: 0; transform: scale(.9); } }
@keyframes apPop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (max-width: 760px) {
  .ap-body { grid-template-columns: minmax(0, 1fr); height: auto; max-height: none; }
  .ap-side { border: 0; padding: 0; overflow: visible; }
  .ap-side .ap-places, .ap-side .ap-sep, .ap-side .ap-tree { display: none; }
  .ap-mob { display: block; width: 100%; }
  .ap-main { padding-left: 0; }
  .ap-list { max-height: 52vh; }
  .ap-fgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ap-sel { display: none; }
  .ap-foot { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-dlg, .ap-in .ap-row, .ap-in .ap-ftile, .ap-chip, .ap-row > input:checked + .bx { animation: none; }
  .ap-kids, .ap-chev svg, .ap-ftile, .ap-fg, .ap-fa, .ap-chip, .ap-row, .ap-row .dr-ext, .ap-fic { transition: none; }
}
