/* Backlot desktop. Brand tokens come from gpl-tokens.css; this file is the shell, windows, launcher and stream window. */
:root {
  --bl-bg: #0b1322;
  --bl-navy: var(--gpl-navy);
  --bl-text: var(--gpl-offwhite);
  --bl-text-body: var(--gpl-gray-100);
  --bl-muted: var(--gpl-gray-200);
  --bl-accent: var(--gpl-orange);
  --bl-accent-hover: var(--gpl-orange-hover);
  --bl-glass: rgb(19 30 46 / .62);
  --bl-glass-border: rgb(249 248 244 / .12);
  --bl-radius: 12px;
  --bl-shadow: 0 18px 50px rgb(0 0 0 / .45), 0 2px 6px rgb(0 0 0 / .35);
  --bl-menubar-h: 36px;
  --bl-dock-h: 72px;
  --bl-motion: 200ms cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bl-bg);
  color: var(--bl-text-body);
  font-family: var(--gpl-font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
.no-motion *, .no-motion *::before, .no-motion *::after { transition: none !important; animation: none !important; }

/* Wallpaper: a studio backlot at night, in pure CSS */
#wallpaper { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
#wallpaper .sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 70% 110%, rgb(248 85 16 / .18), transparent 60%),
    radial-gradient(900px 500px at 20% 100%, rgb(40 105 164 / .22), transparent 60%),
    linear-gradient(180deg, #060a14 0%, #0b1322 45%, #131e2e 100%);
}
#wallpaper .lamps {
  position: absolute; inset: 0;
  background:
    radial-gradient(3px 3px at 12% 64%, rgb(255 214 192 / .9), transparent 70%),
    radial-gradient(3px 3px at 38% 61%, rgb(255 214 192 / .9), transparent 70%),
    radial-gradient(3px 3px at 63% 66%, rgb(255 214 192 / .9), transparent 70%),
    radial-gradient(3px 3px at 86% 62%, rgb(255 214 192 / .9), transparent 70%),
    radial-gradient(220px 120px at 12% 66%, rgb(255 166 129 / .14), transparent 70%),
    radial-gradient(220px 120px at 38% 63%, rgb(255 166 129 / .12), transparent 70%),
    radial-gradient(220px 120px at 63% 68%, rgb(255 166 129 / .14), transparent 70%),
    radial-gradient(220px 120px at 86% 64%, rgb(255 166 129 / .12), transparent 70%);
}
#wallpaper .stages {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background:
    linear-gradient(180deg, transparent 0 30%, #070b14 30%),
    repeating-linear-gradient(90deg, #0a0f1b 0 220px, #0d1424 220px 260px, #0a0f1b 260px 520px);
  clip-path: polygon(0 32%, 9% 32%, 10% 18%, 27% 18%, 28% 30%, 42% 30%, 43% 14%, 61% 14%, 62% 28%, 75% 28%, 76% 20%, 92% 20%, 93% 34%, 100% 34%, 100% 100%, 0 100%);
}
#wallpaper .fog {
  position: absolute; left: -20%; right: -20%; bottom: 8%; height: 26%;
  background: linear-gradient(180deg, transparent, rgb(249 248 244 / .05) 40%, transparent);
  filter: blur(18px);
  animation: drift 60s linear infinite alternate;
}
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

/* Chrome */
.glass {
  background: var(--bl-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--bl-glass-border);
}
#menubar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bl-menubar-h); z-index: 50;
  display: flex; align-items: center; gap: 16px; padding: 0 14px;
  background: rgb(19 30 46 / .55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--bl-glass-border);
  color: var(--bl-text); font-size: 13px;
}
#menubar .wordmark { font-weight: 700; letter-spacing: .02em; }
#menubar .wordmark::after { content: '.'; color: var(--bl-accent); }
#desktop {
  position: fixed; top: var(--bl-menubar-h); left: 0; right: 0; bottom: var(--bl-dock-h); z-index: 1;
}
#windows { position: absolute; inset: 0; }
#dock {
  position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 50;
  height: calc(var(--bl-dock-h) - 20px); padding: 0 10px; border-radius: 18px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bl-glass); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--bl-glass-border); box-shadow: var(--bl-shadow);
}

