/* ============================================================
   RoadOS Desktop — window-manager layout layer.
   styles.css (copied verbatim from blackroados-home) owns every
   visual token and component class; this file only adds the
   retro-desktop placement: desktop icons, floating windows,
   drag/focus states, and the menu-bar text items. It introduces
   no new colors — everything references the styles.css tokens.
   ============================================================ */

/* the desktop plane sits between the topbar and the dock */
.desktop-plane {
  position: fixed;
  inset: var(--topbar) 0 0 0;
  overflow: hidden;
  background:
    radial-gradient(1000px 520px at 72% -8%, var(--surface-2), transparent 62%),
    var(--paper);
}

/* centered logo, like a wallpaper mark */
.desk-logo {
  position: absolute;
  left: 50%;
  top: calc(50% - var(--dock-h) / 2);
  width: min(410px, 46vh);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}

/* ---------- desktop icons (old-OS column flow) ---------- */
.desk-icons {
  position: absolute;
  left: 16px;
  top: 16px;
  bottom: calc(var(--dock-h) + 20px);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  z-index: 1;
}

.desk-icon {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-align: center;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.desk-icon:hover {
  background: var(--hover);
  border-color: var(--line);
}

.desk-icon:active {
  transform: scale(0.97);
}

.desk-icon .workspace-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.desk-icon .workspace-icon svg {
  width: 21px;
  height: 21px;
}

.desk-icon > span:last-child {
  max-width: 90px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- floating windows ---------- */
.win {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 330px;
  min-height: 200px;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: scale(0.98) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.win.is-open {
  opacity: 1;
  transform: none;
}

.win.is-blurred {
  box-shadow: var(--shadow);
}

.win.is-minimized {
  display: none;
}

/* the panel-header doubles as the title bar / drag handle */
.win > .panel-header {
  flex: none;
  cursor: grab;
  user-select: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  background: var(--paper-soft);
}

.win.is-dragging > .panel-header {
  cursor: grabbing;
}

.win-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-controls .icon-button {
  font: 600 12px/1 var(--sans);
}

.win-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 8px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.win-body::-webkit-scrollbar {
  width: 8px;
}

.win-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--line-strong);
  background-clip: content-box;
}

.win-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 5;
}

/* window content helpers that styles.css does not define */
.terminal-surface {
  margin: 4px 15px 15px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font: 11.5px/1.85 var(--mono);
  user-select: text;
}

.terminal-surface .t-soft {
  color: var(--faint);
}

.terminal-surface .t-prompt {
  font-weight: 650;
}

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--paper);
  animation: cursor-blink 1.06s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.about-body {
  padding: 6px 19px 18px;
}

.about-body .orbit-visual {
  margin: 6px auto 14px;
}

.about-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: -0.01em;
  line-height: 1.6;
}

.metric-grid.in-window {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 15px 14px;
}

/* ---------- menu bar (topbar text menus, old-OS style) ---------- */
.menu-items {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.menu-text {
  padding: 6px 11px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: -0.012em;
  transition: background 0.16s ease, color 0.16s ease;
}

.menu-text:hover {
  background: var(--hover);
  color: var(--ink);
}

.menu-brand {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 4px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.04em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

@media (max-width: 760px) {
  .desk-logo { width: min(240px, 60vw); }
  .menu-items .menu-text:not(:first-child) { display: none; }
  .win {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
  }
}

/* ---------- Home app: dashboard inside a window ---------- */
.win .home-content {
  height: 100%;
  padding: 20px 22px 26px;
}

.win .home-content .hero {
  min-height: 108px;
  margin-bottom: 16px;
}

.win .home-content .hero h1 {
  font-size: clamp(26px, 2.4vw, 38px);
}

.win .home-content .orbit-visual img {
  border-radius: 22px;
  background: #fff;
}

.win .home-content .system-orbit img {
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 1200px) {
  .win .home-content .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .win .home-content .primary-grid { grid-template-columns: 1fr; }
  .win .home-content .right-stack { grid-template-columns: 1fr 1fr; }
  .win .home-content .analytics-grid { grid-template-columns: 1fr; }
}

/* ---------- boot splash ---------- */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: var(--paper);
  transition: opacity 0.5s ease, visibility 0.5s;
}

.boot-splash.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot-splash img {
  width: 140px;
  height: 140px;
  animation: boot-breathe 1.6s ease-in-out infinite;
}

@keyframes boot-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.boot-bar {
  width: 180px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.boot-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
  animation: boot-fill 1.3s ease forwards;
}

@keyframes boot-fill {
  from { width: 0; }
  to { width: 100%; }
}

.boot-tag {
  color: var(--faint);
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* ---------- menu dropdowns ---------- */
.menu-root {
  position: relative;
}

.menu-root.is-open .menu-text {
  background: var(--hover);
  color: var(--ink);
}

.menu-drop {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 200;
  display: none;
  min-width: 208px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-float);
}

.menu-root.is-open .menu-drop {
  display: block;
  animation: palette-in 0.16s ease-out;
}

.menu-drop button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 540;
  letter-spacing: -0.012em;
  text-align: left;
  color: var(--ink-2);
}

