/* Кабинет ГК: unified CSS, original source order retained. */

/* ---- clean.css ---- */
/* PRESENT — clean, restrained interface. No decorative panels or metric cards. */
:root {
  --bg:#f7f9fc; --ink:#172235; --muted:#69798c; --primary:#2d4e74;
  --primary-dark:#213c5b; --card:#fff; --line:#e3e9f0;
  --accent-bg:#eff4fa; --dark:#111925; --stage-dark:#171e29;
  --shadow:0 2px 12px rgba(29,49,72,.035); --shadow-lg:0 12px 28px rgba(29,49,72,.08);
  --radius:12px;
}
html { scroll-behavior:smooth; }
body { background:var(--bg); color:var(--ink); font-family:Inter,"Segoe UI",-apple-system,BlinkMacSystemFont,system-ui,sans-serif; letter-spacing:-.01em; }
body::before,.workspace::after,.sidebar::before,.sidebar::after { content:none !important; display:none !important; }
button,input,textarea,select { font-family:inherit; }
::selection { background:#d8e5f4; color:#142946; }
:focus-visible { outline:2px solid #648cb8 !important; outline-offset:2px; }
.icon { width:18px; height:18px; }

.workspace { display:grid; grid-template-columns:232px minmax(0,1fr); min-height:100dvh; background:var(--bg); }
.sidebar { position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; overflow:hidden; padding:28px 16px 18px; background:#fff; box-shadow:none; border-right:1px solid var(--line); animation:none; }
.sidebar > * { position:relative; }
.sidebar .brand,.brand { display:flex; align-items:center; gap:10px; margin:0 5px 47px; padding:0; color:var(--ink); font-size:23px; line-height:1; font-weight:750; letter-spacing:-.06em; text-decoration:none; }
.brand-mark,.sidebar .brand-mark { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:10px; background:#263e5d; color:#fff; box-shadow:none; }
.brand-mark .icon,.sidebar .brand-mark .icon { width:19px; height:19px; }
.brand-dot { color:#6e90b5; }
.sidebar .nav-label { margin:0 13px 12px; padding:0; font-size:10px; font-weight:700; letter-spacing:.1em; color:#8895a5; }
.side-nav { display:flex; flex-direction:column; gap:4px; }
.nav-item { width:100%; min-height:42px; display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid transparent; border-radius:9px; background:transparent; text-align:left; color:#536277; font-size:12px; font-weight:550; box-shadow:none; transition:background .18s,color .18s,border-color .18s; }
.nav-item .icon { width:17px; height:17px; color:#7d8da0; }
.nav-item span { flex:1; }
.nav-item b { font-size:11px; font-weight:550; color:#8e9bad; }
.nav-item:hover { color:var(--primary); background:#f4f7fb; transform:none; }
.nav-item.on { color:#213e60; background:#edf3fa; border:1px solid #e6eef8; box-shadow:none; }
.nav-item.on .icon,.nav-item.on b { color:#2d567e; }
.sidebar-bottom { margin-top:auto; }
.profile { display:flex; align-items:center; gap:10px; padding:14px 5px 0; margin-top:14px; border-top:1px solid var(--line); background:transparent; border-radius:0; }
.profile .avatar { display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:#e8eff7; color:#264767; font-size:12px; font-weight:750; }
.profile > div { flex:1; min-width:0; display:flex; flex-direction:column; }
.profile strong { color:#2e3e50; font-size:12px; font-weight:650; }
.profile div span { color:#8794a4; font-size:10px; }
.profile .icon-btn { color:#8291a1; }
.main-panel { min-width:0; }
.main-topbar { height:63px; display:flex; align-items:center; justify-content:space-between; padding:0 clamp(22px,3.4vw,52px); background:#fff; border-bottom:1px solid var(--line); box-shadow:none; backdrop-filter:none; }
.breadcrumb { display:flex; align-items:center; gap:10px; font-size:12px; }
.breadcrumb span { color:#8390a0; }.breadcrumb b { color:#cbd4df; font-weight:400; }.breadcrumb strong { color:#44566a; font-weight:600; }
.top-role,.top-role.admin { border:1px solid #e6ebf1; border-radius:7px; background:#f7f9fb; color:#63748a; padding:6px 9px; font-size:11px; font-weight:600; }
.content { max-width:1450px; margin:auto; padding:38px clamp(22px,3.4vw,52px) 66px; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:22px; margin:0 0 39px; animation:fadeInUp .38s both; }
.page-heading h1 { margin:0; font-size:clamp(27px,2.9vw,37px); font-weight:750; line-height:1.2; color:#182536; letter-spacing:-.045em; }
.page-heading > div > p:last-child { margin:8px 0 0; color:#8390a1; font-size:12px; }
.btn,.page-heading .btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; flex-shrink:0; min-height:42px; padding:10px 15px; border:1px solid transparent; border-radius:9px; background:var(--primary); color:#fff; font-size:12px; line-height:1.25; font-weight:650; box-shadow:none; text-decoration:none; cursor:pointer; transition:background .18s,transform .18s,box-shadow .18s; }
.btn:hover,.page-heading .btn:hover { background:var(--primary-dark); transform:translateY(-1px); box-shadow:0 5px 14px rgba(29,55,84,.14); }
.btn:disabled { opacity:.58; cursor:default; transform:none; box-shadow:none; }
.btn.ghost { background:#fff; border:1px solid #dbe4ee; color:#3e5168; box-shadow:none; }
.btn.ghost:hover { background:#f4f7fa; box-shadow:none; }
.btn.danger-solid { background:#b34c52; }
.btn.danger-solid:hover { background:#92373e; }
.icon-btn { border-radius:8px; color:#7d8ca0; transition:background .15s,color .15s; }
.icon-btn:hover { background:#edf3fa; color:#27496f; transform:none; }
.icon-btn.danger:hover { background:#fff0f0; color:#ac4b51; }
.collection { scroll-margin-top:25px; }
.collection-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 17px; }
.collection-head > div { display:block; }
.collection-head h2 { font-size:18px; font-weight:700; letter-spacing:-.03em; color:#233246; }
.collection-head .stats { color:#8795a6; font-size:12px; font-weight:500; }
.toolbar { display:flex; align-items:center; gap:10px; margin:0 0 20px; }
.search { display:flex; flex:1; max-width:none; min-width:160px; align-items:center; gap:10px; height:44px; padding:0 12px; border:1px solid #dde5ef; border-radius:9px; color:#8594a5; background:#fff; box-shadow:none; transition:border-color .18s,box-shadow .18s; }
.search > .icon { width:18px; height:18px; }
.search:focus-within { border-color:#8faac9; box-shadow:0 0 0 3px rgba(62,103,148,.08); }
.search input { min-width:0; flex:1; padding:10px 0; font-size:12px; color:#27384a; }
.search input::placeholder { color:#96a3b2; }
.search kbd { padding:2px 5px; border:1px solid #edf0f4; border-radius:4px; background:#f9fafc; color:#a4aebb; font-size:10px; }
.select-wrap { height:44px; border:1px solid #dde5ef; border-radius:9px; background:#fff; }
.select-wrap select { height:100%; color:#51647a; font-size:12px; }
.view-switch { display:flex; align-items:center; gap:2px; height:44px; padding:4px; background:#fff; border:1px solid #dde5ef; border-radius:9px; }
.view-switch .icon-btn { height:34px; width:34px; border-radius:6px; }
.view-switch .icon-btn.on { background:#eaf1f9; color:#2b4b70; box-shadow:none; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:16px; }
.card { overflow:hidden; min-width:0; display:flex; flex-direction:column; background:#fff; border:1px solid #e1e8f0; border-radius:12px; box-shadow:var(--shadow); animation:fadeInUp .36s ease both; transition:box-shadow .22s,border-color .22s,transform .22s; }
.card:hover { transform:translateY(-2px); border-color:#cbd8e7; box-shadow:var(--shadow-lg); }
.card .cover { position:relative; display:block; margin:0; aspect-ratio:16/9; overflow:hidden; border-radius:0; background:#eef2f7; }
.card .cover::after { content:none; }
.card .cover img { width:100%; height:100%; object-fit:cover; filter:none; transform:none; transition:transform .3s ease; }
.card:hover .cover img { filter:none; transform:scale(1.015); }
.card .cover .play { background:transparent; }
.card .cover:hover .play { background:rgba(23,39,58,.18); }
.card .cover .play span { width:44px; height:44px; border-radius:50%; color:#284769; background:#fff; box-shadow:0 6px 20px rgba(15,32,53,.13); opacity:0; transform:scale(.96); transition:opacity .18s,transform .18s; }
.card .cover:hover .play span { opacity:1; transform:scale(1); }
.card .body { display:flex; flex:1; flex-direction:column; gap:7px; padding:15px 16px 12px; }
.card-title-row { display:flex; align-items:flex-start; gap:7px; }
.card h3 { margin:0; font-size:14px; font-weight:680; letter-spacing:-.02em; line-height:1.4; color:#223247; }
.card h3 a:hover { color:#315b86; }
.card .desc { min-height:36px; font-size:11.5px; line-height:1.6; color:#78879a; }
.card-tags { margin-top:2px; gap:8px; font-size:10px; color:#9aa7b5; }
.card-format { color:#426589; font-weight:650; font-size:10px; letter-spacing:0; }
.card .foot { min-height:39px; display:flex; align-items:center; justify-content:space-between; margin-top:6px; padding:10px 0 0; border-top:1px solid #edf1f5; }
.open-link { padding:3px 0; background:none; color:#365b81; font-size:11px; font-weight:650; text-decoration:none; }
.open-link:hover { background:none; color:#203d5d; }
.card-actions { gap:2px; }
.card-actions .icon-btn { width:30px; height:30px; }
.badge-count,.badge-fx,.badge-demo { border-radius:5px; box-shadow:none; }
.grid.list-view { gap:10px; }
.grid.list-view .card { border-radius:10px; }
.grid.list-view .cover { background:#eef3f8; }
.empty { padding:60px 22px; border:1px dashed #d6e0eb; border-radius:12px; background:#fff; }
.empty .big { background:#eaf0f8; border-radius:13px; color:#3e6188; }
.empty h2 { color:#2a4059; font-size:17px; }.empty p { color:#8190a0; font-size:12px; }

/* Upload, confirmation and sharing dialogs */
.modal-back { background:rgba(17,30,47,.46); backdrop-filter:blur(3px); }
.modal { max-width:510px; padding:25px; border:1px solid #e0e7ef; border-radius:14px; background:#fff; box-shadow:0 25px 80px rgba(19,38,59,.22); animation:fadeInUp .24s ease both; }
.modal h2 { color:#1d2c3e; font-size:20px; font-weight:730; letter-spacing:-.03em; }
.modal .sub { color:#78889a; font-size:12px; line-height:1.65; }
.modal-head { display:flex; align-items:flex-start; gap:10px; }
.modal-head > div { flex:1; }
.modal-close { margin:-5px -5px 0 0; }
.field { margin-bottom:15px; }.field label { margin-bottom:7px; color:#43566a; font-size:12px; font-weight:650; }
.field input[type="text"],.field input[type="password"],.field textarea { width:100%; min-height:43px; background:#fff; border:1px solid #dce5ee; border-radius:8px; color:#27384b; padding:10px 12px; font-size:12px; outline:none; }
.field input:focus,.field textarea:focus { border-color:#779fc9; box-shadow:0 0 0 3px rgba(62,103,148,.09); }
.field input::placeholder,.field textarea::placeholder { color:#a6b2be; }
.drop { display:flex; align-items:center; flex-direction:column; gap:6px; padding:23px 14px; background:#f9fbfe; color:#637c96; border:1px dashed #bacbde; border-radius:10px; cursor:pointer; }
.drop:hover,.drop.over { background:#f0f6fd; border-color:#82a4c5; }
.drop .name { color:#345371; font-size:12px; font-weight:650; }
.drop .hint { color:#8c9bab; font-size:10px; }
.modal .row { display:flex; gap:8px; }
.toast { background:#23364b; color:#fff; border:0; border-radius:9px; box-shadow:0 12px 28px rgba(17,35,55,.2); font-size:12px; }

/* Login: a plain, compact form rather than a decorative showcase */
.auth-page { display:flex; justify-content:center; align-items:center; min-height:100dvh; padding:24px; background:var(--bg); }
.auth-card { width:100%; max-width:420px; min-height:0; display:block; padding:32px; margin:0; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 14px 44px rgba(23,46,72,.055); animation:fadeInUp .4s ease both; }
.auth-brand { display:flex; align-items:center; gap:9px; color:var(--ink); font-size:23px; font-weight:750; letter-spacing:-.06em; }
.auth-card-inner { width:100%; max-width:none; margin:0; padding:34px 0 0; animation:none; }
.auth-copy { margin-bottom:25px; }
.auth-copy h1 { color:#1e2c3d; font-size:26px; line-height:1.25; font-weight:750; letter-spacing:-.045em; }
.auth-copy > p:last-child { color:#8491a1; font-size:12px; line-height:1.5; margin-top:8px; }
.auth-card .field { margin-bottom:16px; }
.auth-card .field label { color:#3f5164; font-size:12px; }
.auth-card .field input { display:block; width:100%; height:46px; border:1px solid #dce5ee; border-radius:8px; padding:0 13px; background:#fff; font-size:13px; }
.auth-card .field input:focus { border-color:#86a5c9; }
.auth-submit { display:flex; justify-content:space-between; width:100%; margin-top:7px; min-height:46px; padding:11px 15px; background:var(--primary); font-size:13px; }
.auth-footnote { display:block; margin-top:20px; padding-top:17px; border-top:1px solid #edf1f5; color:#9ba7b4; font-size:11px; line-height:1.45; }

/* Keep the immersive presentation viewer dark but remove saturated violet accents. */
.viewer { background:#111823; }
.viewer-logo { color:#9fb7d1; }
.viewer .progress i,.progress i { background:#6385ad; }
.viewer .control-btn.primary-control,.control-btn.primary-control { background:#365a80; color:#fff; }
.viewer .control-btn.primary-control:hover { background:#416a93; }
.thumbs button.on { border-color:#89a7ca; box-shadow:0 0 0 2px rgba(88,130,175,.16); }
.hbtn.on { color:#c4d8ef; background:rgba(109,146,190,.18); }
.autoplay-menu button.on { background:#365a80; }
.ov-cell.on { border-color:#8ca9cc; box-shadow:0 0 0 2px rgba(113,151,193,.2); }

@keyframes fadeInUp { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:none; } }
@media(max-width:1000px) {
  .workspace { grid-template-columns:205px minmax(0,1fr); }
  .sidebar { padding:22px 11px 14px; }
  .sidebar .brand { margin-bottom:35px; font-size:21px; }
  .content { padding:30px 24px 55px; }
  .main-topbar { padding:0 24px; }
}
@media(max-width:720px) {
  .workspace { display:block; }
  .sidebar { position:relative; z-index:2; width:100%; height:auto; padding:14px 15px 10px; border-right:0; border-bottom:1px solid var(--line); }
  .sidebar .brand { margin:0 0 12px; font-size:20px; }
  .sidebar .brand-mark { width:30px; height:30px; flex:0 0 30px; border-radius:8px; }
  .sidebar .nav-label { display:none; }
  .side-nav { flex-direction:row; gap:5px; overflow:auto; padding-bottom:2px; scrollbar-width:none; }
  .side-nav::-webkit-scrollbar { display:none; }
  .nav-item { width:auto; min-height:36px; flex-shrink:0; gap:6px; padding:8px 9px; border-radius:7px; font-size:11px; white-space:nowrap; }
  .nav-item .icon { width:15px; height:15px; }
  .nav-item b { display:none; }
  .sidebar-bottom { position:absolute; top:7px; right:10px; margin:0; }
  .profile { gap:0; margin:0; padding:0; border:0; }
  .profile .avatar,.profile > div { display:none; }
  .profile .icon-btn { width:34px; height:34px; }
  .main-topbar { display:none; }
  .content { padding:25px 15px 45px; }
  .page-heading { margin-bottom:28px; align-items:flex-start; }
  .page-heading h1 { font-size:25px; }
  .page-heading > div > p:last-child { max-width:250px; font-size:11px; }
  .page-heading .btn { min-width:0; padding:10px; font-size:0; height:40px; width:40px; border-radius:8px; }
  .page-heading .btn .icon { width:18px; height:18px; }
  .collection-head h2 { font-size:17px; }
  .toolbar { flex-wrap:wrap; gap:8px; }
  .search { flex:1 1 100%; }
  .select-wrap { flex:1; }
  .view-switch { flex-shrink:0; }
  .grid { grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
  .modal { width:calc(100vw - 22px); padding:19px; border-radius:12px; max-height:calc(100dvh - 28px); overflow:auto; }
}
@media(max-width:400px) {
  .page-heading h1 { font-size:23px; }
  .nav-item { padding:7px 8px; }
  .grid { grid-template-columns:1fr; }
  .card .body { padding:13px 14px; }
  .auth-card { padding:24px; }
  .auth-page { padding:14px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
/* Neutral status labels */
.badge-fx { color:#355a7e; background:rgba(246,249,253,.96); border:1px solid #e0e8f1; }
.badge-demo { color:#526a82; background:rgba(251,252,254,.97); border:1px solid #e6edf5; }
@media(max-width:720px) {
  .side-nav .nav-item span { display:inline !important; }
}
.cover-fallback { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:12px; width:100%; height:100%; padding:24px; background:#eaf0f7; color:#385778; }
.cover-fallback .icon { width:29px; height:29px; }
.cover-fallback strong { display:block; max-width:100%; color:#243e5d; font-size:16px; line-height:1.3; }
.cover-fallback small { color:#7f95aa; font-size:11px; }
/* Functional upload queue; no decorative dashboard panels. */
.upload-queue{margin:0 0 18px;border:1px solid #dce4ed;border-radius:10px;background:#fff;padding:4px 14px}
.job-line{display:flex;align-items:center;gap:12px;padding:10px 0;font-size:13px}
.job-line+.job-line{border-top:1px solid #edf0f4}
.job-title{min-width:0;flex:1;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.job-progress{color:#536278;font-variant-numeric:tabular-nums}
.upload-queue.hidden{display:none}
@media(max-width:570px){.job-line{flex-wrap:wrap}.job-title{width:100%;flex:auto}}

.field select{display:block;width:100%;min-height:42px;border:1px solid #dce3eb;border-radius:9px;background:#fff;color:#273449;padding:9px 11px;font:inherit}
.field select:focus{outline:2px solid #b6c6da;outline-offset:1px}

/* Workflow controls: compact, functional, responsive. */
.card-select{position:absolute;top:11px;left:11px;z-index:3;width:19px;height:19px;accent-color:#315b83;cursor:pointer}
.card{position:relative}
.card-actions{display:flex;align-items:center;gap:5px}
.batch-bar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;background:#f5f8fb;border:1px solid #dce4ec;border-radius:10px;padding:10px 12px;margin:12px 0}
.actions-stack{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:12px 0}
.actions-stack .btn{justify-content:center}
.management-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #e9eef4}
.management-row .management-title{min-width:120px;flex:1;overflow-wrap:anywhere}
.inline-check{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:13px;color:var(--ink,#263448)}
.inline-check input{accent-color:#315b83}
.divider-simple{height:1px;background:#e9eef4;margin:12px 0}
@media(max-width:560px){.management-row{align-items:stretch;flex-direction:column}.management-row .btn{width:100%}.batch-bar .btn{flex:1}}

/* ---- minimal-workspace.css ---- */
/* Кабинет ГК / Minimal Workspace
   Subtle neutrals, clear information hierarchy and hover-to-expand navigation.
   Loaded last to preserve existing player, forms and application behavior. */
:root {
  color-scheme: light;
  --bg: #fbfcfd;
  --card: #fff;
  --ink: #25303a;
  --muted: #687584;
  --primary: #334e63;
  --primary-dark: #253a4b;
  --line: #e5e9ee;
  --accent-bg: #f1f5f8;
  --shadow: 0 2px 12px rgba(30,45,60,.025);
  --shadow-lg: 0 12px 30px rgba(30,45,60,.075);
  --radius: 11px;
  --rail-width: 76px;
  --sidebar-width: 250px;
}
html { scrollbar-gutter: stable; }
body { background:var(--bg); color:var(--ink); }
button, a, input, select { -webkit-tap-highlight-color:transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline:2px solid #5d809a; outline-offset:3px; }

/* Sidebar: the compact rail is part of layout. Expansion is an overlay so cards never jump. */
.workspace {
  display:grid;
  grid-template-columns:var(--rail-width) minmax(0,1fr);
  min-height:100dvh;
  background:var(--bg);
  transition:grid-template-columns .34s cubic-bezier(.4,0,.2,1);
}
.workspace.sidebar-pinned { grid-template-columns:var(--sidebar-width) minmax(0,1fr); }
.workspace .sidebar {
  position:fixed;
  left:0;
  top:0;
  z-index:30;
  width:var(--rail-width);
  height:100dvh;
  min-height:0;
  padding:18px 10px 15px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-right:1px solid var(--line);
  box-shadow:none;
  transition:width .23s cubic-bezier(.22,1,.36,1),box-shadow .23s;
}
.workspace .sidebar.expanded {
  width:var(--sidebar-width);
  box-shadow:10px 0 28px rgba(29,46,60,.085);
}
.workspace.sidebar-pinned .sidebar { box-shadow:none; }
.sidebar-brand-row { display:flex; align-items:center; position:relative; flex:0 0 44px; margin:0 0 35px; }
.workspace .sidebar .brand {
  margin:0; padding:0 8px; height:44px; gap:13px; width:100%;
  white-space:nowrap; color:#202c36; font-size:22px; font-weight:760;
  text-decoration:none; line-height:1;
}
.workspace .sidebar .brand-mark {
  width:38px; height:38px; flex:0 0 38px;
  border-radius:11px; background:#293e51; color:#fff;
}
.workspace .sidebar .brand-mark .icon { width:20px; height:20px; }
.workspace .sidebar .brand-name {
  opacity:0; visibility:hidden; transform:translateX(-8px);
  transition:opacity .13s ease,transform .20s ease,visibility .13s;
}
.workspace .sidebar.expanded .brand-name { opacity:1; visibility:visible; transform:none; transition-delay:.07s; }
.sidebar-pin {
  position:absolute; right:0; top:4px; width:34px; height:34px;
  background:#fff; border:1px solid transparent; flex-shrink:0;
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .15s,visibility .15s;
}
.workspace .sidebar.expanded .sidebar-pin { opacity:1; visibility:visible; pointer-events:auto; transition-delay:.09s; }
.sidebar-pin:hover,.sidebar-pin[aria-pressed="true"] { background:#edf2f6; color:#2e4a60; }
.sidebar-pin .icon { width:16px; height:16px; }

.workspace .sidebar .nav-label {
  height:15px; margin:0 0 11px; padding:0 13px;
  color:#89939f; font-size:10px; font-weight:700; letter-spacing:.10em;
  white-space:nowrap; opacity:0; transition:opacity .12s;
}
.workspace .sidebar.expanded .nav-label { opacity:1; transition-delay:.1s; }
.workspace .sidebar .sub-nav-label { margin-top:25px; }
.workspace .sidebar .side-nav { display:flex; flex-direction:column; gap:4px; overflow:visible; padding:0; }
.workspace .sidebar .nav-item {
  display:flex; align-items:center; flex-shrink:0; width:100%; min-height:44px;
  gap:13px; padding:11px 17px; border:1px solid transparent;
  border-radius:9px; font-size:13px; font-weight:550; color:#566575;
  white-space:nowrap; overflow:hidden; transition:background .15s,color .15s,border-color .15s;
}
.workspace .sidebar .nav-item .icon { flex:0 0 19px; width:19px; height:19px; color:#758598; }
.workspace .sidebar .nav-item span {
  flex:0 0 0; width:0; min-width:0; opacity:0; visibility:hidden; overflow:hidden;
  transition:opacity .13s ease,visibility .13s;
}
.workspace .sidebar .nav-item b { display:none; font-size:11px; color:#9aa4af; }
.workspace .sidebar.expanded .nav-item { padding:11px 12px; }
.workspace .sidebar.expanded .nav-item span { flex:1; width:auto; opacity:1; visibility:visible; transition-delay:.07s; }
.workspace .sidebar.expanded .nav-item b { display:block; }
.workspace .sidebar .nav-item:hover { background:#f4f7f9; color:#24394b; }
.workspace .sidebar .nav-item.on {
  background:#edf2f6; color:#243f54; border-color:transparent;
}
.workspace .sidebar .nav-item.on .icon { color:#294c64; }
.workspace .sidebar-bottom { margin-top:auto; min-height:65px; }
.workspace .sidebar .profile {
  display:flex; align-items:center; min-width:0; gap:10px;
  margin:0; padding:15px 8px 1px; border-top:1px solid var(--line);
}
.workspace .sidebar .profile .avatar { flex:0 0 36px; width:36px; height:36px; border-radius:10px; color:#324a60; background:#eaf0f5; }
.workspace .sidebar .profile > div,
.workspace .sidebar .profile #logout { display:none; }
.workspace .sidebar.expanded .profile { padding:15px 4px 1px; }
.workspace .sidebar.expanded .profile > div { display:flex; }
.workspace .sidebar.expanded .profile #logout { display:inline-flex; width:33px; height:33px; }
.workspace .sidebar .profile strong { font-size:12.5px; color:#2f3e4c; }
.workspace .sidebar .profile div span { font-size:11px; color:#7b8794; }
.workspace .sidebar .profile .icon-btn .icon { width:18px; }
.workspace .main-panel { min-width:0; grid-column:2; }
.workspace .main-topbar {
  height:66px; border-bottom:1px solid var(--line); background:#fff;
  padding:0 clamp(24px,3.5vw,54px);
}
.mobile-topbar-brand { display:none; }
.workspace .main-topbar .breadcrumb { font-size:12.5px; }
.workspace .main-topbar .top-role { padding:6px 10px; font-size:11px; font-weight:550; }

/* Content is crisp and intentionally sparse, with no dashboards or hero banners. */
.content { max-width:1540px; padding:40px clamp(24px,3.5vw,54px) 72px; }
.page-heading { margin:0 0 32px; align-items:center; animation:none; }
.page-heading h1 { font-size:clamp(29px,2.5vw,35px); line-height:1.2; font-weight:740; letter-spacing:-.055em; color:#202d37; }
.page-heading .btn, .btn {
  border-radius:8px; box-shadow:none; background:#2d4356; color:#fff;
  font-weight:620; font-size:13px; min-height:42px; padding:10px 15px;
  transform:none;
}
.page-heading .btn:hover, .btn:hover { background:#203649; color:#fff; box-shadow:none; transform:none; }
.btn.ghost { background:#fff; border:1px solid #dde3e9; color:#465a6c; }
.btn.ghost:hover { color:#2c455b; background:#f4f7f9; box-shadow:none; }
.btn.small { min-height:38px; padding:8px 12px; border-radius:8px; font-size:12px; }
.icon-btn:hover { transform:none; }
.collection-head { margin-bottom:19px; align-items:baseline; }
.collection-head h2 { font-size:17px; font-weight:650; letter-spacing:-.025em; color:#31404d; }
.collection-head .stats { font-size:12px; font-weight:500; color:#788595; }
.toolbar { gap:9px; margin:0 0 22px; flex-wrap:wrap; }
.toolbar > .search {
  order:-1; flex:2 1 320px; max-width:510px; min-width:220px; height:42px;
  background:#fff; border:1px solid #dfe5eb; border-radius:8px;
}
.search input { font-size:13px; }
.search:focus-within { border-color:#738ea3; box-shadow:0 0 0 3px rgba(46,79,103,.08); }
.search kbd { font-size:10px; }
.toolbar .select-wrap { height:42px; border:1px solid #dfe5eb; border-radius:8px; }
.toolbar .select-wrap select { width:100%; max-width:100%; min-width:0; font-size:12px; color:#516171; }
.view-switch { height:42px; border:1px solid #dfe5eb; border-radius:8px; }
.view-switch .icon-btn { width:33px; height:33px; }
.view-switch .icon-btn.on { background:#eef2f6; color:#2c4c62; }
.card {
  border:1px solid #e1e7ec; border-radius:11px; box-shadow:0 2px 12px rgba(30,45,60,.025);
  animation:none; transform:none; transition:border-color .18s, box-shadow .18s;
}
.card:hover { transform:none; border-color:#c8d4df; box-shadow:0 10px 26px rgba(31,49,67,.07); }
.card .cover { background:#f2f5f7; }
.card .cover img { transform:none !important; }
.card .cover:hover .play { background:rgba(26,38,49,.14); }
.card .body { padding:15px 16px 12px; }
.card h3 { font-size:14.5px; font-weight:650; color:#263541; }
.card h3 a:hover { color:#254b66; }
.card .desc { color:#758494; font-size:12px; line-height:1.5; }
.card-tags { font-size:11px; }
.card-format { color:#4f6c81; }
.card .foot { border-top-color:#edf0f3; }
.open-link { color:#3d6178; font-size:12px; }
.open-link:hover { color:#203f56; }
.empty { background:#fff; border:1px dashed #d9e1e8; }
.empty .big { background:#f0f4f7; color:#44637a; }
.modal { border-radius:13px; animation:none; }
.auth-card { animation:none; border-radius:12px; }
.auth-copy h1 { font-weight:740; }
.sidebar-backdrop { display:none; }

@media (max-width: 1000px) {
  .workspace { grid-template-columns:var(--rail-width) minmax(0,1fr); }
  .workspace.sidebar-pinned { grid-template-columns:var(--sidebar-width) minmax(0,1fr); }
  .workspace .sidebar { padding:18px 10px 15px; }
  .workspace .sidebar .brand { font-size:22px; margin:0; }
  .content { padding:32px 25px 58px; }
  .workspace .main-topbar { padding:0 25px; }
}
@media (max-width: 760px) {
  html { scrollbar-gutter:auto; }
  .workspace, .workspace.sidebar-pinned { display:block; }
  .workspace .sidebar,
  .workspace.sidebar-pinned .sidebar,
  .workspace .sidebar.expanded {
    position:fixed; top:0; left:0; bottom:0; z-index:80;
    width:min(286px,calc(100vw - 48px)); height:100dvh;
    padding:20px 13px 16px; border-bottom:0; border-right:1px solid var(--line);
    transform:translateX(-102%); box-shadow:10px 0 36px rgba(18,31,45,.12);
    transition:transform .22s cubic-bezier(.22,1,.36,1);
  }
  body.sidebar-drawer-open { overflow:hidden; }
  .workspace .sidebar.mobile-open { transform:translateX(0); }
  .workspace .sidebar { overflow-y:auto; overscroll-behavior:contain; }
  .workspace .sidebar .brand-name,
  .workspace .sidebar .nav-label,
  .workspace .sidebar .nav-item span,
  .workspace .sidebar .nav-item b,
  .workspace .sidebar .profile > div,
  .workspace .sidebar .profile #logout { opacity:1; visibility:visible; transform:none; transition:none; }
  .workspace .sidebar .brand { width:100%; margin:0; font-size:22px; }
  .workspace .sidebar .brand-mark { width:38px; height:38px; flex-basis:38px; }
  .workspace .sidebar .nav-label { display:block; }
  .workspace .sidebar .nav-item { width:100%; font-size:13px; gap:13px; padding:11px 12px; min-height:44px; }
  .workspace .sidebar .nav-item .icon { width:19px; height:19px; }
  .workspace .sidebar .nav-item span { display:inline; flex:1; width:auto; }
  .workspace .sidebar .nav-item b { display:block; }
  .workspace .sidebar .side-nav { display:flex; flex-direction:column; gap:4px; overflow:visible; }
  .workspace .sidebar .profile { gap:10px; padding:15px 4px 1px; }
  .workspace .sidebar .profile .avatar { display:grid; }
  .workspace .sidebar .profile > div { display:flex; }
  .workspace .sidebar .profile #logout { display:inline-flex; width:33px; height:33px; }
  .workspace .sidebar .sidebar-pin { display:none; }
  .workspace .main-panel { grid-column:auto; width:100%; }
  .workspace .main-topbar { display:flex; height:60px; padding:0 18px; }
  .mobile-topbar-brand { display:flex; align-items:center; gap:10px; }
  .mobile-sidebar-toggle { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--line); }
  .mobile-brand-name { color:#293744; font-weight:750; font-size:19px; letter-spacing:-.055em; }
  .workspace .main-topbar .breadcrumb { display:none; }
  .workspace .main-topbar .top-role { font-size:10px; }
  .workspace .content { padding:25px 17px 48px; }
  .page-heading { margin-bottom:28px; gap:10px; align-items:center; }
  .page-heading h1 { font-size:26px; }
  .page-heading .btn { min-width:0; width:auto; height:39px; min-height:39px; padding:9px 12px; font-size:12px; gap:6px; }
  .page-heading .btn .icon { width:16px; height:16px; }
  .collection-head { margin-bottom:15px; }
  .collection-head h2 { font-size:16px; }
  .toolbar { display:flex; flex-wrap:wrap; gap:8px; }
  .toolbar > .search { flex:1 1 100%; max-width:none; min-width:0; order:-1; }
  .toolbar .select-wrap { flex:1 1 calc(50% - 5px); min-width:0; }
  .toolbar > .select-wrap:first-child { order:0; }
  .toolbar > .select-wrap:has(#sort) { order:1; }
  .toolbar #folder-add { flex:0 0 auto; order:2; }
  .toolbar #folder-manage { flex:0 0 auto; order:3; }
  .toolbar .view-switch { flex-shrink:0; margin-left:auto; order:4; }
  .grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr)); gap:12px; }
  .card .body { padding:14px 15px; }
  .sidebar-backdrop:not([hidden]) {
    display:block; position:fixed; z-index:70; inset:0; width:100%; height:100%;
    background:rgba(23,34,44,.34); border:0; border-radius:0; cursor:pointer;
  }
}
@media (max-width: 400px) {
  .workspace .content { padding:22px 14px 40px; }
  .page-heading h1 { font-size:24px; }
  .page-heading .btn span { font-size:11px; }
  .toolbar #folder-manage { display:inline-flex; }
  .toolbar > .select-wrap:first-child { flex:1 1 calc(50% - 5px); }
  .toolbar .search kbd { display:none; }
  .grid { grid-template-columns:1fr; }
}
@media (max-width: 345px) {
  .page-heading .btn span { display:none; }
  .page-heading .btn { width:40px; }
}
/* Smooth sidebar, v2.
   The sidebar keeps its full internal width even when compact. Only the visible
   region is animated. This avoids repeated flex layout, wrapping, icon hops,
   and abrupt display:none/display:flex changes during hover. */
@media (min-width:761px) {
  .workspace .sidebar,
  .workspace .sidebar.expanded {
    width:var(--sidebar-width);
    min-width:var(--sidebar-width);
    clip-path:inset(0 calc(var(--sidebar-width) - var(--rail-width)) 0 0);
    transition:clip-path .34s cubic-bezier(.4,0,.2,1),
               box-shadow .34s cubic-bezier(.4,0,.2,1);
    will-change:clip-path;
    contain:layout style;
  }
  .workspace .sidebar.expanded {
    clip-path:inset(0 0 0 0);
  }
  .workspace .sidebar .brand,
  .workspace .sidebar.expanded .brand { flex-shrink:0; }
  .workspace .sidebar .brand-name {
    visibility:visible;
    opacity:0;
    transform:translate3d(-4px,0,0);
    transition:opacity .18s ease,transform .25s cubic-bezier(.4,0,.2,1);
    transition-delay:0s;
  }
  .workspace .sidebar.expanded .brand-name {
    opacity:1;
    transform:translate3d(0,0,0);
    transition-delay:.09s;
  }
  .workspace .sidebar .nav-label {
    opacity:0;
    transform:translate3d(-4px,0,0);
    transition:opacity .16s ease,transform .24s ease;
    transition-delay:0s;
  }
  .workspace .sidebar.expanded .nav-label {
    opacity:1;
    transform:translate3d(0,0,0);
    transition-delay:.08s;
  }
  .workspace .sidebar .nav-item,
  .workspace .sidebar.expanded .nav-item {
    position:relative;
    padding:11px 12px;
    gap:13px;
  }
  /* Compact controls have a real compact hit box (not a clipped 228px
     button). This keeps mouse and automated/assistive clicks predictable. */
  .workspace .sidebar .nav-item { width:54px; }
  .workspace .sidebar.expanded .nav-item { width:100%; }
  .workspace .sidebar .nav-item span,
  .workspace .sidebar.expanded .nav-item span {
    position:absolute;
    top:50%; left:44px; right:32px;
    display:block;
    flex:none;
    width:auto;
    min-width:0;
    overflow:hidden;
    visibility:visible;
    opacity:0;
    transform:translate3d(-4px,-50%,0);
    transition:opacity .16s ease,transform .22s ease;
    transition-delay:0s;
  }
  .workspace .sidebar.expanded .nav-item span {
    opacity:1;
    transform:translate3d(0,-50%,0);
    transition-delay:.08s;
  }
  .workspace .sidebar .nav-item b,
  .workspace .sidebar.expanded .nav-item b {
    display:block;
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    opacity:0;
    transition:opacity .18s ease;
  }
  .workspace .sidebar.expanded .nav-item b {
    opacity:1;
    transition-delay:.1s;
  }
  .workspace .sidebar .profile,
  .workspace .sidebar.expanded .profile { padding:15px 8px 1px; }
  .workspace .sidebar .profile > div,
  .workspace .sidebar.expanded .profile > div {
    display:flex;
    min-width:0;
    opacity:0;
    transform:translate3d(-4px,0,0);
    transition:opacity .18s ease,transform .22s ease;
  }
  .workspace .sidebar.expanded .profile > div {
    opacity:1;
    transform:translate3d(0,0,0);
    transition-delay:.09s;
  }
  .workspace .sidebar .profile #logout,
  .workspace .sidebar.expanded .profile #logout {
    display:inline-flex;
    width:33px;
    height:33px;
    flex:0 0 33px;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .18s ease,visibility 0s linear .18s;
  }
  .workspace .sidebar.expanded .profile #logout {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:opacity .18s ease .09s,visibility 0s linear 0s;
  }
  .workspace .sidebar .sidebar-pin {
    visibility:hidden;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease,visibility 0s linear .18s;
  }
  .workspace .sidebar.expanded .sidebar-pin {
    visibility:visible;
    opacity:1;
    pointer-events:auto;
    transition:opacity .18s ease .11s,visibility 0s linear 0s;
  }
}
@media (max-width:760px) {
  .workspace .sidebar,
  .workspace .sidebar.expanded,
  .workspace .sidebar.mobile-open {
    clip-path:none;
    will-change:transform;
    transform:translate3d(-102%,0,0);
    transition:transform .34s cubic-bezier(.4,0,.2,1);
  }
  .workspace .sidebar.mobile-open { transform:translate3d(0,0,0); }
  #sidebar-backdrop,
  #sidebar-backdrop:not([hidden]) {
    display:block;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:opacity .34s cubic-bezier(.4,0,.2,1),visibility 0s linear 0s;
  }
  #sidebar-backdrop[hidden] {
    display:block;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .34s cubic-bezier(.4,0,.2,1),visibility 0s linear .34s;
  }
}
/* Restrained interaction motion: fade and a 6px entrance, not bouncing. */
@keyframes presentDialogEnter {
  from { opacity:0; transform:translate3d(0,6px,0) scale(.995); }
  to { opacity:1; transform:translate3d(0,0,0) scale(1); }
}
@keyframes presentDialogLeave {
  from { opacity:1; transform:translate3d(0,0,0); }
  to { opacity:0; transform:translate3d(0,5px,0); }
}
@keyframes presentOverlayEnter { from { opacity:0; } to { opacity:1; } }
@keyframes presentOverlayLeave { from { opacity:1; } to { opacity:0; } }
.modal-back { animation:presentOverlayEnter .18s ease-out both; }
.modal { animation:presentDialogEnter .23s cubic-bezier(.2,.7,.2,1) both; }
.modal-back.closing {
  pointer-events:none;
  animation:presentOverlayLeave .17s ease-in both;
}
.modal-back.closing .modal { animation:presentDialogLeave .17s ease-in both; }
.view-switch .icon-btn { transition:background-color .18s ease,color .18s ease; }
.sidebar .nav-item .icon { transition:color .18s ease; }
@media (prefers-reduced-motion:reduce) {
  .workspace, .workspace .sidebar, .workspace .sidebar *, .sidebar-backdrop, .card, .btn, .modal, .modal-back, .toast, .view-switch .icon-btn { transition:none !important; animation:none !important; }
  .workspace .sidebar { will-change:auto; }
}

/* ---- polish.css ---- */
/* Кабинет ГК / Polished Workspace — 2026-11
   Only the library shell, catalogue controls and cards are refined here.
   The slide player and server contracts remain unchanged. */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #243240;
  --muted: #667789;
  --primary: #2c4255;
  --primary-dark: #213547;
  --line: #e2e8ee;
  --accent-bg: #f0f4f7;
  --radius: 10px;
  --shadow: none;
  --shadow-lg: 0 7px 22px rgba(26, 45, 61, .055);
}
body {background:var(--bg);font-size:14px;color:var(--ink);}
.workspace {background:var(--bg);}
.workspace .sidebar {border-right-color:#e7ebef; padding:16px 10px 15px;}
.workspace .sidebar .sidebar-brand-row {margin-bottom:20px;}
.workspace .sidebar .brand-mark {background:#293e51; border-radius:10px;}
.workspace .sidebar .nav-label {font-size:10px;letter-spacing:.09em;color:#596a7b;}
.workspace .sidebar .sub-nav-label {margin-top:19px;}
.workspace .sidebar .management-heading {margin-top:20px;}
.workspace .sidebar .side-nav {gap:3px;}
.workspace .sidebar .nav-item {
  min-height:42px; border-radius:8px; color:#607285;
  font-size:13px; font-weight:530;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}
.workspace .sidebar .nav-item .icon {color:#728599;width:18px;height:18px;flex-basis:18px;}
.workspace .sidebar .nav-item:hover {background:#f3f6f8;color:#263d50;}
.workspace .sidebar .nav-item.on {background:#ecf2f6;color:#253e52;}
.workspace .sidebar .nav-item.on .icon {color:#2d516b;}
.workspace .sidebar .folder-shortcuts {overflow-y:auto;overflow-x:hidden;max-height:220px;scrollbar-width:thin;scrollbar-color:#d1dce6 transparent;}
.workspace .sidebar .folder-shortcuts:empty {display:none;}
.workspace .sidebar .folder-shortcuts .nav-item span {text-overflow:ellipsis;white-space:nowrap;}
.workspace .sidebar .folder-shortcut:not(.on) {color:#68798b;}
.workspace .sidebar .folder-tools {margin-top:3px;}
.workspace .sidebar .folder-tools .nav-item {color:#788a9b;}
.workspace .sidebar .folder-tools .nav-item:hover {color:#2e4a5f;}
.workspace .sidebar .profile {min-height:63px;}
.workspace .sidebar .profile strong {font-size:13px;}
.workspace .sidebar .profile div span {font-size:12px;color:#718091;}
.workspace .main-topbar {
  height:64px;padding:0 clamp(26px,3.1vw,48px);
  background:#fff;border-bottom:1px solid #e7ebef;
}
.workspace .main-topbar .breadcrumb {font-size:12px;gap:10px;color:#758596;}
.workspace .main-topbar .breadcrumb span {color:#526b80;}
.workspace .main-topbar .breadcrumb strong {font-weight:580;color:#485b6d;}
.content {
  box-sizing:border-box;
  width:100%;max-width:1360px;
  padding:38px clamp(26px,3.1vw,48px) 78px;
  margin:0 auto;
}
.page-heading {margin:0 0 28px;gap:22px;align-items:center;}
.page-heading .heading-group {display:flex;align-items:center;gap:14px;min-width:0;}
.page-heading h1 {font-size:clamp(25px,2.1vw,30px);font-weight:720;letter-spacing:-.045em;line-height:1.22;color:#23313e;}
.heading-count {
  display:inline-flex;align-items:center;justify-content:center;
  padding:4px 9px;border:1px solid #e5ebf0;background:#eef3f7;
  border-radius:7px;font-size:12px;line-height:1.25;font-weight:600;
  white-space:nowrap;color:#526b80;
}
.btn,.page-heading .btn {
  min-height:40px;padding:9px 15px;border-radius:8px;
  font-size:13px;font-weight:620;line-height:1.4;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease;
}
.btn:hover,.page-heading .btn:hover {transform:none;box-shadow:none;}
.btn.ghost,.page-heading .btn.ghost {background:#fff;border:1px solid #dfe6ec;color:#42596b;}
.btn.ghost:hover {background:#f4f7fa;}
.btn.small {min-height:36px;padding:7px 11px;font-size:12px;}
.icon-btn {border-radius:8px;transition:background-color .16s ease,color .16s ease;}
.icon-btn:hover {transform:none;}
.toolbar {display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0 0 21px;max-width:1090px;}
.toolbar > .search {
  order:0;flex:1 1 330px;max-width:540px;min-width:235px;
  height:40px;border:1px solid #dfe6ed;border-radius:8px;
  padding:0 12px;box-shadow:none;
}
.search input {font-size:13px;color:#334456;}
.search input::placeholder {color:#596a7b;}
.search kbd {font-size:10px;color:#596a7b;}
.toolbar .select-wrap {height:40px;min-width:0;border-radius:8px;border-color:#dfe6ed;}
.toolbar .select-wrap select {font-size:12.5px;color:#475a6d;height:38px;padding:0 30px 0 13px;min-width:0;border:0;}
.toolbar .folder-picker {width:168px;}
.toolbar .select-wrap:has(#sort) {width:168px;}
.toolbar .view-switch {height:40px;padding:3px;border:1px solid #dfe6ed;background:#fff;border-radius:8px;gap:2px;}
.toolbar .view-switch .icon-btn {width:32px;height:32px;border-radius:6px;color:#8191a2;}
.toolbar .view-switch .icon-btn.on {background:#eef3f7;color:#294b64;box-shadow:none;}
/* Cards are intentionally no wider than ~300 px even when only two exist. */
.grid:not(.list-view) {display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,300px));gap:18px;align-items:stretch;}
.card {
  position:relative;isolation:isolate;overflow:hidden;
  border:1px solid #e2e8ee;border-radius:11px;background:#fff;
  box-shadow:none;transform:none;transition:border-color .18s ease,box-shadow .2s ease;
}
.card:hover {border-color:#bac9d7;box-shadow:var(--shadow-lg);transform:none;}
.card:has(.card-stretched-link:focus-visible) {outline:2px solid #547995;outline-offset:3px;}
.card-stretched-link {position:absolute;inset:0;z-index:1;border-radius:inherit;}
.card-stretched-link:focus-visible {outline:none;}
.card .cover {margin:0;border-radius:0;aspect-ratio:16/9;background:#f0f3f6;pointer-events:none;}
.card .cover img {height:100%;width:100%;object-fit:cover;transform:none!important;}
.card .cover .play {display:none;}
.card .cover-fallback {font-size:12px;}
.card .badge-count {
  right:10px;bottom:10px;z-index:0;
  border-radius:5px;padding:5px 8px;font-size:11px;line-height:1.2;
  color:#fff;background:rgba(35,48,61,.76);font-weight:550;
  backdrop-filter:none;
}
.card .badge-fx {
  top:10px;right:10px;left:auto;z-index:0;
  background:rgba(249,251,253,.96);color:#49677f;
  border:1px solid #e0e7ed;border-radius:5px;
  font-size:10px;line-height:1.2;font-weight:600;padding:5px 7px;
}
.card .badge-fx .icon {width:12px;height:12px;}
.card .badge-demo {display:none;}
.card .body {display:flex;flex-direction:column;gap:6px;padding:14px 14px 15px;min-height:86px;}
.card .card-title-row {display:flex;align-items:start;gap:5px;}
.card h3 {
  flex:1;min-width:0;margin:0;padding-top:3px;
  font-size:14px;line-height:1.42;font-weight:650;letter-spacing:-.018em;color:#28394a;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
.card .card-actions {display:flex;gap:1px;align-items:center;position:relative;z-index:3;flex:none;}
.card .card-actions .icon-btn {width:30px;height:30px;border-radius:7px;background:transparent;color:#526b80;}
.card .card-actions .icon-btn:hover {background:#f0f4f8;color:#314f65;}
.card .card-actions .favorite.on {color:#c04d6c;background:#fff4f7;}
.card .card-actions .icon-btn .icon {width:16px;height:16px;}
.card .card-more .icon {display:none;}
.card .card-more::after {content:'•••';font-size:13px;letter-spacing:1px;transform:rotate(90deg);display:block;line-height:1;}
.card .card-meta {color:#55687a;font-size:12px;line-height:1.4;font-weight:430;}
.card .desc {display:none;}
.card-select {
  position:absolute;top:10px;left:10px;z-index:3;
  width:24px;height:24px;display:grid;place-items:center;
  padding:3px;border-radius:6px;background:rgba(255,255,255,.96);
  box-shadow:0 1px 4px rgba(25,42,56,.12);
  opacity:0;transition:opacity .15s ease;
}
.card-select input {width:16px;height:16px;accent-color:#3e5e78;cursor:pointer;}
.card:hover .card-select,.card-select:focus-within,.card:has(.card-select input:checked) .card-select {opacity:1;}
/* List view keeps the description, but removes the extra link and dividers. */
.grid.list-view {display:flex;flex-direction:column;gap:9px;max-width:1080px;}
.grid.list-view .card {display:grid;grid-template-columns:176px minmax(0,1fr);min-height:108px;}
.grid.list-view .cover {width:176px;aspect-ratio:16/9;margin:0;border-right:1px solid #edf0f3;border-bottom:0;}
.grid.list-view .card .body {min-height:0;padding:12px 17px;display:flex;flex-direction:column;gap:5px;}
.grid.list-view .card h3 {-webkit-line-clamp:1;padding-top:3px;}
.grid.list-view .card .desc {display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;margin:0;font-size:12px;color:#596a7b;min-height:0;line-height:1.45;}
.grid.list-view .card .badge-count {padding:3px 6px;font-size:10px;}
.grid.list-view .card .badge-fx {display:none;}
.empty {border:1px dashed #d5dfe8;background:#fff;border-radius:11px;}
/* Responsiveness */
@media(max-width:1100px) {
  .content {padding:32px 27px 65px;}
  .workspace .main-topbar {padding:0 27px;}
  .grid:not(.list-view) {grid-template-columns:repeat(auto-fill,minmax(260px,300px));}
}
@media(max-width:760px) {
  .workspace .main-topbar {padding:0 17px;height:59px;}
  .workspace .content {padding:25px 17px 55px;}
  .page-heading {margin-bottom:24px;}
  .page-heading h1 {font-size:25px;}
  .page-heading .heading-group {gap:9px;}
  .heading-count {font-size:11px;padding:4px 7px;}
  .page-heading .btn {min-height:38px;padding:8px 11px;}
  .toolbar {gap:8px;}
  .toolbar > .search {flex:1 0 100%;max-width:none;min-width:0;order:-1;}
  .toolbar .folder-picker,.toolbar .select-wrap:has(#sort) {flex:1 1 115px;width:auto;}
  .toolbar .view-switch {margin-left:0;}
  .grid:not(.list-view) {grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:14px;}
  .card .body {padding:14px;}
  .card-select {opacity:1;}
  .grid.list-view .card {grid-template-columns:112px minmax(0,1fr);}
  .grid.list-view .cover {width:112px;}
  .grid.list-view .card .body {padding:10px 11px;}
  .grid.list-view .card h3 {font-size:13px;-webkit-line-clamp:2;}
  .grid.list-view .card .desc {display:none;}
  .grid.list-view .card .badge-fx {display:none;}
}
@media(max-width:430px) {
  .workspace .content {padding:23px 14px 45px;}
  .page-heading h1 {font-size:23px;}
  .page-heading .btn {height:39px;padding:9px 11px;min-width:39px;font-size:12px;}
  .page-heading .btn span {font-size:11px;}
  .heading-count {font-size:10px;}
  .toolbar .folder-picker,.toolbar .select-wrap:has(#sort) {flex:1 1 117px;}
  .grid:not(.list-view) {grid-template-columns:1fr;}
  .card {width:100%;}
}
@media (min-width:761px) {
  .workspace .sidebar,.workspace .sidebar.expanded {transition:clip-path .30s cubic-bezier(.4,0,.2,1),box-shadow .30s cubic-bezier(.4,0,.2,1);}
  .workspace {transition:grid-template-columns .30s cubic-bezier(.4,0,.2,1);}
}
@media(prefers-reduced-motion:reduce) {
  .card,.card-select,.btn,.icon-btn,.workspace,.workspace .sidebar {animation:none!important;transition:none!important;}
}
/* Compact mobile header: count belongs under the title, never between its words. */
@media(max-width:480px) {
  .page-heading {align-items:flex-start;gap:10px;}
  .page-heading .heading-group {flex-direction:column;align-items:flex-start;gap:7px;flex:1 1 auto;min-width:0;}
  .page-heading h1 {font-size:23px;line-height:1.22;max-width:230px;}
  .page-heading .btn {align-self:flex-start;margin-top:2px;}
  .page-heading .heading-count {padding:3px 7px;}
}

