/* Compact workspace shell. Existing functional components keep their selectors. */
:root {
  --surface: #ffffff;
  --raised: #f4f6f7;
  --line: #dce2e5;
  --muted: #657078;
  --text: #20272b;
  --accent: #14765b;
  background: #fafbfc;
  color: var(--text);
  color-scheme: light;
}
body { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: 216px; margin: 0;
  padding: 28px 16px 20px; background: #f0f3f4; border: 0; border-right: 1px solid var(--line);
}
.brand { justify-content: flex-start; padding: 0 8px; font-size: 22px; }
.brand svg { width: 23px; height: 23px; }
.workspace-label { text-align: left; padding: 8px 8px 24px; }
.sidebar nav { flex-direction: column; overflow: visible; gap: 5px; }
.sidebar .nav { min-height: 42px; border-radius: 5px; padding: 10px 12px; margin: 0; }
.nav.active { background: #deeee7; color: #12583f; box-shadow: inset 3px 0 #14765b; }
.sidebar .count { background: #d5e5de; padding: 1px 6px; border-radius: 4px; }
.header-status { position: static; order: 3; margin-top: auto; padding: 20px 8px 12px; border-bottom: 1px solid var(--line); }
.header-status small { padding-left: 13px; }
.sidebar-bottom { position: static; order: 4; padding: 16px 8px 0; flex-wrap: wrap; gap: 16px; }
main { width: 100%; max-width: 1600px; margin: 0 auto; }
.topbar { height: 60px; padding: 0 32px; background: #fff; }
.view { padding: 26px 32px; }
.section-head h1, h1 { font-size: 21px; }
.section-marker { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 400; }
.has-help { position: relative; padding-right: 28px; }
.field-help { position: absolute; right: 0; top: -2px; width: 24px; height: 24px; min-height: 24px; color: #77858d; }
.field-help svg { width: 14px; height: 14px; }
.has-help.checkbox { padding-right: 28px; }
#control-help { position: fixed; z-index: 10000; width: max-content; max-width: min(340px, calc(100vw - 16px)); padding: 11px 14px; border-radius: 5px; color: #fff; background: #26342f; box-shadow: 0 4px 18px #0002; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; pointer-events: none; }
.primary { background: #14765b; border-color: #14765b; }
.primary:hover { background: #0b6048; }
.secondary:hover, .icon:hover { background: #eaf0ee; }
.metric-strip { gap: 20px 32px; padding: 16px 0; }
.metric { display: grid; gap: 5px; }
.metric strong { font-size: 23px; color: var(--text); font-variant-numeric: tabular-nums; }
.metric.good strong { color: #14765b; }
.metric.warn strong { color: #916514; }
.metric.bad strong { color: #b43b43; }
.badge { background: #eef0f2; color: #57666e; }
.badge.good { background: #e4f2eb; color: #246848; }
.badge.warn { background: #fbf2d9; color: #8b6512; }
.badge.bad { background: #fbe9ea; color: #a32e40; }
.warning { color: #855b10; background: #fff8e8; border-color: #d4b56e; }
.danger { color: #b03444; border-color: #dfa4ad; }
.danger:hover { background: #fff0f2; }
#notice { color: #236348; background: #e9f6ed; border-color: #8ab899; }
#notice.error { color: #9d2635; background: #fff0f1; border-color: #d99fa9; }
.table-scroll { border-radius: 4px; background: #fff; }
th { font-size: 12px; font-weight: 500; background: #f1f4f5; }
tbody tr:hover { background: #f8faf9; }
td { padding: 13px 12px; }
.segmented .selected { background: #e1eee7; color: #175b42; }
.result-item > button, .reference-item img { background: #eef1f2; }
.result-item > .result-preview { display: grid; place-items: center; color: var(--muted); height: auto; aspect-ratio: 4/3; }
.result-preview > svg { width: 32px; height: 32px; }
.result-item footer .result-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 2px; }
.reference-description { min-width: 0; display: grid; gap: 6px; overflow-wrap: anywhere; }
.reference-description select { max-width: 100%; }
pre { background: #f1f4f5; }
.action-menu { position: relative; margin: 0; padding: 0; border: 0; }
.action-menu > summary { font-size: 12px; color: var(--muted); padding: 8px; cursor: pointer; }
.action-menu-items { position: absolute; right: 0; top: 100%; width: 244px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 5px 18px #0001; padding: 6px; }
.action-menu-items .icon { display: flex; width: 100%; min-height: 38px; justify-content: flex-start; gap: 10px; padding: 8px 10px; font-size: 12px; }
.mobile-action { display: none; }
@media (max-width: 1100px) {
body { grid-template-columns: 188px minmax(0, 1fr); }
.sidebar { width: 188px; padding-inline: 12px; }
.brand { font-size: 20px; }
.view { padding-inline: 24px; }
.topbar { padding-inline: 24px; }
}
.task-duration { min-width: 100px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
body { display: block; }
.sidebar { position: relative; height: auto; width: 100%; padding: 18px 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
.brand { width: fit-content; max-width: 100%; padding: 0; font-size: 21px; }
.workspace-label { display: none; }
.header-status { position: absolute; top: 16px; right: 16px; left: auto; margin: 0; padding: 0; border: 0; display: grid; gap: 0; }
.header-status small { font-size: 10px; padding-left: 13px; }
.sidebar nav { flex-direction: row; overflow-x: auto; margin-top: 20px; gap: 2px; padding-bottom: 8px; }
.sidebar .nav { padding: 8px 10px; font-size: 12px; min-height: 38px; }
.sidebar-bottom { display: none; }
.topbar { padding-inline: 16px; height: 44px; }
.mobile-action { display: inline-flex; }
.view { padding: 20px 16px; }
.section-head h1, h1 { font-size: 19px; }
#cleanup-fields { grid-template-columns: minmax(0, 1fr); }
.two-columns { grid-template-columns: minmax(0, 1fr); }
.metric-strip { gap: 16px; }
.metric strong { font-size: 21px; }
.section-head .actions { gap: 6px; }
.section-head .actions button { font-size: 12px; }
}

/* Account import and video delivery extend the inherited console surfaces. */
.import-form, #login-form { display: grid; gap: 16px; }
.import-form textarea { width: 100%; font-family: Consolas, monospace; }
#login-dialog { max-width: 420px; }
#login-form h2 { margin: 0; }
#login-form button { justify-self: start; }
#reference-help, #generation-price, #model-status { font-size: 12px; line-height: 1.65; }
#submission-status { font-size: 12px; overflow-wrap: anywhere; }
#detail-body video, #detail-body img { display: block; width: 100%; max-height: 65vh; object-fit: contain; margin-bottom: 12px; }
.result-item > video, .result-item > img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; background: #eef1f2; }
.reference-item > video, .reference-item > img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
#catalog-search { width: min(420px, 100%); }
#models-table td:first-child { max-width: 420px; overflow-wrap: anywhere; }
.generation-controls { align-content: start; }
.generation-controls > p { margin: 0; }
@media (max-width: 760px) { #logout { padding: 6px 10px; } }