.menu-drop button:hover {
  background: #111;
  color: #fff;
}

.menu-drop button span {
  color: var(--faint);
  font: 600 10px/1 var(--mono);
}

.menu-drop button:hover span {
  color: rgba(255, 255, 255, 0.6);
}

.menu-drop hr {
  height: 1px;
  margin: 5px 8px;
  border: 0;
  background: var(--line);
}

/* ---------- terminal input ---------- */
.terminal-surface {
  display: flex;
  flex-direction: column;
  min-height: calc(100% - 20px);
}

.t-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.t-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  caret-color: var(--paper);
}

/* ---------- notes ---------- */
.notes-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 8px);
  padding: 2px 15px 14px;
  gap: 9px;
}

.notes-area {
  flex: 1;
  min-height: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-soft);
  resize: none;
  outline: 0;
  font: 13px/1.7 var(--sans);
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.notes-area:focus {
  border-color: #bdbdb9;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
  background: #fff;
}

.notes-count {
  color: var(--faint);
  font: 600 8.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- calculator ---------- */
.calc-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 8px);
  padding: 2px 15px 15px;
  gap: 10px;
}

.calc-display {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-soft);
  text-align: right;
  font: 560 30px/1 var(--sans);
  letter-spacing: -0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-key.icon-button {
  width: auto;
  height: auto;
  min-height: 42px;
  border-radius: 12px;
  font: 590 15px/1 var(--sans);
  color: var(--ink);
}

.calc-key.is-fn {
  background: var(--surface-2);
}

.calc-key.is-op {
  background: #111;
  border-color: #111;
  color: #fff;
}

.calc-key.is-op:hover {
  background: #2b2b2b;
  color: #fff;
}

.calc-key.is-zero {
  grid-column: span 2;
}

/* ---------- Mission Control ---------- */
body.is-overview .desktop-plane {
  background: var(--surface-2);
}

body.is-overview .win {
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-float);
}

body.is-overview .win .win-body,
body.is-overview .win .win-resize {
  pointer-events: none;
}

body.is-overview .desk-icons,
body.is-overview .desk-logo {
  opacity: 0.25;
  transition: opacity 0.25s ease;
}

/* ---------- agents ---------- */
.agents-list {
  padding: 2px 10px 12px;
}

.agent-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 7px 8px;
  border-top: 1px solid var(--line);
  transition: background 0.16s ease, border-radius 0.16s ease;
}

.agent-row:first-child {
  border-top: 0;
}

.agent-row:hover {
  border-radius: 12px;
  background: var(--hover);
}

.agent-avatar {
  width: 34px;
  height: 34px;
  margin: 0;
  font-size: 13px;
}

.agent-avatar.small {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.agent-chip.is-busy span {
  background: var(--faint);
}

.agent-actions {
  display: flex;
  gap: 6px;
}

/* ---------- tasks ---------- */
.tasks-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 8px);
  padding: 2px 15px 13px;
  gap: 10px;
}

.task-compose {
  display: flex;
  gap: 8px;
}

.task-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-soft);
  outline: 0;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.task-input:focus {
  border-color: #bdbdb9;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.task-add {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #111;
  border-color: #111;
  color: #fff;
}

.task-add:hover {
  background: #2b2b2b;
  color: #fff;
}

.tasks-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.task-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 4px;
  border-top: 1px solid var(--line);
}

.task-row:first-child {
  border-top: 0;
}

.task-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: transparent;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.task-check svg {
  width: 12px;
  height: 12px;
}

.task-check:hover {
  border-color: #111;
}

.task-row.is-done .task-check {
  background: #111;
  border-color: #111;
  color: #fff;
}

.task-title {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: -0.012em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row.is-done .task-title {
  color: var(--faint);
  text-decoration: line-through;
}

.task-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 10px;
  font-weight: 620;
  white-space: nowrap;
}

.task-assignee:hover {
  background: var(--hover);
}

.task-remove {
  width: 24px;
  height: 24px;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.14s ease, color 0.14s ease;
}

.task-row:hover .task-remove {
  opacity: 1;
}

.task-remove:hover {
  color: #111;
}

