/* Business Archaeology — Video Production Tracker
   Tông "phòng dựng phim": xám trung tính không ám màu, nhấn cam như timeline NLE,
   số liệu dùng mono để các cột thẳng hàng khi quét dọc 30 dòng. */

:root {
  --bg: #141416;
  --surface: #1a1a1c;
  --surface-2: #202024;
  --surface-3: #26262b;
  --line: #2a2a2e;
  --line-2: #37373d;
  --txt: #e8e8ea;
  --dim: #9a9aa0;
  --dimmer: #6c6c73;

  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, .13);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .12);
  --danger: #f2555a;
  --gold: #e0b341;

  /* 4 pillar nội dung — tách bạch với cam của accent */
  --A: #d6b84c; --B: #e05252; --C: #a78bfa; --D: #58a6ff;

  --r-sm: 5px; --r-md: 7px; --r-lg: 10px;

  /* thang cột của bảng — sửa ở đây là cả header lẫn row đổi theo */
  --c-check: 34px;
  --c-day: 50px;
  --c-thumb: 72px;
  --c-pipe: 150px;
  --c-count: 40px;
  --c-btn: 78px;
  --c-caret: 26px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 0 0 64px;
  -webkit-font-smoothing: antialiased;
}

svg { display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-radius: 3px;
}

/* ============ header ============ */
header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}

.head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 52px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 26px; height: 26px; flex: none; border-radius: var(--r-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 26, .3);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.brand-mark svg { width: 15px; height: 15px; }
h1 {
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
}
.brand-sub {
  font-size: 10.5px; color: var(--dimmer); letter-spacing: .1em;
  text-transform: uppercase; display: block; margin-top: -2px;
}

.head-right { display: flex; align-items: center; gap: 16px; }

.ext-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .04em;
  padding: 4px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); color: var(--dimmer);
  transition: color .2s, border-color .2s, background .2s;
}
.ext-badge svg { width: 12px; height: 12px; }
.ext-badge.on { border-color: rgba(74, 222, 128, .35); color: var(--ok); background: var(--ok-soft); }

.stat { display: flex; align-items: baseline; gap: 6px; }
.stat-big {
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 500; letter-spacing: -.01em;
}
.stat-label {
  color: var(--dimmer); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
}

/* thanh tiến độ mảnh, ăn hết bề ngang ngay dưới header */
.progress { height: 2px; background: var(--line); margin: 0 -20px; }
#progressFill { height: 100%; width: 0; background: var(--ok); transition: width .4s ease; }

.hint { color: var(--dim); font-size: 11.5px; padding: 7px 0 8px; }
.hint b { color: var(--txt); font-weight: 600; }

/* ============ toolbar ============ */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 20px;
}

.tabs { display: flex; gap: 1px; }
.tab {
  border: 1px solid transparent; background: transparent; color: var(--dim);
  padding: 5px 12px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.tab b {
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-weight: 500; font-size: 10.5px; color: var(--dimmer); margin-left: 5px;
}
.tab:hover { color: var(--txt); background: var(--surface-2); }
.tab.active { background: var(--accent-soft); border-color: rgba(255, 122, 26, .35); color: var(--accent); }
.tab.active b { color: var(--accent); }

.search-box { flex: 1; min-width: 180px; max-width: 340px; position: relative; display: block; }
.search-box svg {
  width: 13px; height: 13px; position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--dimmer); pointer-events: none;
}
#search {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 6px 10px 6px 30px;
  color: var(--txt); font: inherit; font-size: 12px;
  transition: border-color .15s, background .15s;
}
#search::placeholder { color: var(--dimmer); }
#search:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }

/* ============ bảng ============ */
/* header cột và row dùng chung một grid template ⇒ luôn thẳng hàng */
.thead, .vrow {
  display: grid;
  grid-template-columns:
    var(--c-check) var(--c-day) var(--c-thumb) minmax(0, 1fr)
    var(--c-pipe) var(--c-count) var(--c-btn) var(--c-btn) var(--c-caret);
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.thead {
  position: sticky; top: 52px; z-index: 20;
  height: 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dimmer);
}
.thead .t-center { text-align: center; }
.thead .t-right { text-align: right; }

.empty-list { padding: 60px 0; text-align: center; color: var(--dimmer); font-size: 13px; }

.video { border-bottom: 1px solid var(--line); }
.video:hover { background: var(--surface); }
.video.open { background: var(--surface); }
.video.done .vrow { opacity: .5; }
.video.done:hover .vrow { opacity: .72; }

.vrow { height: 52px; cursor: pointer; }

