/* pvedash: раздел «Файлы» и страница «Доступы». Токены (цвета, радиусы, тени) — из style.css; тёмная тема работает через них же.
   Размеры динамических элементов задаются из JS через CSSOM, поэтому style-src 'self' достаточно. */
.pwrap.fmwrap { max-width: 1400px; }
.fm-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fm-title .ph1 { margin-bottom: 14px; }
.fm-ro { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.fm-ro svg.i { width: 13px; height: 13px; }

/* ---------- раскладка */
.fm { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.fm-side { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow: auto; padding: 12px 10px; }
.fm-h2 { font-size: 12.5px; font-weight: 650; color: var(--muted); letter-spacing: 0; margin: 4px 8px 8px; }
.fm-side .fm-h2:not(:first-child) { margin-top: 16px; }
.fm-main { padding: 0; position: relative; overflow: hidden; container-type: inline-size; }
.fm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); min-height: 62px; }
.fm-sidebtn { display: none; }

/* ---------- дерево */
.ftree, .ftree ul { list-style: none; margin: 0; padding: 0; }
.ftree ul { margin-left: 14px; border-left: 1px solid var(--line-2); padding-left: 2px; }
.ftree li { outline: none; }
.trow { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 2px 8px 2px 2px; border-radius: 9px; cursor: pointer; color: var(--soft); min-width: 0; }
.trow:hover { background: var(--blue-soft); color: var(--blue-ink); }
li:focus-visible > .trow { box-shadow: var(--ring); background: var(--blue-soft); }
li[aria-selected="true"] > .trow { background: var(--blue-soft); color: var(--blue-ink); font-weight: 650; }
.tg { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; }
.tg svg.i { width: 14px; height: 14px; transition: transform .12s; }
li[aria-expanded="true"] > .trow .tg svg.i { transform: rotate(90deg); }
.tg.none { visibility: hidden; }
.tic { flex: none; display: grid; color: var(--blue); }
.tic svg.i { width: 17px; height: 17px; }
.tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
li[aria-busy="true"] > .trow .tt::after { content: " …"; color: var(--muted); }
.fm-trash { list-style: none; margin: 0; padding: 0; }
.trashbtn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 2px 10px; border: 0; border-radius: 9px; background: none; color: var(--soft); cursor: pointer; text-align: left; font-size: 13.5px; min-width: 0; }
.trashbtn:hover { background: var(--blue-soft); color: var(--blue-ink); }
.trashbtn[aria-current="page"] { background: var(--blue-soft); color: var(--blue-ink); font-weight: 650; }
.trashbtn svg.i { width: 17px; height: 17px; flex: none; }

/* ---------- хлебные крошки и поиск */
.fm-crumbs { min-width: 0; flex: 1 1 auto; }
.fm-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.fm-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.fm-crumbs li + li::before { content: "/"; color: var(--line); margin: 0 4px; font-weight: 400; }
.cr { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 8px; border-radius: 8px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--blue-ink); cursor: pointer; }
button.cr:hover { background: var(--blue-soft); }
.cr.cur { color: var(--ink); cursor: default; font-weight: 700; }
.fm-search { position: relative; flex: 0 0 280px; }
.fm-search > svg.i { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.fm-q { padding-left: 34px; min-height: 40px; height: 40px; }

/* ---------- панель кнопок */
.fm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.fm-tools .grow { flex: 1 1 0; }
.fm-grp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fm-grp[hidden] { display: none; }
.fm-grp + .fm-grp:not([hidden]):not(:last-of-type)::before { content: ""; }
.fm-grp.seg { gap: 0; }
.fm-grp.seg .btn { border-radius: 0; margin-left: -1px; }
.fm-grp.seg .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.fm-grp.seg .btn:last-child { border-radius: 0 9px 9px 0; }
.fm-grp.seg .btn[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-mid); color: var(--blue-ink); position: relative; z-index: 1; }
.fbtn { gap: 6px; }
.fbtn svg.i { width: 16px; height: 16px; }
.fbtn:disabled { opacity: .42; cursor: not-allowed; filter: none; }
.fm-sort { width: auto; min-height: 34px; height: 34px; font-size: 13px; padding: 0 30px 0 10px; }
.fm-main:not(.is-grid) .fm-sort { display: none; }
/* компактная панель: у кнопок выбранного остаются только значки (названия — в подсказках и контекстном меню) */
@container (max-width: 980px) { .fm-grp[aria-label="Выбранное"] .lbl, .fm-grp[aria-label="Корзина"] .lbl { display: none; } }
.btn:focus-visible, .input:focus-visible { box-shadow: var(--ring); }

