:root {
  color-scheme: light;
  --ink: #172033; --muted: #667085; --line: #d8dee9; --bg: #f4f6f9;
  --panel: #fff; --accent: #2457a7; --accent-dark: #183f7d;
  --good: #166534; --warn: #92400e; --bad: #b42318; --radius: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #80aaff; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.topbar { min-height: 64px; background: #172033; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; gap: 20px; }
.product { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.product small { display: block; color: #b9c4d6; font-weight: 400; font-size: .72rem; }
.identity { display: flex; gap: 10px; align-items: center; }
.role { font-size: .78rem; color: #d2d9e5; border: 1px solid #536176; padding: 2px 8px; border-radius: 99px; }
.shell { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.nav { padding: 24px 14px; border-right: 1px solid var(--line); background: #fff; }
.nav a { display: block; padding: 9px 12px; border-radius: 7px; color: #344054; text-decoration: none; font-weight: 550; }
.nav a:hover { background: #eef3fb; color: var(--accent-dark); }
main { width: 100%; max-width: 1600px; padding: 30px; }
.standalone { max-width: none; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .error-page { width: min(100%, 430px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: 0 10px 30px #10182812; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: .77rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
h1, h2 { line-height: 1.2; }
h1 { font-size: 1.8rem; margin: 0 0 18px; }
h2 { font-size: 1.15rem; margin: 0 0 18px; }
.muted, small { color: var(--muted); }
.page-head, .section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.page-head { margin-bottom: 22px; }
.section-head h2 { margin-bottom: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metrics article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: .82rem; }
.metrics strong { display: block; font-size: 1.65rem; margin: 4px 0; }
.status { display: inline-flex; align-items: center; border-radius: 99px; padding: 3px 9px; font-size: .78rem; font-weight: 700; background: #eef2f6; color: #344054; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.status.ok, .status.ready { background: #eaf7ee; color: var(--good); }
.status.missing, .status.failed { background: #fff1f0; color: var(--bad); }
.notice { padding: 12px 15px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; }
.notice.success { background: #edf8f0; color: var(--good); border-color: #b7dec2; }
.notice.error { background: #fff0ef; color: #8f1d16; border-color: #f2b8b5; }
.notice.warning { background: #fff8e7; color: var(--warn); border-color: #f1d291; }
.stack { display: grid; gap: 9px; }
.stack label, .form-row label, .form-grid label, .manager-toolbar label, .compact label { font-size: .83rem; font-weight: 650; color: #344054; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #aeb8c7; border-radius: 7px; padding: 9px 11px; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; padding: 0; accent-color: var(--accent); }
textarea { resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; width: max-content; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #fff; font: inherit; font-weight: 650; padding: 9px 14px; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--accent-dark); }
button.secondary, .button.secondary { background: #fff; color: var(--accent); border-color: #9eb2d4; }
button.danger, .button.danger { background: var(--bad); border-color: var(--bad); }
.link-danger { border: 0; background: transparent; color: var(--bad); padding: 6px 0; }
.form-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 160px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: end; }
.form-grid label { display: grid; gap: 5px; }
.filter-actions, .actions { display: flex; gap: 9px; align-items: center; }
.table-wrap { overflow-x: auto; padding: 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 15px; vertical-align: top; }
th { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
td small, .item-name small, .item-kind small, .item-measure small { display: block; margin-top: 3px; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .84em; word-break: break-all; }
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }
.details div { padding: 12px 14px; border-left: 2px solid #e4e9f1; }
.details dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.details dd { margin: 4px 0 0; }
.player video { width: 100%; max-height: 65vh; background: #0b0f18; border-radius: 7px; }
.danger-zone { border-color: #e7b7b3; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 20px; }
.compact { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; margin: 10px 0; }
.compact label { display: grid; gap: 4px; flex: 1; min-width: 160px; }
.user-card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.user-card details { margin-top: 12px; }
.user-list { display: grid; gap: 10px; }
.security-actions { padding-top: 12px; border-top: 1px solid var(--line); }
summary { cursor: pointer; color: var(--accent); }
.metadata { margin: 0; font-size: .8rem; }
.metadata div { display: flex; gap: 5px; }
.metadata dt::after { content: ":"; }
.metadata dd { margin: 0; word-break: break-word; }
.live-events { display: grid; gap: 10px; list-style: none; padding: 0; }
.live-events li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.live-events li:last-child { border-bottom: 0; }

/* Live operator console */
.nav a[aria-current="page"] { background: #e9f0fb; color: var(--accent-dark); box-shadow: inset 3px 0 var(--accent); }
.nav a.live-active { background: #eaf7ee; color: var(--good); box-shadow: inset 3px 0 var(--good); }
.nav a.live-active::after { content: " ●"; font-size: .7em; }
.live-console { --state: #64748b; --state-soft: #f1f5f9; }
.live-console[data-state="live"] { --state: #137044; --state-soft: #e8f7ef; }
.live-console[data-state="starting"], .live-console[data-state="degraded"],
.live-console[data-state="interrupted"], .live-console[data-state="finalizing"] { --state: #9a5b0b; --state-soft: #fff7e5; }
.live-console[data-state="error"] { --state: #b42318; --state-soft: #fff0ef; }
.live-console[data-stale="true"] { --state: #80510d; }
.live-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.live-head h1 { margin-bottom: 0; }
.live-head-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.live-update, .live-user { border: 1px solid var(--line); border-radius: 99px; background: #fff; padding: 5px 10px; font-size: .78rem; color: var(--muted); }
.live-update.stale { background: #fff7e5; border-color: #e8c77c; color: #80510d; font-weight: 700; }
.monitor-banner[hidden], .warnings-panel[hidden] { display: none; }
.live-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(340px, .85fr); gap: 18px; margin-bottom: 22px; }
.live-stage { min-height: 490px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 40px; border-radius: 14px; background: #111827; color: #fff; box-shadow: inset 0 0 0 1px #ffffff14; }
.live-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--state) 32%, transparent), transparent 42%); }
.live-stage > * { position: relative; z-index: 1; }
.live-state-mark { width: 64px; height: 64px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 18px; color: #fff; background: var(--state); font-size: 2rem; font-weight: 800; }
.live-kicker { margin: 22px 0 3px; text-transform: uppercase; letter-spacing: .1em; color: #b9c4d6; font-size: .72rem; font-weight: 700; }
.live-stage h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.8rem); letter-spacing: -.035em; }
.live-stage-copy { max-width: 720px; margin: 10px 0 22px; color: #d7deea; font-size: 1rem; }
.live-duration { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border: 1px solid #ffffff2b; background: #ffffff0d; border-radius: 9px; }
.live-duration span { color: #bac5d5; font-size: .76rem; }
.live-duration strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.preview-screen { width: 94px; aspect-ratio: 16 / 9; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #ffffff30; border-radius: 7px; background: #070b12; color: #94a3b8; }
.preview-screen span { font-size: .68rem; letter-spacing: .14em; }
.dvr-player { width: 100%; margin-top: 24px; padding-top: 24px; border-top: 1px solid #ffffff20; }
.dvr-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #ffffff30; border-radius: 10px; background: #05080d; }
.dvr-screen video { width: 100%; height: 100%; display: block; background: #05080d; object-fit: contain; }
.dvr-screen video[hidden] { display: none; }
.dvr-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px; color: #e5eaf2; }
.dvr-placeholder[hidden] { display: none; }
.dvr-placeholder p { margin: 3px 0 0; color: #aeb9ca; font-size: .8rem; }
.dvr-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; pointer-events: none; }
.dvr-badges span { padding: 4px 8px; border-radius: 99px; background: #05080dd9; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.dvr-badges .playback-mode.live { background: #146c43; }.dvr-badges .playback-mode.delayed { background: #8a520c; }
.dvr-controls { margin-top: 10px; }.dvr-controls[hidden] { display: none; }
.dvr-seek-buttons { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.dvr-seek-buttons button { min-height: 36px; border-color: #ffffff38; background: #ffffff10; color: #fff; }
.dvr-seek-buttons button:hover { background: #ffffff1f; }.dvr-seek-buttons .go-live { margin-left: auto; background: #f8fafc; color: #152033; }
.dvr-timeline-wrap { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 8px; align-items: center; margin-top: 9px; font-size: .75rem; font-variant-numeric: tabular-nums; }
.dvr-timeline-wrap label, .dvr-timeline-wrap input { width: 100%; }.dvr-timeline-wrap span:last-child { text-align: right; }
.dvr-range-track { position: relative; height: 4px; margin: 3px 64px 0; border-radius: 99px; background: #ffffff1f; overflow: hidden; }
.dvr-range-track span { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: #7ccfa4; }
.dvr-status { margin: 8px 0 0; color: #bdc8d8; font-size: .78rem; }.dvr-player > a { display: inline-flex; margin-top: 8px; }.dvr-player > a[hidden] { display: none; }
.media-presence { width: 100%; display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 14px; }
.presence, .codec-line { padding: 4px 9px; border-radius: 99px; background: #ffffff10; color: #ccd4e0; font-size: .78rem; }
.presence.present { color: #8ee2b3; }.presence.missing { color: #ffb4ae; }.presence.unknown { color: #ccd4e0; }
.broadcast-summary { margin: 0; padding: 24px; }
.broadcast-summary .section-head { align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.state-badge { display: inline-flex; gap: 6px; align-items: center; color: var(--state); background: var(--state-soft); border: 1px solid color-mix(in srgb, var(--state) 35%, white); border-radius: 99px; padding: 5px 9px; font-size: .76rem; font-weight: 750; }
.summary-list, .live-card dl { margin: 0; }
.summary-list > div { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.2fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf0f4; }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list dt, .live-card dt, .diagnostic-grid dt, .source-grid dt { color: var(--muted); font-size: .76rem; }
.summary-list dd, .live-card dd, .diagnostic-grid dd, .source-grid dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.pipeline-section { margin-bottom: 22px; }
.signal-pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.pipeline-step { min-width: 0; display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 7px; padding: 16px 12px; border-right: 1px solid var(--line); }
.pipeline-step:last-child { border-right: 0; }
.pipeline-marker { color: var(--state); font-weight: 800; }
.pipeline-step > div { min-width: 0; display: flex; flex-direction: column; }
.pipeline-step strong { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pipeline-step [data-pipeline-status] { margin-top: 3px; font-weight: 750; }
.pipeline-step small { margin-top: 4px; overflow-wrap: anywhere; line-height: 1.25; }
.pipeline-step.inactive { background: #f7f8fa; color: #7b8493; }
.pipeline-step.inactive .pipeline-marker { color: #8d96a5; }
.live-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.live-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 19px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
.card-status { border-radius: 99px; padding: 3px 8px; background: var(--state-soft); color: var(--state); font-size: .73rem; font-weight: 750; }
.live-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.live-card dl > div { min-width: 0; padding-top: 11px; }
.live-card dl > div.wide { grid-column: 1 / -1; }
.live-card dd { margin-top: 2px; font-weight: 650; }
.card-note { min-height: 45px; margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.warnings-panel { border: 2px solid #e3b75f; background: #fffdf7; }
.warning-count { min-width: 30px; text-align: center; padding: 3px 8px; border-radius: 99px; background: #8d5108; color: #fff; font-weight: 750; }
.warning-list { display: grid; gap: 9px; list-style: none; margin: 16px 0 0; padding: 0; }
.warning-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid #edce8f; border-radius: 8px; background: #fff; }
.warning-item.severity-error { border-color: #efb2ad; }
.warning-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #fff0cf; color: #8d5108; font-weight: 900; }
.severity-error .warning-symbol { background: #ffebe9; color: var(--bad); }
.warning-item p { margin: 2px 0; color: #4b5565; }
.warning-item small { display: block; }
.event-timeline { list-style: none; margin: 17px 0 0; padding: 0; }
.event-timeline li:not(.empty-event) { position: relative; display: grid; grid-template-columns: 18px 155px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.event-timeline li:last-child { border-bottom: 0; }
.event-marker { width: 10px; height: 10px; margin-top: 6px; border: 2px solid #fff; border-radius: 50%; background: #667085; box-shadow: 0 0 0 2px #cbd2dc; }
.event-timeline .severity-warning .event-marker { background: #9a5b0b; box-shadow: 0 0 0 2px #ebcd91; }
.event-timeline .severity-error .event-marker { background: var(--bad); box-shadow: 0 0 0 2px #f1b9b5; }
.event-timeline time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.event-timeline div { display: flex; flex-direction: column; }
.empty-event { text-align: center; color: var(--muted); padding: 30px 0; }
.diagnostics summary { font-size: 1.05rem; font-weight: 750; }
.diagnostic-grid, .source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 14px 0; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.diagnostic-grid > div, .source-grid > div { min-width: 0; padding: 10px; background: #fff; }
.diagnostic-grid dd, .source-grid dd { margin-top: 3px; text-align: left; }
.diagnostics h3 { margin: 20px 0 0; font-size: .95rem; }

@media (prefers-reduced-motion: no-preference) {
  .live-console[data-state="live"] .live-state-mark { animation: live-pulse 2.4s ease-in-out infinite; }
  @keyframes live-pulse { 50% { box-shadow: 0 0 0 8px #36a86d22; } }
}

.breadcrumbs { margin: -8px 0 18px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li { display: flex; min-width: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: #98a2b3; margin-left: 5px; }
.breadcrumbs a, .breadcrumbs span { overflow-wrap: anywhere; }
.manager-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.folder-pane { position: sticky; top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; max-height: calc(100vh - 36px); overflow: auto; }
.folder-drawer > summary { font-weight: 750; color: var(--ink); margin-bottom: 10px; }
.folder-tree, .folder-tree ul { list-style: none; margin: 0; padding-left: 18px; }
.folder-tree { padding-left: 0; }
.tree-node, .tree-root { min-height: 34px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 3px; align-items: center; padding: 3px 5px; border-radius: 6px; text-decoration: none; }
.tree-root { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 3px; }
.tree-node.current, .tree-root.current { background: #e9f0fb; box-shadow: inset 3px 0 var(--accent); }
.tree-node a { color: #344054; text-decoration: none; overflow-wrap: anywhere; }
.tree-toggle { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.tree-toggle[aria-expanded="true"] span[aria-hidden="true"] { transform: rotate(90deg); }
.tree-spacer { width: 24px; }
.tree-count { min-width: 24px; padding: 1px 6px; border-radius: 99px; background: #eef2f6; color: var(--muted); font-size: .72rem; text-align: center; }
.sidebar-action { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.sidebar-action > summary { font-weight: 650; }
.sidebar-action form { margin-top: 10px; }
.workspace-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.workspace-head h1 { margin-bottom: 6px; }
.workspace-head p:last-child { margin: 0; }
.storage-strip { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.storage-strip div { padding: 9px 12px; }
.storage-strip dt { color: var(--muted); font-size: .72rem; }
.storage-strip dd { margin: 0; font-weight: 700; }
.manager-toolbar { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)); gap: 10px; padding: 15px; align-items: end; }
.manager-toolbar > div, .manager-toolbar > details { display: grid; gap: 4px; }
.more-filters { grid-column: 1 / -2; }
.more-filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 8px; }
.more-filter-grid label { display: grid; gap: 4px; }
.workspace-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 2px 10px; }
.workspace-controls p { margin: 0; font-size: .82rem; }
.view-switch { display: flex; gap: 4px; }
.view-switch button { padding: 6px 10px; }
.view-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #eef3fb; border: 1px solid #c4d3ea; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.bulk-bar label { display: flex; align-items: center; gap: 7px; font-size: .84rem; }
.bulk-bar label[for="bulk-folder"] { margin-left: auto; }
.bulk-bar select { width: auto; min-width: 190px; }
.manager-items { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: visible; background: var(--line); }
.manager-header, .manager-item { display: grid; grid-template-columns: 34px minmax(220px, 2fr) minmax(130px, 1fr) minmax(150px, 1fr) minmax(110px, .7fr) minmax(180px, 1fr); gap: 10px; align-items: center; }
.manager-header { padding: 8px 12px; color: var(--muted); background: #f8fafc; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.manager-item { min-height: 68px; padding: 10px 12px; background: var(--panel); }
.manager-item:focus-within { position: relative; box-shadow: inset 3px 0 var(--accent); }
.item-name { min-width: 0; display: flex; align-items: center; gap: 10px; }
.item-name > div { min-width: 0; }
.item-name a { font-weight: 700; overflow-wrap: anywhere; }
.file-symbol { width: 30px; height: 30px; display: grid; place-items: center; background: #eaf0f8; color: var(--accent); border-radius: 7px; flex: 0 0 auto; }
.folder-item .file-symbol { background: #fff2cc; color: #7a5900; }
.item-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; }
.action-menu { position: relative; }
.action-menu > summary { white-space: nowrap; }
.menu-panel { position: absolute; z-index: 5; right: 0; width: min(340px, 85vw); padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 30px #1018282a; }
.view-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; border: 0; background: transparent; }
.view-grid .manager-header { display: none; }
.view-grid .manager-item { grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "select name" "kind kind" "date measure" "actions actions"; align-content: start; gap: 10px; min-height: 210px; border: 1px solid var(--line); border-radius: var(--radius); }
.view-grid .item-select { grid-area: select; }
.view-grid .item-name { grid-area: name; }
.view-grid .item-kind { grid-area: kind; }
.view-grid time { grid-area: date; }
.view-grid .item-measure { grid-area: measure; text-align: right; }
.view-grid .item-actions { grid-area: actions; border-top: 1px solid var(--line); padding-top: 10px; }
.view-grid .file-symbol { width: 42px; height: 42px; }

@media (max-width: 1180px) {
  .live-workspace { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); }
  .live-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-step:nth-child(3) { border-right: 0; }.pipeline-step:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .manager-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .manager-toolbar { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .search-control { grid-column: span 2; }
  .more-filters { grid-column: 1 / -1; }
  .manager-header, .manager-item { grid-template-columns: 32px minmax(180px, 2fr) minmax(120px, 1fr) minmax(135px, 1fr) minmax(100px, .7fr); }
  .manager-header span:last-child, .manager-item .item-actions { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
  .live-workspace { grid-template-columns: 1fr; }
  .live-stage { min-height: 430px; }
  .diagnostic-grid, .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .details, .form-grid { grid-template-columns: repeat(2, 1fr); }
  .manager-layout { display: block; }
  .folder-pane { position: static; max-height: none; margin-bottom: 14px; }
  .folder-drawer:not([open]) nav, .folder-drawer:not([open]) + .sidebar-action { display: none; }
  .workspace-head { display: block; }
  .storage-strip { margin-top: 12px; }
}
@media (max-width: 680px) {
  .live-head { display: block; }.live-head-meta { justify-content: flex-start; margin-top: 10px; }
  .live-workspace { display: block; }.live-stage { min-height: 0; padding: 25px 20px; margin-bottom: 14px; }
  .live-stage h2 { font-size: 2.35rem; }.preview-screen { width: 74px; }
  .dvr-seek-buttons button { flex: 1 1 30%; }.dvr-seek-buttons .go-live { margin-left: 0; flex-basis: 100%; }
  .dvr-timeline-wrap { grid-template-columns: 45px minmax(0, 1fr) 45px; }.dvr-range-track { margin-inline: 53px; }
  .signal-pipeline, .live-cards { grid-template-columns: 1fr; }
  .pipeline-step, .pipeline-step:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--line); }
  .pipeline-step:last-child { border-bottom: 0; }
  .event-timeline li:not(.empty-event) { grid-template-columns: 16px minmax(0, 1fr); }
  .event-timeline time { grid-column: 2; grid-row: 1; }.event-timeline div { grid-column: 2; }
  .diagnostic-grid, .source-grid { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .shell { display: block; }
  .nav { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; display: flex; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  main { padding: 18px 12px; }
  .metrics, .details, .form-grid, .manager-toolbar, .more-filter-grid, .storage-strip { grid-template-columns: 1fr; }
  .search-control { grid-column: auto; }
  .workspace-controls { align-items: flex-start; }
  .manager-header { display: none; }
  .view-list .manager-item { grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "select name" "kind kind" "date measure" "actions actions"; gap: 8px; }
  .view-list .item-select { grid-area: select; }
  .view-list .item-name { grid-area: name; }
  .view-list .item-kind { grid-area: kind; }
  .view-list time { grid-area: date; font-size: .82rem; }
  .view-list .item-measure { grid-area: measure; text-align: right; }
  .view-list .item-actions { grid-area: actions; grid-column: auto; border-top: 1px solid var(--line); padding-top: 8px; }
  .bulk-bar label[for="bulk-folder"] { margin-left: 0; }
  .bulk-bar select { width: 100%; }
  .identity .role { display: none; }
}