/* ô tick "đã up" */
.check {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: border-color .15s, background .15s, color .15s;
}
.check svg { width: 11px; height: 11px; }
.check:hover { border-color: var(--ok); }
.video.done .check { background: var(--ok); border-color: var(--ok); color: #0b1f12; }

/* số ngày + pillar: số mono, pillar là gạch màu mảnh bên trái */
.day {
  display: flex; align-items: center; gap: 7px;
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 500; color: var(--dim);
}
.day::before {
  content: ""; width: 2px; height: 20px; border-radius: 1px;
  background: var(--pillar, var(--line-2)); flex: none;
}
.day.A { --pillar: var(--A); } .day.B { --pillar: var(--B); }
.day.C { --pillar: var(--C); } .day.D { --pillar: var(--D); }
.video.open .day, .vrow:hover .day { color: var(--txt); }

/* thumbnail */
.thumb-box {
  position: relative; width: var(--c-thumb); height: 41px;
  border-radius: 4px; overflow: hidden; cursor: pointer; flex: none;
}
.thumb-box.empty {
  border: 1px dashed var(--line-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--dimmer); background: var(--surface-2);
  transition: border-color .15s, color .15s;
}
.thumb-box.empty svg { width: 13px; height: 13px; }
.thumb-box.empty:hover { border-color: var(--accent); color: var(--accent); }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-tools {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 5px; background: rgba(10, 10, 12, .8); opacity: 0; transition: opacity .15s;
}
.thumb-box.has:hover .thumb-tools, .thumb-box.has:focus-within .thumb-tools { opacity: 1; }
.thumb-tools button {
  border: none; border-radius: 3px; width: 20px; height: 20px;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.thumb-tools button svg { width: 11px; height: 11px; }
.thumb-tools button:hover { background: rgba(255, 255, 255, .3); }

/* tiêu đề */
.title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.title .star { color: var(--gold); flex: none; }
.title .star svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.title-text {
  font-size: 13.5px; font-weight: 500; letter-spacing: -.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.video.done .title-text { text-decoration: line-through; text-decoration-color: var(--dimmer); }

/* pipeline: 9 chấm chia 4 nhóm theo giai đoạn */
.pipe { display: flex; align-items: center; gap: 7px; }
.pipe-g { display: flex; gap: 3px; }
.pipe-g + .pipe-g { padding-left: 4px; border-left: 1px solid var(--line); margin-left: 1px; }
.dot {
  width: 12px; height: 12px; border-radius: 3px; flex: none;
  border: 1px solid var(--line-2); background: transparent; padding: 0;
  transition: background .15s, border-color .15s, transform .12s;
}
.dot:hover { border-color: var(--accent); transform: scale(1.18); }
.dot.on { background: var(--ok); border-color: var(--ok); }
/* task đang tới lượt — biết ngay việc kế tiếp mà không cần mở panel */
.dot.next { border-color: var(--accent); background: var(--accent-soft); }

.tcount {
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 11.5px; color: var(--dim); text-align: right;
}
.tcount.full { color: var(--ok); }

/* nút mở modal Nội dung / Short */
.content-btn, .shorts-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 24px; width: 100%; padding: 0 8px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--dim); font-size: 11px; font-weight: 500;
  transition: border-color .15s, color .15s, background .15s;
}
.content-btn svg, .shorts-btn svg { width: 11px; height: 11px; flex: none; }
.content-btn b, .shorts-btn b {
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 10.5px; font-weight: 500; color: var(--dim);
}
.content-btn:hover, .shorts-btn:hover { border-color: var(--accent); color: var(--txt); background: var(--surface-2); }
.content-btn.full, .shorts-btn.full { border-color: rgba(74, 222, 128, .3); background: var(--ok-soft); color: var(--ok); }
.content-btn.full b, .shorts-btn.full b { color: var(--ok); }

/* mũi tên mở rộng */
.caret {
  width: 22px; height: 22px; border: none; background: transparent;
  color: var(--dimmer); display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); transition: color .15s, background .15s, transform .18s;
}
.caret svg { width: 13px; height: 13px; }
.caret:hover { color: var(--txt); background: var(--surface-2); }
.video.open .caret { transform: rotate(180deg); color: var(--accent); }

