/* ══ Media page (.mm-*) — session videos & data files ══
   Ported from the approved mockup (tools/harness/media_manager.html); the
   wizard / NAS panel / notes chrome stays behind for phase 2. */

/* The two-pane library scrolls in .main-content; #media must NOT be its own
   overflow container or the sticky rail/lane-headers pin to #media (which never
   scrolls) instead of .main-content and scroll away with the page. */
#media { overflow: visible; }
.mm-loading { color: #7a8a9b; font-size: 13px; padding: 18px 4px; }

/* topbar */
.mm-topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 12px; }
.mm-title { font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.mm-spacer { flex: 1; }
.mm-chips { display: flex; gap: 3px; background: #0f1318; border: 1px solid #1a1f28; border-radius: 10px; padding: 3px; }
body.light-mode .mm-chips { background: #e8ecf3; border-color: #dde2ec; }
.mm-chip {
  padding: 5px 12px; border-radius: 8px; border: none; background: none; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-size: 11.5px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase; color: #7a8a9b; transition: background .15s, color .15s;
}
.mm-chip:hover { color: #dce3ed; }
body.light-mode .mm-chip:hover { color: #1a2030; }
.mm-chip.active { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.mm-search {
  display: flex; align-items: center; gap: 7px; background: #141820;
  border: 1px solid #2a3040; border-radius: 9px; padding: 7px 11px; min-width: 200px;
}
body.light-mode .mm-search { background: #fff; border-color: #dde2ec; }
.mm-search .material-symbols-outlined { font-size: 16px; color: #5a6678; }
.mm-search input { background: none; border: none; color: inherit; font: inherit; font-size: 12.5px; outline: none; width: 100%; }
.mm-search input::placeholder { color: #5a6678; }
.mm-storage { display: flex; flex-direction: column; gap: 4px; min-width: 118px; }
.mm-storage-t { font-size: 10.5px; color: #7a8a9b; display: flex; justify-content: space-between; gap: 8px; }
.mm-storage-t b { color: #dce3ed; font-weight: 600; font-variant-numeric: tabular-nums; }
body.light-mode .mm-storage-t b { color: #1a2030; }
.mm-storage-bar { height: 4px; border-radius: 2px; background: #1f2530; overflow: hidden; }
body.light-mode .mm-storage-bar { background: #dde2ec; }
.mm-storage-fill { height: 100%; border-radius: 2px; background: var(--accent); }
.mm-btn-acc {
  display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 8px;
  padding: 8px 15px; cursor: pointer; background: var(--accent); color: #0f1218;
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.mm-btn-acc:hover { opacity: .88; }
.mm-btn-acc .material-symbols-outlined { font-size: 16px; }
.mm-btn-acc[disabled] { opacity: .4; cursor: not-allowed; }

.mm-empty { padding: 60px 0; text-align: center; color: #5a6678; font-size: 13px; }
.mm-empty .material-symbols-outlined { font-size: 34px; display: block; margin: 0 auto 10px; }

/* ══ library: rail (event navigator) + workspace ══ */
#media .mm-lib { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }

/* rail */
.mm-rail { position: sticky; top: 0; align-self: start; max-height: calc(100dvh - 124px);
  display: flex; flex-direction: column; background: #141820; border: 1px solid #1a1f28; border-radius: 14px; overflow: hidden; }
body.light-mode .mm-rail { background: #fff; border-color: #e2e7f0; }
.mm-rail-h { display: flex; flex-direction: column; gap: 9px; padding: 12px; border-bottom: 1px solid #1a1f28; }
body.light-mode .mm-rail-h { border-color: #eef1f6; }
.mm-rail-h .mm-search { min-width: 0; }
.mm-rail-h .mm-chip { flex: 1; text-align: center; }
.mm-rail-list { flex: 1; overflow-y: auto; padding: 8px; }
.mm-rail-none { padding: 26px 12px; text-align: center; color: #5a6678; font-size: 12px; }
.mm-rail-yr { margin: 10px 6px 6px; font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: #5a6678; display: flex; align-items: center; gap: 8px; }
.mm-rail-yr::after { content: ""; flex: 1; height: 1px; background: #1a1f28; }
body.light-mode .mm-rail-yr::after { background: #eef1f6; }
.mm-rail-yr:first-child { margin-top: 2px; }
.mm-evrow { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 8px 9px; margin-bottom: 2px;
  border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; position: relative; color: inherit; font: inherit; transition: background .12s; }
.mm-evrow:hover { background: #11151c; }
body.light-mode .mm-evrow:hover { background: #f5f7fa; }
.mm-evrow.active { background: rgba(var(--accent-rgb), .08); border-color: rgba(var(--accent-rgb), .3); }
.mm-evrow.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.mm-evrow-ic { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; display: grid; place-items: center;
  background: #0f1318; border: 1px solid #1f2530; color: #7a8a9b; }
body.light-mode .mm-evrow-ic { background: #f0f3f8; border-color: #dde2ec; }
.mm-evrow-ic .material-symbols-outlined { font-size: 16px; }
.mm-evrow.active .mm-evrow-ic { border-color: rgba(var(--accent-rgb), .4); color: var(--accent); }
.mm-evrow-tx { flex: 1; min-width: 0; }
.mm-evrow-n { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.mm-evrow-n > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-evrow-s { font-size: 10.5px; color: #5a6678; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-evrow-live { font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .5); border-radius: 6px; padding: 0 5px; flex: 0 0 auto; }
body.light-mode .mm-evrow-live { color: #5a7a00; border-color: rgba(90, 122, 0, .4); }
.mm-evrow-m { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.mm-evrow-cnt { font-size: 11px; color: #5a6678; font-variant-numeric: tabular-nums; }
.mm-evrow-cnt b { color: #dce3ed; font-weight: 600; }
body.light-mode .mm-evrow-cnt b { color: #1a2030; }
.mm-evrow-needs { font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: #e0a64b; background: rgba(224, 166, 75, .14); border-radius: 6px; padding: 1px 5px; }
.mm-evrow-dots { display: flex; gap: 3px; }
.mm-dot { width: 6px; height: 6px; border-radius: 50%; }
.mm-dot.cloud { background: #4ac8a4; } .mm-dot.queue { background: #e0a64b; } .mm-dot.nas { background: #7a8a9b; }

/* workspace */
.mm-work { min-width: 0; }
.mm-work-empty { padding: 60px 20px; text-align: center; color: #5a6678; font-size: 13px; }
.mm-work-empty .material-symbols-outlined { font-size: 32px; display: block; margin: 0 auto 10px; }
.mm-wh-top { display: flex; align-items: flex-start; gap: 14px; }
.mm-wh-title { flex: 1; min-width: 0; }
.mm-wh-eyebrow { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
body.light-mode .mm-wh-eyebrow { color: #5a7a00; }
.mm-wh-h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 25px; font-weight: 800; letter-spacing: .3px; margin: 1px 0 4px; display: flex; align-items: center; gap: 11px; }
.mm-wh-live { font-size: 11px !important; padding: 2px 8px !important; }
.mm-wh-sub { font-size: 11.5px; color: #7a8a9b; display: flex; flex-wrap: wrap; gap: 5px 14px; }
.mm-wh-sub span { display: inline-flex; align-items: center; gap: 6px; }
.mm-wh-sub .material-symbols-outlined { font-size: 14px; color: #5a6678; }
.mm-wh-acts { flex: 0 0 auto; }

/* stat strip */
.mm-stats { display: flex; gap: 9px; margin: 14px 0 2px; flex-wrap: wrap; }
.mm-stat { flex: 1; min-width: 128px; background: #141820; border: 1px solid #1a1f28; border-radius: 11px; padding: 10px 13px; }
body.light-mode .mm-stat { background: #fff; border-color: #e2e7f0; }
.mm-stat.warn { border-color: rgba(224, 166, 75, .4); background: rgba(224, 166, 75, .06); cursor: pointer; }
.mm-stat-k { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: #5a6678; display: flex; align-items: center; gap: 6px; }
.mm-stat-k .material-symbols-outlined { font-size: 14px; }
.mm-stat.warn .mm-stat-k { color: #e0a64b; }
.mm-stat-v { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: .3px; margin-top: 3px; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 7px; }
.mm-stat-v small { font-family: 'Barlow', sans-serif; font-weight: 500; font-size: 11px; color: #5a6678; letter-spacing: 0; }
.mm-stat.warn .mm-stat-v { color: #e0a64b; }
.mm-stat-x { display: flex; gap: 10px; align-items: center; margin-top: 5px; font-size: 10.5px; color: #5a6678; min-height: 13px; }
.mm-leg { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.mm-leg i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.mm-leg-v { background: var(--accent); } .mm-leg-d { background: #e0a64b; } .mm-leg-q { background: #e0a64b; } .mm-leg-n { background: #7a8a9b; }
.mm-leg-ok { color: #4ac8a4; }

/* toolbar */
.mm-tools { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding-bottom: 12px; flex-wrap: wrap; border-bottom: 1px solid #1a1f28; }
body.light-mode .mm-tools { border-color: #eef1f6; }
.mm-carchips { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; padding-bottom: 2px; }
.mm-carchips::-webkit-scrollbar { height: 0; }
.mm-cchip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 8px;
  border: 1px solid #2a3040; background: #141820; color: #7a8a9b; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
body.light-mode .mm-cchip { background: #fff; border-color: #dde2ec; }
.mm-cchip:hover { color: #dce3ed; border-color: #3a4356; }
body.light-mode .mm-cchip:hover { color: #1a2030; }
.mm-cchip.on { background: #dce3ed; border-color: #dce3ed; color: #0f1318; }
body.light-mode .mm-cchip.on { background: #1a2030; border-color: #1a2030; color: #fff; }
.mm-cchip-n { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 10.5px; opacity: .7; }
.mm-cdot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.mm-seg { flex: 0 0 auto; }
.mm-seg .mm-chip { display: inline-flex; align-items: center; gap: 5px; }
.mm-seg .mm-chip .material-symbols-outlined { font-size: 15px; }
#mm-select-btn.on { background: var(--accent); border-color: var(--accent); color: #0f1218; }

/* lanes */
.mm-lanes { padding-bottom: 40px; }
.mm-lane { margin-top: 16px; }
.mm-lane-h { display: flex; align-items: center; gap: 10px; padding: 5px 0 8px; position: sticky; top: 0; z-index: 2; background: #090b0e; }
body.light-mode .mm-lane-h { background: #f0f3f8; }
.mm-lane-tag { width: 6px; height: 20px; border-radius: 3px; background: #2a3040; flex: 0 0 auto; }
.mm-lane.unfiled .mm-lane-tag { background: #e0a64b; }
.mm-lane-n { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.mm-lane.unfiled .mm-lane-n { color: #e0a64b; }
.mm-lane-t { font-size: 11px; color: #5a6678; font-variant-numeric: tabular-nums; }
.mm-lane-day { font-family: 'Barlow Condensed', sans-serif; font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #5a6678; border: 1px solid #2a3040; border-radius: 6px; padding: 1px 6px; }
body.light-mode .mm-lane-day { border-color: #dde2ec; }
.mm-lane-hint { font-size: 11px; color: #e0a64b; }
.mm-lane-cnt { margin-left: auto; font-size: 11px; color: #5a6678; font-variant-numeric: tabular-nums; }
.mm-lane-b { border-radius: 12px; transition: background .12s, box-shadow .12s; }
.mm-lane.drop-hot .mm-lane-b { box-shadow: 0 0 0 1.5px var(--accent); background: rgba(var(--accent-rgb), .06); }
.mm-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 20px; text-align: center;
  border: 1.5px dashed #2a3040; border-radius: 12px; color: #5a6678; font-size: 11.5px; }
body.light-mode .mm-drop-empty { border-color: #dde2ec; }
.mm-lane.drop-hot .mm-drop-empty { border-color: var(--accent); color: var(--accent); }
.mm-drop-empty .material-symbols-outlined { font-size: 20px; }
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 11px; }

/* file card */
.mm-card { background: #141820; border: 1px solid #1a1f28; border-radius: 12px; overflow: hidden; cursor: grab; position: relative;
  transition: transform .12s, border-color .12s, box-shadow .12s; }
body.light-mode .mm-card { background: #fff; border-color: #e2e7f0; }
.mm-card:hover { border-color: #2a3040; box-shadow: 0 10px 26px rgba(0,0,0,.4); transform: translateY(-1px); }
body.light-mode .mm-card:hover { box-shadow: 0 10px 26px rgba(20,30,50,.12); }
.mm-card.dragging { opacity: .45; }
.mm-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mm-poster { height: 100px; position: relative; display: grid; place-items: center; overflow: hidden; }
.mm-poster-d { background: #0f1318; color: #e0a64b; }
body.light-mode .mm-poster-d { background: #f0f3f8; }
.mm-trace { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-poster-play { width: 38px; height: 38px; border-radius: 50%; background: rgba(10,14,20,.55); backdrop-filter: blur(3px);
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); }
.mm-poster-play .material-symbols-outlined { font-size: 22px; color: #fff; }
/* Video poster — cinematic film-strip "logo" so an MP4 reads as video at a glance */
.mm-poster-v { background:
    radial-gradient(120% 85% at 32% 24%, hsl(var(--vh,210) 60% 40% / .5), transparent 62%),
    linear-gradient(135deg, hsl(var(--vh,210) 44% 27%), hsl(calc(var(--vh,210) + 40) 42% 12%)); }
.mm-poster-v::before, .mm-poster-v::after { content: ''; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
  background: radial-gradient(circle, transparent 0 1.8px, rgba(4,7,11,.9) 2.2px 100%) 0 0 / 13px 12px repeat-x; }
.mm-poster-v::before { top: 0; }
.mm-poster-v::after { bottom: 0; }
.mm-poster-v .mm-kbadge, .mm-poster-v .mm-poster-play { z-index: 2; }
.mm-poster-v .mm-poster-play { width: 48px; height: 48px; background: rgba(10,14,20,.5); border-color: rgba(255,255,255,.55);
  box-shadow: 0 6px 20px rgba(0,0,0,.45), 0 0 0 8px rgba(255,255,255,.06); transition: transform .14s, box-shadow .14s, border-color .14s; }
.mm-poster-v .mm-poster-play .material-symbols-outlined { font-size: 28px; }
.mm-card:hover .mm-poster-v .mm-poster-play { border-color: var(--accent); transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 0 9px rgba(255,255,255,.09); }
.mm-kbadge { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px;
  border-radius: 6px; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 9.5px; letter-spacing: .4px; text-transform: uppercase; }
.mm-kbadge .material-symbols-outlined { font-size: 12px; }
.mm-kbadge.video { background: var(--accent); color: #0f1218; }
.mm-kbadge.data { background: #e0a64b; color: #241705; }
.mm-cbadge { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; background: rgba(8,11,16,.66);
  color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 10.5px; letter-spacing: .4px; padding: 2px 7px; border-radius: 7px; }
.mm-pick { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.6);
  background: rgba(8,11,16,.5); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.mm-card:hover .mm-pick, .mm-card.sel .mm-pick, .mm-selmode .mm-pick { opacity: 1; }
.mm-pick .material-symbols-outlined { font-size: 14px; color: #fff; opacity: 0; }
.mm-card.sel .mm-pick { background: var(--accent); border-color: var(--accent); }
.mm-card.sel .mm-pick .material-symbols-outlined { opacity: 1; color: #0f1218; }
.mm-cbody { padding: 9px 10px 10px; }
.mm-cfn { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-cmeta { font-size: 10.5px; color: #5a6678; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-cfoot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.mm-cacts { margin-left: auto; display: flex; gap: 1px; }
.mm-cacts .mm-ico { width: 26px; height: 26px; }
.mm-cacts .mm-ico .material-symbols-outlined { font-size: 15px; }

/* list view */
.mm-list { display: flex; flex-direction: column; gap: 1px; background: #1a1f28; border: 1px solid #1a1f28; border-radius: 12px; overflow: hidden; }
body.light-mode .mm-list { background: #e2e7f0; border-color: #e2e7f0; }
.mm-lrow { display: flex; align-items: center; gap: 11px; padding: 8px 12px; background: #141820; cursor: grab; }
body.light-mode .mm-lrow { background: #fff; }
.mm-lrow:hover { background: #11151c; }
body.light-mode .mm-lrow:hover { background: #f8fafd; }
.mm-lrow.dragging { opacity: .45; }
.mm-lrow.sel { background: rgba(var(--accent-rgb), .08); }
.mm-lrow .mm-pick { position: static; opacity: 1; background: transparent; border-color: #2a3040; }
.mm-lrow.sel .mm-pick { background: var(--accent); border-color: var(--accent); }
.mm-lrow .mm-pick .material-symbols-outlined { opacity: 0; }
.mm-lrow.sel .mm-pick .material-symbols-outlined { opacity: 1; color: #0f1218; }
.mm-lk { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.mm-lk.video { background: rgba(var(--accent-rgb), .12); color: var(--accent); }
body.light-mode .mm-lk.video { color: #5a7a00; }
.mm-lk.data { background: rgba(224,166,75,.14); color: #e0a64b; }
.mm-lk .material-symbols-outlined { font-size: 15px; }
.mm-lx { flex: 1; min-width: 0; }
.mm-lfn { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-lm { display: block; font-size: 10.5px; color: #5a6678; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-lcar { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 10.5px; letter-spacing: .4px; color: #7a8a9b; border: 1px solid #2a3040; border-radius: 7px; padding: 2px 8px; }
body.light-mode .mm-lcar { border-color: #dde2ec; }
.mm-lsess { font-size: 11px; color: #5a6678; flex: 0 0 auto; min-width: 92px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-lrow .mm-cacts { flex: 0 0 auto; }

/* selection bar (body-level) */
/* The off-state is hidden by VISIBILITY, not by the slide. The bar is body-level
   and is created EMPTY on every render (~20px of padding + border) long before
   anything is selected, so a percentage translate is measured against almost
   nothing: at the phone's bottom:74px it left a permanent white pill sitting
   above the tab bar, on every page, because nothing ever removes the node. */
.mm-selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(150%); z-index: 620;
  display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 16px; border-radius: 14px; background: #101318;
  border: 1px solid #2a3545; box-shadow: 0 14px 40px rgba(0,0,0,.5); visibility: hidden;
  transition: transform .22s cubic-bezier(.2,.9,.3,1), visibility 0s .22s; }
body.light-mode .mm-selbar { background: #fff; border-color: #dde2ec; box-shadow: 0 14px 40px rgba(20,30,50,.16); }
.mm-selbar.on { transform: translateX(-50%) translateY(0); visibility: visible;
  transition: transform .22s cubic-bezier(.2,.9,.3,1), visibility 0s; }
/* running a bulk action: no clicks, spinner + live progress bar */
.mm-selbar.busy { pointer-events: none; min-width: 320px; }
.mm-spin { animation: mm-spin 1s linear infinite; font-size: 18px; vertical-align: middle; color: var(--accent); }
@keyframes mm-spin { to { transform: rotate(360deg); } }
.mm-selbar-prog { flex: 1; height: 5px; min-width: 90px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
body.light-mode .mm-selbar-prog { background: #e2e7f0; }
.mm-selbar-prog > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s ease; }
.mm-selbar-c { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .3px; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.mm-selbar-c b { color: var(--accent); }
body.light-mode .mm-selbar-c b { color: #5a7a00; }
.mm-selbar-div { width: 1px; height: 22px; background: #2a3545; }
body.light-mode .mm-selbar-div { background: #dde2ec; }
.mm-selbar-b { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px;
  border: 1px solid #2a3040; background: #0f1318; color: #dce3ed; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; }
body.light-mode .mm-selbar-b { background: #f0f3f8; border-color: #dde2ec; color: #1a2030; }
.mm-selbar-b .material-symbols-outlined { font-size: 15px; }
.mm-selbar-b:hover { border-color: #3a4356; }
.mm-selbar-b.acc { background: var(--accent); border-color: var(--accent); color: #0f1218; }
.mm-selbar-b.danger { color: #ef4444; }
.mm-selbar-b.danger:hover { border-color: #ef4444; }

/* move modal extras */
.mm-move-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #0f1318; border: 1px solid #1a1f28; }
body.light-mode .mm-move-file { background: #f8fafd; border-color: #e2e7f0; }
.mm-move-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; color: #7a8a9b; }
.mm-move-note .material-symbols-outlined { font-size: 15px; color: #5a6678; }
.mm-move-note b { color: #dce3ed; font-weight: 600; }
body.light-mode .mm-move-note b { color: #1a2030; }
.mm-kico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.mm-kico .material-symbols-outlined { font-size: 15px; }
.mm-kico.video { background: rgba(var(--accent-rgb), .1); color: var(--accent); }
.mm-kico.data { background: rgba(224, 166, 75, .13); color: #e0a64b; }
.mm-fx { flex: 1; min-width: 0; }
.mm-fn { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-fm { font-size: 10.5px; color: #5a6678; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mm-sy {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  font-family: 'Barlow Condensed', sans-serif; font-size: 10.5px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; padding: 2px 8px; border-radius: 10px;
}
.mm-sy .material-symbols-outlined { font-size: 12px; }
.mm-sy-cloud { color: #4ac8a4; background: rgba(74, 200, 164, .1); }
.mm-sy-nas { color: #7a8a9b; background: #1a1f28; }
body.light-mode .mm-sy-nas { background: #eef0f5; }
.mm-sy-queued { color: #e0a64b; background: rgba(224, 166, 75, .12); }
.mm-sy-syncing { color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.mm-sy-syncing .material-symbols-outlined { animation: mm-spin 1.4s linear infinite; }
@keyframes mm-spin { to { transform: rotate(360deg); } }
.mm-act { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.mm-ico {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: none;
  display: grid; place-items: center; color: #5a6678; cursor: pointer; text-decoration: none;
}
.mm-ico:hover { background: #1a1f28; color: #dce3ed; }
body.light-mode .mm-ico:hover { background: #eef0f5; color: #1a2030; }
.mm-ico .material-symbols-outlined { font-size: 17px; }
.mm-ico.eye-on { color: var(--accent); }

/* modals (upload + re-file) */
.mm-back {
  position: fixed; inset: 0; z-index: 700; background: rgba(4, 6, 10, .74);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.mm-back.on { display: flex; }
.mm-modal { width: min(580px, 100%); max-height: 92vh; overflow-y: auto; background: #141820; border: 1px solid #2a3545; border-radius: 14px; }
body.light-mode .mm-modal { background: #fff; border-color: #dde2ec; }

/* in-app video player */
.mm-ico-play .material-symbols-outlined { color: var(--accent, #b6e335); }
.mm-player { width: min(1000px, 100%); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.mm-player .mm-mo-t { text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 700; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-player-stage { background: #000; flex: 1 1 auto; min-height: 0; display: flex; }
.mm-player-vid { width: 100%; max-height: calc(92vh - 148px); background: #000; display: block; margin: auto; }
.mm-player-foot { display: flex; align-items: center; gap: 12px; padding: 11px 17px; border-top: 1px solid #1f2530; flex: 0 0 auto; }
body.light-mode .mm-player-foot { border-color: #eef1f6; }
.mm-player-meta { flex: 1; min-width: 0; color: #7a8a9b; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-player-open { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  color: #cfe0ee; font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1px solid #2a3545; border-radius: 8px; text-decoration: none; }
.mm-player-open:hover { background: rgba(255, 255, 255, .05); }
.mm-player-open .material-symbols-outlined { font-size: 16px; }
body.light-mode .mm-player-open { color: #33455a; border-color: #dde2ec; }
.mm-player-help { display: flex; justify-content: center; padding: 0 17px 12px; flex: 0 0 auto; }
.mm-player-help .cr-vidfix { margin-top: 4px; }
.mm-mo-h { display: flex; align-items: center; gap: 10px; padding: 14px 17px; border-bottom: 1px solid #1f2530; }
body.light-mode .mm-mo-h { border-color: #eef1f6; }
.mm-mo-t { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; flex: 1; }
.mm-mo-b { padding: 15px 17px; display: flex; flex-direction: column; gap: 13px; }
.mm-scope { display: grid; grid-template-columns: 1.4fr 0.9fr 1fr; gap: 9px; }
.mm-lab { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #7a8a9b; margin-bottom: 4px; display: block; }
.mm-sel {
  width: 100%; background: #0f1318; border: 1px solid #2a3040; border-radius: 9px;
  color: #dce3ed; font: inherit; font-size: 12.5px; padding: 7px 9px;
}
body.light-mode .mm-sel { background: #f0f3f8; border-color: #dde2ec; color: #1a2030; }
.mm-droparea {
  display: grid; place-items: center; gap: 4px; padding: 22px; border: 1.5px dashed #2a3040;
  border-radius: 11px; color: #5a6678; font-size: 12px; text-align: center; cursor: pointer;
}
.mm-droparea:hover, .mm-droparea.drag { border-color: rgba(var(--accent-rgb), .5); }
.mm-droparea .material-symbols-outlined { font-size: 26px; color: #5a6678; }
.mm-droparea b { color: #9aa7b8; font-weight: 600; }
.mm-file { display: flex; align-items: center; gap: 10px; background: #0f1318; border: 1px solid #1a1f28; border-radius: 10px; padding: 8px 11px; }
body.light-mode .mm-file { background: #f8fafd; border-color: #e2e7f0; }
.mm-file .mm-kico { width: 26px; height: 26px; }
.mm-file-n { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-file-n small { display: block; font-size: 10.5px; color: #5a6678; font-weight: 400; }
.mm-file .mm-sel { width: auto; font-size: 11.5px; padding: 4px 7px; }
.mm-shrow { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #9aa7b8; }
.mm-tgl { position: relative; width: 34px; height: 19px; border-radius: 10px; background: #2a3040; border: none; cursor: pointer; flex: 0 0 auto; transition: background .15s; }
.mm-tgl::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #7a8a9b; transition: left .15s, background .15s; }
.mm-tgl.on { background: var(--accent); }
.mm-tgl.on::after { left: 17px; background: #0f1218; }
.mm-mo-f { display: flex; align-items: center; gap: 10px; padding: 13px 17px; border-top: 1px solid #1f2530; }
body.light-mode .mm-mo-f { border-color: #eef1f6; }
.mm-mo-sum { font-size: 11.5px; color: #5a6678; flex: 1; }

/* upload dock — body-level so it survives page switches */
.mm-dock {
  position: fixed; right: 18px; bottom: 18px; width: 336px; z-index: 600;
  background: #101318; border: 1px solid #2a3545; border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5); overflow: hidden; display: none;
  color: #dce3ed; font-family: 'Barlow', sans-serif;
}
.mm-dock.on { display: block; }
body.light-mode .mm-dock { background: #fff; border-color: #dde2ec; box-shadow: 0 12px 36px rgba(20, 30, 50, .18); color: #1a2030; }
@media (max-width: 767px) { .mm-dock { right: 10px; left: 10px; width: auto; bottom: 74px; } }
.mm-dock-h { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-bottom: 1px solid #1f2530; cursor: pointer; }
body.light-mode .mm-dock-h { border-color: #eef1f6; }
.mm-dock-h .material-symbols-outlined { font-size: 17px; color: var(--accent); }
.mm-dock-t { flex: 1; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.mm-dock-t small { display: block; font-family: 'Barlow', sans-serif; font-size: 10.5px; font-weight: 400; color: #5a6678; letter-spacing: 0; text-transform: none; margin-top: 1px; }
.mm-dock-b { max-height: 300px; overflow-y: auto; }
.mm-dock.min .mm-dock-b { display: none; }
.mm-up { padding: 9px 13px; border-bottom: 1px solid #12161d; }
.mm-up:last-child { border-bottom: none; }
body.light-mode .mm-up { border-color: #eef1f6; }
.mm-up-r1 { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.mm-up-n { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-up-x { border: none; background: none; color: #5a6678; cursor: pointer; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.mm-up-x:hover { background: #1a1f28; color: #dce3ed; }
body.light-mode .mm-up-x:hover { background: #eef0f5; color: #1a2030; }
.mm-up-x .material-symbols-outlined { font-size: 14px; }
.mm-up-track { height: 3px; border-radius: 2px; background: #1f2530; overflow: hidden; }
body.light-mode .mm-up-track { background: #e4e8f0; }
.mm-up-fill { height: 100%; border-radius: 2px; background: var(--accent); width: 0%; transition: width .3s; }
.mm-up-m { font-size: 10.5px; color: #5a6678; margin-top: 4px; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.mm-up-m .material-symbols-outlined { font-size: 12px; }
.mm-up.q .mm-up-fill { background: #2a3040; }
.mm-up.done .mm-up-fill { background: #4ac8a4; }
.mm-up.done .mm-up-m { color: #4ac8a4; }
.mm-up.err .mm-up-fill { background: #ef4444; }
.mm-up.err .mm-up-m { color: #ef4444; }
.mm-up-retry {
  margin-left: auto; border: 1px solid #2a3040; background: none; border-radius: 7px;
  color: #9aa7b8; font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; padding: 2px 8px; cursor: pointer;
}
.mm-up-retry:hover { border-color: #7a8a9b; color: #dce3ed; }

/* responsive: stack the rail above the workspace, then phone trims */
@media (max-width: 900px) {
  #media .mm-lib { grid-template-columns: 1fr; }
  .mm-rail { position: static; max-height: 320px; }
}
@media (max-width: 767px) {
  .mm-selbar { left: 10px; right: 10px; bottom: 74px; transform: translateY(160%); flex-wrap: wrap; justify-content: center; }
  .mm-selbar.on { transform: translateY(0); }
}
@media (max-width: 600px) {
  .mm-topbar { gap: 8px; }
  .mm-storage { display: none; }
  .mm-wh-acts { display: none; }
  .mm-stats .mm-stat:nth-child(n+3) { display: none; }
  .mm-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
  .mm-scope { grid-template-columns: 1fr; }
}
