/* Videos page (#/videos): pages/videos.js */
.videos-page .head p { margin: 4px 0 0; max-width: 60ch; }
.vl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.vl-tabs button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font: inherit; }
.vl-tabs button.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.vl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.vl-tools .vl-search { flex: 1 1 220px; max-width: 360px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 8px 11px; }
.vl-tools select, .videos-page dialog select { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 7px 9px; font: inherit; }
.vl-view { display: inline-flex; margin-left: auto; }
.vl-view .btn { border-radius: 0; }
.vl-view .btn:first-child { border-radius: 9px 0 0 9px; }
.vl-view .btn:last-child { border-radius: 0 9px 9px 0; margin-left: -1px; }
.vl-view .btn.on { background: var(--soft); border-color: var(--brand); font-weight: 600; }
.vl-msg { padding: 8px 12px; border-radius: 9px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vl-msg.ok { background: var(--soft); border: 1px solid var(--line); }
.vl-msg.error { color: var(--danger); border: 1px solid var(--danger); background: var(--panel); }
.vl-msg[hidden], .vl-bar[hidden] { display: none; }
.vl-bar { position: sticky; top: 0; z-index: 3; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px;
  background: var(--panel); border: 1px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow); }
.vl-bar strong { margin-right: 6px; }
.vl-trashhead { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.vl-trashhead:empty { display: none; }
.vl-all { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 8px; color: var(--muted); cursor: pointer; }
.vl-empty { padding: 30px 10px; color: var(--muted); text-align: center; }
.vl-danger-text { color: var(--danger); }
.btn.primary.vl-danger { background: var(--danger); border-color: var(--danger); }

.vl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.vl-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.vl-card:hover, .vl-card:focus-visible { border-color: var(--brand); outline: none; }
.vl-card.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.vl-card .vl-tick { position: absolute; top: 9px; left: 9px; z-index: 2; width: 18px; height: 18px; cursor: pointer; accent-color: var(--brand); }
.vl-thumb { position: relative; background: #0d1520; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vl-card .vl-thumb { aspect-ratio: 4 / 5; }
.vl-thumb img, .vl-thumb video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vl-thumb video.vl-hover { position: absolute; inset: 0; }
.vl-thumb.playable { cursor: pointer; }
.vl-thumb.playable::after { content: '▶'; position: absolute; right: 9px; top: 8px; color: #fff; font-size: 13px; background: rgba(0, 0, 0, .45); border-radius: 99px; width: 26px; height: 26px; display: grid; place-items: center; pointer-events: none; }
.vl-noimg { color: rgba(255, 255, 255, .35); font-size: 34px; }
.vl-len { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; padding: 1px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.vl-body { padding: 11px 12px 12px; display: grid; gap: 6px; flex: 1; align-content: start; }
.vl-name { font-size: 15px; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-chips, .vl-vers { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.vl-tag { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; line-height: 1.4; }
.vl-state { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.vl-state.s-rendered { color: var(--ok); border-color: var(--ok); }
.vl-state.s-changed { color: var(--accent); border-color: var(--accent); }
.vl-state.s-never, .vl-state.s-empty { color: var(--muted); }
.vl-state.s-rendering { color: var(--brand); border-color: var(--brand); }
.vl-ver { text-decoration: none; font-size: 12px; }
.vl-ver.s-rendered { border-color: var(--ok); }
.vl-ver.s-changed { border-color: var(--accent); }
.vl-src { color: var(--brand); text-decoration: none; }
.vl-src:hover { text-decoration: underline; }
.vl-actions { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.vl-actions .btn { padding: 6px 11px; text-decoration: none; font-size: 14px; }
.vl-actions .vl-more { margin-left: auto; }
.vl-more { font-size: 18px; line-height: 1; padding: 4px 9px; }

.vl-table { width: 100%; border-collapse: collapse; }
.vl-table th, .vl-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vl-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.vl-table tr.sel td { background: var(--soft); }
.vl-table .vl-mini { width: 64px; }
.vl-table .vl-mini .vl-thumb { width: 56px; border-radius: 6px; }
.vl-table .vl-mini .vl-thumb::after, .vl-table .vl-mini .vl-len { display: none; }
.vl-table .vl-name { white-space: normal; }
.vl-table .vl-name a { color: var(--ink); text-decoration: none; }
.vl-table .vl-name a:hover { text-decoration: underline; }

.vl-thumb.shape-1x1 { aspect-ratio: 1 / 1; }
.vl-thumb.shape-9x16 { aspect-ratio: 9 / 16; }
.vl-card .vl-thumb.shape-1x1, .vl-card .vl-thumb.shape-9x16 { aspect-ratio: 4 / 5; }

.vl-menu { position: fixed; z-index: 1000; min-width: 190px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(0, 0, 0, .22); padding: 5px; display: grid; }
.vl-menu button { border: 0; background: transparent; color: inherit; text-align: left; padding: 7px 11px; border-radius: 7px; cursor: pointer; font: inherit; }
.vl-menu button:hover:not([disabled]), .vl-menu button:focus-visible { background: var(--soft); outline: none; }
.vl-menu button[disabled] { opacity: .45; cursor: default; }
.vl-menu button.danger { color: var(--danger); }
.vl-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }

dialog.vl-watchdlg { width: min(720px, 94vw); }
.vl-watch { display: grid; gap: 10px; }
.vl-player { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; }
.vl-sizes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vl-sizes .vl-tag { cursor: pointer; font: inherit; font-size: 13px; }
.vl-sizes .vl-tag.on { border-color: var(--brand); font-weight: 600; }

@media (max-width: 640px) {
  .vl-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .vl-view { margin-left: 0; }
  .vl-table th:nth-child(7), .vl-table td:nth-child(7), .vl-table th:nth-child(4), .vl-table td:nth-child(4) { display: none; }
}