/* ============ panel mở rộng ============ */
/* Chấm ở dòng để tick nhanh; panel này để đọc nhãn, copy prompt và sửa link. */
.vdetail {
  display: none;
  padding: 2px 20px 16px calc(20px + var(--c-check) + var(--c-day) + 24px);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.video.open .vdetail { display: block; }

.phase-grid { display: flex; gap: 22px; flex-wrap: wrap; }
.phase { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; }
.phase-label {
  font-size: 9.5px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dimmer);
  display: flex; align-items: center; gap: 6px;
}
.phase-label .pl-n { font-family: "Roboto Mono", monospace; }
.phase.full .phase-label { color: var(--ok); }
.phase.now .phase-label { color: var(--accent); }
.phase-tasks { display: flex; gap: 5px; flex-wrap: wrap; }

.task-wrap { display: inline-flex; }
.task {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--dim);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.task-wrap:has(.task-copy) .task { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.task-box {
  width: 13px; height: 13px; border-radius: 3px; flex: none;
  border: 1px solid var(--line-2); background: transparent;
  display: flex; align-items: center; justify-content: center; color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.task-box svg { width: 9px; height: 9px; }
.task:hover { color: var(--txt); border-color: var(--line-2); }
.task.done { color: var(--ok); border-color: rgba(74, 222, 128, .3); background: var(--ok-soft); }
.task.done .task-box { background: var(--ok); border-color: var(--ok); color: #0b1f12; }

.task-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: -1px;
  border: 1px solid var(--line); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--surface-2); color: var(--dimmer);
  transition: color .15s, border-color .15s, background .15s;
}
.task-copy svg { width: 11px; height: 11px; }
.task-copy:hover { color: var(--accent); border-color: var(--accent); }
.task.done + .task-copy { border-color: rgba(74, 222, 128, .3); background: var(--ok-soft); color: rgba(74, 222, 128, .75); }

/* hàng dưới của panel: link Drive + nút Start */
.dtools {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.drive-box { position: relative; width: 420px; max-width: 100%; }
.drive-box > svg {
  width: 12px; height: 12px; position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--dimmer); pointer-events: none;
}
.drive {
  width: 100%; height: 28px; padding: 0 10px 0 28px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--dim);
  font: inherit; font-size: 11.5px; text-overflow: ellipsis;
}
.drive::placeholder { color: var(--dimmer); }
.drive:hover { border-color: var(--line-2); }
.drive:focus { outline: none; border-color: var(--accent); color: var(--txt); background: var(--surface-2); }

.drive-open {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--dim);
  transition: color .15s, border-color .15s;
}
.drive-open svg { width: 12px; height: 12px; }
.drive-open:hover { color: var(--txt); border-color: var(--line-2); }

.start {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; margin-left: auto;
  border: 1px solid var(--accent); border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.start svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
.start:hover { background: var(--accent); color: #14100b; }

/* ============ modal (dùng chung Nội dung + Short) ============ */
body.drawer-open { overflow: hidden; }
#drawer, #shorts { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 8, 10, .7);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: absolute; inset: 0; margin: auto;
  width: min(1000px, 92vw); height: min(760px, 86vh);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  overflow: hidden;
  animation: drawer-in .16s cubic-bezier(.32, .72, .35, 1);
}
@keyframes drawer-in { from { transform: scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer-panel { animation: none; } }

.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--line);
  border-top: 2px solid var(--accent);
}
.drawer-head h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.drawer-sub { display: block; margin-top: 3px; font-size: 13px; color: var(--txt); }
.drawer-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--dim);
  transition: color .15s, border-color .15s;
}
.drawer-x:hover { color: var(--txt); border-color: var(--line-2); }
.drawer-x svg { width: 13px; height: 13px; }

#drawerText {
  flex: 1; resize: none;
  margin: 12px 18px; padding: 13px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg); color: var(--txt);
  font-family: "Roboto Mono", ui-monospace, Menlo, monospace;
  font-size: 12px; line-height: 1.7;
}
#drawerText:focus { outline: none; border-color: var(--line-2); }