.tasks-footer {
  color: var(--faint);
  font: 600 8.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- chat ---------- */
.chat-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 8px);
  padding: 2px 15px 13px;
  gap: 10px;
}

.chat-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px;
  scrollbar-width: thin;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 86%;
}

.chat-msg.is-me {
  align-self: flex-end;
}

.chat-msg .chat-text {
  padding: 9px 13px;
  border-radius: 15px;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.chat-msg.is-bot .chat-text {
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
  background: var(--paper-soft);
}

.chat-msg.is-me .chat-text {
  border-bottom-right-radius: 5px;
  background: #111;
  color: #fff;
}

.chat-msg.is-typing .chat-text {
  color: var(--faint);
  animation: cursor-blink 1.06s steps(1) infinite;
}

.chat-compose {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
  outline: 0;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chat-input:focus {
  border-color: #bdbdb9;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #111;
  border-color: #111;
  color: #fff;
}

.chat-send:hover {
  background: #2b2b2b;
  color: #fff;
}

/* ---------- chat meta ---------- */
.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.chat-brand {
  color: var(--faint);
  font: 600 8.5px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
   Gloss layer — frosted glass, specular highlights, sheen.
   Pure polish: no layout changes, no new components.
   ============================================================ */

/* wallpaper: deeper, softer light field */
.desktop-plane {
  background:
    radial-gradient(900px 480px at 18% -6%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1100px 620px at 82% 0%, #f1f1ef, transparent 62%),
    radial-gradient(1000px 700px at 50% 118%, #ececea, transparent 58%),
    linear-gradient(180deg, #fcfcfb, #f4f4f2);
}

.desk-logo {
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.16));
}

/* windows: frosted glass with a specular top edge */
.win.panel {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  border-color: rgba(217, 217, 213, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 1px rgba(0, 0, 0, 0.03),
    0 30px 80px rgba(0, 0, 0, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.05);
}

.win.is-blurred {
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 40px rgba(0, 0, 0, 0.07);
}

.win > .panel-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 250, 249, 0.55));
  border-bottom-color: rgba(232, 232, 229, 0.9);
}

/* desktop icons: glass tiles with a reflection */
.desk-icon .workspace-icon {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f4f4f2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.09),
    0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.desk-icon .workspace-icon::after {
  content: "";
  position: absolute;
  inset: 0 0 55% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.desk-icon:hover .workspace-icon {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 16px 34px rgba(0, 0, 0, 0.13),
    0 3px 8px rgba(0, 0, 0, 0.06);
}

/* dock: glassier, with a running-light sheen */
.dock {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 1px rgba(217, 217, 213, 0.55),
    0 24px 60px rgba(0, 0, 0, 0.14),
    0 3px 8px rgba(0, 0, 0, 0.05);
}

.dock-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12));
}

