/* xFTP – vzhled inspirovaný Průzkumníkem Windows 11 */
@font-face { font-family: "Inter xftp"; src: url(inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono xftp"; src: url(jbm-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter xftp", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, "JetBrains Mono xftp", monospace;
  --bg: #eef1f6; --mica: #f3f4f8; --surface: #fff; --surface2: #f9f9f9; --line: #e3e3e3; --line2: #d1d1d1;
  --text: #1b1b1b; --muted: #5f6368; --faint: #8a8f98;
  --accent: #005fb8; --accent-h: #1a6fc0; --accent-t: #fff;
  --hover: #f0f4fa; --sel: #cce8ff; --sel-b: #99d1ff; --sel-h: #b9dcfa;
  --danger: #c42b1c; --ok: #0f7b0f;
  --shadow: 0 8px 24px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.08);
  --r: 6px;
  --pg: #fff; --pgs: #a8adb5; --pgf: #e7e9ed; --ln: #9aa3ad;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1c1c1c; --mica: #202020; --surface: #272727; --surface2: #2c2c2c; --line: #333; --line2: #444;
  --text: #f3f3f3; --muted: #b5b5b5; --faint: #8c8c8c;
  --accent: #4cc2ff; --accent-h: #62cbff; --accent-t: #000;
  --hover: #2f2f2f; --sel: #0f3c5f; --sel-b: #1c6aa3; --sel-h: #164a73;
  --danger: #ff6b5b; --ok: #6ccb5f;
  --shadow: 0 8px 28px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
  --pg: #f4f5f7; --pgs: #8b9099; --pgf: #d5d8de; --ln: #8c95a0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1c; --mica: #202020; --surface: #272727; --surface2: #2c2c2c; --line: #333; --line2: #444;
    --text: #f3f3f3; --muted: #b5b5b5; --faint: #8c8c8c;
    --accent: #4cc2ff; --accent-h: #62cbff; --accent-t: #000;
    --hover: #2f2f2f; --sel: #0f3c5f; --sel-b: #1c6aa3; --sel-h: #164a73;
    --danger: #ff6b5b; --ok: #6ccb5f;
    --shadow: 0 8px 28px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
    --pg: #f4f5f7; --pgs: #8b9099; --pgf: #d5d8de; --ln: #8c95a0;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.4 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.grow { flex: 1; }
.i { width: 18px; height: 18px; flex: none; }
a { color: var(--accent); }

/* ---------- tlačítka ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 14px;
  border: 1px solid var(--line2); border-bottom-color: color-mix(in srgb, var(--line2) 70%, #000 30%); border-radius: var(--r);
  background: var(--surface); color: var(--text); transition: background .12s; white-space: nowrap; }
.btn:hover { background: var(--surface2); }
.btn:active { opacity: .85; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-t); }
.btn.primary:hover { background: var(--accent-h); }
.btn.primary.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover, .btn.ghost.on { background: var(--hover); }
.btn.sm { min-height: 30px; padding: 4px 10px; }
.btn.big { width: 100%; min-height: 40px; font-weight: 600; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn .i { width: 16px; height: 16px; }
.ib { display: inline-grid; place-items: center; width: 34px; height: 32px; border: 0; border-radius: var(--r); background: transparent; color: var(--text); flex: none; }
.ib:hover:not(:disabled) { background: var(--hover); }
.ib:disabled { opacity: .35; cursor: default; }
.ib.on { background: var(--sel); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- přihlášení ---------- */
.login-page { background: radial-gradient(1200px 600px at 10% -10%, #cfe3ff 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e6d9ff 0, transparent 55%), var(--bg); }
:root[data-theme="dark"] .login-page { background: radial-gradient(1200px 600px at 10% -10%, #0e2a4a 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #2a1f45 0, transparent 55%), var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-page { background: radial-gradient(1200px 600px at 10% -10%, #0e2a4a 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #2a1f45 0, transparent 55%), var(--bg); } }
.login { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 28px; }
.login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.login-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.2px; }
.login-head p { margin: 2px 0 0; color: var(--muted); }
.alert { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--text); border-radius: var(--r); padding: 10px 12px; margin-bottom: 16px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 6px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.row { display: flex; gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fld > span:first-child { font-size: 13px; color: var(--muted); }
.fld.port { width: 90px; flex: none; }
.fld input, .inp { width: 100%; height: 36px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line2); border-bottom: 2px solid var(--line2); border-radius: var(--r); outline: none; }
.fld input:focus, .inp:focus { border-bottom-color: var(--accent); }
.pw { position: relative; display: block; }
.pw input { padding-right: 40px; }
.pw-eye { position: absolute; right: 3px; top: 3px; width: 32px; height: 30px; border: 0; border-radius: 5px; background: transparent center/18px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.7'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.pw-eye:hover, .pw-eye.on { background-color: var(--hover); }
.opts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 2px 0 18px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.chk input, .perm input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; text-align: center; min-height: 18px; }
.login-foot { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 18px; line-height: 1.6; }
.btn.busy { position: relative; }

/* ---------- aplikace ---------- */
.app-page { overflow: hidden; }
#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--mica); }
.titlebar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 12px; flex: none; }
.titlebar .side-tg { display: none; }
.ttl { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.ttl b { font-weight: 600; }
.conn { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.proto { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #19a33a; box-shadow: 0 0 0 3px color-mix(in srgb, #19a33a 22%, transparent); flex: none; }
.navbar { display: flex; align-items: center; gap: 8px; padding: 4px 8px 6px; flex: none; }
.navbtns { display: flex; gap: 2px; }
.addr { flex: 1; min-width: 0; display: flex; align-items: center; height: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 4px 0 8px; cursor: text; position: relative; }
.addr:hover { border-color: var(--line2); }
.addr-ic { color: var(--muted); display: inline-flex; margin-right: 4px; }
.addr-ic .i { width: 16px; height: 16px; }
.crumbs { flex: 1; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; white-space: nowrap; min-width: 0; height: 100%; }
.crumbs::-webkit-scrollbar { display: none; }
.crumb { border: 0; background: transparent; padding: 3px 7px; border-radius: 4px; flex: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.crumb:hover, .crumb.dropover { background: var(--hover); }
.csep { color: var(--faint); display: inline-flex; flex: none; }
.csep .i { width: 13px; height: 13px; }
.addr-in { display: none; flex: 1; border: 0; outline: none; background: transparent; height: 100%; padding: 0 4px; }
.addr.editing { border-color: var(--accent); border-bottom-width: 2px; }
.addr.editing .crumbs { display: none; }
.addr.editing .addr-in { display: block; }
.search { display: flex; align-items: center; gap: 6px; width: 260px; height: 34px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search .i { width: 16px; height: 16px; }
.search-in { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); }
.loadbar { height: 2px; flex: none; position: relative; overflow: hidden; }
.loadbar.on::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--accent); animation: load 1s ease-in-out infinite; }
@keyframes load { from { left: -30%; } to { left: 100%; } }

.cmdbar { display: flex; align-items: center; gap: 2px; padding: 5px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--mica); flex: none; overflow-x: auto; scrollbar-width: none; }
.cmdbar::-webkit-scrollbar { display: none; }
.cmd { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r); background: transparent; white-space: nowrap; flex: none; }
.cmd:hover:not(:disabled) { background: var(--hover); }
.cmd:disabled { opacity: .4; cursor: default; }
.cmd .i { color: var(--accent); }
.cmd .dd { width: 12px; height: 12px; color: var(--muted); margin-left: -2px; }
.cmd[data-cmd=del] .i { color: var(--danger); }
.sep { width: 1px; height: 22px; background: var(--line2); margin: 0 6px; flex: none; }

.body { flex: 1; display: flex; min-height: 0; background: var(--surface); position: relative; }
.side { width: 240px; flex: none; border-right: 1px solid var(--line); overflow: auto; padding: 6px 4px; background: var(--surface); }
.side-off .side { display: none; }
.tsec { padding-bottom: 6px; }
.tsec + .tsec { border-top: 1px solid var(--line); padding-top: 6px; }
.trow { display: flex; align-items: center; gap: 4px; height: 30px; padding-right: 8px; border-radius: 4px; cursor: default; white-space: nowrap; position: relative; user-select: none; }
.trow:hover { background: var(--hover); }
.trow.cur { background: var(--sel); }
.trow.cur::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.trow.dropover { background: var(--sel-h); outline: 1px solid var(--sel-b); }
.tw { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; padding: 0; background: transparent; color: var(--faint); border-radius: 3px; flex: none; transition: transform .12s; }
.tw .i { width: 12px; height: 12px; }
.tw.open { transform: rotate(90deg); }
.tw.leaf { visibility: hidden; }
.tic { display: inline-flex; flex: none; color: var(--accent); }
.tic .fi, .tic .i { width: 20px; height: 20px; }
.tl { overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.scroll { flex: 1; overflow: auto; position: relative; padding: 2px 4px 40px; }
.lhead { display: grid; grid-template-columns: minmax(200px, 1fr) 160px 170px 100px; padding: 0 4px; border-bottom: 1px solid var(--line); flex: none; background: var(--surface); }
.hc { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; text-align: left; position: relative; }
.hc + .hc::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 1px; background: var(--line); }
.hc:hover { background: var(--hover); color: var(--text); }
.hc .arr { display: inline-flex; opacity: 0; }
.hc .arr .i { width: 12px; height: 12px; }
.hc.on .arr { opacity: .8; transform: rotate(180deg); }
.hc.on.desc .arr { transform: none; }
.c-size, .hc.c-size { justify-content: flex-end; text-align: right; }
.view-icons .lhead { display: none; }

.list { outline: none; min-height: 100%; }
.it { display: grid; grid-template-columns: minmax(200px, 1fr) 160px 170px 100px; align-items: center; height: 30px; border: 1px solid transparent; border-radius: 4px; user-select: none; cursor: default; }
.it > div { padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.it .c-name { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.it .ico { display: inline-flex; flex: none; }
.it .fi { width: 22px; height: 22px; }
.nm { overflow: hidden; text-overflow: ellipsis; }
.it:hover { background: var(--hover); }
.it.sel { background: var(--sel); border-color: transparent; }
.it.sel:hover { background: var(--sel-h); }
.list:focus .it.focus { border-color: var(--sel-b); }
.it.cutting .ico, .it.cutting .nm { opacity: .5; }
.it.hid .ico { opacity: .7; }
.hide-dot .it.hid { display: none; }
.it.dropover { background: var(--sel-h); border-color: var(--sel-b); }
.main { position: relative; }
.main.dropover .scroll { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.main.dropover::after { content: attr(data-drop); position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-t); font-weight: 600; box-shadow: var(--shadow); pointer-events: none; }
.scroll.dropover { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.ren { flex: 1; min-width: 60px; resize: none; height: 24px; padding: 2px 6px; border: 1px solid var(--accent); border-radius: 3px; background: var(--surface); outline: none; overflow: hidden; line-height: 18px; font-size: 14px; }

.view-icons .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px; padding: 8px 4px; align-content: start; }
.view-icons .it { display: flex; flex-direction: column; height: auto; min-height: 112px; padding: 8px 4px 6px; }
.view-icons .it > div:not(.c-name) { display: none; }
.view-icons .it .c-name { flex-direction: column; gap: 4px; padding: 0; text-align: center; white-space: normal; width: 100%; }
.view-icons .it .fi { width: 64px; height: 64px; }
.view-icons .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; hyphens: auto; font-size: 13px; line-height: 17px; max-width: 100%; }
.view-icons .it.sel .nm { -webkit-line-clamp: 5; }
.view-icons .ren { width: 100%; height: 40px; text-align: center; white-space: normal; overflow: auto; font-size: 13px; }

.empty { position: absolute; inset: 70px 16px auto; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); pointer-events: none; }
.empty .fi { width: 72px; height: 72px; opacity: .55; margin-bottom: 4px; }
.empty b { font-weight: 600; color: var(--text); font-size: 15px; }
.empty span { font-size: 13px; }
.marquee { position: absolute; border: 1px solid var(--sel-b); background: color-mix(in srgb, var(--sel) 55%, transparent); pointer-events: none; z-index: 2; }
.drag-ghost { position: fixed; top: -100px; left: 0; padding: 6px 12px; background: var(--accent); color: var(--accent-t); border-radius: 6px; font-weight: 600; font-size: 13px; }

/* ikony souborů */
.fi .pg { fill: var(--pg); stroke: var(--pgs); stroke-width: 1.2; }
.fi .pgf { fill: var(--pgf); stroke: var(--pgs); stroke-width: 1.2; stroke-linejoin: round; }
.fi .ln { stroke: var(--ln); stroke-width: 2; stroke-linecap: round; fill: none; }
.view-details .it .fi .bt, .phead .fi .bt.none { display: none; }
.fi .bt { fill: #fff; font: 700 7.5px/1 "Segoe UI", Arial, sans-serif; letter-spacing: .2px; }

.statusbar { display: flex; align-items: center; gap: 18px; height: 30px; padding: 0 6px 0 14px; font-size: 12.5px; color: var(--muted); background: var(--mica); border-top: 1px solid var(--line); flex: none; }
.statusbar .ib { width: 30px; height: 24px; }
.statusbar .ib .i { width: 16px; height: 16px; }

/* ---------- nabídky ---------- */
.menu { position: fixed; z-index: 50; min-width: 220px; max-width: 320px; padding: 4px; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(24px);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px 0 8px; border: 0; border-radius: 4px; background: transparent; text-align: left; white-space: nowrap; outline: none; }
.mi:hover:not(:disabled), .mi:focus-visible { background: var(--hover); outline: none; }
.mi:disabled { opacity: .4; cursor: default; }
.mi.bold .ml { font-weight: 600; }
.mi.danger .mic { color: var(--danger); }
.mic { width: 18px; display: inline-flex; color: var(--accent); }
.ml { flex: 1; }
.mk { color: var(--faint); font-size: 12px; margin-left: 18px; }
.msub { display: inline-flex; color: var(--faint); }
.msub .i { width: 12px; height: 12px; }
.msep { height: 1px; background: var(--line); margin: 4px 6px; }

/* ---------- dialogy ---------- */
.dlg-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.28); animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.dlg { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100dvh - 32px); animation: pop .14s ease-out; }
.dlg.wide { max-width: 640px; }
.dlg-title { display: flex; align-items: center; gap: 8px; padding: 10px 8px 6px 20px; font-weight: 600; font-size: 15px; }
.dlg-title .btn { font-weight: normal; font-size: 14px; }
.dlg-title > .dt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-body { padding: 4px 20px 18px; overflow: auto; }
.dlg-body p { margin: 0; line-height: 1.5; }
.dlg-msg { display: flex; gap: 14px; align-items: flex-start; }
.dlg-ic { display: inline-flex; flex: none; color: var(--accent); }
.dlg-ic .i { width: 32px; height: 32px; }
.dlg-ic.warn { color: #d97a00; }
.dlg-body .fld { margin: 6px 0 0; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; background: var(--mica); border-top: 1px solid var(--line); }
.dlg-foot .btn { min-width: 96px; }
.kt { border-collapse: collapse; width: 100%; }
.kt td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
kbd { font: 12px var(--mono); background: var(--surface2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; }
.phead { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.phead b { font-size: 15px; word-break: break-all; }
.ico.big .fi { width: 48px; height: 48px; }
.pt { border-collapse: collapse; width: 100%; }
.pt th { text-align: left; font-weight: normal; color: var(--muted); padding: 4px 12px 4px 0; width: 100px; vertical-align: top; white-space: nowrap; }
.pt td { padding: 4px 0; word-break: break-all; }
.pbox { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0 0; padding: 8px 14px 12px; }
.pbox legend { padding: 0 6px; color: var(--muted); }
.perm { border-collapse: collapse; width: 100%; }
.perm th { font-weight: normal; color: var(--muted); font-size: 12.5px; padding: 4px; }
.perm td { padding: 4px; text-align: center; }
.perm td:first-child { text-align: left; }
.octl { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted); }
.oct { width: 80px !important; font-family: var(--mono); }

/* editor */
.editor-win { max-width: 1100px; height: calc(100dvh - 32px); }
.editor-win .dlg-title { padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); background: var(--mica); }
.editor-win .dlg-title > .ico .fi { width: 20px; height: 20px; display: block; }
.editor-win .dlg-title { gap: 6px; }
.etitle { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edirty { color: var(--accent); font-size: 12px; font-weight: normal; white-space: nowrap; }
.ed-body { flex: 1; display: flex; min-height: 0; background: var(--surface); }
.gutter { flex: none; min-width: 46px; padding: 12px 10px 12px 8px; overflow: hidden; text-align: right; white-space: pre; font: 13.5px/1.55 var(--mono); color: var(--faint); background: var(--surface2); border-right: 1px solid var(--line); user-select: none; }
.editor { flex: 1; min-width: 0; width: 100%; resize: none; border: 0; outline: none; padding: 12px 14px; font: 13.5px/1.55 var(--mono); tab-size: 4; background: var(--surface); color: var(--text); white-space: pre; overflow: auto; }
.editor[wrap=soft] { white-space: pre-wrap; }
.estatus { display: flex; gap: 18px; padding: 5px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--mica); white-space: nowrap; overflow: hidden; }
.estatus > span:first-child { overflow: hidden; text-overflow: ellipsis; }

/* náhled */
.pv { position: fixed; inset: 0; z-index: 45; background: rgba(10,10,12,.92); display: flex; flex-direction: column; color: #fff; animation: fade .15s; }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; }
.pv-bar .ib, .pv-bar .btn { color: #fff; }
.pv-bar .ib:hover, .pv-bar .btn:hover { background: rgba(255,255,255,.12); }
.pv-cap { font-size: 13.5px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 64px 24px; }
.pv-stage img, .pv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.pv-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 4px; }
.pv-stage audio { width: min(520px, 100%); }
.pv-stage.loading::before { content: ""; width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.pv-nav { position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; }
.pv-nav:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.pv-nav:disabled { opacity: 0; pointer-events: none; }
.pv-nav.prev { left: 10px; } .pv-nav.next { right: 10px; }
.pv-nav .i { width: 22px; height: 22px; }

/* přenosy a oznámení */
.transfers { position: fixed; right: 16px; bottom: 44px; z-index: 30; width: 360px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 8px; }
.tr { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 6px 12px 14px; animation: pop .15s; }
.trh { display: flex; align-items: center; gap: 8px; }
.trh b { flex: 1; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trh .ib { width: 28px; height: 26px; }
.pbar { height: 4px; border-radius: 2px; background: var(--line); margin: 8px 8px 6px 0; overflow: hidden; position: relative; }
.pbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .2s; }
.tr.ind .pbar i { width: 35%; position: absolute; animation: load 1.1s ease-in-out infinite; }
.tr.ok .pbar i { background: var(--ok); }
.tr.bad .pbar i { background: var(--danger); width: 100%; }
.tinfo { display: block; font-size: 12px; color: var(--muted); padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr.bad .tinfo { white-space: normal; color: var(--danger); }
.toasts { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 24px)); padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); animation: pop .15s; transition: opacity .3s; pointer-events: auto; }
.toast .ti { display: inline-flex; color: var(--ok); }
.toast.err .ti { color: var(--danger); }
.toast.out { opacity: 0; }
.scrim { display: none; }

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  .titlebar { padding-left: 4px; }
  .titlebar .side-tg { display: inline-grid; }
  .titlebar .btn span { display: none; }
  .tlogo { display: none; }
  .conn { max-width: 52vw; }
  .conn .proto { display: none; }
  .cmd[data-cmd=view], .cmdbar .sep { display: none; }
  .cmdbar { justify-content: space-between; }
  .cmdbar .grow { display: none; }
  .navbar { flex-wrap: wrap; padding: 2px 6px 6px; gap: 4px; }
  .navbtns .ib:nth-child(2) { display: none; }
  .addr { order: 0; min-width: 0; }
  .search { order: 2; width: 100%; }
  .cmd span { display: none; }
  .cmd { padding: 0 9px; }
  .cmd .dd { display: none; }
  .sep { margin: 0 2px; }
  .side { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; width: 82vw; max-width: 300px; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  .side-off .side { display: block; }
  .side-open .side { transform: none; }
  .side-open .scrim { display: block; position: absolute; inset: 0; z-index: 15; background: rgba(0,0,0,.3); }
  .trow { height: 40px; }
  .lhead { grid-template-columns: 1fr 90px; }
  .lhead .c-mtime, .lhead .c-type { display: none; }
  .it { grid-template-columns: 1fr 90px; height: 48px; }
  .it .c-mtime, .it .c-type { display: none; }
  .it .fi { width: 30px; height: 30px; }
  .view-icons .list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .view-icons .it .fi { width: 54px; height: 54px; }
  .touch-sel .it .ico { position: relative; }
  .mi { height: 42px; }
  .mk { display: none; }
  .menu { min-width: 240px; }
  .stsel { display: none; }
  .has-sel .stsel { display: inline; }
  .transfers { right: 8px; left: 8px; width: auto; bottom: 40px; }
  .pv-stage { padding: 0 8px 16px; }
  .pv-nav { top: auto; bottom: 18px; margin: 0; }
  .dlg-foot { flex-wrap: wrap; }
  .dlg-foot .btn { flex: 1; min-width: 0; }
  .editor-win { height: calc(100dvh - 16px); }
  .dlg-wrap:has(.editor-win) { padding: 8px; }
  .editor-win .btn.ghost { display: none; }
}