.drawer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 18px 14px;
}
.drawer-count {
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 11px; color: var(--dimmer); white-space: nowrap;
}
.drawer-count.dirty { color: var(--accent); }
.drawer-actions { display: flex; gap: 6px; }
.dbtn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--dim);
  font-size: 12px; font-weight: 500;
  transition: color .15s, border-color .15s, background .15s;
}
.dbtn:hover { color: var(--txt); border-color: var(--line-2); }
.dbtn svg { width: 12px; height: 12px; }
.dbtn.primary { background: var(--accent); border-color: var(--accent); color: #14100b; font-weight: 600; }
.dbtn.primary:hover { background: #ff8c3a; }
.dbtn.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(242, 85, 90, .1); }
.dbtn:disabled { opacity: .55; cursor: default; }

/* tabs 3 loại nội dung trong modal */
.cm-tabs { display: flex; gap: 2px; padding: 9px 18px 0; border-bottom: 1px solid var(--line); }
.cm-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent; color: var(--dimmer);
  padding: 7px 13px 9px; font: inherit; font-size: 12px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.cm-tab:hover { color: var(--txt); }
.cm-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.cm-ok { display: inline-flex; color: var(--ok); }
.cm-ok svg { width: 11px; height: 11px; }

/* ---------- modal Short ---------- */
.shorts-panel { width: min(1200px, 92vw); height: min(860px, 88vh); }

.sh-group { display: flex; align-items: center; gap: 8px; padding: 13px 18px 0; }
.sh-group-box { position: relative; flex: 1; }
.sh-group-box > svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; color: var(--dimmer); pointer-events: none;
}
#shortsDrive {
  width: 100%; height: 32px; padding: 0 11px 0 29px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--dim);
  font: inherit; font-size: 12px; text-overflow: ellipsis;
}
#shortsDrive::placeholder { color: var(--dimmer); }
#shortsDrive:focus { outline: none; border-color: var(--accent); color: var(--txt); background: var(--surface-2); }

.sh-add {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 18px 13px; border-bottom: 1px solid var(--line);
}
#shortsInput {
  flex: 1; resize: vertical; min-height: 32px; max-height: 170px;
  padding: 7px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--txt);
  font: inherit; font-size: 12.5px; line-height: 1.5;
}
#shortsInput:focus { outline: none; border-color: var(--accent); }
#shortsInput::placeholder { color: var(--dimmer); }
.sh-add .dbtn { height: 32px; flex: none; }

.sh-list { flex: 1; overflow-y: auto; padding: 4px 18px 12px; }
.sh-empty { padding: 44px 0; text-align: center; color: var(--dimmer); font-size: 12.5px; }

.sh-head { display: flex; gap: 8px; padding: 2px 0 6px; border-bottom: 1px solid var(--line); }
.sh-head span {
  width: 20px; flex: none; text-align: center;
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--dimmer);
}

.sh-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.sh-row:last-child { border-bottom: none; }

.sh-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: none;
  border: 1px solid var(--line-2); border-radius: 4px;
  background: var(--surface-2); color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.sh-check svg { width: 12px; height: 12px; }
.sh-check.k-done:hover { border-color: var(--accent); }
.sh-check.k-posted:hover { border-color: var(--ok); }
.sh-row.done .k-done { background: var(--accent); border-color: var(--accent); color: #14100b; }
.sh-row.posted .k-posted { background: var(--ok); border-color: var(--ok); color: #0b1f12; }

.sh-num {
  width: 24px; flex: none; text-align: right;
  font-family: "Roboto Mono", monospace; font-variant-numeric: tabular-nums;
  font-size: 11px; color: var(--dimmer);
}

.sh-title {
  flex: 1; min-width: 0; padding: 6px 9px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--txt); font: inherit; font-size: 12.5px;
}
.sh-title:hover { border-color: var(--line); }
.sh-title:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.sh-row.posted .sh-title { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--dimmer); }

.sh-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--dimmer);
  transition: color .15s, border-color .15s, background .15s;
}
.sh-del svg { width: 12px; height: 12px; }
.sh-del:hover { color: var(--danger); border-color: var(--danger); background: rgba(242, 85, 90, .1); }

/* ============ toast ============ */
#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 14px);
  background: var(--surface-3); color: var(--txt);
  border: 1px solid var(--line-2); border-left: 2px solid var(--accent);
  border-radius: var(--r-sm); padding: 9px 16px;
  font-size: 12.5px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .18s, transform .18s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { border-left-color: var(--ok); }
#toast.err { border-left-color: var(--danger); }

/* ============ responsive ============ */
@media (max-width: 1280px) {
  :root { --c-thumb: 56px; --c-pipe: 130px; --c-btn: 66px; }
  .thead, .vrow { gap: 9px; padding: 0 12px; }
  .vdetail { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 900px) {
  /* màn hẹp: giấu thumbnail + pipeline khỏi dòng, vẫn xem được trong panel mở rộng */
  .thead, .vrow {
    grid-template-columns: var(--c-check) var(--c-day) minmax(0, 1fr) var(--c-btn) var(--c-caret);
  }
  .thead .th-thumb, .thead .th-pipe, .thead .th-count, .thead .th-content,
  .vrow .thumb-box, .vrow .pipe, .vrow .tcount, .vrow .content-btn { display: none; }
  .drawer-panel, .shorts-panel { width: 100vw; height: 100dvh; border-radius: 0; border: none; }
  .sh-add { flex-wrap: wrap; }
}
