.video-slot { grid-column: 10 / span 3; grid-row: 2; display: flex; flex-direction: column; align-self: end; }
.video-slot:has(#insightsPane:not([hidden])) { align-self: stretch; }
.video-tabs { display: flex; gap: 18px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.video-tabs button { padding: 12px 0 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 15px; line-height: 1.4; font-weight: 600; cursor: pointer; }
.video-tabs button[aria-selected="true"] { color: var(--cyan); border-bottom-color: var(--cyan); }
.video-pane { display: flex; flex: 0 0 auto; flex-direction: column; min-height: 0; }
.video-footer { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.video-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.video-description { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
.video-context strong { flex-shrink: 0; max-width: 72px; min-width: 2ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-status { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.video-status[data-state="playing"] { color: var(--green); }
.video-status[data-state="failed"] { color: var(--amber); }
.video-viewport { flex: none; width: 100%; min-width: 0; aspect-ratio: 16 / 9; container-type: size; }
.video-stage { position: relative; width: 100%; height: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #090d10; }
#videoMount, #videoMount video { position: absolute; width: 100%; height: 100%; inset: 0; }
#videoMount video { object-fit: cover; }
.ez-video-mount { width: 100%; height: 100%; }
.video-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; text-align: center; background: radial-gradient(ellipse at center, #172b2e, #0a1114); }
.video-placeholder svg { width: 42px; height: 42px; stroke: var(--cyan); fill: none; stroke-width: 1.4; opacity: .65; }
.video-placeholder strong { font-size: 12px; font-weight: 400; color: #afc0c3; line-height: 1.6; overflow-wrap: anywhere; }
.video-placeholder .small-button { padding: 5px 12px; }
.video-binding-label { min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.video-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.video-toolbar .text-button { padding: 0; font-size: 12px; }
.video-toolbar select { color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 3px; padding: 3px 5px; font-size: 12px; }
.video-slot .opportunity-panel { padding: 12px; flex: 1; min-height: 0; overflow: auto; }
.video-slot .opportunity-panel .panel-header h2 { display: none; }
.video-slot [hidden], .video-dialog [hidden], #videoStage [hidden] { display: none !important; }
.video-stage:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; background: #050708; border: none; }
.video-stage:fullscreen .video-placeholder strong { font-size: 18px; }
.video-dialog { width: min(580px, calc(100vw - 28px)); }
.video-config-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 4px; }
.video-config-title-row h2 { margin: 0; }
.video-config-title-row .small-button { color: var(--cyan); font-size: 12px; }
.video-dialog > .dialog-header, .video-guide-dialog > .dialog-header { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.video-guide-dialog { width: min(760px, calc(100vw - 28px)); }
.video-guide-dialog .dialog-header > div { min-width: 0; }
.video-guide-dialog h2 { line-height: 1.4; }
.video-guide-content { padding: 18px 20px 24px; font-size: 14px; line-height: 1.75; color: #c7cecb; overflow-wrap: anywhere; }
.video-guide-intro { padding: 12px 14px; background: #16272a; border-left: 3px solid var(--cyan); border-radius: 4px; }
.video-guide-section { margin-top: 22px; }
.video-guide-section h3 { margin-bottom: 10px; color: var(--text); font-size: 16px; line-height: 1.5; }
.video-guide-section h4 { margin: 0; color: var(--text); font-size: 14px; line-height: 1.6; }
.video-guide-section p + p { margin-top: 8px; }
.video-guide-section ul { margin: 0; padding-left: 20px; }
.video-guide-section ul li + li { margin-top: 8px; }
.video-guide-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.video-guide-steps > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.video-guide-steps h4 { margin-bottom: 5px; }
.video-guide-number { display: grid; place-items: center; align-self: start; height: 30px; background: #163331; color: var(--cyan); border-radius: 5px; font-size: 13px; font-weight: 700; }
.video-guide-problem { padding: 12px 0; border-bottom: 1px solid var(--line); }
.video-guide-problem h4 { margin-bottom: 5px; color: var(--amber); }
.video-guide-footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.video-guide-footer .small-button { min-height: 32px; font-size: 13px; text-decoration: none; }
.video-form { padding: 18px 20px; }
.video-platform { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.video-platform [data-connected="true"] { color: var(--green); }
.video-target { display: grid; gap: 5px; padding: 12px 14px; background: #16272a; border: 1px solid #2a474b; border-radius: 4px; margin-bottom: 18px; }
.video-target > span { color: var(--muted); font-size: 12px; }
.video-target strong { font-size: 15px; }
.video-target code { color: var(--cyan); font-size: 12px; }
.video-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; font-size: 13px; min-width: 0; }
.video-field input, .video-field select { box-sizing: border-box; width: 100%; height: 39px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: #0e1414; color: var(--text); font: inherit; }
.video-field input:focus, .video-field select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.video-field input::placeholder { color: #6b7a76; font-size: 12px; }
.video-field input:disabled, .video-field select:disabled { opacity: .6; }
.video-field small, .video-form-hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.video-device-actions { display: flex; align-items: center; gap: 16px; }
.video-device-actions .text-button { font-size: 12px; padding: 0; }
.video-form-hint { margin: 10px 0 17px; }
.video-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.video-form-message { background: var(--green-soft); color: var(--green); font-size: 12px; line-height: 1.7; padding: 10px 12px; border-radius: 4px; margin-bottom: 14px; overflow-wrap: anywhere; }
.video-form-message.error { color: var(--amber); background: var(--amber-soft); }
.video-form-footer { display: flex; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 14px; gap: 16px; }
.video-form-footer .video-danger { margin-right: auto; color: var(--red); font-size: 12px; }
.video-primary { color: #071a1b; background: var(--cyan); border-color: var(--cyan); font-weight: 600; }
.video-form button:disabled { opacity: .45; cursor: wait; }
@media (min-width: 1181px) {
  body { overflow: hidden; }
  .dashboard-shell { height: 100dvh; min-height: 0; }
  .content-grid { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .dashboard-column { display: grid; min-width: 0; min-height: 0; gap: 10px; }
  .operations-column { grid-template-rows: minmax(0, 1fr) minmax(0, 1.05fr); }
  .analysis-column { grid-template-rows: auto minmax(0, 1fr); }
  .monitoring-column { grid-template-rows: minmax(0, 1fr) auto; }
  .dashboard-column > .panel { grid-column: auto; grid-row: auto; }
  .trend-panel .panel-header { flex-direction: column; align-items: flex-start; gap: 5px; }
  .trend-panel .legend-row { flex-wrap: wrap; gap: 4px 10px; font-size: 12px; line-height: 1.4; }
}
@media (max-height: 820px) and (min-width: 1181px) {
  .work-panel .panel-header { flex-wrap: nowrap; gap: 8px; }
  .work-panel .panel-header > div:first-child { min-width: 0; flex: 1; }
  .work-panel .current-cycle { flex: 0 0 auto; padding: 5px 7px; }
  .work-panel .current-cycle-copy,
  .work-panel .current-cycle small { display: none; }
  .work-panel .legend-row { flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
  .composition-panel { gap: 8px; }
  .composition-list { gap: 6px; }
  .mini-trend-block svg { height: 30px; }
  .trend-panel { padding: 10px 12px 8px; }
  .trend-panel .panel-header p { display: none; }
  .trend-panel .panel-header h2 { font-size: 16px; }
  .trend-panel .panel-header { gap: 4px; }
  .trend-panel .trend-insight { padding-top: 5px; font-size: 12px; }
  .video-tabs button { padding-top: 8px; padding-bottom: 6px; }
  .video-footer { padding: 8px 10px; gap: 6px; }
  .video-toolbar .text-button { height: 28px; }
}
@container (max-height: 160px) {
  .video-placeholder { padding: 8px; gap: 6px; }
  .video-placeholder svg { display: none; }
}
@media (max-width: 1180px) {
  .dashboard-column { display: contents; }
  .top-actions { flex-wrap: wrap; }
  .video-slot { grid-column: auto; grid-row: auto; min-height: 0; }
}
@media (max-width: 720px) { .video-slot { grid-column: 1 / -1; } .video-form { padding: 14px; } .video-fields-row { grid-template-columns: 1fr; gap: 0; } }