/* Tiles: glossy two-letter monograms in the category colour */
.tile {
  --tc: hsl(0 0% 60%);
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px;
  font-weight: 700; font-size: 12px; letter-spacing: .02em; color: #131E2E;
  background: var(--tc);
  background-image: linear-gradient(140deg, rgb(255 255 255 / .35), rgb(255 255 255 / 0) 55%, rgb(0 0 0 / .12));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 1px 2px rgb(0 0 0 / .35);
}

/* Windows */
.win {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column;
  border-radius: var(--bl-radius); overflow: hidden;
  background: rgb(19 30 46 / .78);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--bl-glass-border);
  box-shadow: var(--bl-shadow);
  transition: box-shadow var(--bl-motion), opacity var(--bl-motion);
  will-change: transform;
}
.win.focused { border-color: rgb(249 248 244 / .28); box-shadow: 0 24px 70px rgb(0 0 0 / .55), 0 2px 8px rgb(0 0 0 / .4); }
.win.dragging { transition: none; opacity: .92; }
.win[hidden] { display: none; }
.win-title {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 10px; flex: none;
  background: rgb(249 248 244 / .04); border-bottom: 1px solid var(--bl-glass-border);
  color: var(--bl-text); user-select: none; cursor: grab; touch-action: none;
}
.win.dragging .win-title { cursor: grabbing; }
.win-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--bl-muted); }
.win-actions { margin-left: auto; display: flex; gap: 2px; }
.win-actions button {
  width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--bl-text-body);
  font-size: 15px; line-height: 1; display: grid; place-items: center;
}
.win-actions button:hover { background: rgb(249 248 244 / .1); color: var(--bl-text); }
.win-actions .win-close:hover { background: var(--gpl-error); color: var(--gpl-offwhite); }
.win.pinned .win-pin { color: var(--bl-accent); }
.win-body { flex: 1; min-height: 0; overflow: auto; }
.win-resize { position: absolute; right: 0; bottom: 0; z-index: 5; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.win-resize::after { content: ''; position: absolute; right: 5px; bottom: 5px; width: 8px; height: 8px; border-right: 2px solid rgb(249 248 244 / .35); border-bottom: 2px solid rgb(249 248 244 / .35); }
.win.maximized { border-radius: 0; }

/* Info card */
.card { padding: 20px 22px 22px; color: var(--bl-text-body); }
.card-head { display: flex; gap: 14px; align-items: flex-start; }
.card-head .tile { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
.card-name { margin: 0; font-size: 22px; color: var(--bl-text); line-height: 1.15; }
.card-aka { margin: 4px 0 0; font-size: 12px; color: var(--bl-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.chip {
  --tc: hsl(0 0% 60%);
  font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px;
  color: #131E2E; background: var(--tc);
}
.card-summary { margin: 0 0 16px; font-size: 15px; color: var(--bl-text); }
.card-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 0 0 18px; }
.card-field dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--bl-muted); }
.card-field dd { margin: 2px 0 0; color: var(--bl-text); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.card-note { font-size: 12px; color: var(--bl-muted); flex-basis: 100%; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--bl-glass-border); background: rgb(249 248 244 / .06); color: var(--bl-text);
  font-weight: 600; font-size: 13px; text-decoration: none; transition: background var(--bl-motion), border-color var(--bl-motion);
}
.btn:hover { background: rgb(249 248 244 / .12); }
.btn-launch { background: var(--bl-accent); border-color: transparent; color: var(--gpl-offwhite); }
.btn-launch:hover { background: var(--bl-accent-hover); }
.btn-ghost { background: transparent; }

/* Launcher */
.launcher { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding-top: 12vh; background: rgb(6 10 20 / .45); }
.launcher[hidden] { display: none; }
.launcher-panel {
  width: min(760px, calc(100vw - 32px)); max-height: 72vh; display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  background: rgb(19 30 46 / .88); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgb(249 248 244 / .18); box-shadow: 0 30px 90px rgb(0 0 0 / .6);
}
.launcher-input {
  width: 100%; height: 58px; padding: 0 20px; border: 0; outline: 0; background: transparent;
  color: var(--bl-text); font: inherit; font-size: 20px;
}
.launcher-input::placeholder { color: var(--bl-muted); }
.launcher-facets { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--bl-glass-border); }
.facet, .facet-toggle {
  height: 28px; padding: 0 10px; border-radius: 7px; font: inherit; font-size: 12px;
  border: 1px solid var(--bl-glass-border); background: rgb(249 248 244 / .06); color: var(--bl-text-body);
}
.facet option { color: #131E2E; }
.facet-toggle[aria-pressed="true"] { background: var(--bl-accent); border-color: transparent; color: var(--gpl-offwhite); }
.launcher-results { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.result { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; cursor: pointer; color: var(--bl-text); }
.result:hover, .result.active { background: rgb(249 248 244 / .09); }
.result-name { font-weight: 600; }
.result-cat { color: var(--bl-muted); font-size: 12px; margin-left: auto; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--bl-glass-border); color: var(--bl-muted); }
.badge-stream { color: var(--gpl-offwhite); background: var(--bl-accent); border-color: transparent; }
.launcher-count { padding: 8px 16px; font-size: 12px; color: var(--bl-muted); border-top: 1px solid var(--bl-glass-border); }

/* Menu bar details */
#menubar .menubar-active { color: var(--bl-text-body); }
#menubar .menubar-spacer { flex: 1; }
#menubar .menubar-ws, #menubar .menubar-count { color: var(--bl-muted); font-size: 12px; }

/* Dock */
#dock button { border: 0; background: transparent; padding: 0; color: var(--bl-text-body); }
.dock-logo { display: grid; place-items: center; width: 92px; height: 36px; border-radius: 10px; }
.dock-logo img { width: 84px; height: auto; display: block; }
.dock-logo:hover { background: rgb(249 248 244 / .08); }
.dock-sep { width: 1px; height: 32px; background: var(--bl-glass-border); }
.dock-items { display: flex; gap: 6px; min-width: 44px; }
.dock-item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; transition: transform var(--bl-motion), background var(--bl-motion); }
.dock-item .tile { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.dock-item:hover { transform: translateY(-4px); background: rgb(249 248 244 / .08); }
.dock-item.open::after { content: ''; position: absolute; bottom: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--bl-text); }
.dock-item.focused::after { background: var(--bl-accent); }
.dock-item.minimized .tile { opacity: .55; }
.dock-item.pinned:not(.open) .tile { opacity: .8; }
.dock-ws { display: flex; gap: 6px; padding: 0 4px; }
#dock .ws-dot { width: 10px; height: 10px; border-radius: 50%; background: rgb(249 248 244 / .25); transition: background var(--bl-motion), transform var(--bl-motion); }
#dock .ws-dot[aria-pressed="true"] { background: var(--bl-accent); transform: scale(1.2); }
.dock-tile-all, .dock-launch { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--bl-glass-border) !important; }
.dock-tile-all:hover, .dock-launch:hover { background: rgb(249 248 244 / .08); }

