:root {
  --bg-main: #090e17;
  --bg-canvas: #090e17;
  --bg-header: #0d1524;
  --bg-sidebar: #0c1322;
  --bg-card: #111c2e;
  --bg-card-hover: #16243b;
  --bg-card-elevated: #182842;
  --bg-input: #152238;
  --bg-input-focus: #1a2b47;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(56, 189, 248, 0.45);
  --cyan: #38bdf8;
  --cyan-hover: #0ea5e9;
  --cyan-glow: rgba(56, 189, 248, 0.25);
  --text-white: #f8fafc;
  --text-light: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #22c55e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-white);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

/* Top Header Bar */
.topbar {
  height: 50px;
  background: rgba(13, 21, 36, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  flex-shrink: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  font-size: 19px;
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s ease;
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-logo-img {
  max-height: 32px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  display: block;
}

.brand-bold {
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-light {
  font-weight: 400;
  color: var(--cyan);
  opacity: 0.95;
}

/* Modern Minimalist Breadcrumbs */
.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  user-select: none;
  white-space: nowrap;
}

.breadcrumb-separator {
  color: #475569;
  font-size: 11px;
}

.breadcrumb-home {
  color: #94a3b8;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s ease;
}

.breadcrumb-home:hover {
  color: var(--cyan);
}

.breadcrumb-active {
  color: #f8fafc;
  font-weight: 600;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Auto-save Status Pill */
.auto-save-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.save-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
  transition: background 0.2s ease;
}

.auto-save-pill.saving .save-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: savePulse 1.2s infinite ease-in-out;
}

.auto-save-pill.saving .save-status-text {
  color: #fcd34d;
}

.auto-save-pill.saved .save-status-dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.auto-save-pill.saved .save-status-text {
  color: #86efac;
}

@keyframes savePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
}

.btn-shortcuts {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-shortcuts:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.admin-link {
  color: var(--text-muted);
  font-size: 11.5px;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s ease;
}

.admin-link:hover {
  color: #fff;
  border-color: var(--cyan);
}

/* ============================================================================
   VIEW 1: Customer Edits Dashboard (Screenshot 1)
   ============================================================================ */
.dashboard-view {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding-top: 60px;
}

.dashboard-container {
  width: 100%;
  max-width: 1020px;
  padding: 0 28px 64px;
}

.client-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 4px;
}

.client-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 26px;
  font-weight: 400;
}

.templates-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.template-catalog-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.22s ease;
  position: relative;
  z-index: 1;
}

.template-catalog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(56, 189, 248, 0.25);
  z-index: 10;
}

.template-catalog-thumb {
  width: 100%;
  height: 145px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.template-catalog-thumb img.tpl-thumb-img,
.template-catalog-thumb video.tpl-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  transform-origin: center center;
}

.template-catalog-thumb video.tpl-thumb-video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.template-catalog-thumb video.tpl-thumb-video.playing {
  opacity: 1;
}

.template-catalog-thumb img.tpl-thumb-img.playing {
  opacity: 0;
}

/* 30% Size Increase on Hover */
.template-catalog-card:hover .template-catalog-thumb img,
.template-catalog-card:hover .template-catalog-thumb video {
  transform: scale(1.30);
}

.template-catalog-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(13, 21, 36, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.template-catalog-body {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
}

.template-catalog-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.template-catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-catalog-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.template-catalog-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-catalog-card:hover .template-catalog-btn {
  background: var(--cyan);
  color: #090e17;
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.edits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.edit-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  height: 150px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--border-subtle);
}

.edit-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px -2px rgba(0, 0, 0, 0.5);
}

.new-edit-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.new-edit-card:hover {
  background: rgba(56, 189, 248, 0.04);
  border-color: rgba(56, 189, 248, 0.45);
}

.new-edit-plus {
  font-size: 42px;
  font-weight: 200;
  color: #94a3b8;
  line-height: 1;
  transition: all 0.2s ease;
}

.new-edit-card:hover .new-edit-plus {
  color: var(--cyan);
  transform: scale(1.1);
}

.edit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-light);
}

.card-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.card-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.card-menu-wrapper {
  position: relative;
}

.card-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #101827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  padding: 5px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-dropdown-menu.hidden {
  display: none !important;
}

.dropdown-item {
  background: transparent;
  border: none;
  padding: 7px 10px;
  text-align: left;
  font-size: 11.5px;
  color: #e2e8f0;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  transition: background 0.12s ease, color 0.12s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-item.text-danger {
  color: #f87171;
}

.dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.edit-card-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #ffffff;
  font-size: 13px;
  padding-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.edit-card:hover .edit-card-play {
  background: var(--cyan);
  color: #090e17;
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  transform: scale(1.08);
}

.edit-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.edit-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-card-status {
  font-size: 10px;
  color: var(--text-muted);
}

.edit-card-time {
  font-size: 9.5px;
  color: var(--text-dim);
}

.dashboard-footer {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.btn-cyan {
  background: var(--cyan);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 8px 28px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-cyan:hover {
  background: var(--cyan-hover);
}

.btn-sm {
  padding: 5px 14px;
  font-size: 11.5px;
}

.btn-full {
  width: 100%;
  padding: 9px 16px;
}

/* ============================================================================
   VIEW 2: Customer Editor View (Screenshot 3)
   ============================================================================ */
.editor-shell {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 50px);
  max-height: calc(100vh - 50px);
  min-height: 0;
  overflow: hidden;
  background: var(--bg-canvas);
}

/* Left Options Sidebar: Runs ALL THE WAY DOWN, strictly bounded with guaranteed scroll */
.options-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  z-index: 10;
}

.sidebar-top-header {
  padding: 12px 14px 10px;
  flex-shrink: 0;
  background: #0f1827;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.options-client-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AI Sidebar Tree Navigation (matches modern pro IDE sidebar) */
.ai-sidebar-tree-wrapper {
  background: #0d1522;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  max-height: 250px;
  display: flex;
  flex-direction: column;
}

.ai-tree-header {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0a101b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-tree-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.ai-tree-count {
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.ai-tree-list {
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
}

.ai-tree-list::-webkit-scrollbar {
  width: 5px;
}

.ai-tree-list::-webkit-scrollbar-thumb {
  background: #1e2c3f;
  border-radius: 999px;
}

.ai-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.ai-tree-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.ai-tree-item.active {
  background: #162338;
  color: #fff;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ai-tree-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.ai-tree-item-icon {
  font-size: 11px;
  flex-shrink: 0;
  opacity: 0.85;
}

.ai-tree-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ai-tree-item-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-tree-item.active .ai-tree-item-title {
  color: var(--cyan);
}

.ai-tree-item-sub {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.ai-tree-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ai-tree-item-price {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  background: #090e17;
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* AI Tag Inspector (Active Tag Editor — Guarantees 100% field access) */
.ai-tag-inspector {
  flex: 1 1 0px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0d1522;
  overflow: hidden;
}

.inspector-header {
  height: 40px;
  padding: 0 12px;
  background: #111a28;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.inspector-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.inspector-icon {
  font-size: 13px;
}

.inspector-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.inspector-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-stepper {
  display: flex;
  align-items: center;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 1px 3px;
  gap: 3px;
}

.btn-step-tag {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1;
  transition: all 0.15s ease;
}

.btn-step-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tag-counter {
  font-size: 9.5px;
  font-weight: 700;
  color: #cbd5e1;
  padding: 0 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.inspector-fields-scroll {
  flex: 1 1 0px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sidebar Panels */
.sidebar-panel {
  display: none;
  flex: 1 1 0px;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-panel.active {
  display: flex;
}



.options-client-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.options-subtitle {
  font-size: 11px;
  color: var(--text-light);
}

/* Quick Navigation Pills: 1-click jump to any Tag without long scrolling */
.options-quick-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 0 2px;
  scrollbar-width: none;
}

.options-quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav-pill {
  background: #182536;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.quick-nav-pill:hover {
  background: var(--cyan);
  color: #0f172a;
  border-color: var(--cyan);
}

.quick-nav-pill.active {
  background: rgba(98, 195, 208, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Options Scrollable Body: GUARANTEED to scroll independently */
.options-scroll {
  flex: 1 1 0px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
}

.options-scroll::-webkit-scrollbar {
  width: 6px;
}

.options-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.options-scroll::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 999px;
}

.options-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* ============================================================================
   Twirl Accordions for Parameter Groups (Pricetags, Controls, etc.)
   ============================================================================ */
.options-subtitle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.accordion-toggle-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-link-action {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link-action:hover {
  color: var(--cyan);
}

.option-accordion-group {
  background: #182536;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  margin-bottom: 0;
  overflow: hidden;
  scroll-margin-top: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.option-accordion-group.open {
  border-color: rgba(98, 195, 208, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.option-accordion-group.is-disabled {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.04);
}

.option-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #141f2d;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.option-accordion-header:hover {
  background: #1b2a3c;
  color: var(--cyan);
}

.option-accordion-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-accordion-arrow {
  display: inline-block;
  font-size: 8.5px;
  color: #94a3b8;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  transform: rotate(0deg);
  width: 10px;
  text-align: center;
}

.option-accordion-group.open .option-accordion-arrow {
  transform: rotate(90deg);
  color: var(--cyan);
}

.option-accordion-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.option-accordion-badge {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: #090e15;
  border: 1px solid rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.22);
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Hero Price Field inside Accordion Body */
.option-item.is-price-item {
  background: #0f1a26;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
}

.option-item.is-price-item .option-label {
  color: #38bdf8;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.option-price-hero-wrap {
  display: flex;
  align-items: center;
  background: #060b11;
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.option-price-hero-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.option-price-hero-currency {
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-right: 1px solid rgba(56, 189, 248, 0.3);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.option-price-hero-input {
  flex: 1;
  height: 36px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  padding: 0 10px;
  letter-spacing: 0.02em;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.option-accordion-body {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px;
  background: rgba(14, 23, 36, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.option-accordion-group.open .option-accordion-body {
  display: flex;
}

/* Shortcuts Button and Modal styles */
.btn-shortcuts {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-shortcuts:hover {
  background: rgba(98, 195, 208, 0.18);
  border-color: var(--cyan);
  color: #fff;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.key-badge {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 1-Click Use Template button on cards */
.use-template-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: all 0.18s ease;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  font-size: 10px;
  padding: 4px 8px;
  font-weight: 700;
}

.mogrt-card:hover .use-template-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.option-group-header {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  padding-top: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.option-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.option-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.option-item.option-item-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.option-label {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.option-input,
.option-select {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 11.5px;
  outline: none;
  width: 100%;
  height: 32px;
  transition: all 0.15s ease;
}

.option-input:focus,
.option-select:focus {
  border-color: var(--cyan);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.option-number {
  width: 80px;
}

/* Toggle Switch matching Screenshot 3 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #27384e;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--cyan);
  border-color: var(--cyan);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(14px);
  background-color: #090e17;
}

/* Left Sidebar Bottom Action Bar */
.options-bottom-bar {
  height: 48px;
  min-height: 48px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #0d1522;
  flex-shrink: 0;
  z-index: 5;
  padding: 4px;
  gap: 4px;
}

.bottom-action-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.bottom-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.bottom-action-btn.btn-highlight {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  font-weight: 700;
}

.bottom-action-btn.btn-highlight:hover {
  background: var(--cyan);
  color: #090e17;
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}

/* ============================================================================
   Render Progress HUD (Live After Effects progress, Frame counts, ETA, Duration)
   ============================================================================ */
.render-progress-hud {
  padding: 11px 13px 10px;
  background: linear-gradient(180deg, #0d1524 0%, #101a2d 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  animation: hudSlideUp 0.25s ease-out;
  position: relative;
  z-index: 6;
}

@keyframes hudSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.render-progress-hud.hidden {
  display: none !important;
}

.render-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.render-hud-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.render-hud-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: hudPulse 1.2s infinite ease-in-out;
}

@keyframes hudPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.render-progress-hud.complete .render-hud-pulse {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: none;
}

.render-hud-title {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.render-hud-pct {
  font-size: 12.5px;
  font-weight: 800;
  color: #38bdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.render-progress-hud.complete .render-hud-pct {
  color: #22c55e;
}

.render-hud-track {
  width: 100%;
  height: 6px;
  background: rgba(9, 14, 23, 0.95);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.render-hud-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 60%, #818cf8 100%);
  background-size: 200% 100%;
  animation: hudGlow 2.5s ease-in-out infinite alternate;
  border-radius: 999px;
  transition: width 0.25s ease-out;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

@keyframes hudGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.render-progress-hud.complete .render-hud-fill {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  animation: none;
}

.render-hud-details,
.render-hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.render-hud-frames {
  color: #94a3b8;
  font-weight: 600;
}

.render-hud-eta {
  color: #38bdf8;
  font-weight: 700;
}

.render-hud-elapsed {
  color: #64748b;
  font-size: 9.5px;
}

.render-hud-engine {
  color: #64748b;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Render Button States */
#renderVideoBtn.rendering {
  position: relative;
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  pointer-events: none;
  font-weight: 700;
}

#renderVideoBtn.render-complete {
  background: rgba(34, 197, 94, 0.18) !important;
  color: #4ade80 !important;
  border-color: #22c55e !important;
  font-weight: 700;
}

/* ============================================================================
   Center Cinematic Canvas Stage (Full Height & Full Remaining Width)
   ============================================================================ */
.canvas-main-stage {
  flex: 1 1 0px;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #111a26;
  overflow: hidden;
}

.canvas-stage-wrapper {
  flex: 1 1 0px;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px 14px;
  overflow: hidden;
}

.preview-card-cinema {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: #162232;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
}

/* Pop-out Fullscreen Theater Mode */
.preview-card-cinema.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Timeline Snapshots Bar (Multi-Moment AE Timeline Organization) */
.timeline-snapshots-bar {
  height: 38px;
  background: #111a26;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  flex-shrink: 0;
  overflow-x: auto;
}

.snapshots-bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.snapshots-camera-icon {
  font-size: 12px;
}

.snapshots-pills-container {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
}

.snapshots-pills-container::-webkit-scrollbar {
  display: none;
}

.snapshot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #182536;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.snapshot-pill:hover {
  background: #1f3045;
  color: #fff;
  border-color: rgba(98, 195, 208, 0.4);
}

.snapshot-pill.active {
  background: rgba(98, 195, 208, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 700;
}

.snapshot-pill-star {
  color: #fbbf24;
  font-size: 10px;
}

.snapshot-pill-time {
  font-size: 9.5px;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

.snapshot-pill.active .snapshot-pill-time {
  color: #fff;
  background: rgba(98, 195, 208, 0.35);
}

.snapshots-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-snapshot-action {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-snapshot-action:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(98, 195, 208, 0.08);
}

/* Floating Settings Drawer (inside Fullscreen Theater) */
.cinema-floating-drawer {
  position: absolute;
  top: 46px;
  bottom: 34px;
  left: 0;
  width: 380px;
  max-width: 90vw;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 14px 0 36px rgba(0, 0, 0, 0.65);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinema-floating-drawer.drawer-closed {
  transform: translateX(-105%);
  pointer-events: none;
}

.floating-drawer-header {
  height: 42px;
  padding: 0 14px;
  background: #16202c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.floating-drawer-body {
  flex: 1 1 0px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-cinema-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #101927;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.preview-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.preview-cinema-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

/* Mode toggle (Frame vs Video) */
.cinema-mode-toggle {
  display: flex;
  align-items: center;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  margin-left: 10px;
}

.cinema-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cinema-tab-btn:hover {
  color: #fff;
}

.cinema-tab-btn.active {
  background: var(--cyan);
  color: #090e17;
  font-weight: 700;
}

/* Rail Zoom / Scale Bar */
.rail-zoom-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.zoom-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 2px;
}

.zoom-btn {
  background: #131d2c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zoom-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.zoom-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 700;
}

.preview-cinema-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenshot-status-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--cyan);
}

/* Viewport for Ultra-Wide Shelf Rails & Studio Monitors */
.preview-cinema-viewport {
  flex: 1 1 0px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070b12;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.preview-cinema-viewport.has-rail {
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 28px 20px;
}

.preview-cinema-viewport::-webkit-scrollbar {
  height: 7px;
}

.preview-cinema-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}

.preview-cinema-viewport::-webkit-scrollbar-thumb {
  background: #1e2c3f;
  border-radius: 999px;
}

.preview-cinema-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* Shelf Rail & Studio Monitor Casing */
.shelf-mounting-casing {
  display: flex;
  flex-direction: column;
  background: #111a28;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6);
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
  flex-shrink: 0;
  margin: auto;
}

/* Mode 1: Ultra-Wide Shelf Rails (e.g. 3840x158, 2880x158, 1920x158) */
.shelf-mounting-casing.casing-rail {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.shelf-mounting-casing.casing-rail.zoom-150 {
  width: 150% !important;
  max-width: none !important;
}

.shelf-mounting-casing.casing-rail.zoom-200 {
  width: 200% !important;
  max-width: none !important;
}

/* Mode 2: Adaptive Studio Broadcast Monitor (1:1 Square, 16:9 Cinema, 9:16 Vertical) */
.shelf-mounting-casing.casing-monitor {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 270px);
  aspect-ratio: var(--comp-aspect, 1 / 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.preview-card-cinema.is-fullscreen .shelf-mounting-casing.casing-monitor {
  max-height: calc(100vh - 120px);
}

.shelf-bezel-top {
  height: 22px;
  background: linear-gradient(180deg, #182436 0%, #101a28 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  user-select: none;
  flex-shrink: 0;
}

.shelf-indicator-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.shelf-mounting-casing.casing-monitor .shelf-indicator-led {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.shelf-tag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.shelf-res-tag {
  font-size: 8.5px;
  font-weight: 600;
  color: var(--cyan);
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shelf-bezel-bottom {
  height: 10px;
  background: linear-gradient(180deg, #101a28 0%, #0a111a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  flex-shrink: 0;
}

.shelf-screen-track {
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.shelf-mounting-casing.casing-rail .shelf-screen-track {
  height: auto;
  aspect-ratio: var(--comp-aspect, 3840 / 158);
  min-height: 48px;
  flex: none;
}

.shelf-mounting-casing.casing-monitor .shelf-screen-track {
  height: 100%;
  flex: 1 1 0px;
  min-height: 0;
}

/* Screen Media Sizing: Dynamic for Rails vs Studio Monitors */
.shelf-mounting-casing.casing-rail .shelf-screen-media {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

.shelf-mounting-casing.casing-monitor .shelf-screen-media {
  width: 100% !important;
  height: 100% !important;
  max-height: calc(100vh - 300px);
  max-width: 100%;
  display: block;
  object-fit: contain;
  margin: auto;
  padding: 0;
}

.preview-card-cinema.is-fullscreen .shelf-mounting-casing.casing-monitor .shelf-screen-media {
  max-height: calc(100vh - 150px);
}

video.shelf-screen-media,
video#dashboardVideoPlayer {
  background: #000;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: -webkit-optimize-contrast;
}

.canvas-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  margin: auto;
}

.preview-cinema-footer {
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1522;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.cinema-meta-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.cinema-meta-hint {
  font-size: 10.5px;
  color: var(--text-dim);
}

/* ============================================================================
   MODALS: Modern Obsidian Dialogs with Frosted Glass
   ============================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.18s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: 360px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.modal-close-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.modal-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-input {
  width: 100%;
  background: #182436;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
  outline: none;
  transition: all 0.15s ease;
}

.modal-input:focus {
  border-color: var(--cyan);
  background: #1c2b40;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.video-player-modal-box {
  width: 90vw;
  max-width: 1120px;
  padding: 20px 22px 22px;
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-right: 28px;
}

.video-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.video-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-modal-body {
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.video-modal-body video {
  width: 100%;
  max-height: 70vh;
  border-radius: 6px;
  outline: none;
  object-fit: contain;
  background: #000;
}

/* ============================================================================
   AE 2026 Modern Essential Graphics Controls (Search, Reset, Sliders, Typography)
   ============================================================================ */
.ai-tree-search-wrap {
  padding: 6px 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-tree-search-input {
  width: 100%;
  background: #0d1520;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 11.5px;
  padding: 5px 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-tree-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(98, 195, 208, 0.18);
}

.ai-tree-item.has-modified .ai-tree-item-title::after {
  content: '•';
  color: var(--cyan);
  margin-left: 5px;
  font-weight: 900;
}

.btn-reset-group {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-group.is-dirty {
  color: var(--cyan);
  border-color: rgba(98, 195, 208, 0.4);
  background: rgba(98, 195, 208, 0.1);
}

.btn-reset-group:hover {
  background: rgba(98, 195, 208, 0.18);
  color: #fff;
}

.option-label-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.option-item-row .option-label-header {
  width: auto;
  flex: 1;
}

.option-label-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-reset-field {
  background: rgba(98, 195, 208, 0.12);
  border: 1px solid rgba(98, 195, 208, 0.3);
  color: var(--cyan);
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-field:hover {
  background: var(--cyan);
  color: #090d16;
}

.option-item.search-highlight {
  border-color: rgba(98, 195, 208, 0.5) !important;
  box-shadow: 0 0 0 1px rgba(98, 195, 208, 0.2);
}

.option-slider-combo {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.option-range-slider {
  flex: 1;
  accent-color: var(--cyan);
  height: 4px;
  cursor: pointer;
}

.option-number-compact {
  width: 72px !important;
  text-align: right;
  padding: 5px 6px !important;
  flex-shrink: 0;
}

.option-unit-suffix {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}

.option-point-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.option-point-axis {
  display: flex;
  align-items: center;
  background: #0d1520;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.option-point-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(98, 195, 208, 0.12);
  padding: 5px 7px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.option-point-input {
  border: none !important;
  background: transparent !important;
  padding: 5px 7px !important;
  width: 100%;
}

.option-font-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.option-font-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-font-pill:hover {
  border-color: rgba(98, 195, 208, 0.45);
  color: #e2e8f0;
  background: rgba(98, 195, 208, 0.1);
}

.option-font-drawer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.option-font-select {
  flex: 1;
  font-size: 11px !important;
  padding: 4px 6px !important;
}

.option-font-size-input {
  width: 64px !important;
  font-size: 11px !important;
  padding: 4px 6px !important;
  text-align: right;
}


