:root {
  --bg: #0c0d10;
  --bg-2: #101216;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.08);
  --glass-brd: rgba(255, 255, 255, 0.12);
  --glass-brd-hi: rgba(255, 255, 255, 0.22);
  --text: #eef1f5;
  --muted: #9aa3b2;
  --muted-2: #6b7382;
  --accent: #8ea2ff;
  --accent-2: #b98cff;
  --grad: linear-gradient(135deg, #8ea2ff 0%, #b98cff 100%);
  --grad-soft: linear-gradient(135deg, rgba(142,162,255,.18), rgba(185,140,255,.18));
  --good: #56d79a;
  --warn: #f5c26b;
  --bad: #ff7a7a;
  --gold: #ffd77a;
  --radius: 16px;
  --radius-sm: 11px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(142,162,255,.10), transparent 60%),
    radial-gradient(1000px 600px at 92% 0%, rgba(185,140,255,.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
#app { min-height: 100%; }

/* ---- glass primitive (iOS liquid-glass) ---- */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    0 10px 40px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(255,255,255,.04);
}
/* specular top-edge highlight */
.glass::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 22%);
  mask: linear-gradient(#fff, transparent 40%);
}

/* ---- topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; position: sticky; top: 0; z-index: 30;
  background: rgba(12,13,16,.6);
  border-bottom: 1px solid var(--glass-brd);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.brand { font-weight: 800; letter-spacing: .2px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(142,162,255,.4)); }
.brand-name { display: inline; }
.brand-name span {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tabs { display: flex; gap: 6px; margin-left: 12px; }
.tab {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--muted);
  font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: .18s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text); background: var(--glass-2); border-color: var(--glass-brd-hi);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.spacer { flex: 1; }

/* ---- buttons ---- */
.btn {
  border: 1px solid var(--glass-brd); background: var(--glass); color: var(--text);
  padding: 10px 18px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: .16s; backdrop-filter: blur(8px);
}
.btn:hover { border-color: var(--glass-brd-hi); background: var(--glass-2); transform: translateY(-1px); }
.btn.primary {
  background: var(--grad); border: none; color: #12121a; font-weight: 700;
  box-shadow: 0 6px 18px rgba(142,162,255,.35);
}
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 30px 24px 90px; }
.h1 { font-size: 24px; font-weight: 800; margin: 0 0 5px; letter-spacing: -.3px; }
.sub { color: var(--muted); margin: 0 0 24px; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; }
.login-inner {
  display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: stretch;
  width: 100%; max-width: 940px;
}
.login-card { padding: 40px 36px; border-radius: 26px; display: flex; flex-direction: column; justify-content: center; }
.login-logo { width: 76px; height: 76px; object-fit: contain; margin: 0 auto 18px; display: block; filter: drop-shadow(0 6px 20px rgba(142,162,255,.5)); }
.login-card h1 { text-align: center; margin: 0 0 5px; font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.login-card h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card p { text-align: center; color: var(--muted); margin: 0 0 26px; }

.how { padding: 34px 32px; border-radius: 26px; }
.how-title { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 22px; }
.steps { display: flex; flex-direction: column; gap: 20px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-n {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #12121a; background: var(--grad);
  box-shadow: 0 6px 16px rgba(142,162,255,.35);
}
.step-t { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.step-d { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 780px) { .login-inner { grid-template-columns: 1fr; max-width: 460px; } }
.input {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--glass-brd);
  background: rgba(255,255,255,.04); color: var(--text); font-size: 15px; transition: .16s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(142,162,255,.18); }
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 7px; font-weight: 600; letter-spacing: .2px; text-transform: uppercase; }
.err { color: var(--bad); font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ---- dropzone ---- */
.drop {
  border: 1.5px dashed var(--glass-brd-hi); border-radius: var(--radius); padding: 44px;
  text-align: center; color: var(--muted); cursor: pointer; transition: .18s;
  background: var(--grad-soft);
}
.drop.hover { border-color: var(--accent); background: linear-gradient(135deg, rgba(142,162,255,.28), rgba(185,140,255,.28)); color: var(--text); }
.drop b { color: var(--text); }

/* ---- grids ---- */
.grid { display: grid; gap: 18px; }
.grid.files { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.outputs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.card {
  border-radius: var(--radius); overflow: hidden; position: relative; transition: .2s cubic-bezier(.4,0,.2,1);
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 8px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.10);
}
.card:hover { transform: translateY(-3px); border-color: var(--glass-brd-hi); box-shadow: 0 12px 34px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08); }
.card.selectable { cursor: pointer; }
.card.sel {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--accent), 0 0 26px rgba(142,162,255,.5), 0 12px 34px rgba(0,0,0,.4);
}
.card.sel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(135deg, rgba(142,162,255,.16), rgba(185,140,255,.10));
}
.thumb {
  aspect-ratio: 9/16; background: #07080b; display: grid; place-items: center;
  color: var(--muted-2); font-size: 30px; position: relative; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .play-badge {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45));
  opacity: 0; transition: .18s; font-size: 34px; color: #fff;
}
.card:hover .thumb .play-badge { opacity: 1; }
.card .meta { padding: 11px 13px; }
.card .name { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .info { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---- selection tick ---- */
.tick {
  position: absolute; top: 10px; left: 10px; z-index: 4; width: 26px; height: 26px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: rgba(0,0,0,.35);
  display: grid; place-items: center; color: #fff; font-size: 15px; transition: .15s; backdrop-filter: blur(4px);
}
.card.sel .tick { background: var(--grad); border-color: transparent; box-shadow: 0 0 14px rgba(142,162,255,.7); }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.badge.uploaded, .badge.queued { background: rgba(255,255,255,.08); color: var(--muted); }
.badge.analyzing, .badge.assembling, .badge.rendering { background: rgba(245,194,107,.16); color: var(--warn); }
.badge.ready, .badge.done { background: rgba(86,215,154,.16); color: var(--good); }
.badge.failed { background: rgba(255,122,122,.16); color: var(--bad); }

.fav { position: absolute; top: 10px; right: 10px; z-index: 4; font-size: 21px; cursor: pointer; color: rgba(255,255,255,.4); transition: .15s; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.fav:hover { color: var(--gold); transform: scale(1.12); }
.fav.on { color: var(--gold); text-shadow: 0 0 12px rgba(255,215,122,.7); }

.del {
  position: absolute; top: 10px; right: 10px; z-index: 5; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.75); display: grid; place-items: center; cursor: pointer;
  font-size: 18px; line-height: 1; opacity: 0; transition: .15s; backdrop-filter: blur(4px);
}
.card:hover .del { opacity: 1; }
.del:hover { background: rgba(255,122,122,.85); color: #fff; border-color: transparent; transform: scale(1.1); }

/* ---- progress ---- */
.progress { height: 8px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.progress > i {
  display: block; height: 100%; background: var(--grad); border-radius: 999px;
  transition: width .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 12px rgba(142,162,255,.6);
}

.bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.pill { background: var(--glass); border: 1px solid var(--glass-brd); padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); backdrop-filter: blur(8px); }

.empty { text-align: center; color: var(--muted); padding: 66px 20px; }

/* ---- admin ---- */
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.statcard { padding: 22px; border-radius: 18px; }
.stat-val { font-size: 34px; font-weight: 800; letter-spacing: -.5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text); font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.stat-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.arow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--glass-brd); }
.arow:last-child { border-bottom: none; }
.arow .aname { flex: 1; font-weight: 600; font-size: 14px; }
.arow .adate { color: var(--muted); font-size: 12px; }

/* ---- insights ---- */
.row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; text-decoration: none; color: var(--text); transition: transform .12s ease, box-shadow .12s ease; }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.trank { flex: none; width: 26px; text-align: center; font-weight: 800; font-size: 15px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tthumb { flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--glass-brd); }
.tthumb img { width: 100%; height: 100%; object-fit: cover; }
.tmeta { min-width: 0; }
.tname { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.vcard { display: block; padding: 0; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text); transition: transform .12s ease, box-shadow .12s ease; }
.vcard:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.vthumb { aspect-ratio: 16/9; background: var(--glass-brd); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vmeta { padding: 11px 13px 14px; }
.vtitle { font-weight: 650; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ins-note { padding: 18px 20px; border-radius: 16px; }

/* ---- create chooser ---- */
.chooser { max-width: 640px; padding: 28px; }
.chooser-h { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.chooser-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.chooser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice { padding: 20px; border-radius: 16px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; border: 1px solid var(--glass-brd); }
.choice:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0,0,0,.32); }
.choice.pro { border-color: transparent; background:
  linear-gradient(#171922, #171922) padding-box,
  linear-gradient(135deg, #8ea2ff, #b98cff) border-box; }
.choice.pro .choice-d { color: #b9c2d4; }
.choice-t { font-size: 17px; font-weight: 750; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.choice-d { color: var(--muted); font-size: 13px; line-height: 1.45; }
.pro-badge { font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 999px; color: #fff; background: var(--grad); vertical-align: middle; }

/* ---- pro studio ---- */
.studio { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); }
.studio-top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 0; border-bottom: 1px solid var(--glass-brd); }
.studio-phase { color: var(--muted); font-size: 13px; margin-right: 6px; }
.studio-body { flex: 1; overflow-y: auto; padding: 26px; }
.studio-setup { max-width: 720px; margin: 0 auto; }
.studio-head { margin-bottom: 22px; }
.studio-h { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.studio-sub { color: var(--muted); font-size: 14px; margin: 0; }
.setup-panel { padding: 20px; border-radius: 18px; margin-bottom: 16px; }
.panel-title { font-size: 13px; font-weight: 750; letter-spacing: .3px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel-count { font-size: 11px; font-weight: 700; color: #fff; background: var(--grad); border-radius: 999px; padding: 2px 9px; }
.studio-footer { position: sticky; bottom: 18px; max-width: 720px; margin: 8px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.footer-summary { color: var(--muted); font-size: 13px; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 22px 0 10px; }
.sclip-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.sclip { flex: 0 0 84px; }
.sclip-thumb { width: 84px; height: 149px; border-radius: 12px; overflow: hidden; background: var(--glass-brd); display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.sclip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sclip-name { font-size: 11px; color: var(--muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.modecard { padding: 16px; border-radius: 14px; cursor: pointer; border: 1.5px solid var(--glass-brd); transition: transform .12s ease, border-color .12s ease; }
.modecard:hover { transform: translateY(-2px); }
.modecard.sel { border-color: transparent; background:
  linear-gradient(#171922, #171922) padding-box,
  linear-gradient(135deg, #8ea2ff, #b98cff) border-box; }
.modecard.sel .modecard-d { color: #b9c2d4; }
.modecard-t { font-weight: 750; font-size: 15px; margin-bottom: 5px; }
.modecard-d { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.mode-extra { margin-top: 14px; padding: 14px; border-radius: 12px; background: rgba(0,0,0,.22); border: 1px solid var(--glass-brd); }
.mode-extra label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 8px; }
.mode-extra textarea, .mode-extra input { width: 100%; background: rgba(0,0,0,.25); border: 1px solid var(--glass-brd); border-radius: 10px; color: var(--text); padding: 10px 12px; font: inherit; resize: vertical; min-height: 44px; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-right: 10px; margin-bottom: 8px; }
.seg-btn { padding: 9px 15px; background: rgba(255,255,255,.04); border: 1px solid var(--glass-brd); border-radius: 10px; color: var(--muted); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; transition: all .14s ease; display: inline-flex; align-items: center; gap: 6px; }
.seg-btn:hover:not(.on):not(:disabled) { border-color: var(--glass-brd-hi); color: var(--text); background: rgba(255,255,255,.07); }
.seg-btn.on { background: var(--grad); color: #fff; font-weight: 650; border-color: transparent; box-shadow: 0 4px 14px rgba(142,162,255,.35); }
.seg-btn.disabled, .seg-btn:disabled { opacity: .4; cursor: not-allowed; }
.soon { font-size: 9px; padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,.14); }
.sound-sub { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.opt-label { font-size: 13px; font-weight: 650; color: var(--text); }
.opt-row .seg { margin: 0; }
/* track upload */
.track-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 20px; border-radius: 12px; border: 1.5px dashed var(--glass-brd-hi); background: rgba(0,0,0,.18); cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.track-drop:hover, .track-drop.drag { border-color: #8ea2ff; background: rgba(142,162,255,.08); }
.track-drop-icon { font-size: 20px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.track-drop-t { font-weight: 650; font-size: 13.5px; }
.track-drop-d { color: var(--muted); font-size: 11.5px; }
.track-loaded { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.22); border: 1px solid var(--glass-brd); }
.track-icon { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--grad); color: #fff; font-size: 16px; }
.track-meta { flex: 1; min-width: 0; }
.track-name { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-sub { color: var(--muted); font-size: 11.5px; }
.track-remove { flex: none; background: rgba(255,255,255,.06); border: 1px solid var(--glass-brd); color: var(--muted); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; transition: color .12s ease, border-color .12s ease; }
.track-remove:hover { color: #ff6b6b; border-color: #ff6b6b; }
.studio-actions { margin-top: 30px; }
.btn.lg { padding: 13px 30px; font-size: 15px; }

/* working */
.studio-working { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.working-glass { padding: 40px 48px; border-radius: 22px; text-align: center; min-width: 340px; }
.working-title { font-size: 18px; font-weight: 750; margin: 18px 0 4px; }
.working-step { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto; border: 3px solid var(--glass-brd); border-top-color: #8ea2ff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* editor */
.studio-editor { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.preview-pane { border-radius: 18px; padding: 16px; }
.preview-frame { position: relative; aspect-ratio: 9/16; max-height: 46vh; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.preview-frame img { width: 100%; height: 100%; object-fit: contain; }
.preview-empty { color: var(--muted); }
.preview-note { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,.6); }
.clip-prompt { padding: 16px; border-radius: 14px; background: #171922; border: 1.5px solid transparent;
  background:
  linear-gradient(#171922, #171922) padding-box,
  linear-gradient(135deg, #8ea2ff, #b98cff) border-box; }
.cp-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.cp-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; }
.clip-prompt textarea { width: 100%; background: rgba(0,0,0,.25); border: 1px solid var(--glass-brd); border-radius: 10px; color: var(--text); padding: 10px 12px; font: inherit; resize: vertical; min-height: 60px; }
.cp-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.timeline-wrap { position: sticky; bottom: 0; }
.timeline { display: flex; gap: 4px; padding: 10px; background: rgba(0,0,0,.28); border-radius: 14px; overflow-x: auto; }
.tl-clip { position: relative; border-radius: 9px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color .12s ease, transform .12s ease; min-width: 48px; }
.tl-clip:hover { transform: translateY(-2px); }
.tl-clip.active { border-color: #8ea2ff; }
.tl-clip.edited { border-color: #ffb347; box-shadow: 0 0 0 1px #ffb347 inset; }
.tl-thumb { height: 76px; background: var(--glass-brd); display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-tr { font-size: 9px; text-align: center; padding: 2px; color: var(--muted); background: rgba(0,0,0,.4); }
.timeline-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

/* ---- admin labeling studio ---- */
.lfile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.lfile { padding: 16px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-brd); cursor: pointer; transition: border-color .12s ease, transform .12s ease; }
.lfile:hover:not(.disabled) { border-color: var(--glass-brd-hi); transform: translateY(-2px); }
.lfile.disabled { opacity: .5; cursor: not-allowed; }
.lfile-name { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfile-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.lab-title { font-weight: 700; font-size: 16px; margin: 10px 0 12px; }
.lab-stage { max-width: 340px; margin: 0 auto 14px; }
.lab-stage video { width: 100%; max-height: 52vh; aspect-ratio: 9/16; background: #000; border-radius: 12px; }
.lab-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.lab-hint { color: var(--muted); font-size: 12px; }
.lab-timeline { position: relative; height: 46px; background: rgba(0,0,0,.3); border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--glass-brd); }
.lregion { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 11px; box-sizing: border-box; }
.lregion.highlight { background: rgba(78,201,120,.45); border: 1px solid #4ec978; }
.lregion.discard { background: rgba(255,107,107,.4); border: 1px solid #ff6b6b; }
.lregion.pending { background: #8ea2ff; border: none; }
.lregion.sel { outline: 2px solid #fff; }
.lab-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 6px #fff; pointer-events: none; }
.lab-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-brd); cursor: pointer; }
.lrow.sel { border-color: #8ea2ff; }
.lrow-kind.highlight { }
.lrow-time { font-weight: 600; font-size: 13px; min-width: 130px; }
.lrow-note { flex: 1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-star { background: none; border: none; opacity: .3; cursor: pointer; font-size: 14px; }
.lrow-star.on { opacity: 1; }
.lrow-del { background: rgba(255,255,255,.06); border: 1px solid var(--glass-brd); color: var(--muted); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; }
.lrow-del:hover { color: #ff6b6b; border-color: #ff6b6b; }
.badge.running, .badge.queued { background: rgba(142,162,255,.2); color: #b9c2d4; }
.badge.done { background: rgba(78,201,120,.2); color: #a8e6bf; }
.badge.failed { background: rgba(255,107,107,.2); color: #ffb3b3; }

/* ---- upload bar ---- */
.upbar { margin-top: 20px; padding: 18px 20px; border-radius: var(--radius); }
.upbar .uplabel { font-weight: 650; margin-bottom: 11px; font-size: 14px; }

/* ---- modal ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(6,7,10,.62); display: grid; place-items: center; z-index: 50; padding: 22px; backdrop-filter: blur(6px); }
.modal { border-radius: 22px; width: min(940px, 100%); max-height: 92vh; overflow: auto; }
.modal-body { display: grid; grid-template-columns: 1fr 340px; }
.modal-video { background: #000; display: grid; place-items: center; }
.modal-video video { width: 100%; max-height: 82vh; }
.modal-side { padding: 24px; border-left: 1px solid var(--glass-brd); }
.modal-side h3 { margin: 0 0 16px; font-size: 17px; }
.row { display: flex; gap: 9px; margin-bottom: 13px; }
.row .btn { flex: 1; }
.seg { color: var(--muted); font-size: 13px; font-weight: 500; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0 16px; }
.chip { padding: 7px 12px; border: 1px solid var(--glass-brd); border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--muted); transition: .15s; }
.chip:hover, .chip.on { border-color: var(--accent); color: var(--text); background: var(--grad-soft); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 13px 22px; border-radius: 13px; z-index: 60; font-weight: 600; font-size: 14px; }
.hint { color: var(--muted-2); font-size: 12px; margin-top: -4px; margin-bottom: 14px; }
select.input { appearance: none; }

/* shimmer for analyzing cards */
.thumb.analyzing::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(142,162,255,.14), transparent);
  transform: translateX(-100%); animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

@media (max-width: 720px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-side { border-left: none; border-top: 1px solid var(--glass-brd); }
}




