/* Empty workspace */
#empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; padding: 24px; }
#empty[hidden] { display: none; }
.empty-title { margin: 0; font-size: 44px; font-weight: 700; color: var(--bl-text); line-height: 1.1; }
.empty-title .hl { font-family: var(--gpl-font-display); font-style: italic; font-weight: 800; color: var(--bl-accent); }
.empty-open {
  width: min(520px, 80vw); height: 52px; border-radius: 14px; font-size: 17px; text-align: left; padding: 0 18px;
  border: 1px solid rgb(249 248 244 / .18); background: rgb(19 30 46 / .7); color: var(--bl-muted);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.empty-open::after { content: 'Ctrl K'; float: right; font-size: 12px; opacity: .7; line-height: 50px; }
.empty-rows { display: grid; gap: 10px; }
.empty-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.empty-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--bl-muted); margin-right: 4px; }
.chip-tool {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 5px; border-radius: 10px;
  border: 1px solid var(--bl-glass-border); background: rgb(19 30 46 / .6); color: var(--bl-text); font-size: 13px; font-weight: 600;
}
.chip-tool:hover { background: rgb(249 248 244 / .1); }
.chip-tool .tile { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }
.empty-stats { display: flex; gap: 28px; margin-top: 8px; }
.stat { display: grid; justify-items: center; gap: 2px; }
.stat-n { font-size: 26px; font-weight: 700; color: var(--bl-text); }
.stat-l { font-size: 12px; color: var(--bl-muted); }

