:root {
  --ink: #102029;
  --muted: #65747d;
  --line: #dfe5e5;
  --soft-line: #ecf0ef;
  --paper: #ffffff;
  --canvas: #f3f6f4;
  --nav: #0b1720;
  --nav-soft: #142832;
  --blue: #2f6fed;
  --blue-dark: #1f55c8;
  --mint: #33d0aa;
  --lime: #d8f25e;
  --amber: #f0ad3d;
  --red: #e15c5c;
  --green: #1eaa79;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 12px 40px rgba(21, 42, 50, .08);
  --font: "DM Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 4px; }
.brand b { font-size: 18px; letter-spacing: -.45px; }
.brand em { color: #8da0a9; font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.brand.dark { color: var(--ink); }
.brand.dark em { color: var(--muted); }
.brand-mark { position: relative; display: grid; width: 32px; height: 32px; grid-template-columns: 1fr 1fr; gap: 3px; padding: 7px; overflow: hidden; border-radius: 10px; background: var(--blue); transform: rotate(-4deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.brand-mark i { display: block; border-radius: 3px; background: white; opacity: .96; }
.brand-mark i:last-child { margin-top: 7px; background: var(--lime); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 254px; flex-direction: column; padding: 28px 18px 16px; background: var(--nav); color: #d8e0e4; }
.sidebar > .brand { padding: 0 11px 24px; }
.workspace-switcher { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; margin: 4px 1px 25px; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.045); }
.workspace-logo { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #17302a; background: var(--lime); font-size: 12px; font-weight: 800; }
.workspace-switcher small, .workspace-switcher b { display: block; }
.workspace-switcher small { margin-bottom: 2px; color: #71858f; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.workspace-switcher b { overflow: hidden; color: white; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: #75909c; }
.main-nav { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow-y: auto; }
.nav-label { margin: 18px 12px 7px; color: #536a74; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.main-nav a { position: relative; display: flex; min-height: 44px; align-items: center; gap: 12px; margin: 2px 0; padding: 0 12px; border-radius: 11px; color: #9fb0b8; font-weight: 500; transition: .18s ease; }
.main-nav a:hover { color: white; background: rgba(255,255,255,.05); }
.main-nav a.active { color: white; background: var(--nav-soft); box-shadow: inset 3px 0 0 var(--lime); }
.main-nav a [data-icon] { display: grid; width: 19px; height: 19px; place-items: center; }
.main-nav svg, .button svg, .icon-button svg, .metric-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { margin-left: auto; padding: 2px 7px; border-radius: 99px; color: #392422; background: #ffc4b6; font-size: 10px; font-style: normal; font-weight: 700; }
.live-pin { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(51,208,170,.12); }
.sidebar-footer { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.system-health { display: flex; align-items: center; gap: 10px; padding: 8px 11px 14px; }
.system-health b, .system-health small { display: block; }
.system-health b { color: #dbe5e8; font-size: 11px; }
.system-health small { margin-top: 2px; color: #607781; font-size: 9px; }
.pulse { display: inline-block; width: 8px; height: 8px; border: 2px solid rgba(51,208,170,.3); border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(51,208,170,.11); }
.pulse.warn { border-color: rgba(240,173,61,.35); background: var(--amber); box-shadow: 0 0 0 4px rgba(240,173,61,.12); }
.pulse.off { border-color: rgba(225,92,92,.3); background: var(--red); box-shadow: 0 0 0 4px rgba(225,92,92,.1); }
.user-card { display: grid; width: 100%; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 9px; border: 0; border-radius: 11px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.user-card:hover { background: rgba(255,255,255,.045); }
.user-card b, .user-card small { display: block; }
.user-card b { color: white; font-size: 11px; }
.user-card small { margin-top: 1px; color: #617782; font-size: 9px; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #183036; background: #a6dddc; font-size: 10px; font-weight: 800; }

.workspace { min-height: 100vh; margin-left: 254px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; }
.breadcrumb span { color: #94a0a5; font-size: 12px; }
.breadcrumb span::after { content: "/"; margin-left: 10px; color: #c3ccce; }
.breadcrumb b { font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.connection-pill { display: flex; align-items: center; gap: 9px; margin-right: 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: #fff; font-size: 11px; }
.icon-button { position: relative; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.icon-button:hover { border-color: #c6d1d2; background: #f8faf9; }
.icon-button i { position: absolute; top: 8px; right: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 5px 16px rgba(47,111,237,.18); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { border-color: var(--line); background: #fff; }
.button.secondary:hover { border-color: #c7d1d2; }
.button.dark { color: white; background: var(--ink); }
.button.danger { color: #b84444; border-color: #f0cdcd; background: #fff7f7; }
.button.small { min-height: 31px; padding: 0 10px; border-radius: 8px; font-size: 10px; }
.button.large { width: 100%; min-height: 49px; justify-content: space-between; padding: 0 18px; font-size: 13px; }

.view-root { padding: 30px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0 0 7px; font-size: 27px; line-height: 1.1; letter-spacing: -.8px; }
.page-head p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { display: block; margin-bottom: 9px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: var(--lime); }
.grid { display: grid; gap: 18px; }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr); }
.grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 2px 12px rgba(21,42,50,.025); }
.card.padded { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h2 { margin: 0; font-size: 15px; letter-spacing: -.2px; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.card-head .link-button { margin-left: auto; }
.link-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.metric-card { position: relative; min-height: 139px; padding: 20px; overflow: hidden; }
.metric-card::after { position: absolute; right: -24px; bottom: -37px; width: 96px; height: 96px; border-radius: 50%; background: var(--metric-wash, #eef4ff); content: ""; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metric-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--metric-color, var(--blue)); background: var(--metric-wash, #eef4ff); }
.metric-number { display: flex; align-items: baseline; gap: 9px; margin-top: 14px; }
.metric-number strong { font-size: 28px; line-height: 1; letter-spacing: -1px; }
.metric-number small { color: var(--muted); font-size: 10px; }
.trend { display: inline-flex; align-items: center; margin-top: 9px; color: var(--green); font-size: 10px; font-weight: 700; }
.trend.warn { color: var(--amber); }
.trend.neutral { color: var(--muted); }

.preview-frame { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; border-radius: 15px; color: #f9f5ec; background: #13272a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.preview-frame::before { position: absolute; inset: 0; background: radial-gradient(circle at 93% 0, rgba(216,242,94,.15), transparent 32%), linear-gradient(120deg, rgba(255,255,255,.03), transparent 40%); content: ""; }
.preview-menu { position: relative; z-index: 1; display: grid; height: 100%; grid-template-columns: .85fr 1fr 1fr; gap: 2px; padding: 18px; }
.preview-feature { display: flex; flex-direction: column; justify-content: space-between; padding: 14px; border-radius: 12px; color: #1c2929; background: var(--lime); }
.preview-feature small { font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.preview-feature strong { max-width: 80%; font-size: clamp(12px, 1.3vw, 22px); line-height: 1.05; letter-spacing: -.6px; }
.preview-feature span { font-size: 7px; }
.preview-column { padding: 5px 12px; border-left: 1px solid rgba(255,255,255,.1); }
.preview-column h4 { margin: 2px 0 10px; color: var(--lime); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.mini-product { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.12); font-size: 7px; }
.mini-product b { font-size: 7px; font-weight: 600; }
.mini-product small { grid-column: 1 / 2; overflow: hidden; color: #8ba0a1; font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
.mini-product.sold b { color: #728485; text-decoration: line-through; }
.mini-product.sold em { color: #ff9d90; font-size: 5px; font-style: normal; font-weight: 700; }
.preview-status { position: absolute; right: 12px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 99px; color: #cfe0df; background: rgba(3,11,12,.72); font-size: 6px; }
.preview-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

.fleet-list, .activity-list, .quick-list { display: flex; flex-direction: column; }
.fleet-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--soft-line); }
.fleet-row:last-child { border: 0; padding-bottom: 0; }
.device-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: var(--blue); background: #edf3ff; }
.device-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fleet-row b, .fleet-row small { display: block; }
.fleet-row b { font-size: 11px; }
.fleet-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.status-chip::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-chip.online, .status-chip.available, .status-chip.delivered { color: #13795c; background: #e4f7ef; }
.status-chip.offline, .status-chip.unavailable, .status-chip.failed { color: #bd4d4d; background: #fff0ee; }
.status-chip.pending { color: #9b6b13; background: #fff7df; }
.status-chip.draft { color: #5c6e78; background: #eef2f3; }
.activity-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--soft-line); }
.activity-row:last-child { border: 0; }
.activity-dot { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--blue); background: #edf3ff; font-size: 10px; font-weight: 800; }
.activity-row p { margin: 0; font-size: 10px; line-height: 1.45; }
.activity-row p b { font-weight: 700; }
.activity-row small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.quick-list { gap: 8px; }
.quick-action { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--soft-line); border-radius: 11px; background: #fbfcfc; cursor: pointer; }
.quick-action:hover { border-color: #cdd7d8; background: #fff; }
.quick-action span:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--blue); background: #eef3ff; }
.quick-action b, .quick-action small { display: block; }
.quick-action b { font-size: 10px; }
.quick-action small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.search-box { position: relative; display: flex; min-width: 240px; flex: 1; align-items: center; }
.search-box svg { position: absolute; left: 12px; width: 16px; height: 16px; fill: none; stroke: #849198; stroke-width: 1.8; }
.search-box input, .control { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--ink); }
.search-box input { padding: 0 14px 0 38px; }
.search-box input:focus, .control:focus, .field-label input:focus, .field-label select:focus, .field-label textarea:focus { border-color: #86aaf2; box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.select-wrap { position: relative; min-width: 155px; }
.select-wrap select { min-height: 40px; padding: 0 35px 0 12px; appearance: none; }
.select-wrap::after { position: absolute; top: 12px; right: 12px; color: var(--muted); content: "⌄"; pointer-events: none; }
.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 44px; padding: 0 15px; border-bottom: 1px solid var(--line); color: #849098; background: #f8faf9; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { height: 62px; padding: 9px 15px; border-bottom: 1px solid var(--soft-line); font-size: 11px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfc; }
.product-cell { display: flex; align-items: center; gap: 11px; }
.product-thumb { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #244149; background: linear-gradient(145deg, #d7f3e9, #b7ddd8); font-size: 16px; }
.product-cell b, .product-cell small { display: block; }
.product-cell b { font-size: 11px; }
.product-cell small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.category-pill { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: #51656d; background: #eef2f2; font-size: 9px; font-weight: 700; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.toggle { position: relative; width: 39px; height: 22px; border: 0; border-radius: 99px; background: #cbd4d5; cursor: pointer; transition: .18s; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); content: ""; transition: .18s; }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(17px); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.mini-icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.mini-icon-button:hover { border-color: #bfcacc; }
.mini-icon-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.pagination { display: flex; gap: 4px; }
.pagination button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; }
.pagination button.active { color: white; border-color: var(--blue); background: var(--blue); }
.empty-state { display: grid; min-height: 260px; place-items: center; padding: 30px; text-align: center; }
.empty-state-icon { display: grid; width: 62px; height: 62px; margin: auto; place-items: center; border-radius: 18px; color: var(--blue); background: #edf3ff; }
.empty-state h3 { margin: 14px 0 5px; font-size: 15px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 10px; }

.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.board-card { padding: 12px; cursor: pointer; transition: .18s ease; }
.board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.board-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #13272a; }
.board-thumb .preview-menu { padding: 9px; }
.board-thumb .preview-feature { padding: 7px; border-radius: 7px; }
.board-thumb .preview-column { padding: 2px 6px; }
.board-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 3px 3px; }
.board-meta b, .board-meta small { display: block; }
.board-meta b { font-size: 12px; }
.board-meta small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.board-editor { display: grid; grid-template-columns: minmax(0, 1.45fr) 330px; gap: 18px; }
.editor-canvas { padding: 16px; }
.editor-canvas .preview-frame { aspect-ratio: 16 / 9; }
.inspector { padding: 20px; }
.inspector-section { padding: 15px 0; border-bottom: 1px solid var(--soft-line); }
.inspector-section:first-child { padding-top: 0; }
.inspector-section:last-child { border: 0; }
.inspector-section h3 { margin: 0 0 11px; font-size: 11px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 32px; height: 32px; border: 3px solid #fff; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.active { box-shadow: 0 0 0 2px var(--blue); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input { flex: 1; }

/* Menu design studio */
.modal.studio-modal { width: min(1480px, calc(100vw - 34px)); height: min(900px, calc(100vh - 34px)); max-height: none; display: flex; overflow: hidden; flex-direction: column; }
.studio-modal .modal-head { flex: 0 0 auto; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.studio-modal .modal-body { min-height: 0; flex: 1; overflow: auto; padding: 0; background: #f4f6f5; }
.studio-modal .modal-actions { position: relative; z-index: 2; flex: 0 0 auto; background: #fff; box-shadow: 0 -8px 22px rgba(16,32,41,.04); }
.studio-shell { display: grid; min-height: 100%; grid-template-columns: minmax(620px, 1.35fr) minmax(390px, .75fr); }
.studio-main { min-width: 0; padding: 22px; border-right: 1px solid var(--line); }
.studio-side { min-width: 0; padding: 22px; }
.studio-board-fields { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(100px, .55fr)); gap: 10px; margin-bottom: 16px; }
.studio-board-fields input, .studio-board-fields select { min-height: 38px; }
.studio-preview-wrap { padding: 12px; border: 1px solid #d5dddd; border-radius: 16px; color: var(--muted); background: #fff; font-size: 9px; }
.studio-preview-wrap > span { display: block; padding: 9px 3px 0; }
.studio-canvas { display: grid; aspect-ratio: 16 / 8.5; grid-template-columns: repeat(var(--grid-columns, 48), 1fr); grid-template-rows: repeat(var(--grid-rows, 27), 1fr); gap: 2px; padding: 10px; overflow: hidden; border-radius: 11px; background: #13272a; }
.studio-canvas-block { position: relative; display: flex; min-width: 0; min-height: 0; grid-column: calc(var(--bx) + 1) / span var(--bw); grid-row: calc(var(--by) + 1) / span var(--bh); flex-direction: column; justify-content: flex-end; padding: 7px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--block-color) 75%, white); border-radius: 8px; color: white; background: rgba(255,255,255,.07); }
.studio-canvas-block::after { position: absolute; inset: auto 0 0; height: 60%; background: linear-gradient(transparent, rgba(0,0,0,.65)); content: ""; }
.studio-canvas-block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-canvas-block small, .studio-canvas-block b { position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-canvas-block small { color: var(--block-color); font-size: 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.studio-canvas-block b { font-size: clamp(7px, .9vw, 13px); }
.studio-empty-preview { display: grid; grid-column: 1 / -1; grid-row: 1 / -1; place-items: center; color: #8ca0a2; font-size: 11px; }
.studio-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.studio-section-head h3, .studio-panel h3 { margin: 0; font-size: 13px; }
.studio-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.studio-block-list { display: flex; flex-direction: column; gap: 10px; }
.studio-block { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.studio-block > header { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--soft-line); background: #f9fbfa; }
.studio-block > header b { font-size: 10px; }
.block-grip { color: #a5b0b2; letter-spacing: -2px; }
.block-actions { display: flex; gap: 4px; margin-left: auto; }
.block-actions button, .catalog-row-actions > button:not(.toggle) { min-width: 27px; min-height: 27px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 9px; cursor: pointer; }
.block-actions button:disabled, .catalog-row-actions button:disabled { opacity: .35; cursor: default; }
.block-form { display: grid; grid-template-columns: repeat(6, minmax(58px, 1fr)); gap: 9px; padding: 11px; }
.block-form .span-2 { grid-column: span 2; }
.block-form .span-4 { grid-column: span 4; }
.block-form .span-6 { grid-column: 1 / -1; }
.block-form .field-label:first-child { grid-column: span 2; }
.block-form input, .block-form select, .block-form textarea { min-height: 34px; margin-top: 4px; padding: 0 8px; border-radius: 8px; font-size: 10px; }
.block-form textarea { padding: 8px; line-height: 1.45; }
.block-json { margin-top: 2px; border-top: 1px solid var(--soft-line); }
.block-json summary { padding: 9px 2px 0; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.block-json > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-top: 8px; }
.block-json textarea { min-height: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.field-label.compact, .check-field.compact { font-size: 8px; }
.check-field { display: flex; min-height: 42px; align-items: center; gap: 8px; padding-top: 17px; color: #506068; font-size: 10px; font-weight: 700; }
.check-field input { width: 15px; height: 15px; margin: 0; }
.upload-button { display: flex; min-height: 34px; align-self: end; align-items: center; justify-content: center; border: 1px dashed #b9c7c8; border-radius: 8px; color: var(--blue); background: #f6f9ff; font-size: 9px; font-weight: 700; cursor: pointer; }
.upload-button input { display: none; }
.studio-empty { padding: 30px; border: 1px dashed #cbd5d5; border-radius: 13px; color: var(--muted); text-align: center; background: rgba(255,255,255,.5); }
.studio-empty b, .studio-empty span { display: block; }
.studio-empty b { margin-bottom: 5px; color: var(--ink); font-size: 12px; }
.studio-empty span { font-size: 9px; }
.studio-panel { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.studio-panel > h3 { margin-bottom: 13px; }
.studio-panel > h3.subhead { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--soft-line); }
.compact-grid { gap: 10px; }
.compact-grid input, .compact-grid select { min-height: 36px; }
.theme-fields { display: flex; gap: 8px; margin-top: 12px; }
.theme-fields label { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 9px; border: 1px solid var(--soft-line); border-radius: 8px; color: var(--muted); font-size: 8px; }
.theme-fields input { width: 26px; height: 24px; padding: 0; border: 0; background: transparent; }
.catalog-panel .studio-section-head { margin-top: 0; }
.catalog-toolbar { display: flex; gap: 6px; margin-bottom: 10px; }
.catalog-panel details, .modal-body > details { border-top: 1px solid var(--soft-line); }
.catalog-panel summary, .modal-body > details summary { padding: 11px 0; font-size: 9px; font-weight: 800; cursor: pointer; }
.catalog-list { display: flex; max-height: 210px; overflow: auto; flex-direction: column; gap: 5px; padding-bottom: 8px; }
.catalog-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--soft-line); border-radius: 9px; background: #fbfcfc; }
.catalog-row > span:first-child { min-width: 0; }
.catalog-row b, .catalog-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-row b { font-size: 9px; }
.catalog-row small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.catalog-row-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; }
.mini-toggle { width: 31px; height: 18px; }
.mini-toggle::after { top: 3px; left: 3px; width: 12px; height: 12px; }
.mini-toggle.on::after { transform: translateX(13px); }
.soldout-button { min-height: 27px; padding: 0 9px; border: 1px solid #bfe3d5; border-radius: 7px; color: #13795c; background: #eefaf5; font-size: 9px; font-weight: 700; cursor: pointer; }
.soldout-button.sold { color: #b84444; border-color: #f0cdcd !important; background: #fff3f3 !important; }
.danger-icon { color: #b84444 !important; }
.muted-copy { margin: 8px; color: var(--muted); font-size: 9px; }
.contract-note { margin: 0; padding: 4px 4px 20px; color: #74858b; font-size: 8px; line-height: 1.55; }
.contract-note code { color: #4d6370; }
.studio-validation-errors { margin: 0 0 14px; padding: 12px 15px; border: 1px solid #edbdbd; border-radius: 11px; color: #8e2e2e; background: #fff3f3; font-size: 9px; line-height: 1.5; }
.studio-validation-errors b { display: block; margin-bottom: 5px; }
.studio-validation-errors ol { margin: 0; padding-left: 18px; }

.device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.device-card { padding: 18px; }
.device-card-head { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; }
.device-card-head .device-icon { width: 42px; height: 42px; }
.device-card h3 { margin: 0; font-size: 12px; }
.device-card h3 + small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.device-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.device-stat { padding: 10px; border-radius: 9px; background: #f5f8f7; }
.device-stat small, .device-stat b { display: block; }
.device-stat small { color: var(--muted); font-size: 8px; }
.device-stat b { margin-top: 4px; font-size: 10px; }
.device-actions { display: flex; gap: 6px; }
.device-actions .button { flex: 1; }

.integration-card { padding: 20px; }
.integration-head { display: flex; align-items: center; gap: 12px; }
.integration-logo { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: white; background: var(--ink); font-weight: 800; }
.integration-logo.toast { color: #e93c2f; background: #fff0ee; }
.integration-logo.api { color: var(--blue); background: #edf3ff; }
.integration-logo.webhook { color: #148567; background: #e8f7f2; }
.integration-head h3 { margin: 0; font-size: 13px; }
.integration-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.integration-status { margin-left: auto; }
.code-box { margin-top: 15px; padding: 13px; overflow-x: auto; border: 1px solid #d9e1e1; border-radius: 10px; color: #3d5965; background: #f5f8f7; font: 10px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.stat-band > div { padding: 18px 20px; border-right: 1px solid var(--line); }
.stat-band > div:last-child { border: 0; }
.stat-band small, .stat-band b { display: block; }
.stat-band small { color: var(--muted); font-size: 9px; }
.stat-band b { margin-top: 6px; font-size: 17px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(7,20,27,.55); backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.24); }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 0; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.modal-close { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.modal-body { padding: 22px 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field-label { display: block; color: #506068; font-size: 10px; font-weight: 700; }
.field-label input, .field-label select, .field-label textarea { display: block; width: 100%; min-height: 42px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: white; color: var(--ink); font-size: 12px; }
.field-label textarea { min-height: 84px; padding-top: 10px; resize: vertical; }
.form-error { min-height: 18px; color: var(--red); font-size: 10px; }
.pairing-claim-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 10px; border: 1px solid #dce6f8; border-radius: 12px; background: #f5f8ff; }
.pairing-claim-guide span { display: flex; min-width: 0; align-items: center; gap: 7px; color: #4c5e6d; font-size: 9px; line-height: 1.35; }
.pairing-claim-guide i { display: grid; width: 21px; height: 21px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 8px; font-style: normal; font-weight: 800; }
.field-label .pairing-code-input { min-height: 64px; padding-right: 18px; padding-left: 18px; border-color: #b7caee; background: #f9fbff; font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: .34em; text-align: center; text-indent: .34em; }
.field-label .pairing-code-input::placeholder { color: #bec9d7; font-weight: 600; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; }
.field-hint.full { margin-top: -8px; }
.field-hint.warning { color: #946411; }
.field-hint.error { color: var(--red); }
.pairing-claim-form[aria-busy="true"] { opacity: .72; }
.pairing-result { text-align: center; }
.pairing-result-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 11px; place-items: center; border-radius: 50%; color: #fff; background: var(--green); box-shadow: 0 8px 22px rgba(30,170,121,.2); font-size: 24px; font-weight: 800; }
.pairing-result h3 { margin: 0; font-size: 18px; }
.pairing-result > p { margin: 6px auto 16px; max-width: 390px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pairing-result dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.pairing-result dl > div { min-width: 0; padding: 11px 13px; border-right: 1px solid var(--soft-line); border-bottom: 1px solid var(--soft-line); }
.pairing-result dl > div:nth-child(2n) { border-right: 0; }
.pairing-result dl > div:nth-last-child(-n+2) { border-bottom: 0; }
.pairing-result dt { margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.pairing-result dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 700; }
.pairing-assignment { display: grid; gap: 4px; margin-top: 13px; padding: 12px 14px; border: 1px solid; border-radius: 12px; text-align: left; }
.pairing-assignment.ready { border-color: #bae7d5; color: #176e55; background: #effaf6; }
.pairing-assignment.warning { border-color: #f0d9a8; color: #815b13; background: #fff9e9; }
.pairing-assignment b { font-size: 10px; }
.pairing-assignment span { font-size: 10px; font-weight: 700; }
.pairing-assignment small { opacity: .82; font-size: 9px; line-height: 1.5; }
.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 150; display: flex; width: 330px; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); animation: toast-in .24s ease-out; }
.toast i { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #11795c; background: #e6f7ef; font-style: normal; font-weight: 800; }
.toast b, .toast small { display: block; }
.toast b { font-size: 11px; }
.toast small { margin-top: 2px; color: var(--muted); font-size: 9px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.skeleton { position: relative; overflow: hidden; border-radius: 8px; background: #e9eeed; }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); content: ""; transform: translateX(-100%); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.login-screen { display: grid; min-height: 100vh; grid-template-columns: 1.25fr .75fr; background: #fff; }
.login-visual { position: relative; min-height: 620px; overflow: hidden; background: var(--nav); }
.login-grid { position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 62px 62px; mask-image: linear-gradient(to right, black, transparent 94%); }
.display-mockup { position: absolute; top: 13%; left: 9%; width: 78%; aspect-ratio: 16/8.2; padding: 18px; border: 2px solid rgba(255,255,255,.14); border-radius: 22px; background: #183137; box-shadow: 0 50px 90px rgba(0,0,0,.34); transform: perspective(900px) rotateY(7deg) rotateX(2deg); }
.display-mockup::after { position: absolute; top: 100%; left: 48%; width: 4%; height: 70px; background: linear-gradient(#52646a, #22343a); content: ""; }
.mockup-top { display: flex; justify-content: space-between; padding: 10px 7px 19px; }
.mockup-top span { width: 18%; height: 6px; border-radius: 8px; background: rgba(255,255,255,.14); }
.mockup-top span:last-child { width: 7%; background: var(--lime); }
.mockup-columns { display: grid; height: calc(100% - 36px); grid-template-columns: .75fr 1fr 1fr; gap: 9px; }
.mockup-columns i { display: block; border-radius: 12px; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.12) 0 7px, transparent 7px 23px); }
.mockup-columns i:first-child { background: radial-gradient(circle at 50% 30%, #f8ffb7, transparent 18%), var(--lime); }
.login-copy { position: absolute; right: 10%; bottom: 8%; left: 10%; color: white; }
.login-copy h2 { margin: 0 0 15px; font-size: clamp(30px, 3.1vw, 54px); line-height: 1.06; letter-spacing: -2px; }
.login-copy p { max-width: 530px; margin: 0; color: #92a7ad; font-size: 13px; line-height: 1.7; }
.login-panel { display: grid; place-items: center; padding: 50px; }
.login-form { width: min(360px, 100%); }
.login-heading { margin: 64px 0 30px; }
.login-heading h1 { margin: 0; font-size: 30px; letter-spacing: -1px; }
.login-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.login-form .field-label { margin-bottom: 15px; }
.login-form .field-label input { min-height: 47px; }
.identity-login-button { width: 100%; justify-content: space-between; margin-bottom: 18px; text-decoration: none; }
.login-separator { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: #87959b; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.login-separator::before, .login-separator::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.login-hint { margin: 17px 0 0; color: #87959b; font-size: 9px; line-height: 1.55; text-align: center; }
.mobile-only { display: none; }

@media (max-width: 1100px) {
  .grid.metrics { grid-template-columns: repeat(2, 1fr); }
  .grid.two, .board-editor { grid-template-columns: 1fr; }
  .board-grid, .device-grid { grid-template-columns: repeat(2, 1fr); }
  .login-screen { grid-template-columns: 1fr 440px; }
  .studio-shell { grid-template-columns: 1fr; }
  .studio-main { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .view-root { padding: 24px 18px 50px; }
  .mobile-only { display: grid; }
  .breadcrumb, .connection-pill, .topbar-actions .button.secondary { display: none; }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 32px; }
}
@media (max-width: 620px) {
  .grid.metrics, .grid.equal, .board-grid, .device-grid, .form-grid { grid-template-columns: 1fr; }
  .grid.metrics { gap: 11px; }
  .metric-card { min-height: 124px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-actions, .toolbar { width: 100%; flex-wrap: wrap; }
  .search-box { min-width: 100%; }
  .select-wrap { flex: 1; }
  .table-card { overflow-x: auto; }
  .data-table { min-width: 760px; }
  .stat-band { grid-template-columns: 1fr 1fr; }
  .stat-band > div:nth-child(2) { border-right: 0; }
  .stat-band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-grid .full { grid-column: auto; }
  .modal.studio-modal { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .studio-board-fields { grid-template-columns: 1fr 1fr; }
  .studio-board-fields .field-label:first-child { grid-column: 1 / -1; }
  .block-form { grid-template-columns: repeat(2, 1fr); }
  .block-form .span-2, .block-form .field-label:first-child { grid-column: 1 / -1; }
  .catalog-row { align-items: flex-start; flex-direction: column; }
  .catalog-row-actions { width: 100%; flex-wrap: wrap; }
}

/* Reference-parity application frame ------------------------------------- */
:root {
  --topbar-h: 52px;
  --sidebar-w: 184px;
  --reference-nav: #17202c;
  --reference-nav-soft: #263648;
  --reference-top: #101821;
  --reference-blue: #2f78d5;
}

:focus-visible { outline: 3px solid rgba(47,120,213,.34); outline-offset: 2px; }
.app-shell { min-height: 100vh; background: #f1f3f6; }
.global-topbar {
  position: fixed; inset: 0 0 auto; z-index: 80; display: flex; height: var(--topbar-h);
  align-items: center; justify-content: space-between; padding: 0 14px 0 10px;
  color: #d9e2eb; background: var(--reference-top); box-shadow: 0 1px 8px rgba(5,12,19,.28);
}
.global-brand-wrap, .global-actions { display: flex; min-width: 0; align-items: center; gap: 13px; }
.brand.compact { gap: 8px; }
.brand.compact .brand-mark { width: 27px; height: 27px; padding: 6px; border-radius: 7px; }
.brand.compact b { font-size: 15px; }
.brand.compact em { color: #7f91a1; font-size: 8px; }
.topbar-divider { width: 1px; height: 22px; background: rgba(255,255,255,.12); }
.enterprise-name { max-width: 250px; overflow: hidden; color: #aebdca; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-organization-link { padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; cursor: pointer; text-align: left; }
.topbar-organization-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.current-date { color: #9cadba; font-size: 11px; white-space: nowrap; }
.global-topbar .connection-pill { margin: 0; padding: 5px 9px; border-color: rgba(255,255,255,.12); color: #9fb0bd; background: rgba(255,255,255,.035); font-size: 9px; }
.topbar-icon, .topbar-text-button, .account-button {
  border: 0; color: inherit; background: transparent; cursor: pointer;
}
.topbar-icon { position: relative; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 5px; }
.topbar-icon:hover, .topbar-text-button:hover, .account-button:hover { color: #fff; background: rgba(255,255,255,.07); }
.topbar-text-button { display: flex; min-height: 32px; align-items: center; gap: 6px; padding: 0 9px; border-radius: 5px; font-size: 10px; }
.topbar-text-button svg, .topbar-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.notification-button i { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1px solid var(--reference-top); border-radius: 50%; background: #ef5c62; }
.account-button { display: grid; min-width: 156px; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 3px 7px; border-radius: 6px; text-align: left; }
.account-button .avatar { width: 27px; height: 27px; border-radius: 6px; font-size: 8px; }
.account-button b, .account-button small { display: block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button b { color: #eef4f8; font-size: 10px; }
.account-button small { margin-top: 1px; color: #718493; font-size: 8px; text-transform: capitalize; }
.account-popover { position: fixed; top: 47px; right: 12px; z-index: 120; width: 228px; padding: 6px; border: 1px solid #dce2e7; border-radius: 7px; background: #fff; box-shadow: 0 16px 45px rgba(10,25,38,.2); }
.account-popover-head { padding: 9px 11px 10px; border-bottom: 1px solid #edf0f2; }
.account-popover-head strong, .account-popover-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover-head strong { color: #20313d; font-size: 11px; }
.account-popover-head small { margin-top: 3px; color: #81909a; font-size: 8px; }
.account-popover-separator { height: 1px; margin: 4px 5px; background: #edf0f2; }
.account-popover button { display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: space-between; padding: 0 11px; border: 0; border-radius: 5px; color: #40505d; background: transparent; font-size: 11px; text-align: left; cursor: pointer; }
.account-popover button:hover { color: var(--reference-blue); background: #eff5fc; }
.account-popover em { min-width: 19px; padding: 2px 5px; border-radius: 9px; color: white; background: #e65a62; font-size: 8px; font-style: normal; text-align: center; }

.app-frame { min-height: 100vh; padding-top: var(--topbar-h); }
.sidebar {
  inset: var(--topbar-h) auto 0 0; z-index: 50; width: var(--sidebar-w); padding: 9px 0 12px;
  color: #aab9c6; background: var(--reference-nav); transition: width .2s ease, transform .2s ease;
}
.product-switcher { position: relative; padding: 5px 9px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.product-switcher-current { display: grid; width: 100%; min-height: 47px; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 7px 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; color: inherit; background: rgba(255,255,255,.035); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.product-switcher-current { list-style: none; }
.product-switcher-current::-webkit-details-marker { display: none; }
.product-switcher-current:hover, .product-switcher.open .product-switcher-current { border-color: rgba(100,159,234,.46); background: rgba(255,255,255,.07); }
.product-switcher-mark, .product-switcher-option-mark { display: grid; flex: 0 0 auto; place-items: center; border-radius: 6px; color: #fff; background: var(--reference-blue); font-weight: 800; }
.product-switcher-mark { width: 31px; height: 31px; font-size: 10px; }
.product-switcher-current-copy { min-width: 0; }
.product-switcher-current-copy b, .product-switcher-current-copy small, .product-switcher-product b, .product-switcher-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-switcher-current-copy b { color: #f4f8fb; font-size: 10px; font-weight: 650; }
.product-switcher-current-copy small { margin-top: 2px; color: #718493; font-size: 8px; font-weight: 600; }
.product-switcher-chevron { color: #718493; font-size: 12px; transition: transform .16s ease; }
.product-switcher.open .product-switcher-chevron { transform: rotate(180deg); }
.product-switcher-links { display: grid; gap: 3px; margin-top: 5px; padding: 4px; border: 1px solid rgba(255,255,255,.09); border-radius: 7px; background: #111c27; box-shadow: 0 13px 30px rgba(0,0,0,.24); }
.product-switcher-links a, .product-switcher-links .disabled { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 5px; color: #aab9c6; font-size: 9px; text-decoration: none; }
.product-switcher-links a:hover { color: #fff; background: rgba(255,255,255,.07); }
.product-switcher-links a.active { color: #fff; background: rgba(65,134,230,.18); }
.product-switcher-links .disabled { opacity: .55; cursor: not-allowed; }
.product-switcher-option-mark { width: 27px; height: 27px; font-size: 8px; }
.product-switcher-product { min-width: 0; flex: 1; }
.product-switcher-product b { color: #dfe7ed; font-size: 9px; font-weight: 650; }
.product-switcher-product small { margin-top: 2px; color: #718493; font-size: 7px; }
.product-switcher-check { color: #69a8f5; font-size: 10px; }
.product-switcher-arrow { color: #617586; font-size: 9px; }
.main-nav { padding-top: 2px; }
.main-nav a { min-height: 50px; gap: 11px; margin: 0; padding: 0 18px; border-radius: 0; color: #a9b5c1; font-size: 11px; }
.main-nav a b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.main-nav a:hover { background: rgba(255,255,255,.045); }
.main-nav a.active { color: #fff; background: var(--reference-blue); box-shadow: none; }
.main-nav a [data-icon] { flex: 0 0 18px; }
.sidebar-footer { margin-top: auto; padding: 11px 14px 0; border-color: rgba(255,255,255,.08); }
.sidebar-footer .system-health { padding: 0 0 10px; }
.sidebar-footer > small { display: block; margin-top: 3px; color: #546777; font-size: 7px; line-height: 1.4; }
.workspace { min-height: calc(100vh - var(--topbar-h)); margin-left: var(--sidebar-w); transition: margin-left .2s ease; }
.secondary-nav { position: sticky; top: var(--topbar-h); z-index: 32; display: flex; min-height: 47px; align-items: stretch; gap: 2px; padding: 0 20px; overflow-x: auto; border-bottom: 1px solid #d9dee3; background: #fff; }
.secondary-nav a { position: relative; display: flex; flex: 0 0 auto; align-items: center; padding: 0 14px; color: #64727d; font-size: 11px; white-space: nowrap; }
.secondary-nav a:hover { color: var(--reference-blue); }
.secondary-nav a.active { color: var(--reference-blue); font-weight: 700; }
.secondary-nav a.active::after { position: absolute; right: 13px; bottom: 0; left: 13px; height: 2px; background: var(--reference-blue); content: ""; }
.workspace > .breadcrumb { min-height: 39px; padding: 0 24px; border-bottom: 1px solid #e1e5e8; color: #87939c; background: #fafbfc; }
.workspace > .breadcrumb span { font-size: 9px; }
.workspace > .breadcrumb b { color: #495964; font-size: 10px; }
.view-root { min-height: calc(100vh - 138px); padding: 20px 24px 50px; }
body.sidebar-collapsed .sidebar { width: 58px; }
body.sidebar-collapsed .workspace { margin-left: 58px; }
body.sidebar-collapsed .main-nav a { justify-content: center; padding: 0; }
body.sidebar-collapsed .main-nav a b, body.sidebar-collapsed .main-nav .nav-badge, body.sidebar-collapsed .main-nav .live-pin, body.sidebar-collapsed .sidebar-footer { display: none; }
body.sidebar-collapsed .product-switcher { padding-right: 5px; padding-left: 5px; }
body.sidebar-collapsed .product-switcher-current { display: flex; justify-content: center; padding: 7px 0; }
body.sidebar-collapsed .product-switcher-current-copy, body.sidebar-collapsed .product-switcher-chevron { display: none; }
body.sidebar-collapsed .product-switcher-links { position: absolute; top: 4px; left: calc(100% + 7px); width: 210px; margin: 0; }

/* Reference-parity content components ------------------------------------ */
.page-head.reference-head { align-items: center; margin-bottom: 16px; }
.page-head.reference-head h1 { margin-bottom: 4px; font-size: 21px; letter-spacing: -.45px; }
.page-head.reference-head p { font-size: 10px; line-height: 1.45; }
.page-head.reference-head .eyebrow { margin-bottom: 5px; font-size: 8px; }
.reference-shell { min-width: 0; }
.reference-layout { display: grid; min-height: 570px; grid-template-columns: 238px minmax(0, 1fr); gap: 14px; }
.reference-layout.no-tree { grid-template-columns: 1fr; }
.scope-tree { min-width: 0; padding: 13px; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.scope-tree-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid #edf0f2; }
.scope-tree-head b { font-size: 11px; }
.tree-search { width: 100%; min-height: 31px; margin-bottom: 8px; padding: 0 9px; border: 1px solid #dfe4e7; border-radius: 4px; font-size: 10px; }
.tree-list, .tree-list ul { margin: 0; padding: 0; list-style: none; }
.tree-list ul { padding-left: 10px; }
.tree-node { display: flex; min-height: 31px; align-items: center; gap: 7px; padding: 0 7px; border-radius: 4px; color: #52616c; font-size: 10px; cursor: pointer; }
.tree-node:is(button) { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; }
.tree-node > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node .tree-count { min-width: 20px; margin-left: auto; padding: 2px 5px; border-radius: 8px; color: #7b8993; background: #edf1f4; font-size: 8px; text-align: center; }
.tree-node.active .tree-count { color: var(--reference-blue); background: #dcecff; }
.tree-node:hover, .tree-node.active { color: var(--reference-blue); background: #eef5fc; }
.tree-node::before { color: #8da0ad; content: "▾"; font-size: 8px; }
.tree-node.leaf::before { content: "•"; }
.screen-tree-list, .screen-tree-list ul { margin: 0; padding: 0; list-style: none; }
.screen-tree-list ul { padding-left: 10px; }
.screen-tree-list details { margin: 2px 0; }
.screen-tree-list summary { display: flex; min-height: 34px; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 5px; color: #425662; font-size: 9px; cursor: pointer; list-style: none; }
.screen-tree-list summary::-webkit-details-marker { display: none; }
.screen-tree-list summary::before { color: #81929e; content: "▸"; font-size: 8px; transition: transform .15s ease; }
.screen-tree-list details[open] > summary::before { transform: rotate(90deg); }
.screen-tree-list summary:hover { color: var(--reference-blue); background: #eef5fc; }
.screen-tree-list summary > span { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.screen-tree-list summary > small { margin-left: auto; color: #87959e; font-size: 7px; white-space: nowrap; }
.screen-store-node > summary { color: #5d6f79; }
.screen-tree-device { display: grid; width: 100%; min-height: 42px; grid-template-columns: 8px minmax(0,1fr); align-items: center; gap: 7px; padding: 6px 7px; border: 0; border-radius: 5px; color: #536670; background: transparent; text-align: left; cursor: pointer; }
.screen-tree-device:hover { color: var(--reference-blue); background: #f0f6fc; }
.screen-tree-device b, .screen-tree-device small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-tree-device b { font-size: 8px; }
.screen-tree-device small { margin-top: 3px; color: #8a979f; font-size: 7px; }
.screen-tree-status { width: 7px; height: 7px; border-radius: 50%; background: #aeb8be; }
.screen-tree-status.online { background: #29a676; box-shadow: 0 0 0 3px rgba(41,166,118,.1); }
.screen-tree-status.pending { background: #daa135; }
.screen-tree-empty { padding: 8px 8px 8px 24px; color: #929da4; font-size: 8px; }
.reference-main-panel { min-width: 0; }
.scope-summary { display: flex; min-height: 43px; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #dfe4e8; border-bottom: 0; border-radius: 5px 5px 0 0; color: #788690; background: #f8fafb; font-size: 9px; }
.scope-summary b { color: #33434e; font-size: 11px; }
.scope-summary small { margin-left: auto; }
.scope-summary + .reference-toolbar { border-radius: 0; }
.reference-toolbar { display: flex; min-height: 52px; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #dfe4e8; border-radius: 5px 5px 0 0; background: #fff; }
.reference-toolbar.wrap { flex-wrap: wrap; }
.reference-toolbar .toolbar-spacer { flex: 1; }
.reference-toolbar input, .reference-toolbar select, .inline-filter input, .inline-filter select {
  min-height: 31px; padding: 0 9px; border: 1px solid #d9e0e5; border-radius: 4px; color: #45545f; background: #fff; font-size: 10px;
}
.reference-toolbar input[type="search"] { min-width: 190px; }
.reference-toolbar label, .inline-filter label { display: inline-flex; align-items: center; gap: 6px; color: #6c7983; font-size: 9px; }
.button.reference { min-height: 31px; padding: 0 11px; border-radius: 4px; font-size: 10px; box-shadow: none; }
.button.reference:hover { transform: none; }
.button.reference.primary { background: var(--reference-blue); }
.button.reference.ghost { border-color: #d9e0e5; color: #53636e; background: #fff; }
.button.reference.danger { border-color: #efcfd1; color: #bf4349; background: #fff7f7; }
.segmented { display: inline-flex; overflow: hidden; border: 1px solid #d9e0e5; border-radius: 4px; }
.segmented button { min-height: 29px; padding: 0 9px; border: 0; border-right: 1px solid #e4e8eb; color: #77858e; background: white; font-size: 9px; cursor: pointer; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: var(--reference-blue); background: #edf5ff; }
.reference-table-card { min-width: 0; overflow: hidden; border: 1px solid #dfe4e8; border-top: 0; border-radius: 0 0 5px 5px; background: #fff; }
.reference-table-wrap { max-width: 100%; overflow: auto; }
.reference-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.reference-table th { height: 39px; padding: 0 11px; border-bottom: 1px solid #e1e6e9; color: #677783; background: #f6f8fa; font-size: 9px; font-weight: 600; text-align: left; white-space: nowrap; }
.reference-table td { height: 52px; padding: 8px 11px; border-bottom: 1px solid #edf0f2; color: #42515c; font-size: 9px; vertical-align: middle; }
.reference-table tr:last-child td { border-bottom: 0; }
.reference-table tbody tr:hover { background: #fafcff; }
.reference-table .row-title { display: block; max-width: 220px; overflow: hidden; color: #263640; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.reference-table .row-subtitle { display: block; margin-top: 3px; color: #87949d; font-size: 8px; }
.table-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.table-actions button { padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: 9px; cursor: pointer; }
.table-actions button.danger-link { color: #d44f55; }
.product-switcher-links a.product-switcher-super-admin { border-top: 1px solid rgba(255,255,255,.08); color: #d7e7ff; }
.product-switcher-links a.product-switcher-super-admin .product-switcher-option-mark { color: #d9e9ff; background: #285b93; }
.super-admin-table .reference-table { min-width: 1120px; }
.super-admin-table .reference-table td { height: auto; min-height: 66px; vertical-align: top; }
.super-admin-products, .super-admin-org-list, .super-admin-access-list { display: grid; align-content: start; gap: 6px; min-width: 130px; }
.super-admin-product-chip, .super-admin-badge { display: inline-flex; width: fit-content; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 10px; color: #36556d; background: #eaf1f6; font-size: 8px; font-weight: 700; white-space: nowrap; }
.super-admin-badge { margin-top: 6px; color: #6c4d12; background: #fff1c9; }
.super-admin-org, .super-admin-access { display: grid; gap: 3px; }
.super-admin-org b, .super-admin-access b { color: #33434e; font-size: 9px; font-weight: 650; }
.super-admin-org small, .super-admin-access small { color: #84929c; font-size: 8px; line-height: 1.45; }
.super-admin-access > span { display: flex; align-items: center; gap: 6px; }
.super-admin-actions { flex-wrap: wrap; align-items: flex-start; min-width: 115px; white-space: normal; }
.page-empty.compact { min-height: 150px; border: 0; }
.pagination.reference-pagination { display: flex; min-height: 48px; align-items: center; justify-content: flex-end; gap: 7px; padding: 8px 12px; border-top: 1px solid #edf0f2; color: #7a8790; font-size: 9px; }
.pagination.reference-pagination button { min-width: 28px; height: 28px; border: 1px solid #dce2e6; border-radius: 4px; background: #fff; cursor: pointer; }
.pagination.reference-pagination button.active { border-color: var(--reference-blue); color: #fff; background: var(--reference-blue); }
.pagination.reference-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.page-error, .page-empty, .page-loading, .permission-state { display: grid; min-height: 350px; place-items: center; padding: 35px; border: 1px solid #dfe4e8; border-radius: 5px; color: #78858e; background: #fff; text-align: center; }
.page-error > div, .page-empty > div, .page-loading > div, .permission-state > div { max-width: 470px; }
.page-error h3, .page-empty h3, .permission-state h3 { margin: 9px 0 5px; color: #34444f; font-size: 15px; }
.page-error p, .page-empty p, .permission-state p { margin: 0 0 14px; font-size: 10px; line-height: 1.6; }
.page-error .state-icon, .page-empty .state-icon, .permission-state .state-icon { display: grid; width: 48px; height: 48px; margin: auto; place-items: center; border-radius: 50%; color: #7b8b95; background: #eef2f4; font-size: 21px; }
.page-error .state-icon { color: #c84c52; background: #fff0f1; }
.page-loading .skeleton-lines { width: min(430px, 72vw); }
.page-loading .skeleton { margin: 8px 0; }

.material-grid, .scene-grid, .template-grid, .screen-wall-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid #dfe4e8; border-top: 0; background: #fff; }
.material-card, .scene-card, .template-card, .wall-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #e0e5e8; border-radius: 5px; background: #fff; }
.asset-thumb { position: relative; display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; color: #82919c; background: linear-gradient(145deg,#eef2f5,#f8fafb); }
.asset-preview-button { width: 100%; padding: 0; border: 0; font: inherit; cursor: zoom-in; }
.asset-preview-hint { position: absolute; right: 7px; bottom: 7px; padding: 3px 6px; border-radius: 3px; color: #fff; background: rgba(17,32,42,.72); font-size: 7px; opacity: 0; transform: translateY(3px); transition: .16s ease; }
.asset-preview-button:hover .asset-preview-hint, .asset-preview-button:focus-visible .asset-preview-hint { opacity: 1; transform: translateY(0); }
.asset-thumb img, .asset-thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb.media-preview video { object-fit: contain; background: #0e1820; }
.asset-thumb .asset-type { font-size: 23px; }
.asset-select { position: absolute; top: 7px; left: 7px; z-index: 2; }
.asset-card-copy { padding: 9px; }
.asset-card-copy b, .asset-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card-copy b { color: #33434e; font-size: 10px; }
.asset-card-copy small { margin-top: 4px; color: #88959e; font-size: 8px; }
.asset-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 7px 9px; border-top: 1px solid #edf0f2; }
.asset-card-actions button { padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: 8px; cursor: pointer; }
.asset-card-actions .asset-publish-action, .table-actions .primary-link { color: #147856; font-weight: 750; }
.media-drive { border: 1px solid #dfe4e8; border-bottom: 0; background: #fff; }
.media-drive-bar { display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #dfe4e8; border-bottom: 0; color: #586975; background: #fff; }
.media-drive-bar > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: var(--reference-blue); background: #edf5ff; }
.media-drive-bar svg, .media-folder-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.media-drive-bar b, .media-drive-bar small { display: block; }
.media-drive-bar b { font-size: 10px; }
.media-drive-bar small { margin-top: 3px; color: #84919a; font-size: 8px; }
.media-drive-toolbar { display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; }
.media-breadcrumb { display: flex; min-width: 0; align-items: center; gap: 4px; overflow-x: auto; }
.media-crumb { min-height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 4px; color: #62727d; background: transparent; font-size: 10px; white-space: nowrap; cursor: pointer; }
.media-crumb:hover, .media-crumb.active { color: var(--reference-blue); background: #edf5ff; }
.media-crumb.media-drop-active { border-color: #60a5fa; background: #dcebff; box-shadow: 0 0 0 2px rgba(37,119,214,.12); }
.media-crumb-separator { color: #a0abb2; font-size: 13px; }
.media-drive-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.media-drag-hint { color: #8a969e; font-size: 8px; }
.media-folder-grid { display: grid; grid-template-columns: repeat(4,minmax(145px,1fr)); gap: 8px; padding: 0 11px 11px; }
.media-folder-card { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px; border: 1px solid #dfe5e9; border-radius: 7px; background: #fbfcfd; transition: border-color .15s ease, background .15s ease, opacity .15s ease; }
.media-folder-card:hover { border-color: #b8cad8; background: #f6faff; }
.media-folder-card.media-drop-active { border-color: #2f7ed2; background: #eaf4ff; box-shadow: 0 0 0 2px rgba(37,119,214,.12); }
.media-folder-card.media-dragging, .material-card.media-dragging, tr.media-dragging { opacity: .45; }
.media-folder-open { display: grid; min-width: 0; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 7px; padding: 9px; border: 0; color: #3e505c; background: transparent; text-align: left; cursor: pointer; }
.media-folder-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 6px; color: #2e74ba; background: #eaf3fc; }
.media-folder-open b, .media-folder-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-folder-open b { font-size: 9px; }
.media-folder-open small { margin-top: 3px; color: #88959e; font-size: 7px; }
.media-folder-actions { display: grid; gap: 3px; padding-right: 7px; }
.media-folder-actions button { padding: 2px 3px; border: 0; color: #71808a; background: transparent; font-size: 7px; cursor: pointer; }
.media-folder-actions button:hover { color: var(--reference-blue); }
.material-card[draggable="true"], .reference-table tr[draggable="true"] { cursor: grab; }
.material-card[draggable="true"]:active, .reference-table tr[draggable="true"]:active { cursor: grabbing; }
.readonly-field { min-height: 36px; padding: 10px; border: 1px solid #e1e6e9; border-radius: 5px; color: #65747e; background: #f6f8f9; }
.material-table-name { display: grid; grid-template-columns: 72px minmax(120px,1fr); align-items: center; gap: 9px; }
.material-table-thumb { position: relative; display: grid; width: 72px; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; border: 1px solid #e2e7ea; border-radius: 4px; color: #82919c; background: #eef2f5; }
.material-table-thumb img, .material-table-thumb video { width: 100%; height: 100%; object-fit: cover; }
.material-table-thumb .asset-preview-hint { display: none; }
.publish-flow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 11px 14px; overflow-x: auto; border: 1px solid #dfe4e8; border-radius: 5px; color: #72808a; background: #fff; font-size: 9px; white-space: nowrap; }
.publish-flow span { display: inline-flex; align-items: center; gap: 6px; }
.publish-flow span b { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: #7098bd; font-size: 9px; }
.publish-flow span.active b, .publish-flow span:last-child b { background: #168765; }
.publish-flow i { color: #b4bec5; font-style: normal; }
.publish-section { margin-top: 12px; overflow: hidden; }
.publish-content-summary { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid #dfe4e8; border-radius: 6px; background: #f8fafb; }
.publish-content-summary .asset-type { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 5px; color: var(--reference-blue); background: #e7f1fb; font-size: 18px; }
.publish-content-summary span:last-child { display: grid; gap: 4px; }
.publish-content-summary small { color: #7b8993; }
.publish-device-list { max-height: 285px; margin-top: 7px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.publish-target-store-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; color: #425863; background: #eef4f6; }
.publish-target-store-label b { font-size: 9px; }
.publish-target-store-label small { color: #81909a; font-size: 8px; }
.publish-device-option { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border-bottom: 1px solid #edf0f2; cursor: pointer; }
.publish-device-option:last-child { border-bottom: 0; }
.publish-device-option:hover { background: #f7fafc; }
.publish-device-option.is-current { background: #f5fbf8; }
.publish-device-option span:nth-child(2) { display: grid; gap: 3px; }
.publish-device-option b { color: #33434e; font-size: 10px; }
.publish-device-option small { color: #87949d; font-size: 8px; }
.publish-target-list { max-height: 460px; }
.compact-screen-list .publish-device-option { min-height: 42px; padding: 6px 9px; }
.publish-device-state { display: grid; min-width: 50px; justify-items: end; gap: 2px; }
.publish-device-state .assignment-state { font-weight: 700; }
.publish-device-state .assignment-state.current { color: #168765; }
.publish-device-state .assignment-state.new { color: #89969e; }
.publish-progress:not(:empty) { padding: 9px 11px; border: 1px solid #cfe1f3; border-radius: 6px; color: #356487; background: #f1f7fc; font-size: 9px; }
.publish-store-target { border-bottom: 1px solid #e3e8eb; }
.publish-store-target:last-child { border-bottom: 0; }
.publish-store-target > .publish-device-option { border-bottom: 0; background: #f8fafc; }
.publish-screen-options { padding: 2px 0 7px 28px; }
.publish-screen-options .publish-device-option { border: 0; border-top: 1px solid #edf1f3; }
.publish-screen-option b { font-weight: 600; }
.publish-no-screens { display: block; padding: 2px 12px 10px 47px; color: #8b979f; font-size: 8px; }
.publish-mode-selector { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.publish-mode-selector label { display: flex; min-height: 62px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #dce3e7; border-radius: 7px; background: #fff; cursor: pointer; }
.publish-mode-selector label:has(input:checked) { border-color: #78a9e3; background: #f0f6fd; box-shadow: inset 0 0 0 1px rgba(47,120,213,.08); }
.publish-mode-selector span, .publish-mode-selector b, .publish-mode-selector small { display: block; }
.publish-mode-selector b { color: #33434e; font-size: 10px; }
.publish-mode-selector small { margin-top: 3px; color: #7d8b95; font-size: 8px; }
.playback-actions-cell { min-width: 210px; }
.playback-row-actions { min-width: 190px; flex-wrap: wrap; white-space: normal; }
.playback-row-actions button { min-height: 26px; padding: 0 8px; border: 1px solid #dce3e7; border-radius: 4px; background: #fff; }
.playback-row-actions button.primary-link { border-color: #b9dfd1; background: #eff9f5; }
.playback-row-actions button.danger-link { border-color: #f0d8da; background: #fff7f7; }
.publication-target-names { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-table td .status-pill + .status-pill { margin-left: 5px; }
.upload-optimization-note { padding: 9px 11px; border: 1px solid #dbe8df; border-radius: 5px; color: #4c6a5f; background: #f2faf6; font-size: 9px; line-height: 1.5; }
.publish-content-library { min-width: 0; }
.playback-library-section { margin-top: 16px; }
.publish-content-library > .card-head { margin: 0; padding: 15px 15px 10px; border: 1px solid #dfe4e8; border-bottom: 0; border-radius: 5px 5px 0 0; background: #fff; }
.playback-stat-band { margin-bottom: 14px; }
.playback-create-from-media { width: 100%; margin-top: 12px; }
.playback-existing-list { display: grid; gap: 9px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--soft-line); }
.playback-existing-list > b { color: #53636e; font-size: 9px; }
.publish-target-heading { display: flex; align-items: center; justify-content: space-between; }
.publish-target-heading > span { display: inline-flex; gap: 8px; }
.publish-target-heading button { padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: 9px; cursor: pointer; }

/* Saved playback content editor */
.modal.playback-editor-modal { display: flex; width: min(1240px, calc(100vw - 34px)); height: min(820px, calc(100vh - 34px)); max-height: none; overflow: hidden; flex-direction: column; }
.playback-editor-modal .modal-head { flex: 0 0 auto; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.playback-editor-modal .modal-body { min-height: 0; flex: 1; overflow: hidden; padding: 0; background: #f5f7f7; }
.playback-editor-modal .modal-body > form { height: 100%; }
.playback-editor-modal .modal-actions { position: relative; z-index: 2; flex: 0 0 auto; background: #fff; box-shadow: 0 -8px 22px rgba(16,32,41,.04); }
.playback-editor-shell { display: grid; height: 100%; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .68fr); }
.playback-editor-main { min-width: 0; overflow-y: auto; padding: 18px 20px 24px; border-right: 1px solid var(--line); }
.playback-editor-library { min-width: 0; overflow: hidden; padding: 18px; background: #fff; }
.playback-content-fields { display: grid; grid-template-columns: 1.35fr .8fr .65fr .65fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.playback-content-fields .full { grid-column: 1 / -1; }
.playback-content-fields input, .playback-content-fields select { min-height: 36px; margin-top: 5px; border-radius: 5px; font-size: 10px; }
.playback-editor-toolbar { display: flex; align-items: center; gap: 7px; margin: 14px 0 8px; }
.playback-editor-toolbar > span { min-width: 0; margin-right: auto; }
.playback-editor-toolbar b, .playback-editor-toolbar small { display: block; }
.playback-editor-toolbar b { color: #33434e; font-size: 11px; }
.playback-editor-toolbar small { margin-top: 3px; color: #82909a; font-size: 8px; }
.playback-editor-toolbar button, .playback-library-head button { min-height: 29px; padding: 0 9px; border: 1px solid #d9e0e5; border-radius: 4px; color: var(--reference-blue); background: #fff; font-size: 8px; font-weight: 700; cursor: pointer; }
.playback-editor-toolbar button:disabled { opacity: .4; cursor: default; }
.playback-editor-list { display: flex; flex-direction: column; gap: 7px; }
.playback-editor-item { display: grid; grid-template-columns: 25px 74px minmax(130px, 1fr) minmax(104px, .68fr) minmax(105px, .7fr); align-items: center; gap: 9px; padding: 9px; border: 1px solid #dfe4e8; border-radius: 6px; background: #fff; }
.playback-order { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #fff; background: #70899b; font-size: 8px; font-weight: 800; }
.playback-item-thumb, .playback-library-thumb { display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; border-radius: 4px; color: #738792; background: #e9eef1; }
.playback-item-thumb img, .playback-item-thumb video, .playback-library-thumb img, .playback-library-thumb video { width: 100%; height: 100%; object-fit: cover; }
.playback-item-thumb .asset-type, .playback-library-thumb .asset-type { font-size: 17px; }
.playback-item-copy { min-width: 0; }
.playback-item-copy b, .playback-item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playback-item-copy b { color: #33434e; font-size: 10px; }
.playback-item-copy small { margin-top: 4px; color: #84929c; font-size: 8px; }
.playback-editor-item .field-label input, .playback-editor-item .field-label select { min-height: 31px; margin-top: 4px; padding: 0 7px; border-radius: 4px; font-size: 9px; }
.playback-item-actions { display: flex; grid-column: 3 / -1; justify-content: flex-end; gap: 6px; padding-top: 7px; border-top: 1px solid #edf0f2; }
.playback-item-actions button { min-height: 25px; padding: 0 7px; border: 1px solid #dfe4e8; border-radius: 4px; color: #526774; background: #fff; font-size: 8px; cursor: pointer; }
.playback-item-actions button:disabled { opacity: .32; cursor: default; }
.playback-item-actions .danger-link { color: #c04b50; }
.playback-item-actions .hotspot-link-button { color: #087c73; border-color: #a9d9d3; background: #effaf8; font-weight: 700; }

.brand-management-layout { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: 14px; align-items: start; }
.brand-sidebar { padding: 10px; position: sticky; top: 12px; }
.brand-sidebar-head { display: grid; gap: 3px; padding: 8px 8px 12px; border-bottom: 1px solid #e9edef; }
.brand-sidebar-head b { color: #263943; font-size: 12px; }
.brand-sidebar-head small { color: #87949b; font-size: 8px; }
.brand-tab { width: 100%; display: grid; gap: 3px; padding: 10px; margin-top: 6px; border: 1px solid transparent; border-radius: 7px; text-align: left; color: #566b76; background: transparent; cursor: pointer; }
.brand-tab b, .brand-tab small { display: block; }
.brand-tab b { font-size: 10px; }
.brand-tab small { font-size: 8px; color: #8a979e; }
.brand-tab.active { border-color: #b9ded9; color: #087c73; background: #effaf8; }
.brand-main { display: grid; gap: 14px; min-width: 0; }
.brand-store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.brand-store-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding: 12px; border: 1px solid #e4e9ec; border-radius: 8px; text-align: left; background: #fff; cursor: pointer; }
.brand-store-card span { min-width: 0; }
.brand-store-card b, .brand-store-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-store-card b { color: #32454f; font-size: 10px; }
.brand-store-card small { margin-top: 5px; color: #87949b; font-size: 8px; }
.brand-store-card em { flex: 0 0 auto; padding: 4px 6px; border-radius: 999px; color: #8a6d27; background: #fff6df; font-size: 7px; font-style: normal; }
.brand-store-card em.connected { color: #13755f; background: #e7f7f1; }
.brand-store-card.active { border-color: #46a99d; box-shadow: 0 0 0 2px rgba(70,169,157,.12); }
.toast-connect-card { border-left: 3px solid #f4a03a; }
.toast-connection-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.toast-connection-summary div { display: grid; gap: 4px; min-width: 0; padding: 10px; border-radius: 7px; background: #f6f8f9; }
.toast-connection-summary small { color: #84929a; font-size: 8px; }
.toast-connection-summary b { overflow: hidden; color: #33464f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.card-actions-row { display: flex; gap: 7px; flex-wrap: wrap; }
.brand-catalog-head { padding: 15px 15px 5px; }
.category-pill.muted { color: #697b84; background: #eef2f4; }
.availability-dot { color: #13755f; font-size: 8px; font-weight: 700; }
.availability-dot.sold { color: #c4474d; }
.toast-menu-list { display: grid; gap: 8px; max-height: min(56vh, 520px); overflow: auto; }
.toast-menu-choice { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e1e7e9; border-radius: 7px; cursor: pointer; }
.toast-menu-choice:has(input:checked) { border-color: #62b7ad; background: #f0faf8; }
.toast-menu-choice input { width: 17px; height: 17px; accent-color: #218e82; }
.toast-menu-choice b, .toast-menu-choice small { display: block; }
.toast-menu-choice b { color: #33464f; font-size: 10px; }
.toast-menu-choice small { margin-top: 4px; color: #839198; font-size: 8px; }
.toast-location-list { display: grid; gap: 8px; max-height: 380px; overflow: auto; padding: 10px; border: 1px solid #dfe7e9; border-radius: 8px; background: #f8fbfb; }
.toast-location-heading { display: flex; justify-content: space-between; gap: 12px; color: #3c545c; }
.toast-location-heading small { color: #84949a; }
.toast-location-row { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 8px; padding: 7px; border-radius: 6px; background: #fff; }
.toast-location-row > input { width: 17px; height: 17px; accent-color: #218e82; }
.toast-location-fields { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(280px, 1.5fr) minmax(140px, .8fr); gap: 8px; }
.toast-location-fields input { min-width: 0; padding: 8px 9px; border: 1px solid #dce5e7; border-radius: 5px; font: inherit; }
.secret-once { display: grid; gap: 8px; }
.secret-once > span { margin-top: 5px; color: #667a84; font-size: 9px; font-weight: 700; }
.secret-once code { display: block; overflow-wrap: anywhere; padding: 12px; border: 1px solid #dfe6e8; border-radius: 7px; color: #143f4c; background: #f4f8f9; font-size: 10px; user-select: all; }
.secret-once p { margin: 6px 0 0; color: #9b5b2d; font-size: 9px; line-height: 1.6; }

.hotspot-editor-modal { width: min(1560px, 98vw); max-height: 96vh; }
.hotspot-editor-shell { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: 16px; }
.hotspot-editor-panel { display: grid; align-content: start; gap: 12px; }
.hotspot-editor-panel select[size] { min-height: 190px; }
.hotspot-ocr-box { display: grid; gap: 8px; padding: 11px; border: 1px solid #cfe6e2; border-radius: 9px; background: #f6fbfa; }
.hotspot-ocr-box .button { justify-content: center; width: 100%; }
.hotspot-ocr-box small { color: #617c79; font-size: 8px; line-height: 1.55; }
.hotspot-ocr-box small b { color: #187f75; }
.hotspot-selection { display: grid; gap: 6px; padding: 10px; border: 1px solid #f0c7ca; border-radius: 8px; background: #fff7f7; }
.hotspot-selection.pending { border-color: #edd08a; background: #fffaf0; }
.hotspot-selection b { color: #324b50; font-size: 9px; }
.hotspot-selection span { color: #708188; font-size: 8px; line-height: 1.5; }
.hotspot-help { padding: 12px; border-radius: 8px; color: #24534e; background: #eef9f7; }
.hotspot-help b { font-size: 10px; }
.hotspot-help p { margin: 5px 0 0; color: #617c79; font-size: 8px; line-height: 1.6; }
.hotspot-linked-list { display: grid; gap: 6px; max-height: 42vh; overflow: auto; }
.hotspot-linked-list button { display: flex; justify-content: space-between; gap: 8px; padding: 9px; border: 1px solid #e4e9eb; border-radius: 6px; color: #536871; background: #fff; font-size: 8px; cursor: pointer; }
.hotspot-linked-list button.selected { border-color: #bd5259; background: #fff3f4; }
.hotspot-linked-list button em { color: #be4d53; font-style: normal; }
.hotspot-linked-list p { color: #89959b; font-size: 9px; }
.hotspot-canvas-wrap { display: grid; gap: 6px; min-width: 0; }
.hotspot-canvas-wrap > small { color: #839198; font-size: 8px; }
.hotspot-canvas { position: relative; width: 100%; max-height: 74vh; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px; background: #050708; cursor: crosshair; touch-action: none; user-select: none; }
.hotspot-canvas > img, .hotspot-canvas > video { width: 100%; height: 100%; display: block; background: #000; }
.hotspot-rectangle, .hotspot-draft { position: absolute; z-index: 3; min-width: 8px; min-height: 8px; border: 2px solid #fff; border-radius: 5px; background: rgba(204,43,51,.84); box-shadow: 0 2px 12px rgba(0,0,0,.28); }
.hotspot-rectangle { display: flex; align-items: center; justify-content: space-between; gap: 5px; overflow: visible; padding: 3px 5px; color: #fff; cursor: move; }
.hotspot-rectangle.selected { outline: 3px solid rgba(255,255,255,.95); outline-offset: 2px; }
.hotspot-rectangle span { overflow: hidden; font-size: clamp(6px, .7vw, 10px); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hotspot-rectangle i { position: absolute; right: -6px; bottom: -6px; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #137f75; cursor: nwse-resize; }
.hotspot-draft { z-index: 4; border-style: dashed; background: rgba(35,156,143,.45); pointer-events: none; }
.hotspot-ocr-candidate { position: absolute; z-index: 2; overflow: hidden; padding: 2px; border: 2px dashed #ffc247; border-radius: 4px; color: #2d2514; background: rgba(255,194,71,.48); cursor: pointer; }
.hotspot-ocr-candidate.selected { outline: 3px solid #fff; outline-offset: 1px; }
.hotspot-ocr-candidate span { font-size: clamp(5px, .62vw, 9px); font-weight: 800; }

@media (max-width: 820px) {
  .brand-management-layout, .hotspot-editor-shell { grid-template-columns: 1fr; }
  .brand-sidebar { position: static; display: flex; overflow-x: auto; }
  .brand-sidebar-head { min-width: 150px; border-bottom: 0; border-right: 1px solid #e9edef; }
  .brand-tab { min-width: 150px; }
  .toast-connection-summary { grid-template-columns: 1fr; }
}
.playback-library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 11px; border-bottom: 1px solid var(--soft-line); }
.playback-library-head b, .playback-library-head small { display: block; }
.playback-library-head b { color: #33434e; font-size: 11px; }
.playback-library-head small { margin-top: 4px; color: #84929c; font-size: 8px; line-height: 1.45; }
.playback-library-head > span { min-width: 0; }
.playback-library-head .field-label { flex: 0 0 155px; color: #657680; font-size: 8px; }
.playback-library-head select { width: 100%; min-height: 30px; margin-top: 4px; padding: 0 7px; border: 1px solid #d9e0e5; border-radius: 4px; color: #42545f; background: #fff; font-size: 8px; }
.playback-library-list { display: flex; height: calc(100% - 53px); overflow-y: auto; flex-direction: column; gap: 6px; padding-top: 10px; }
.playback-library-item { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px; border: 1px solid #e3e8ea; border-radius: 5px; background: #fbfcfc; }
.playback-library-item > span { min-width: 0; }
.playback-library-item b, .playback-library-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playback-library-item b { color: #33434e; font-size: 9px; }
.playback-library-item small { margin-top: 3px; color: #89969f; font-size: 7px; }
.playback-library-item button { padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: 8px; font-weight: 750; cursor: pointer; }
.playback-empty { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 5px; padding: 20px; border: 1px dashed #cad4d7; border-radius: 6px; color: #7f8d96; background: rgba(255,255,255,.6); text-align: center; }
.playback-empty.compact { min-height: 110px; }
.playback-empty b { color: #40515c; font-size: 11px; }
.playback-empty span { max-width: 430px; font-size: 8px; line-height: 1.55; }

.enterprise-stores-wrap { display: grid; gap: 12px; margin-top: 12px; }
.enterprise-stores-section .card-head { align-items: center; }
.enterprise-store-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 9px; }
.enterprise-store-card { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border: 1px solid #e1e7ea; border-radius: 7px; background: #fbfcfd; }
.enterprise-store-card > span { min-width: 0; }
.enterprise-store-card b, .enterprise-store-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-store-card b { color: #33464f; font-size: 10px; }
.enterprise-store-card small { margin-top: 4px; color: #87949c; font-size: 8px; }
.enterprise-store-card button { padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: 8px; cursor: pointer; }

.display-group-manager { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .8fr); gap: 18px; }
.display-group-list { display: flex; max-height: 410px; overflow-y: auto; flex-direction: column; gap: 7px; padding-top: 10px; }
.display-group-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid #e1e6e9; border-radius: 5px; background: #fbfcfc; }
.display-group-row > span { min-width: 0; }
.display-group-row b, .display-group-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.display-group-row b { color: #33434e; font-size: 10px; }
.display-group-row small { max-width: 330px; margin-top: 4px; color: #84929c; font-size: 8px; }
.display-group-row > div { display: flex; gap: 7px; }
.display-group-row button { padding: 0; border: 0; color: var(--reference-blue); background: transparent; font-size: 8px; cursor: pointer; }
.display-group-row button.danger-link { color: #c04b50; }
.display-group-form { align-self: start; padding: 14px; border: 1px solid #dfe4e8; border-radius: 6px; background: #f8fafb; }
.display-group-form > .button { margin-top: 9px; margin-right: 6px; }
.scene-card .asset-thumb, .template-card .asset-thumb { aspect-ratio: 16 / 10; background: linear-gradient(135deg,#213646,#347b9c); }
.scene-card .asset-thumb::after, .template-card .asset-thumb::after { width: 48%; height: 42%; border: 2px solid rgba(255,255,255,.68); border-radius: 5px; box-shadow: 23px 14px 0 -8px rgba(216,242,94,.9); content: ""; }
.library-categories { display: flex; gap: 6px; margin-bottom: 11px; padding: 9px; overflow-x: auto; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.library-categories button { flex: 0 0 auto; min-height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: 4px; color: #65747f; background: transparent; font-size: 9px; cursor: pointer; }
.library-categories button.active { border-color: #cfe1f6; color: var(--reference-blue); background: #eef6ff; }

.status-pill { display: inline-flex; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 9px; color: #5f6f79; background: #edf1f3; font-size: 8px; font-weight: 650; white-space: nowrap; }
.status-pill.online, .status-pill.active, .status-pill.published, .status-pill.delivered, .status-pill.ready { color: #147856; background: #e7f6ef; }
.status-pill.offline, .status-pill.failed, .status-pill.stopped, .status-pill.expired { color: #b34449; background: #fdecee; }
.status-pill.pending, .status-pill.scheduled, .status-pill.paused { color: #9a6818; background: #fff4da; }
.status-pill.draft { color: #596d9f; background: #edf1ff; }
.wall-card { padding: 8px; }
.wall-shot { position: relative; display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; border-radius: 3px; color: #92a0a8; background: #1b2832; font-size: 9px; }
.wall-shot img { width: 100%; height: 100%; object-fit: cover; }
.wall-meta { display: flex; align-items: center; justify-content: space-between; padding: 8px 1px 1px; }
.wall-meta b { font-size: 9px; }
.wall-meta small { color: #84919a; font-size: 8px; }
.timeline { position: relative; height: 48px; min-width: 720px; border: 1px solid #e1e6e9; border-radius: 4px; background: repeating-linear-gradient(90deg,#fafbfc 0,#fafbfc calc(4.166% - 1px),#e5e9ec calc(4.166% - 1px),#e5e9ec 4.166%); }
.timeline-bar { position: absolute; top: 12px; height: 22px; padding: 4px 8px; overflow: hidden; border-radius: 3px; color: #fff; background: var(--reference-blue); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.stats-card { min-height: 112px; padding: 15px; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.stats-card span, .stats-card small { display: block; color: #7b8993; font-size: 9px; }
.stats-card strong { display: block; margin: 13px 0 8px; color: #263742; font-size: 25px; letter-spacing: -.8px; }
.chart-card { min-height: 270px; margin-top: 12px; padding: 16px; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.chart-card h3 { margin: 0 0 15px; font-size: 12px; }
.bar-chart { display: flex; height: 190px; align-items: end; gap: 10px; padding: 17px 8px 0; border-bottom: 1px solid #dfe4e8; }
.bar-chart span { position: relative; min-width: 23px; flex: 1; height: var(--bar-height,20%); max-width: 64px; border-radius: 4px 4px 0 0; background: linear-gradient(#5b9ce6,#2f78d5); }
.bar-chart span small { position: absolute; right: -8px; bottom: -22px; left: -8px; color: #84919a; font-size: 7px; text-align: center; }

.wizard-steps { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 15px; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.wizard-step { display: flex; min-height: 49px; align-items: center; gap: 9px; padding: 0 15px; border-right: 1px solid #e5e9ec; color: #77858f; font-size: 10px; }
.wizard-step:last-child { border-right: 0; }
.wizard-step i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #71818d; background: #edf1f3; font-size: 9px; font-style: normal; }
.wizard-step.active { color: var(--reference-blue); font-weight: 700; }
.wizard-step.active i { color: #fff; background: var(--reference-blue); }
.wizard-panel { min-height: 360px; padding: 18px; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.wizard-panel h3 { margin: 0 0 14px; font-size: 13px; }
.wizard-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.form-error.inline { margin: 7px 0; padding: 8px 10px; border-radius: 4px; color: #a33b41; background: #fff0f1; font-size: 9px; }
.notice-preview { position: relative; min-height: 150px; overflow: hidden; border-radius: 5px; color: white; background: #1b2731; }
.notice-preview span { position: absolute; right: 0; bottom: 24px; left: 0; padding: 10px; color: var(--notice-color,#fff); background: var(--notice-bg,rgba(210,36,45,.85)); font-size: var(--notice-size,20px); text-align: center; }
.color-swatch { display: inline-block; width: 18px; height: 18px; border: 1px solid rgba(0,0,0,.12); border-radius: 3px; vertical-align: middle; }
.account-profile { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 14px; }
.profile-card { padding: 20px; border: 1px solid #dfe4e8; border-radius: 5px; background: #fff; }
.profile-avatar { display: grid; width: 68px; height: 68px; margin-bottom: 14px; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg,#2f78d5,#34b89d); font-size: 20px; font-weight: 800; }
.profile-list { margin: 0; }
.profile-list div { display: grid; grid-template-columns: 125px 1fr; padding: 11px 0; border-bottom: 1px solid #edf0f2; }
.profile-list dt { color: #87949d; font-size: 9px; }
.profile-list dd { margin: 0; color: #3b4b56; font-size: 10px; }

.screen-template-help { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #dce5ea; border-radius: 6px; color: #60737f; background: #f7fafb; font-size: 9px; }
.screen-template-help b { color: #314955; }
.screen-template-help span::before { content: "·"; margin-right: 8px; color: var(--reference-blue); }
.screen-template-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.screen-template-card { padding: 15px; }
.screen-template-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.screen-template-card-head h3 { margin: 3px 0 0; color: #314550; font-size: 13px; }
.screen-template-card-head small { color: var(--reference-blue); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.screen-template-grid { display: grid; grid-template-columns: repeat(var(--screen-template-columns,1),minmax(0,1fr)); gap: 6px; padding: 8px; border-radius: 7px; background: #17242d; }
.screen-slot-cell { position: relative; display: grid; min-height: 70px; place-content: center; gap: 5px; overflow: hidden; border: 2px solid #687983; border-radius: 5px; color: #eef5f7; background: #2c3b44; text-align: center; }
.screen-slot-cell b { font-size: 15px; }
.screen-slot-cell small { max-width: 105px; overflow: hidden; color: #b9c8ce; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.screen-slot-cell em { max-width: 105px; overflow: hidden; color: #70c9ef; font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.screen-slot-cell.missing-device { border-style: dashed; opacity: .66; }
.screen-slot-cell.linked-device { border-color: #4f94ad; }
.screen-slot-cell.has-content { border-color: #3f9fca; background: #244454; }
label.screen-slot-cell { cursor: pointer; }
label.screen-slot-cell input { position: absolute; opacity: 0; pointer-events: none; }
label.screen-slot-cell:hover, label.screen-slot-cell:has(input:checked), label.screen-slot-cell.selected { border-color: #61c7ee; box-shadow: 0 0 0 2px rgba(63,159,202,.25); background: #195876; }
.screen-template-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(92px,1fr)); gap: 8px; margin-top: 12px; }
.screen-template-stats span { display: grid; gap: 2px; text-align: center; }
.screen-template-stats b { color: #314550; font-size: 13px; }
.screen-template-stats small { color: #8997a0; font-size: 7px; }
.screen-group-device-grid { display: grid; grid-template-columns: repeat(var(--screen-template-columns,1),minmax(150px,1fr)); gap: 8px; margin-top: 8px; padding: 10px; overflow-x: auto; border-radius: 7px; background: #17242d; }
.screen-group-slot { display: grid; min-width: 145px; min-height: 108px; align-content: center; gap: 7px; padding: 10px; border: 2px solid #54717f; border-radius: 5px; color: #eff6f8; background: #2b3b44; }
.screen-group-slot > b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #17394b; background: #69c5e7; font-size: 10px; }
.screen-group-slot > span { display: grid; gap: 5px; font-size: 8px; }
.screen-group-slot select { min-width: 0; height: 34px; border: 1px solid #70838e; border-radius: 4px; color: #243842; background: #fff; font-size: 8px; }
.screen-slot-unassigned { padding: 14px; border: 1px dashed #ccd6dc; border-radius: 5px; color: #83929b; background: #fafcfd; font-size: 9px; text-align: center; }
.device-slot-form { margin: 14px 0; padding: 14px; border: 1px solid #e0e7eb; border-radius: 6px; background: #f9fbfc; }
.publish-screen-template-target { border-bottom: 1px solid #e3e8eb; }
.publish-screen-template-target:last-child { border-bottom: 0; }
.screen-template-position-targets { display: flex; align-items: center; gap: 6px; padding: 4px 12px 10px 39px; }
.screen-template-position-targets label span { display: grid; width: 25px; height: 22px; place-items: center; border: 1px solid #d5dfe4; border-radius: 3px; color: #61727c; background: #fff; font-size: 8px; cursor: pointer; }
.screen-template-position-targets label input { position: absolute; opacity: 0; }
.screen-template-position-targets label input:checked + span { border-color: var(--reference-blue); color: #fff; background: var(--reference-blue); }
.screen-template-position-targets > small, .screen-template-publish-note { color: #88969e; font-size: 8px; }
.screen-template-publish-note { display: block; padding: 0 12px 10px 39px; }

@media (max-width: 1180px) {
  .screen-template-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .material-grid, .scene-grid, .template-grid, .screen-wall-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .media-folder-grid { grid-template-columns: repeat(3,minmax(145px,1fr)); }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reference-layout { grid-template-columns: 210px minmax(0,1fr); }
  .global-topbar .connection-pill, .current-date { display: none; }
  .playback-editor-item { grid-template-columns: 25px 62px minmax(120px,1fr) minmax(95px,.62fr); }
  .playback-editor-item > .field-label:nth-of-type(2) { grid-column: 3 / -1; }
  .playback-item-actions { grid-column: 3 / -1; }
}
@media (max-width: 820px) {
  .global-topbar { padding-right: 7px; }
  .enterprise-name, .topbar-divider, .topbar-text-button { display: none; }
  .account-button { min-width: 0; grid-template-columns: 28px auto; }
  .account-button > span:nth-child(2) { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .workspace, body.sidebar-collapsed .workspace { margin-left: 0; }
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w); }
  body.sidebar-collapsed .product-switcher { padding-right: 9px; padding-left: 9px; }
  body.sidebar-collapsed .product-switcher-current { display: grid; justify-content: initial; padding: 7px 8px; }
  body.sidebar-collapsed .product-switcher-current-copy, body.sidebar-collapsed .product-switcher-chevron { display: block; }
  body.sidebar-collapsed .product-switcher-links { position: static; width: auto; margin-top: 5px; }
  .secondary-nav { padding: 0 8px; }
  .workspace > .breadcrumb { padding: 0 14px; }
  .view-root { padding: 16px 14px 40px; }
  .reference-layout { grid-template-columns: 1fr; }
  .scope-tree { display: none; }
  .scope-tree.media-scope-tree, .scope-tree.screen-scope-tree { display: block; max-height: 300px; overflow: auto; }
  .material-grid, .scene-grid, .template-grid, .screen-wall-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .media-folder-grid { grid-template-columns: repeat(2,minmax(140px,1fr)); }
  .media-drive-toolbar { align-items: flex-start; flex-direction: column; }
  .media-drive-actions { width: 100%; justify-content: space-between; }
  .account-profile { grid-template-columns: 1fr; }
  .modal.playback-editor-modal { width: calc(100vw - 18px); height: calc(100vh - 18px); }
  .playback-editor-modal .modal-body { overflow-y: auto; }
  .playback-editor-shell { height: auto; min-height: 100%; grid-template-columns: 1fr; }
  .playback-editor-main { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .playback-editor-library { min-height: 340px; overflow: visible; }
  .playback-library-list { max-height: 420px; height: auto; }
  .display-group-manager { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .screen-template-cards { grid-template-columns: 1fr; }
  .brand.compact em, .enterprise-name { display: none; }
  .material-grid, .scene-grid, .template-grid, .screen-wall-grid, .stats-grid { grid-template-columns: 1fr; }
  .media-folder-grid { grid-template-columns: 1fr; }
  .media-drag-hint { display: none; }
  .reference-toolbar { align-items: stretch; flex-direction: column; }
  .reference-toolbar .toolbar-spacer { display: none; }
  .reference-toolbar input, .reference-toolbar select { width: 100%; }
  .wizard-steps { grid-template-columns: 1fr; }
  .wizard-step { border-right: 0; border-bottom: 1px solid #e5e9ec; }
  .wizard-step:last-child { border-bottom: 0; }
  .pairing-claim-guide { grid-template-columns: 1fr; }
  .field-label .pairing-code-input { font-size: 24px; letter-spacing: .25em; text-indent: .25em; }
  .pairing-result dl { grid-template-columns: 1fr; }
  .pairing-result dl > div { border-right: 0; }
  .pairing-result dl > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--soft-line); }
  .pairing-result dl > div:last-child { border-bottom: 0; }
  .playback-content-fields { grid-template-columns: 1fr; }
  .playback-content-fields .full { grid-column: auto; }
  .playback-editor-toolbar { align-items: stretch; flex-direction: column; }
  .playback-editor-toolbar > span { margin-right: 0; }
  .playback-editor-item { grid-template-columns: 24px 58px minmax(0,1fr); }
  .playback-editor-item > .field-label { grid-column: span 3; }
  .playback-editor-item > .field-label:nth-of-type(2) { grid-column: span 3; }
  .playback-item-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .playback-stat-band { grid-template-columns: repeat(2,1fr); }
}