/* ---------- список */
.fm-list { min-height: 420px; position: relative; transition: opacity .12s; }
.fm-list.loading { opacity: .55; }
.fm-status { padding: 9px 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; min-height: 38px; }
.fm-empty { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 320px; padding: 24px; text-align: center; color: var(--muted); }
.fm-empty svg.i { width: 40px; height: 40px; color: var(--blue-mid); stroke-width: 1.4; }
.fm-empty p { margin: 0; max-width: 46ch; }
.fm-empty.err p { color: var(--red-ink); }
.fm-more { margin: 12px 14px; }

.ftbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; table-layout: fixed; }
.ftbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 8px; height: 36px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); white-space: nowrap; }
.thb { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 600; color: inherit; cursor: pointer; border-radius: 6px; }
.thb:hover { color: var(--blue-ink); }
.arr { font-size: 11px; color: var(--blue-ink); }
.c-chk { width: 44px; text-align: center; }
.ftbl td.c-chk, .ftbl th.c-chk, .ftbl td.c-more, .ftbl th.c-more { padding: 0; text-overflow: clip; }
.ftbl th.c-chk, .ftbl th.c-more { text-align: center; }
.c-sz { width: 100px; text-align: right; }
.ftbl th.c-sz { text-align: right; }
.c-dt { width: 150px; }
.c-more { width: 44px; text-align: center; }
.c-nm { overflow: hidden; }
.ftbl td { height: 46px; padding: 0 8px; border-bottom: 1px solid var(--line-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.ftbl td.c-nm { color: var(--ink); }
.frow { cursor: default; outline: none; }
.frow:hover td { background: var(--surface-2); }
.frow.sel td { background: var(--blue-soft); }
.frow:focus-visible td { box-shadow: inset 0 2px 0 var(--blue), inset 0 -2px 0 var(--blue); }
.frow.droprow td { background: var(--green-soft); }
.c-nm > .fic, .c-nm > .ntxt { vertical-align: middle; }
.c-nm { display: table-cell; }
.fic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--k, var(--blue)); background: color-mix(in srgb, var(--k, var(--blue)) 13%, var(--surface)); margin-right: 10px; flex: none; }
.fic svg.i { width: 17px; height: 17px; }
.fic.big { width: 72px; height: 72px; border-radius: 20px; margin: 0; }
.fic.big svg.i { width: 36px; height: 36px; stroke-width: 1.5; }
.ntxt { display: inline-block; max-width: calc(100% - 44px); vertical-align: middle; line-height: 1.25; }
.fname { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.sub { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.msub { display: none; }
.k-dir { --k: var(--blue); } .k-image { --k: var(--teal); } .k-video { --k: var(--violet); } .k-audio { --k: var(--orange); }
.k-pdf { --k: var(--red); } .k-doc { --k: var(--blue); } .k-sheet { --k: var(--green); } .k-slides { --k: var(--orange); }
.k-text, .k-code, .k-other, .k-special { --k: var(--slate); } .k-archive { --k: var(--orange); }
.fchk { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; margin: 0; vertical-align: middle; }
.kebab { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.kebab:hover, .kebab:focus-visible { background: var(--blue-soft); color: var(--blue-ink); }
.kebab svg.i { width: 18px; height: 18px; stroke-width: 2.4; }

/* ---------- плитка */
.fgrid { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
.tile { position: relative; display: grid; gap: 4px; padding: 8px; border-radius: 12px; border: 1px solid transparent; outline: none; cursor: default; content-visibility: auto; contain-intrinsic-size: auto 176px; }
.tile:hover { background: var(--surface-2); border-color: var(--line-2); }
.tile.sel { background: var(--blue-soft); border-color: var(--blue-line); }
.tile:focus-visible { box-shadow: var(--ring); border-color: var(--blue); }
.tile.droprow { background: var(--green-soft); border-color: var(--green-line); }
.thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; background: color-mix(in srgb, var(--k, var(--blue)) 10%, var(--surface)); }
.thumb .fic { margin: 0; width: 52px; height: 52px; border-radius: 16px; background: transparent; }
.thumb .fic svg.i { width: 30px; height: 30px; stroke-width: 1.5; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.has .fic { visibility: hidden; }
.tname .fname { text-align: center; font-size: 13px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; line-height: 1.25; }
.tsub { text-align: center; font-size: 12px; color: var(--muted); }
.tchk, .tkeb { position: absolute; top: 12px; z-index: 2; opacity: 0; transition: opacity .1s; }
.tchk { left: 12px; }
.tkeb { right: 12px; }
.tile:hover .tchk, .tile:hover .tkeb, .tile.sel .tchk, .tile:focus-within .tchk, .tile:focus-within .tkeb { opacity: 1; }
.tchk .fchk { background: var(--surface); border-radius: 4px; width: 20px; height: 20px; }
.tkeb .kebab { background: color-mix(in srgb, var(--surface) 88%, transparent); width: 30px; height: 30px; }

/* ---------- перетаскивание файлов */
.fm-drop { position: absolute; inset: 0; z-index: 5; display: none; place-content: center; justify-items: center; gap: 10px; background: color-mix(in srgb, var(--blue-soft) 88%, transparent); border: 2px dashed var(--blue); border-radius: var(--radius); color: var(--blue-ink); font-weight: 650; pointer-events: none; text-align: center; padding: 20px; }
.fm-drop svg.i { width: 40px; height: 40px; }
.fm-main.dropping .fm-drop { display: grid; }

/* ---------- контекстное меню (popover) */
.fctx { position: fixed; inset: auto; margin: 0; padding: 6px; min-width: 220px; max-width: calc(100vw - 12px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 18px 40px #0003; }
.fctx:not(:popover-open) { display: none; }
.fctx button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.fctx button:hover, .fctx button:focus-visible { background: var(--blue-soft); color: var(--blue-ink); outline: none; }
.fctx button.danger { color: var(--red-ink); }
.fctx button.danger:hover, .fctx button.danger:focus-visible { background: var(--red-soft); }
.fctx button:disabled { opacity: .4; cursor: not-allowed; }
.fctx button svg.i { width: 17px; height: 17px; }
.fctx hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 2px; }

/* ---------- уведомления и окна */
.ftoasts { position: fixed; left: 50%; bottom: 18px; translate: -50% 0; z-index: 60; display: grid; gap: 8px; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.ftoast { padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); font-size: 13.5px; font-weight: 550; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.ftoast.err { background: var(--red); color: #fff; }
.fdlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.fdlg .field { margin-bottom: 10px; }
.fdlg .field.chk label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ferr { color: var(--red-ink); font-size: 13.5px; margin: 0 0 10px; min-height: 20px; }
.ferr:empty { min-height: 20px; }
.fdlg-actions { justify-content: flex-end; }
.fnames { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; color: var(--soft); overflow-wrap: anywhere; }
.fpick { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin-bottom: 8px; background: var(--surface-2); }
.fpick-out { min-height: 20px; overflow-wrap: anywhere; margin: 0 0 6px; font-size: 13px; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }

/* ---------- загрузки */
.fup { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(380px, calc(100vw - 24px)); max-height: 50dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow), 0 18px 40px #0003; overflow: hidden; }
.fup[hidden] { display: none; }
.fup-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.fup-t { flex: 1; font-weight: 650; font-size: 13.5px; }
.fup-l { list-style: none; margin: 0; padding: 4px 0; overflow: auto; }
.fup-l li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 6px 12px; font-size: 13px; }
.fup-n { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.fup-l progress { grid-column: 1 / -1; grid-row: 3; width: 100%; height: 6px; accent-color: var(--blue); }
.fup-l progress[hidden] { display: none; }
.fup-m { grid-column: 1; font-size: 12px; color: var(--muted); }
.fup-l .tool-btn { grid-column: 2; grid-row: 1 / 3; width: 30px; padding: 0; justify-content: center; }
.fup-l .tool-btn[hidden] { display: none; }
.fup-l li[data-state="err"] .fup-m { color: var(--red-ink); }
.fup-l li[data-state="done"] .fup-m { color: var(--green-ink); }
.fup .tool-btn svg.i { width: 14px; height: 14px; }

/* ---------- просмотрщик */
.fv { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); max-width: none; max-height: none; width: min(1240px, calc(100vw - 24px)); height: min(900px, calc(100dvh - 24px)); box-shadow: var(--shadow), 0 24px 60px #0005; overflow: hidden; }
.fv[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.fv::backdrop { background: rgba(8, 12, 18, .74); }
.fv-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); min-width: 0; }
.fv-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.fv-count { flex: none; color: var(--muted); font-size: 12.5px; }
.fv-tools { display: flex; gap: 4px; align-items: center; flex: none; }
.fv-zl { min-width: 70px; text-align: center; font-size: 12.5px; color: var(--soft); }
.fv-body { position: relative; min-height: 0; background: var(--bg); }
.fv-stage { position: absolute; inset: 0; display: grid; outline: none; overflow: hidden; }
.fv-stage.k-image, .fv-stage.k-video { background: #0b1119; }
.fv-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; display: grid; place-items: center; width: 44px; height: 64px; border: 0; background: rgba(15, 22, 32, .55); color: #fff; cursor: pointer; backdrop-filter: blur(4px); }
.fv-nav:hover:not(:disabled) { background: rgba(15, 22, 32, .8); }
.fv-nav:disabled { opacity: 0; pointer-events: none; }
.fv-nav[hidden] { display: none; }
.fv-nav.prev { left: 0; border-radius: 0 12px 12px 0; }
.fv-nav.next { right: 0; border-radius: 12px 0 0 12px; }
.fv-nav svg.i { width: 24px; height: 24px; stroke-width: 2.2; }
.fv-nav:focus-visible { box-shadow: inset 0 0 0 3px var(--blue); }
.fv-imgbox { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; }
.fv-imgbox.zoomed { place-items: start; cursor: grab; }
.fv-imgbox.zoomed.grab { cursor: grabbing; }
.fv-imgbox.zoomed .fv-img { margin: auto; }
.fv-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0; transition: opacity .15s; user-select: none; -webkit-user-drag: none; }
.fv-img.ready { opacity: 1; }
.fv-video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.fv-audio { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; }
.fv-audio audio { width: min(520px, 86vw); }
.fv-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.fv-card { display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; }
.fv-card p { margin: 0; }
.fv-cn { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; max-width: min(520px, 80vw); }
.fv-msg { max-width: 46ch; color: var(--soft); }
.fv-card .btn { margin-top: 10px; }
.fv-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); pointer-events: none; }
.fv-stage.k-image .fv-wait { color: #9aa8b4; }
.fv-wait p { margin: 0; font-size: 14px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--blue) 25%, transparent); border-top-color: var(--blue); }
@media (prefers-reduced-motion: no-preference) { .spin { animation: fvspin .8s linear infinite; } }
@keyframes fvspin { to { rotate: 360deg; } }
.fv-textwrap { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.fv-note { margin: 0; padding: 8px 16px; background: var(--orange-soft); color: var(--orange-ink); font-size: 13px; border-bottom: 1px solid var(--orange-line); }
.fv-textbox { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 24px; }
.fv-text { margin: 0; font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); white-space: pre; tab-size: 4; }
.fv-text.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.fv-md { max-width: 78ch; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.fv-md h2, .fv-md h3, .fv-md h4, .fv-md h5, .fv-md h6 { margin: 1.2em 0 .5em; }
.fv-md h2 { font-size: 24px; } .fv-md h3 { font-size: 19px; } .fv-md h4 { font-size: 16px; }
.fv-md p, .fv-md ul, .fv-md ol, .fv-md blockquote { margin: 0 0 .9em; }
.fv-md code { font: 13px ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.fv-md pre.fv-text { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; overflow: auto; margin: 0 0 1em; }
.fv-md blockquote { padding: 2px 14px; border-left: 3px solid var(--blue-line); color: var(--soft); }
.fv-md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.mdlink { color: var(--blue-ink); text-decoration: underline dotted; }
.fv-csv { overflow: auto; }
.fv-csv .tbl { width: auto; min-width: 100%; }
.fv-csv th, .fv-csv td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.fv-csv thead th { position: sticky; top: 0; background: var(--surface-2); }

/* ---------- Доступы */
.subtabs { display: flex; gap: 4px; margin: -8px 0 14px; }
.subtabs a { padding: 6px 12px; border-radius: 9px; color: var(--soft); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.subtabs a:hover, .subtabs a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-ink); }
.acc { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-users { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.acc-u { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; }
.acc-u:hover { background: var(--surface-2); }
.acc-u[aria-current="true"] { background: var(--blue-soft); border-color: var(--blue-line); }
.acc-u[aria-current="true"] .sub { color: var(--soft); }
.acc-tree .fchk { width: 24px; height: 24px; margin: 0 2px; }
.acc-u svg.i { color: var(--blue); flex: none; }
.acc-un { min-width: 0; display: grid; }
.acc-un b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-h { font-size: 20px; font-weight: 720; margin-bottom: 4px; }
.acc-tree { margin: 12px 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); max-height: 440px; overflow: auto; }
.acc-tree .trow { cursor: default; flex-wrap: nowrap; }
.acc-tree .trow.on { background: var(--blue-soft); }
.acc-tree .trow .tt { flex: 1 1 auto; }
.acc-tree .input.small { width: auto; flex: none; min-height: 32px; height: 32px; font-size: 13px; padding: 0 30px 0 8px; }
.acc-tree .badge { flex: none; }
.acc-sum { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--blue-line); background: var(--blue-soft); margin-bottom: 14px; }
.acc-sum h3 { font-size: 15px; margin-bottom: 8px; }
.acc-sl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acc-sl li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.acc-sl li.bad { outline: 2px solid var(--red); border-radius: 8px; padding: 2px 4px; }
.acc-sl svg.i { color: var(--blue); }
.acc-st { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.acc-acts { margin-top: 4px; }

/* ---------- узкие экраны */
@media (max-width: 860px) {
  .fm, .acc { grid-template-columns: minmax(0, 1fr); }
  .fm-side { position: static; max-height: 46dvh; display: none; }
  .fm-side.open { display: block; }
  .fm-sidebtn { display: inline-flex; }
  .fm-bar { flex-wrap: wrap; }
  .fm-search { flex: 1 1 100%; }
}
@media (max-width: 700px) {
  .fm-title .ph1 { font-size: 22px; }
  .lbl { display: none; }
  .fm-sidebtn .lbl, .primary-b .lbl { display: inline; }
  .fbtn { min-width: 38px; height: 38px; padding: 0 9px; }
  .fm-tools { padding: 8px 10px; gap: 6px; }
  .fm-bar { padding: 10px; }
  .cr { max-width: 130px; padding: 4px 6px; }
  .c-sz, .c-dt { display: none; }
  .ftbl th.c-sz, .ftbl th.c-dt { display: none; }
  .msub { display: block; }
  .ftbl td { height: 56px; }
  .ftbl thead { display: none; }
  .ntxt { max-width: calc(100% - 44px); }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 10px; }
  .tchk, .tkeb { opacity: 1; }
  .fm-sort { max-width: 150px; display: block !important; min-height: 38px; }
  .fm-main .fm-sort { display: block; }
  .fup { right: 8px; bottom: 8px; left: 8px; width: auto; }
  .fv { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .fv-head { padding: 6px 6px 6px 12px; gap: 4px 4px; flex-wrap: wrap; }
  .fv-name { flex: 1 1 0; }
  .fv-tools { order: 5; flex: 1 1 100%; justify-content: center; flex-wrap: wrap; padding-bottom: 2px; }
  .fv-count { display: none; }
  .fv-nav { width: 38px; height: 56px; }
  .fv-zl { min-width: 0; font-size: 12px; }
  .fv-textbox { padding: 10px 12px 20px; }
  .acc-tree .trow { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .tg svg.i, .fm-list { transition: none; } }
