/* Editorul de slideshow / reel. Toate clasele au prefixul „sh-”, ca să nu se calce cu editorul de album. */
.sh-ed { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sh-body { flex: 1; display: flex; min-height: 0; }

/* bara de sus (peste .topbar din app.css) */
.sh-ed .topbar { overflow: hidden; }
.sh-project > span { max-width: 15vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-zoom-val { min-width: 54px; justify-content: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.sh-bg-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); }

/* unelte în stânga */
.sh-side { display: flex; flex: none; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); }
.sh-rail { width: 74px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; background: var(--panel-2); border-right: 1px solid var(--line); overflow-y: auto; }
.sh-rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; }
.sh-rail-btn:hover { background: rgba(20, 24, 40, .06); }
.sh-rail-btn.on { background: var(--accent-soft); color: var(--accent-2); }
.sh-rail-btn:focus-visible, .sh-ct:focus-visible, .sh-chip:focus-visible, .sh-tpl:focus-visible, .sh-lay:focus-visible, .sh-tile button:focus-visible, .sh-add:focus-visible, .sh-play:focus-visible, .sh-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sh-panel { width: 304px; display: flex; flex-direction: column; min-height: 0; }
.sh-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 8px 14px; flex: none; }
.sh-panel-head b { font-size: 15px; }
.sh-panel-x { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 6px; display: inline-flex; }
.sh-panel-x:hover { background: rgba(0, 0, 0, .06); color: var(--text); }
.sh-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sh-tools { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; z-index: 2; background: var(--panel); padding-bottom: 6px; }
.sh-tip { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.sh-none { color: var(--muted); padding: 20px 6px; text-align: center; font-size: 13px; column-span: all; }
.sh-group { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.sh-stack { display: flex; flex-direction: column; gap: 6px; }
.sh-form { display: flex; flex-direction: column; gap: 12px; }
.sh-form-foot { flex-wrap: wrap; }
.sh-mini { width: 26px; height: 26px; flex: none; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.sh-mini:hover { background: rgba(0, 0, 0, .07); color: var(--danger); }
.sh-off { opacity: .5; pointer-events: none; }

/* Imagini */
.sh-imgs { columns: 2; column-gap: 6px; }
.sh-img { position: relative; break-inside: avoid; margin-bottom: 6px; border-radius: 5px; overflow: hidden; background: #e7e3db; cursor: grab; touch-action: none; user-select: none; }
.sh-img:hover { box-shadow: 0 0 0 2px var(--accent); }
.sh-img img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sh-img-used { position: absolute; top: 4px; left: 4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sh-img-fav { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #e11d48; display: flex; align-items: center; justify-content: center; }
.sh-img-fav .ic { fill: currentColor; }
.sh-ghost { display: block; width: 96px; height: auto; }

/* Șabloane */
.sh-tpl { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.sh-tpl:hover { border-color: var(--line-2); background: var(--panel-2); }
.sh-tpl.on { border-color: var(--accent); background: var(--accent-soft); }
.sh-tpl-ic { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--panel-2); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.sh-tpl.on .sh-tpl-ic { background: #fff; color: var(--accent-2); }
.sh-tpl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-tpl-txt small { color: var(--muted); font-size: 12px; }
.sh-tpl-check { color: var(--accent); visibility: hidden; }
.sh-tpl.on .sh-tpl-check { visibility: visible; }

/* Layouturi */
.sh-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-lay { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px; }
.sh-lay:hover { border-color: var(--line-2); }
.sh-lay.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.sh-lay.cur::after { content: "acum"; position: absolute; top: 5px; right: 6px; font-size: 10px; font-weight: 700; color: var(--muted); }
.sh-lay-dia { display: grid; gap: 2px; width: 66px; aspect-ratio: 16 / 9; }
.sh-reel .sh-lay-dia { width: 34px; aspect-ratio: 9 / 16; }
.sh-lay-dia i { background: #b9b4a8; border-radius: 2px; }
.sh-lay.on .sh-lay-dia i { background: var(--accent); }

/* Melodii */
.sh-nowsong { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 8px 7px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.sh-nowsong.has { background: var(--accent-soft); border-color: #cfcbf7; color: var(--accent-2); }
.sh-now-txt, .sh-song-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-now-txt b, .sh-song-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-now-txt small, .sh-song-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-songs { display: flex; flex-direction: column; gap: 6px; }
.sh-songitem { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sh-songitem.on { border-color: var(--accent); }
.sh-song-play { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.sh-song-play:hover { background: var(--ink-soft); }
.sh-song-play.on { background: var(--accent); }
.sh-upload { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Text */
.sh-textlist { display: flex; flex-direction: column; gap: 4px; }
.sh-textitem { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.sh-textitem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-textitem.on { border-color: var(--accent); background: var(--accent-soft); }

/* Titlu și final */
.sh-tstyles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sh-tstyle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 68px; padding: 8px 6px; border: 0; border-radius: 9px; background: var(--ink-2); color: #fff; overflow: hidden; }
.sh-tstyle.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.sh-ts-a, .sh-ts-b { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.sh-ts-b { opacity: .85; }
.sh-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sh-logo { aspect-ratio: 4 / 3; padding: 6px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background-color: #fff; background-image: linear-gradient(45deg, #ececec 25%, transparent 25%, transparent 75%, #ececec 75%), linear-gradient(45deg, #ececec 25%, transparent 25%, transparent 75%, #ececec 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.sh-logo img { max-width: 100%; max-height: 100%; pointer-events: none; }
.sh-logo.on { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.sh-logo.add { flex-direction: column; gap: 4px; border-style: dashed; border-width: 1.5px; background: transparent; color: var(--ink-soft); font-size: 11.5px; font-weight: 600; }
.sh-logo.add:hover { border-color: var(--accent); color: var(--accent-2); }

/* zona de lucru */
.sh-stage { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.sh-ctx { flex: none; min-height: 46px; display: flex; align-items: center; gap: 6px; padding: 5px 14px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
.sh-ctx-info { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-right: 6px; }
.sh-ctx-hint { font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.sh-ct { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; flex: none; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; color: var(--text); font-size: 13px; }
.sh-ct:hover { background: var(--panel-2); }
.sh-ct.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.sh-ct.danger:hover { background: #fde8e8; border-color: #f1b5b5; color: var(--danger); }
.sh-ctx .slider { flex: none; }
.sh-scroller { flex: 1; min-height: 0; overflow: auto; display: flex; padding: 24px; }
.sh-wrap { position: relative; flex: none; margin: auto; background: #000; box-shadow: var(--shadow); user-select: none; touch-action: none; }
.sh-wrap.cropping { cursor: grab; }
.sh-canvas { display: block; width: 100%; height: 100%; }
.sh-sel { position: absolute; pointer-events: none; outline: 2px solid var(--accent); outline-offset: -2px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55); }
.sh-sel.text, .sh-sel.logo { outline-style: dashed; outline-offset: 3px; box-shadow: none; }
.sh-sel.crop { outline-color: #f59e0b; }
.sh-dropbox { position: absolute; pointer-events: none; background: rgba(81, 70, 224, .3); outline: 3px solid var(--accent); outline-offset: -3px; }
.sh-textedit { position: absolute; margin: 0; padding: 0; border: 0; border-radius: 2px; outline: 2px dashed var(--accent); outline-offset: 4px; background: rgba(20, 24, 40, .22); resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; }
.sh-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-align: center; max-width: 320px; }
.sh-empty b { color: var(--text); font-size: 16px; }

/* cronologia */
.sh-timeline { flex: none; display: flex; flex-direction: column; background: var(--panel); border-top: 1px solid var(--line); }
.sh-tl-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px 7px; white-space: nowrap; overflow: hidden; }
.sh-play { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sh-play:hover { background: var(--ink-soft); }
.sh-play.on { background: var(--accent); }
.sh-time { min-width: 112px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-tl-sep { width: 1px; height: 22px; background: var(--line); }
.sh-speed { display: inline-flex; align-items: center; gap: 6px; }
.sh-lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.sh-step { width: 26px; height: 26px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sh-step:hover { background: var(--panel-2); border-color: #bdb7ab; }
.sh-speed-val { min-width: 116px; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-tl-hint { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.sh-tl-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; }
.sh-tl-inner { position: relative; min-width: 100%; }
.sh-ruler { position: relative; height: 22px; background: var(--panel-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: ew-resize; touch-action: none; }
.sh-tick { position: absolute; top: 0; height: 100%; padding-left: 4px; border-left: 1px solid var(--line-2); font-size: 10.5px; line-height: 21px; color: var(--muted); pointer-events: none; font-variant-numeric: tabular-nums; }
.sh-row { position: relative; height: 92px; margin-top: 8px; }
.sh-tile { position: absolute; top: 0; height: 92px; border-radius: 7px; overflow: hidden; background: #d9d5cc; cursor: grab; touch-action: none; user-select: none; }
.sh-tile.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); z-index: 1; }
.sh-tile.drop { box-shadow: 0 0 0 3px var(--accent); z-index: 1; }
.sh-tile.drop::after { content: ""; position: absolute; inset: 0; background: rgba(81, 70, 224, .3); pointer-events: none; }
.sh-tile.dragging { opacity: .35; }
.sh-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sh-tile-trans { position: absolute; left: 0; right: 0; top: 0; height: 20px; padding: 0 6px; border: 0; background: rgba(18, 21, 32, .66); color: #fff; font-size: 10.5px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-tile-trans:hover { background: var(--accent); }
.sh-tile-dur { position: absolute; left: 4px; bottom: 4px; height: 19px; padding: 0 6px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); font-size: 10.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums; }
.sh-tile-dur:hover { background: var(--accent); color: #fff; }
.sh-tile-num { position: absolute; right: 6px; bottom: 5px; color: #fff; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .85); pointer-events: none; }
.sh-tile-bin { position: absolute; right: 3px; top: 23px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(18, 21, 32, .62); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; opacity: .8; }
.sh-tile-bin:hover { background: var(--danger); opacity: 1; }
.sh-tile.narrow .sh-tile-num { display: none; }
.sh-tile.narrow .sh-tile-trans { padding: 0 3px; font-size: 9.5px; }
.sh-tile.narrow .sh-tile-dur { left: 2px; padding: 0 4px; font-size: 9.5px; }
.sh-tile.narrow .sh-tile-bin { display: none; right: 1px; }
.sh-tile.narrow:hover .sh-tile-bin, .sh-tile.narrow.sel .sh-tile-bin { display: flex; }
.sh-add { position: absolute; top: 36px; width: 20px; height: 20px; margin-left: -10px; z-index: 3; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: var(--shadow-sm); opacity: .6; transition: opacity .12s, transform .12s; }
.sh-row:hover .sh-add, .sh-add.end { opacity: 1; }
.sh-add:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.15); }
.sh-add.end { top: 32px; width: 28px; height: 28px; margin-left: 0; }
.sh-ins { position: absolute; top: 30px; width: 4px; height: 96px; border-radius: 2px; background: var(--accent); z-index: 4; pointer-events: none; }
.sh-head { position: absolute; top: 0; bottom: 0; left: 0; width: 0; z-index: 5; cursor: ew-resize; touch-action: none; }
.sh-head::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: #e11d48; }
.sh-head i { position: absolute; left: -7px; top: 0; width: 14px; height: 15px; border-radius: 3px 3px 8px 8px; background: #e11d48; }

/* pista melodiei */
.sh-songrow { position: relative; height: 32px; margin-top: 8px; }
.sh-song { position: absolute; top: 0; height: 30px; border-radius: 7px; background: linear-gradient(#6e65ee, var(--accent)); overflow: hidden; }
.sh-song.moving { background: linear-gradient(#e0921a, var(--warn)); cursor: ew-resize; touch-action: none; }
.sh-beats { position: absolute; left: 0; bottom: 0; height: 10px; opacity: .8; pointer-events: none; }
.sh-song-cut { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .5) 0 6px, rgba(0, 0, 0, .35) 6px 12px); pointer-events: none; }
.sh-song-label { position: sticky; left: 28px; z-index: 1; display: inline-flex; align-items: center; gap: 9px; height: 20px; margin: 3px 0 0 28px; padding: 0 9px; border-radius: 10px; background: rgba(18, 21, 32, .72); color: #fff; font-size: 11.5px; white-space: nowrap; pointer-events: none; }
.sh-song-label span { opacity: .82; }
.sh-song-none { position: sticky; left: 20px; display: inline-flex; align-items: center; gap: 7px; height: 30px; margin-left: 20px; padding: 0 12px; border: 1.5px dashed var(--line-2); border-radius: 7px; background: transparent; color: var(--ink-soft); font-size: 12.5px; }
button.sh-song-none:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }

/* ferestre mici: tranziție, durată */
.sh-transpop { display: flex; flex-direction: column; gap: 8px; width: 344px; max-width: 100%; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sh-chip { height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 15px; background: #fff; font-size: 12.5px; }
.sh-chip:hover { border-color: var(--accent); }
.sh-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sh-pop-row { display: flex; align-items: center; gap: 8px; }
.sh-pop-foot { display: flex; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }

/* export + comenzi rapide */
.sh-exp-status { min-height: 20px; font-size: 13px; color: var(--ink-soft); }
.sh-exp-status.error { color: var(--danger); }
.sh-exp-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.sh-exp-foot a.btn { text-decoration: none; }
.sh-keys { width: 100%; border-collapse: collapse; }
.sh-keys td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sh-keys tr:last-child td { border-bottom: 0; }
.sh-keys kbd { font: 12px ui-monospace, Consolas, monospace; white-space: nowrap; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--panel-2); }

/* previzualizare pe toată fereastra */
.sh-preview { position: fixed; inset: 0; z-index: 900; background: #0b0d13; display: flex; flex-direction: column; align-items: center; }
.sh-pv-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.sh-pv-canvas { display: block; background: #000; box-shadow: 0 12px 60px rgba(0, 0, 0, .6); cursor: pointer; }
.sh-pv-exit { position: absolute; top: 14px; right: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.sh-pv-exit:hover { background: rgba(255, 255, 255, .2); }
.sh-pv-bar { flex: none; display: flex; align-items: center; gap: 14px; width: min(760px, calc(100vw - 32px)); padding: 12px 0 18px; color: #d7dbe8; }
.sh-pv-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sh-pv-track { flex: 1; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .2); overflow: hidden; cursor: pointer; touch-action: none; }
.sh-pv-track i { display: block; width: 0; height: 100%; background: #fff; }
.sh-pv-time { min-width: 112px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .sh-tl-hint { display: none; }
  .sh-panel { width: 264px; }
  .sh-ed .topbar .tb > span { display: none; }
  .sh-ed .topbar .title, .sh-ed .topbar .tb-primary > span, .sh-ed .topbar .sh-zoom-val { display: inline-flex; }
}