/* Stream window: the DCV canvas (or the fake adapter's placeholder) under a state overlay. No mock stage. */
.win.kind-stream .win-body { overflow: hidden; background: #070b14; }
.stream { position: relative; width: 100%; height: 100%; }
.stream-stage { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(600px 400px at 50% 60%, #121c30, #070b14 70%); }
.stream-mount { position: absolute; inset: 0; }
.win.kind-stream .win-body canvas { display: block; }
.fake-stream {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #131E2E;
  background: repeating-linear-gradient(135deg, var(--gpl-warning) 0 24px, #e0b84a 24px 48px);
}
.stream-overlay {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; gap: 12px; text-align: center; padding: 28px;
  background: rgb(7 11 20 / .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.stream-overlay[hidden] { display: none; }
.stream-title { margin: 0; font-size: 20px; color: var(--bl-text); }
.stream-body { margin: 0; max-width: 44ch; color: var(--bl-text-body); }
.stream-body:empty { display: none; }
.stream-detail { margin: 0; max-width: 44ch; font-size: 12px; color: var(--bl-muted); }
.stream-detail:empty { display: none; }
.stream-attach { display: grid; gap: 8px; width: min(360px, 100%); margin: 0 auto; text-align: left; }
.stream-attach[hidden] { display: none; }
.stream-attach label { display: grid; gap: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--bl-muted); }
.stream-attach input {
  height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--bl-glass-border);
  background: rgb(249 248 244 / .06); color: var(--bl-text); font: inherit;
}
.stream-attach input.shake { animation: shake 300ms; border-color: var(--gpl-error); }
.stream-attach-note { margin: 0; font-size: 12px; color: var(--bl-muted); }
.stream-attach .btn { justify-self: start; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.stream-actions { display: flex; gap: 8px; justify-content: center; }
.stream-confirm {
  position: absolute; left: 0; right: 0; bottom: 44px; z-index: 4; display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 10px; background: rgb(19 30 46 / .94); border-top: 1px solid var(--bl-glass-border); color: var(--bl-text);
}
.stream-confirm[hidden] { display: none; }
.stream-toolbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: rgb(19 30 46 / .85); border-top: 1px solid var(--bl-glass-border);
}
.stream-toolbar[hidden] { display: none; }
.stream-toolbar .btn { height: 28px; font-size: 12px; padding: 0 10px; }
.stream-rtt { margin-left: auto; font-size: 12px; color: var(--bl-muted); }
.stream-toolbar-actions { display: flex; gap: 6px; }

/* Dock: stream tiles say so */
.dock-kind {
  position: absolute; top: -5px; right: -6px; padding: 1px 5px; border-radius: 5px;
  font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--bl-accent); color: var(--gpl-offwhite); pointer-events: none;
}
