/* haus video — desktop-app shell chrome shared by every /video/ page */

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font: var(--font);
}

.vshell {
  height: 100vh;
  display: grid;
  grid-template-rows: 44px 1fr;
  overflow: hidden;
}
.vshell.with-timeline { grid-template-rows: 44px minmax(380px, 1fr) 226px; }

/* ---------- titlebar ---------- */
.titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  background: linear-gradient(#2b2c2e, #202123);
  border-bottom: 1px solid #393b3e;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--inset);
  padding: 4px 8px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand em { font-style: normal; color: var(--accent-edge); }
/* desktop-style menu-bar ribbon with drop-downs */
.menus { display: flex; gap: 2px; }
.menu { position: relative; }
.menus .menu > button, .menus a {
  background: transparent;
  color: #d9dde1;
  border: 1px solid transparent;
  padding: 6px 10px;
  font: inherit;
  text-decoration: none;
  cursor: default;
}
.menus .menu > button:hover, .menus a:hover { background: var(--panel-3); border-color: #45494f; }
.menu.open > button { background: var(--panel-3); border-color: #45494f; }
.menus a.active { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.menu-drop {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 230px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  padding: 5px;
  z-index: 60;
}
.menu.open .menu-drop { display: block; }
.menu-drop button, .menu-drop a {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  color: #dfe5ec;
  padding: 7px 9px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}
.menu-drop button:hover, .menu-drop a:hover { background: var(--accent); color: #fff; }
.menu-drop .kbd { margin-left: auto; color: var(--text-dim); font-family: var(--mono); font-size: 11px; }
.menu-drop button:hover .kbd { color: #cfe1ff; }
.menu-drop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu-drop .disabled { opacity: 0.4; pointer-events: none; }
.project-title { margin: 0 auto; font-weight: 700; white-space: nowrap; }
.project-title span { font-weight: 500; color: var(--text-soft); margin-left: 12px; }
.top-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- buttons / inputs ---------- */
button, .btn {
  background: var(--panel-3);
  color: #d9dde1;
  border: 1px solid #45494f;
  padding: 4px 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
}
button:hover, .btn:hover { background: #383c41; }
.btn-primary { background: var(--accent); border-color: var(--accent-edge); color: #fff; }
.btn-primary:hover { background: #3d89f2; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: #7d3445; color: #ff9eb1; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

label { display: block; color: var(--text-soft); font-size: 12px; margin-bottom: 3px; }
input, select, textarea, .selectish {
  width: 100%;
  background: var(--inset);
  border: 1px solid var(--line);
  color: #e4e8ed;
  padding: 6px 8px;
  font: inherit;
}
.selectish { color: #e4e8ed; }
.search { color: var(--text-dim); margin-bottom: 10px; }
.mock-input { background: var(--inset); border: 1px solid #3e444d; color: #dfe5ec; padding: 11px 12px; font-family: var(--mono); font-size: 12px; }

/* ---------- icons ---------- */
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; }
.ic-lg { width: 20px; height: 20px; }
.ic-xl { width: 24px; height: 24px; }

/* ---------- panels ---------- */
.panel { background: var(--panel); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.panel-head strong { font-size: 15px; }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 10px; }
.tabs button { background: var(--panel-3); border: 1px solid #444951; color: #cfd6de; padding: 5px 0; }
.tabs .active { background: #23406d; border-color: #3479df; }
.control-group { margin: 0 0 9px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 9px; }
.range { height: 8px; background: #151719; border: 1px solid #34383d; overflow: hidden; }
.range span { display: block; height: 100%; background: #8fa3c7; }

/* ---------- chips / badges ---------- */
.badge { background: var(--panel-3); border: 1px solid #444951; padding: 4px 10px; font-size: 12px; }
.timecode { font-family: var(--mono); color: #6db1ff; }
.pill { padding: 4px 9px; font-size: 11px; font-weight: 800; display: inline-block; border: 1px solid transparent; }
.pill.running { background: #173d2f; color: #6ff0b0; border-color: #265e47; }
.pill.queued { background: #363145; color: #d2b2ff; border-color: #4d4566; }
.pill.encoding { background: #163d4b; color: #66e3ff; border-color: #275c6e; }
.pill.complete { background: #1d354e; color: #83b7ff; border-color: #2d4f74; }
.pill.failed { background: #45222a; color: #ff9eb1; border-color: #7d3445; }
.pill.published { background: #3b3120; color: #e7c77f; border-color: #6e5a2a; }
.pill.draft { background: var(--panel-3); color: var(--text-soft); border-color: var(--line); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 44px 0 0;
  background: rgba(4, 5, 7, 0.58);
  backdrop-filter: blur(7px);
  z-index: 50;
  display: none;
  place-items: center;
  padding: 34px;
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(1120px, 94vw);
  max-height: 86vh;
  background: linear-gradient(#2b2e32, #1d1f22);
  border: 1px solid #555b64;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid #3c4148;
  background: linear-gradient(180deg, #30343a, #25282d);
}
.modal-head h1, .modal-head h3 { font-size: 16px; line-height: 1; margin: 2px 0 0; }
.eyebrow { display: block; color: #78b7ff; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; }
.modal-close { width: 28px; height: 28px; padding: 0; font-size: 16px; background: #1a1c20; border: 1px solid #464c55; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid #3c4148; background: #24272c; }

/* ---------- gallery pages (dashboard / templates / create) ---------- */
.page {
  overflow: auto;
  padding: 26px 30px;
}
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 6px 0 0; color: var(--text-soft); }
.section-title { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 800; margin: 26px 0 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.card:hover { border-color: var(--line-strong); }
.card.selected, .card.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47, 127, 240, 0.25); }
.card .thumb { position: relative; aspect-ratio: 16/9; background: var(--black); }
.card .thumb.tall { aspect-ratio: 9/16; max-height: 240px; margin: 0 auto; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .thumb .duration { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.18); font-family: var(--mono); font-size: 11px; padding: 2px 6px; }
.card .meta { padding: 10px 12px; }
.card .meta b { display: block; font-size: 13px; }
.card .meta span { display: block; color: var(--text-soft); font-size: 12px; margin-top: 4px; }
.card .card-play { width: 100%; margin-top: 9px; font-size: 12px; }
.card .card-play:hover { background: var(--accent-soft); border-color: var(--accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); color: #cfd6de; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.chip .count { color: var(--text-dim); margin-left: 6px; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.grid-empty { color: var(--text-soft); grid-column: 1 / -1; padding: 30px 0; text-align: center; }
.card .thumb img.fit-contain { object-fit: contain; }

/* templates gallery — live 9:16 previews (real reel stage scaled down) */
.tpl-preview { cursor: pointer; }
.tpl-stage { position: absolute; top: 0; left: 0; width: 1080px; height: 1920px; transform-origin: 0 0; overflow: hidden; }
.tpl-stage .reel-node { cursor: default; }
.tpl-stage .reel-node:hover, .tpl-stage .reel-node.is-selected { outline: none; }
.tpl-stage .sh, .tpl-stage .chroma-badge { display: none; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.tpl-tag { font-size: 11px; padding: 1px 7px; background: var(--panel-3); color: #b9c0c9; border: 1px solid var(--line); }
.tpl-tag.tax { background: #3a2a20; color: #f0a36a; border-color: #5a3c28; }
.tpl-chips { display: flex; gap: 5px; margin-top: 8px; min-height: 16px; }
.tpl-chip { width: 16px; height: 16px; border: 1px solid rgba(255, 255, 255, 0.3); }
.tpl-actions { display: flex; gap: 8px; margin-top: 10px; }
.tpl-actions .btn-primary { flex: 1; }
.tpl-empty { color: var(--text-soft); padding: 50px 0; text-align: center; grid-column: 1 / -1; }
.tpl-empty code { font-family: var(--mono); color: var(--text); }

/* ---------- context menu (VideoShell.contextMenu) ---------- */
.ctx-menu {
  position: fixed;
  z-index: 160;
  min-width: 170px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  padding: 5px;
}
.ctx-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  color: #dfe5ec;
  padding: 7px 9px;
  font-weight: 500;
  text-align: left;
}
.ctx-menu button:hover { background: var(--accent); color: #fff; }
.ctx-menu button.danger { color: #ff9eb1; }
.ctx-menu button.danger:hover { background: #7d3445; color: #fff; }

/* ---------- future-work marker ----------
   Controls that exist in the reskin with NO classic-UI counterpart yet.
   Yellow-green text flags them at a glance; each carries a data-stub toast
   explaining the plan. Remove the class when the feature gets wired. */
.future, .future button, .future label, .future span, .future b { color: #b6d94c !important; }
button.future, a.future { color: #b6d94c !important; }
.future .ic, button.future .ic { stroke: #b6d94c; }

.stub-note {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99;
  background: #3b3120;
  border: 1px solid var(--gold);
  color: #ecd9ac;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  pointer-events: none;
}
