:root {
  --bg: #0a0a0e; --bg2: #121218; --bg3: #1a1a23; --bg4: #242330; --line: #2a2937;
  --text: #ececf2; --mut: #8d8da1; --accent: #f5b83d; --accent2: #ff8a3d; --accent-ink: #1a1203;
  --ok: #3ecf8e; --info: #4da3ff; --danger: #ff5d6c; --warn: #f5b83d;
  --r: 10px; --shadow: 0 10px 40px rgba(0,0,0,.55);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.muted { color: var(--mut); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; } .gap { gap: 8px; }
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.ic { display: block; }
::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #34344a; border-radius: 8px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-corner { background: transparent; }

#app { height: 100%; display: flex; flex-direction: column; }
#view { flex: 1; min-height: 0; position: relative; }

/* --- górny pasek --- */
.top { display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 56px; border-bottom: 1px solid var(--line); background: linear-gradient(#101016, #0c0c11); flex: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; }
.wordmark { font-size: 19px; font-weight: 600; letter-spacing: .2px; }
.wordmark b { font-weight: 800; background: linear-gradient(90deg, #ffd76a, #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark.big { font-size: 32px; text-align: center; }
.searchwrap { position: relative; width: min(360px, 40vw); }
.searchwrap .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--mut); }
.input.search { padding-left: 34px; width: 100%; border-radius: 999px; }
.user { gap: 8px; }

/* --- przyciski / inputy --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 9px; background: var(--bg3); border: 1px solid var(--line); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s; user-select: none; }
.btn:hover { background: var(--bg4); border-color: #3a3950; }
.btn:active { filter: brightness(.9); }
.btn.primary { background: linear-gradient(135deg, #ffd06a, #ff8a3d); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: #3a1820; border-color: #5a2430; color: #ff9aa5; } .btn.danger:hover { background: #4a1c26; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--bg3); }
.btn.icon { width: 34px; padding: 0; } .btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; } .btn.lg { height: 44px; font-size: 15px; }
.btn.on { background: #3a2c10; border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.input { height: 36px; padding: 0 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; outline: none; width: 100%; }
.input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,184,61,.14); }
select.input { padding-right: 8px; }
.lbl { display: block; font-size: 12px; color: var(--mut); margin: 0 0 6px; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; background: var(--bg4); color: var(--mut); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { background: var(--bg3); border: 0; width: 34px; height: 32px; cursor: pointer; color: var(--mut); display: grid; place-items: center; }
.seg button.on { background: var(--bg4); color: var(--accent); }
kbd { font: 600 11.5px var(--font); background: var(--bg4); border: 1px solid #3a3950; border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; color: #d6d6e4; white-space: nowrap; }

/* --- toasty --- */
#toasts { position: fixed; right: 18px; top: 66px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--bg4); border: 1px solid #3a3950; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); animation: tin .2s; max-width: 360px; }
.toast.ok { border-color: #1f6b4a; } .toast.err { border-color: #7a2a36; color: #ffb3bb; } .toast.out { opacity: 0; transition: opacity .4s; }
@keyframes tin { from { transform: translateY(-8px); opacity: 0; } }

/* --- modal / popup --- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(3px); z-index: 5000; display: grid; place-items: center; padding: 20px; animation: fin .15s; }
@keyframes fin { from { opacity: 0; } }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; width: min(440px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 18px; }
.modal-body { padding: 10px 18px 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.modal h4 { margin: 14px 0 8px; font-size: 13px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.popmenu { position: fixed; z-index: 6000; min-width: 200px; background: var(--bg3); border: 1px solid #3a3950; border-radius: 12px; padding: 5px; box-shadow: var(--shadow); animation: fin .1s; max-height: 70vh; overflow: auto; }
.pm-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.pm-item:hover { background: var(--bg4); } .pm-item.active { color: var(--accent); } .pm-item.danger { color: #ff8f9b; } .pm-item em { margin-left: auto; font-style: normal; color: var(--mut); font-size: 12px; }
.popmenu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.ulist { display: flex; flex-direction: column; gap: 6px; } .urow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg3); border-radius: 10px; }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; } .krow { display: flex; gap: 10px; align-items: center; padding: 4px 0; } .krow kbd { min-width: 96px; text-align: center; } .krow span { color: var(--mut); font-size: 13px; }

/* --- logowanie --- */
.auth { flex: 1; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% 0%, rgba(255,138,61,.10), transparent 70%), var(--bg); }
.auth-card { width: min(380px, 92vw); display: flex; flex-direction: column; gap: 12px; padding: 34px 30px; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); text-align: center; }
.auth-logo { width: 84px; height: 84px; margin: 0 auto 4px; filter: drop-shadow(0 8px 24px rgba(255,138,61,.35)); }
.auth-err { color: #ff8f9b; min-height: 18px; font-size: 13px; }

/* --- dysk --- */
.drive { height: 100%; overflow: auto; padding: 18px 22px 60px; position: relative; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 700; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); } .crumbs .sep { color: var(--mut); display: inline-flex; }
.ftitle { font-size: 17px; }
.cards.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; }
.card:hover { border-color: #4a4766; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.card.droptarget { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,184,61,.25); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #07070a; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.folder { background: linear-gradient(135deg, #1c1b27, #14131c); color: var(--accent); }
.thumb-ico { color: #55556a; display: grid; place-items: center; width: 100%; height: 100%; }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }
.cinfo { padding: 10px 12px 12px; min-width: 0; }
.cname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 26px; }
.cmeta { color: var(--mut); font-size: 12px; margin-top: 2px; }
.cmenu { position: absolute; right: 6px; top: 6px; background: rgba(10,10,14,.7) !important; opacity: 0; width: 30px; height: 30px; } .card:hover .cmenu { opacity: 1; }
.cards.list .cmenu { opacity: 1; background: transparent !important; top: 50%; transform: translateY(-50%); }
.badge { position: absolute; left: 8px; top: 8px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(245,184,61,.95); color: #1a1203; font-weight: 700; }
.badge.err { background: var(--danger); color: #fff; }
.cards.list { display: flex; flex-direction: column; gap: 6px; }
.cards.list .card { display: flex; align-items: center; border-radius: 10px; }
.cards.list .thumb { width: 86px; aspect-ratio: 16 / 9; flex: none; } .cards.list .cinfo { flex: 1; padding: 8px 40px 8px 14px; }
.cards.list .badge { position: static; margin-right: 40px; }
.empty { display: grid; place-items: center; gap: 10px; padding: 80px 20px; text-align: center; color: var(--mut); grid-column: 1 / -1; }
.empty h2 { color: var(--text); }
.dropzone { position: fixed; inset: 56px 0 0 0; z-index: 4000; display: none; place-content: center; text-align: center; gap: 6px; background: rgba(10,10,14,.86); border: 3px dashed var(--accent); margin: 12px; border-radius: 22px; color: var(--accent); pointer-events: none; }
.dropzone.on { display: grid; }
.filebox { display: grid; place-items: center; padding: 20px; } .imgview { max-width: 100%; max-height: 74vh; border-radius: 12px; background: repeating-conic-gradient(#15151c 0 25%, #1b1b24 0 50%) 0 / 20px 20px; }

.uploads { position: fixed; right: 18px; bottom: 18px; width: 340px; max-height: 50vh; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid #3a3950; border-radius: 14px; box-shadow: var(--shadow); z-index: 4500; overflow: hidden; }
.up-head { display: flex; align-items: center; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); } .up-list { overflow: auto; padding: 8px 12px; }
.up-row { padding: 6px 0; } .up-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-bar { height: 4px; background: var(--bg4); border-radius: 4px; margin: 5px 0 3px; overflow: hidden; } .up-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd06a, #ff8a3d); transition: width .2s; }
.up-row.done .up-bar i { background: var(--ok); } .up-row.err .up-bar i { background: var(--danger); } .up-meta { font-size: 11.5px; color: var(--mut); }

/* ================= FILM ================= */
.film { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 372px; }
.film-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.film-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; flex: none; }
.film-top .chip { white-space: nowrap; }
.film-top h3 { min-width: 60px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.stage-area { flex: 1; min-height: 120px; position: relative; padding: 0 14px 10px; display: flex; flex-direction: column; }
.player { position: relative; flex: 1; min-height: 0; background: #000; border-radius: 12px; overflow: hidden; outline: none; user-select: none; }
.player:fullscreen { border-radius: 0; }
.stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #000; overflow: hidden; --u: 1px; container-type: normal; }
.stage video.base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.layer { position: absolute; inset: 0; overflow: hidden; }
.sel-layer { position: absolute; inset: 0; pointer-events: none; z-index: 9999; }
.stage.tool-draw, .stage.tool-draw * { cursor: crosshair !important; } .stage.tool-text, .stage.tool-text * { cursor: text !important; }
.it { position: absolute; transform-origin: 50% 50%; touch-action: none; }
.it.edmode { cursor: move; } .it.sel { outline: 1.5px solid var(--accent); }
.it > img, .it > video { width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; }
.it svg { width: 100%; height: 100%; overflow: visible; display: block; pointer-events: none; }
.it.txt { white-space: pre-wrap; word-break: break-word; line-height: 1.15; padding: .12em .3em; font-weight: 700; }
.it.txt[contenteditable="true"] { outline: 1.5px dashed var(--accent); cursor: text; user-select: text; }
.arrowit { position: absolute; inset: 0; pointer-events: none; } .arrowit svg { width: 100%; height: 100%; overflow: visible; }
.arrowit .hit { pointer-events: stroke; cursor: move; }
.hnd { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: #fff; border: 2px solid var(--accent); border-radius: 3px; pointer-events: auto; z-index: 3; }
.hnd.rot { border-radius: 50%; cursor: grab; } .hnd.pt { border-radius: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; }
.hnd[data-c="nw"], .hnd[data-c="se"] { cursor: nwse-resize; } .hnd[data-c="ne"], .hnd[data-c="sw"] { cursor: nesw-resize; }
.rotline { position: absolute; left: 50%; top: -24px; width: 0; height: 24px; border-left: 1.5px solid var(--accent); pointer-events: none; }
.rev-banner { position: absolute; left: 12px; right: 12px; top: 10px; display: none; z-index: 9000; pointer-events: none; }
.rev-banner.on { display: block; }
.rev-banner > div { display: inline-block; max-width: 100%; background: rgba(10,10,14,.82); backdrop-filter: blur(6px); border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 8px; font-size: calc(var(--u) * 20); line-height: 1.3; box-shadow: 0 4px 20px rgba(0,0,0,.5); }
.rev-banner small { display: block; color: var(--accent); font-weight: 700; font-size: .62em; letter-spacing: .05em; margin-bottom: 2px; }
.bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(10,10,14,.6); backdrop-filter: blur(4px); display: grid; place-items: center; pointer-events: none; opacity: 0; transform: scale(.8); transition: .18s; z-index: 8; border: 1px solid rgba(255,255,255,.2); }
.bigplay.flash { opacity: 1; transform: scale(1); }
.player.loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; z-index: 9; }
@keyframes spin { to { transform: rotate(360deg); } }
.proc-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); text-align: center; z-index: 10; padding: 16px 22px; background: rgba(10,10,14,.85); border-radius: 12px; border: 1px solid var(--line); }

/* kontrolki odtwarzacza */
.controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; padding: 34px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.82)); transition: opacity .25s; }
.player.idle .controls { opacity: 0; pointer-events: none; } .player.idle { cursor: none; }
.cbtns { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.cb { background: none; border: 0; color: #fff; width: 36px; height: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; position: relative; }
.cb:hover { background: rgba(255,255,255,.14); } .cb.txt { width: auto; padding: 0 10px; font-size: 13px; font-weight: 700; } .cb.on { color: var(--accent); }
.time { font-variant-numeric: tabular-nums; font-size: 13px; padding: 0 10px; cursor: pointer; white-space: nowrap; }
.volwrap { display: flex; align-items: center; } .volwrap input { width: 0; opacity: 0; transition: .2s; accent-color: var(--accent); } .volwrap:hover input, .volwrap:focus-within input { width: 84px; opacity: 1; margin-right: 6px; }
.seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek .trk { position: relative; width: 100%; height: 5px; border-radius: 4px; background: rgba(255,255,255,.22); transition: height .12s; }
.seek:hover .trk, .seek.drag .trk { height: 8px; }
.seek .buf, .seek .prog { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.seek .buf { background: rgba(255,255,255,.28); } .seek .prog { background: linear-gradient(90deg, #ffd06a, #ff8a3d); }
.seek .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .12s; box-shadow: 0 0 0 3px rgba(255,138,61,.4); }
.seek:hover .knob, .seek.drag .knob { transform: scale(1); }
.seek .rv { position: absolute; top: -4px; bottom: -4px; background: rgba(77,163,255,.75); border-radius: 2px; min-width: 4px; } .seek .rv.done { background: rgba(62,207,142,.75); } .seek .rv.accepted { background: rgba(62,207,142,.35); }
.seek .tip { position: absolute; bottom: 20px; transform: translateX(-50%); background: rgba(10,10,14,.92); border: 1px solid #3a3950; padding: 2px 8px; border-radius: 6px; font-size: 12px; pointer-events: none; display: none; white-space: nowrap; }
.seek:hover .tip { display: block; }

/* panel poprawek */
.rev-panel { display: flex; flex-direction: column; min-height: 0; background: var(--bg2); }
.rp-head { padding: 12px 14px 8px; display: flex; align-items: center; gap: 8px; }
.rp-head h3 { font-size: 15px; }
.rp-stats { display: flex; gap: 6px; padding: 0 14px 8px; flex-wrap: wrap; }
.tab { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 12px; color: var(--mut); } .tab.on { background: var(--bg4); color: var(--text); border-color: #4a4766; }
.composer { margin: 0 12px 10px; padding: 10px; background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.composer.armed { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,184,61,.1); }
.composer textarea { width: 100%; min-height: 66px; resize: vertical; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; outline: none; max-height: 220px; }
.crange { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); flex-wrap: wrap; }
.tcin { width: 70px; height: 28px; text-align: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; font-variant-numeric: tabular-nums; outline: none; } .tcin:focus { border-color: var(--accent); }
.tcset { height: 28px; padding: 0 7px; font-size: 11px; }
.cactions { display: flex; align-items: center; gap: 6px; }
.mic.rec { background: #4a1420; border-color: var(--danger); color: #ff8f9b; animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255,93,108,.18); } }
.pend { display: flex; flex-wrap: wrap; gap: 6px; }
.attchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: var(--bg4); border: 1px solid #3a3950; border-radius: 8px; padding: 3px 4px 3px 4px; font-size: 12px; }
.attchip img { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; background: #000; } .attchip span.nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attchip button { background: none; border: 0; color: var(--mut); cursor: pointer; padding: 2px 4px; } .attchip button:hover { color: var(--accent); }
.revlist { flex: 1; overflow: auto; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.rev { background: var(--bg3); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .12s, background .12s; }
.rev:hover { background: #1f1e2a; } .rev.done { border-left-color: var(--ok); } .rev.accepted { border-left-color: #2a7a58; opacity: .72; } .rev.open { border-left-color: var(--warn); }
.rev.active { box-shadow: 0 0 0 2px rgba(245,184,61,.55); } .rev.now { background: #26231a; }
.rev-h { display: flex; align-items: center; gap: 8px; }
.rev-n { font-weight: 800; color: var(--mut); font-size: 12px; } .rev-tc { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); } .rev-tc:hover { text-decoration: underline; }
.rev-text { margin: 6px 0 4px; white-space: pre-wrap; word-break: break-word; }
.rev.accepted .rev-text { text-decoration: line-through; text-decoration-color: #555; }
.rev-meta { font-size: 11.5px; color: var(--mut); }
.rev-atts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #343347; }
.att { display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: var(--bg2); border-radius: 9px; padding: 5px 6px; } .att img { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; background: #000; flex: none; }
.att .nm { flex: 1; min-width: 0; } .att .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .att .nm small { color: var(--mut); }
.rev-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.st { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; } .st.open { background: rgba(245,184,61,.16); color: var(--warn); } .st.done { background: rgba(62,207,142,.16); color: var(--ok); } .st.accepted { background: rgba(62,207,142,.1); color: #6fb99b; }

/* ================= EDYTOR ================= */
.etoolbar { display: flex; align-items: center; gap: 6px; padding: 6px 14px; flex: none; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--bg2); }
.etoolbar .sepv { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tool { width: 36px; height: 34px; }
.props { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 0 4px; font-size: 12px; color: var(--mut); }
.props .input { height: 28px; width: 70px; padding: 0 6px; font-size: 12.5px; text-align: center; }
.props input[type=color] { width: 30px; height: 28px; padding: 0; border: 1px solid var(--line); background: var(--bg2); border-radius: 7px; cursor: pointer; }
.props input[type=range] { width: 90px; accent-color: var(--accent); }
.sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; } .sw.on { border-color: #fff; }
.props textarea { width: 190px; height: 28px; min-height: 28px; resize: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: 12.5px; outline: none; }
.revchip { display: inline-flex; gap: 6px; align-items: center; background: #3a2c10; border: 1px solid var(--accent); color: var(--accent); padding: 0 6px 0 10px; height: 28px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.revchip button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 3px; display: grid; place-items: center; }

.tl { flex: none; height: 300px; display: flex; flex-direction: column; background: var(--bg); border-top: 1px solid var(--line); min-height: 140px; position: relative; }
.tl-resize { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; z-index: 30; }
.tl-bar { display: flex; align-items: center; gap: 8px; padding: 5px 14px; flex: none; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; }
.tl-bar input[type=range] { width: 110px; accent-color: var(--accent); }
.tl-bar select { height: 28px; max-width: 200px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; font-size: 12px; }
.tl-scroll { flex: 1; overflow: auto; position: relative; }
.tl-content { position: relative; min-height: 100%; }
.tl-ruler { position: sticky; top: 0; z-index: 20; height: 26px; background: #0f0f15; border-bottom: 1px solid var(--line); cursor: pointer; }
.tl-ruler .tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid #34344a; padding: 7px 0 0 4px; font-size: 10.5px; color: var(--mut); font-variant-numeric: tabular-nums; pointer-events: none; }
.tl-ruler .tick.minor { top: 17px; padding: 0; }
.tl-lane { position: relative; height: 40px; border-bottom: 1px solid #191922; display: flex; }
.tl-lane.rv { height: 34px; } .tl-lane.base { height: 46px; } .tl-lane.prem { height: 28px; } .tl-lane.over:nth-child(odd) { background: #0d0d12; }
.tl-label { position: sticky; left: 0; z-index: 15; width: 112px; flex: none; background: #0f0f15; border-right: 1px solid var(--line); font-size: 11.5px; color: var(--mut); display: flex; align-items: center; padding: 0 8px; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-label b { color: var(--text); font-weight: 700; }
.tl-track { position: relative; flex: none; height: 100%; }
.tl-clip { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; overflow: hidden; cursor: grab; display: flex; align-items: center; padding: 0 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: #fff; border: 1px solid rgba(255,255,255,.18); touch-action: none; background-size: auto 100%; background-repeat: repeat-x; }
.tl-clip .nm { overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none; position: relative; }
.tl-clip.sel { box-shadow: 0 0 0 2px var(--accent); z-index: 5; }
.tl-clip.dim { opacity: .45; }
.tl-clip .hl, .tl-clip .hr { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; } .tl-clip .hl { left: 0; } .tl-clip .hr { right: 0; }
.tl-clip .hl:hover, .tl-clip .hr:hover { background: rgba(255,255,255,.35); }
.c-text { background: linear-gradient(#7b5cff, #5a3fd6); } .c-image { background-color: #1f8a6a; } .c-video { background-color: #2b6fd6; } .c-arrow { background: linear-gradient(#ff6a5c, #d63e33); } .c-rect, .c-ellipse { background: linear-gradient(#e0a020, #b87d12); } .c-pen { background: linear-gradient(#d0488f, #a82e6f); } .c-audio { background: linear-gradient(#17a3a3, #0e7878); }
.tl-clip.base { background: linear-gradient(#2a3a5a, #1d2942); cursor: default; } .tl-clip.pv { background: #2a3550; cursor: default; font-weight: 500; } .tl-clip.pa { background: #24503f; cursor: default; font-weight: 500; }
.tl-clip.rv { background: linear-gradient(#2d6cb8, #245a9c); } .tl-clip.rv.done { background: linear-gradient(#26995f, #1e7a4c); } .tl-clip.rv.accepted { background: #2a4a3c; } .tl-clip.rv.draft { background: repeating-linear-gradient(45deg, #5a4a1c, #5a4a1c 6px, #6a5822 6px, #6a5822 12px); border-style: dashed; border-color: var(--accent); }
.tl-clip.rv.active { box-shadow: 0 0 0 2px var(--accent); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 0; z-index: 25; pointer-events: none; }
.tl-playhead::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--accent2); }
.tl-playhead::after { content: ""; position: absolute; left: -6px; top: 0; border: 6px solid transparent; border-top: 9px solid var(--accent2); }
.tl-snap { position: absolute; top: 26px; bottom: 0; width: 1px; background: #fff; z-index: 24; display: none; opacity: .7; }
.tl-add { color: var(--mut); font-size: 11.5px; padding: 0 10px; cursor: pointer; align-items: center; display: flex; }

@media (max-width: 1100px) { .film { grid-template-columns: 1fr; grid-template-rows: minmax(660px, 100%) minmax(440px, auto); overflow-y: auto; } .film-main { border-right: 0; } .rev-panel { min-height: 440px; } }

/* --- dodatki --- */
#view.noscroll { overflow: hidden; }
.tbhost, .tlhost { display: none; flex: none; }
.film-main.editing .tbhost, .film-main.editing .tlhost { display: block; }
.ptoast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(10,10,14,.88); border: 1px solid #3a3950; padding: 5px 14px; border-radius: 999px; font-weight: 600; z-index: 30; opacity: 0; transition: opacity .2s; pointer-events: none; }
.ptoast.on { opacity: 1; }
.stage:not(.edit) .it, .stage:not(.edit) .arrowit .hit { pointer-events: none; }
.stage.edit .it { pointer-events: auto; cursor: move; }
.stage.edit .arrowit .hit { cursor: move; }
.stage.edit { outline: 1px dashed rgba(255,255,255,.12); }
.film-main.editing .player { border-radius: 12px 12px 0 0; }
.rp-opts { display: none; }
select { color-scheme: dark; }

.etoolbar .props { flex: 1 1 100%; min-height: 30px; padding: 2px 4px 0; }

/* --- zaznaczanie w dysku --- */
.drive { user-select: none; }
.card.selected { border-color: var(--accent); background: #1d1a12; box-shadow: 0 0 0 2px rgba(245,184,61,.35); }
.band { position: absolute; border: 1px solid var(--accent); background: rgba(245,184,61,.14); z-index: 50; pointer-events: none; border-radius: 3px; }
.selbar { position: sticky; top: -18px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: -4px 0 14px; background: #241f12; border: 1px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow); }
.dragghost { position: fixed; top: -100px; left: -100px; padding: 6px 12px; background: var(--accent); color: #1a1203; font-weight: 700; border-radius: 8px; }

/* --- przed / po, zmiany, miniatury --- */
.viewseg button { width: auto; padding: 0 12px; font-size: 12px; font-weight: 700; }
.viewseg button.on { background: #3a1820; color: #ff8f9b; }
.viewseg button:first-child.on { background: var(--bg4); color: var(--text); }
.tl-clip.chg { border: 2px solid #ff3b3b; box-shadow: 0 0 0 1px rgba(255,59,59,.35), 0 0 12px rgba(255,59,59,.35); }
.tl-clip.pmod { background-color: #8a1f2c; background-image: none !important; border: 2px solid #ff3b3b; box-shadow: 0 0 12px rgba(255,59,59,.4); font-weight: 700; }
.tl-clip.pmod.del { background: repeating-linear-gradient(45deg, #5a1520, #5a1520 6px, #7a1c2a 6px, #7a1c2a 12px); text-decoration: line-through; }
.tl-clip.ghost { background: transparent !important; border: 1px dashed #5a5a74; opacity: .7; pointer-events: none; color: var(--mut); }
.tl-clip.pv, .tl-clip.pa { cursor: grab; }
.tl-clip.pv .nm, .tl-clip.c-image .nm, .tl-clip.c-video .nm { background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 4px; }
.pinfo { position: absolute; right: 9px; top: 2px; width: 20px; height: 20px; border-radius: 6px; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; z-index: 3; }
.pinfo:hover { background: var(--accent); color: #000; }
.tl-lane.prem { height: 34px; } .tl-lane.prem.hdr { height: 24px; }
.chip.proj { gap: 6px; background: #2a2540; color: #b9a8ff; height: 24px; }

/* --- checkbox zaznaczania na kartach --- */
.selcb { position: absolute; left: 8px; top: 8px; z-index: 5; width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(255,255,255,.8); background: rgba(10,10,14,.65); color: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s; }
.card:hover .selcb, .cards.hassel .selcb, .card.selected .selcb { opacity: 1; }
.selcb:hover { border-color: var(--accent); }
.card.selected .selcb { background: var(--accent); border-color: var(--accent); color: #1a1203; }
.badge { left: 42px; }
.cards.list .selcb { top: 50%; transform: translateY(-50%); left: 10px; }
.cards.list .thumb { margin-left: 44px; }
.cards.list .badge { left: auto; }

/* --- timeline: separator wideo/audio, klip z poprawką --- */
.tl-sep { display: flex; height: 8px; background: #0b0b10; }
.tl-sep .tl-label { height: 8px; padding: 0; }
.tl-sepline { height: 100%; position: relative; }
.tl-sepline::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: .85; }
.tl-clip.hot { box-shadow: 0 0 0 3px #ff3b3b, 0 0 18px rgba(255,59,59,.7); border-color: #ff3b3b; z-index: 4; }
.tl-clip.hot::after { content: ""; position: absolute; inset: 0; background: rgba(255,40,60,.42); pointer-events: none; }
body.ctrl-held .scrubby { cursor: ew-resize; }
.tcin.scrubby { user-select: none; }

/* --- ukrywanie panelu / osi czasu --- */
.film.nopanel { grid-template-columns: minmax(0, 1fr); }
.film.nopanel .rev-panel { display: none; }
.film-main.notl .tlhost { display: none !important; }
.film-top .btn.on { background: #3a2c10; border-color: var(--accent); color: var(--accent); }

/* --- AI / lista poprawek --- */
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: 12px; margin-bottom: 4px; } .linkbtn:hover { text-decoration: underline; }
.rev-text.israw { color: var(--mut); font-style: italic; }
.rev.linked { background: #2a1a1d; box-shadow: 0 0 0 2px #ff3b3b; border-left-color: #ff3b3b; }
.dragghost.live { top: 0; left: 0; z-index: 9000; pointer-events: none; box-shadow: var(--shadow); }

/* --- pełnoekranowy fragment poprawki --- */
.overlay.fragov { display: flex; flex-direction: column; padding: 0; background: #000; z-index: 7000; backdrop-filter: none; }
.fragtop { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: #fff; flex: none; }
.fragstage { flex: 1; min-height: 0; position: relative; }
.fragtxt { position: absolute; left: 16px; right: 16px; top: 12px; display: inline-block; max-width: 70%; background: rgba(10,10,14,.82); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; font-size: 18px; line-height: 1.35; white-space: pre-wrap; pointer-events: none; }
.fragtxt small { display: block; color: var(--accent); font-weight: 700; font-size: 11px; letter-spacing: .05em; margin-bottom: 3px; }
.fragctl { flex: none; padding: 6px 16px 14px; color: #fff; }
.fragctl .seek .rv { top: 0; bottom: 0; border-radius: 2px; }

/* --- pasek postępu poprawek --- */
.pbarwrap { display: flex; align-items: center; gap: 10px; width: 100%; }
.pbar { flex: 1; height: 10px; background: var(--bg4); border-radius: 999px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd06a, #ff8a3d); border-radius: 999px; transition: width .35s ease; }
.pbar.full i { background: linear-gradient(90deg, #3ecf8e, #2fb97b); }
.ptxt { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.rp-stats { padding-top: 4px; }

/* --- poprawka + element = jedna rzecz na osi czasu --- */
.tl-clip.inrev { border-left: 5px solid #4da3ff; }
.tl-clip.inrev.fixed { border-color: #3ecf8e; box-shadow: 0 0 0 1px rgba(62,207,142,.4); border-left-color: #3ecf8e; }
.tl-clip.sib { box-shadow: 0 0 0 2px var(--accent); }
.tl-clip.pmod.fixed { background-color: #1f6b4a; border-color: #3ecf8e; box-shadow: 0 0 10px rgba(62,207,142,.35); }
.tl-clip.rv.open { background: linear-gradient(#2d6cb8, #245a9c); }
.tl-clip.rv.done { background: linear-gradient(#26995f, #1e7a4c); }

/* --- retencja / Drive --- */
.badge.arch { background: #3b3470; color: #d8d2ff; }
.cmeta .exp { color: var(--mut); } .cmeta .exp.warn { color: #ff8f9b; font-weight: 700; }
.notebox { border-top: 1px solid var(--line); margin-top: 14px; }

/* --- awatary --- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 800; flex: none; background: var(--bg4); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn.user { padding: 0 12px 0 5px; }

/* --- zwarty pasek narzędzi i oś czasu (więcej miejsca na timeline) --- */
.etoolbar { padding: 3px 12px; gap: 4px; }
.etoolbar .props:empty { display: none; }
.etoolbar .props { flex: 1 1 auto; min-height: 0; padding: 0 4px; }
.etoolbar .btn.icon.tool { width: 32px; height: 30px; }
.etoolbar .btn { height: 30px; }
.etoolbar .sepv { height: 18px; margin: 0 2px; }
.tl { border-top: 0; height: 270px; }
.tl-bar { padding: 3px 12px; gap: 6px; }
.tl-bar .btn.sm, .tl-bar .btn.icon.sm { height: 26px; }
.tl-bar .btn.icon.sm { width: 28px; }
.viewseg button { height: 26px; font-size: 11.5px; padding: 0 10px; }
.tl-bar select { height: 26px; max-width: 150px; }
.tl-ruler { height: 22px; } .tl-ruler .tick { padding-top: 5px; }
.tl-ruler .tick.minor { top: 14px; }
.tl-lane { height: 34px; } .tl-lane.rv { height: 28px; } .tl-lane.prem { height: 30px; }
.tl-clip { top: 3px; bottom: 3px; font-size: 11px; }
.film-top { padding: 6px 14px; }