.dock-item:hover {
  background: linear-gradient(180deg, #ffffff, #f6f6f4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 12px 28px rgba(0, 0, 0, 0.12);
}

.dock-item img {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
}

/* topbar + menus: extra frost */
.topbar {
  background: rgba(255, 255, 255, 0.72);
}

.menu-drop {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 26px 70px rgba(0, 0, 0, 0.16),
    0 3px 10px rgba(0, 0, 0, 0.06);
}

/* buttons & keys: soft gradient caps */
.icon-button,
.select-button {
  background: linear-gradient(180deg, #ffffff, #f7f7f5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.calc-key.icon-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calc-key.is-op {
  background: linear-gradient(180deg, #2a2a2a, #0d0d0d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 3px 8px rgba(0, 0, 0, 0.22);
}

.task-add,
.chat-send {
  background: linear-gradient(180deg, #2a2a2a, #0d0d0d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 3px 8px rgba(0, 0, 0, 0.22);
}

.calc-display {
  background: linear-gradient(180deg, #fbfbfa, #f3f3f1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* chat: glossy bubbles */
.chat-msg.is-me .chat-text {
  background: linear-gradient(180deg, #2e2e2e, #0b0b0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.16);
}

.chat-msg.is-bot .chat-text {
  background: linear-gradient(180deg, #ffffff, #f7f7f5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* terminal: screen glass */
.terminal-surface {
  background: linear-gradient(180deg, #131313, #060606);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 40px rgba(0, 0, 0, 0.5),
    0 6px 18px rgba(0, 0, 0, 0.18);
}

/* toast: gloss cap */
.toast {
  background: linear-gradient(180deg, #232323, #050505);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 20px 50px rgba(0, 0, 0, 0.25);
}

/* boot splash: gentle stage light */
.boot-splash {
  background:
    radial-gradient(640px 420px at 50% 38%, #ffffff, transparent 70%),
    linear-gradient(180deg, #fcfcfb, #f2f2f0);
}

.boot-splash img {
  filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.2));
}

/* ---------- functional settings ---------- */
.settings-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 8px);
  padding: 2px 15px 14px;
  gap: 10px;
}

.settings-rows {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-top: 1px solid var(--line);
}

.settings-row:first-child {
  border-top: 0;
}

.settings-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.settings-label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.settings-value {
  color: var(--muted);
  font-size: 11px;
}

.os-switch {
  position: relative;
  width: 42px;
  height: 25px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--line-soft);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.os-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.18s ease;
}

.os-switch.is-on {
  background: #111;
  border-color: #111;
}

.os-switch.is-on::after {
  left: 19px;
}

.seg {
  display: flex;
  gap: 5px;
}

.seg button {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 10.5px;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.seg button:hover {
  background: var(--hover);
}

.seg button.is-on {
  background: #111;
  border-color: #111;
  color: #fff;
}

.panel-action.is-danger {
  color: #7a1f1f;
}

/* ---------- settings effects ---------- */
body.wp-grid .desktop-plane {
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px, 44px 44px, auto;
}

body.wp-plain .desktop-plane {
  background: var(--paper);
}

body.no-gloss .win.panel,
body.no-gloss .win.is-blurred {
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--shadow-float);
}

body.no-gloss .win.is-blurred {
  box-shadow: var(--shadow);
}

body.no-gloss .dock {
  background: rgba(255, 255, 255, 0.95);
}

body.no-gloss .desk-icon .workspace-icon::after {
  display: none;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  transition: none !important;
  animation: none !important;
}

/* ---------- activity (live) ---------- */
.activity-live {
  padding-top: 2px;
}

.activity-live .activity-empty {
  padding: 30px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

/* palette section label */
.command-section {
  padding: 10px 12px 4px;
  color: var(--faint);
  font: 600 8.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- bridge: real-machine visuals ---------- */
.bridge-banner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:2px 15px 12px;padding:10px 13px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper-soft)}
.bridge-sub{color:var(--muted);font-size:10.5px}
.proc-list{padding:0 16px 14px}
.proc-row{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.4fr) 46px;align-items:center;gap:10px;min-height:28px}
.proc-name{overflow:hidden;font-size:11px;font-weight:560;text-overflow:ellipsis;white-space:nowrap}
.proc-bar{height:5px;border-radius:999px;background:var(--line-soft);overflow:hidden}
.proc-bar i{display:block;height:100%;border-radius:999px;background:#111;transition:width .5s ease}
.proc-val{color:var(--muted);font:600 9.5px var(--mono);text-align:right}
.vol-list{padding:0 16px 4px}
.vol-row{display:grid;grid-template-columns:minmax(120px,.9fr) minmax(0,1.2fr) auto;align-items:center;gap:12px;min-height:34px}
.vol-name{display:flex;align-items:center;gap:8px;font-size:11.5px;font-weight:600}
.vol-name svg{width:13px;height:13px}
.vol-bar{height:6px;border-radius:999px;background:var(--line-soft);overflow:hidden}
.vol-bar i{display:block;height:100%;border-radius:999px;background:#111}
.vol-val{color:var(--muted);font:600 9.5px var(--mono);white-space:nowrap}
.about-machine{margin-top:16px;padding:13px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper-soft);text-align:left}
.about-machine-rows{margin-top:8px}
.about-machine-rows>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-height:26px}
.about-machine-rows span{color:var(--muted);font-size:10.5px}
.about-machine-rows b{font-size:11.5px;font-weight:620;text-align:right}

/* ---------- fleet ---------- */
.fleet-body{display:flex;flex-direction:column;height:calc(100% - 8px);overflow:auto;scrollbar-width:thin}
.fleet-list{padding:0 10px}
.fleet-row{display:grid;grid-template-columns:14px 34px minmax(0,1fr) auto;align-items:center;gap:11px;min-height:52px;padding:6px 8px;border-top:1px solid var(--line);border-radius:12px}
.fleet-row:first-child{border-top:0}
.fleet-row:hover{background:var(--hover)}
.fleet-row.is-down{opacity:.5}
.fleet-dot{width:8px;height:8px;border-radius:50%;background:transparent;border:1.5px solid var(--faint)}
.fleet-dot.is-on{background:#111;border-color:#111;box-shadow:0 0 0 3px var(--line-soft)}
.fleet-icon{width:30px;height:30px;border-radius:9px}
.fleet-icon svg{width:14px;height:14px}
.fleet-lat{color:var(--muted);font:600 10px var(--mono);white-space:nowrap}
