﻿/* AI Team Operations Room — cinematic cozy office
   Fonts are local/system only (no CDN) for zero external network calls. */
:root {
  --navy: #0b1c33;
  --navy-2: #122844;
  --navy-3: #1a3558;
  --panel: rgba(11, 28, 51, 0.88);
  --panel-border: rgba(148, 183, 220, 0.22);
  --wood: #8b5a2b;
  --wood-dark: #5c3a1a;
  --wood-light: #c4a574;
  --warm: #f3d5a5;
  --cream: #f7efe3;
  --text: #eef4fb;
  --muted: #9bb0c9;
  --working: #22c55e;
  --available: #8b5cf6;
  --reviewing: #eab308;
  --blocked: #ef4444;
  --limit: #f97316;
  --offline: #64748b;
  --done: #34d399;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: "Segoe UI Variable", "Segoe UI", Candara, "Trebuchet MS", sans-serif;
  --display: Cambria, "Palatino Linotype", Palatino, Georgia, serif;
  --tz: "Asia/Qatar";
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: #06101c;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ——— Top bar ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.96), rgba(8, 18, 34, 0.82));
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy-2);
  object-fit: cover;
}

.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.topbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.field-inline select,
.dialog-body input,
.dialog-body select,
.dialog-body textarea {
  background: var(--navy-2);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  min-width: 0;
}

.team-online {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-size: 0.8rem;
  font-weight: 600;
}

.team-online::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--working);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.btn {
  border: 1px solid var(--panel-border);
  background: var(--navy-3);
  color: var(--text);
  border-radius: 9px;
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: #234670;
}

.btn.primary {
  background: linear-gradient(135deg, #2f6fed, #1d4ed8);
  border-color: transparent;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.btn.icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.btn.danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.workspace-menu {
  position: absolute;
  top: 64px;
  right: 16px;
  z-index: 50;
  width: min(320px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workspace-menu[hidden] {
  display: none;
}

.workspace-menu button {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  color: var(--text);
}

.workspace-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.workspace-menu button.danger {
  color: #fecaca;
}

.menu-note {
  margin: 0.4rem 0.3rem 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

/* ——— Office stage ——— */
.office-stage {
  position: relative;
  flex: 1;
  padding: 1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.office-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.office-bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
  opacity: 0.48;
}

.office-bg-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(255, 170, 80, 0.2), transparent 45%),
    radial-gradient(ellipse at 80% 10%, rgba(56, 120, 200, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(6, 16, 28, 0.55) 0%, rgba(6, 16, 28, 0.62) 40%, rgba(6, 16, 28, 0.88) 70%, rgba(6, 16, 28, 0.96) 100%);
}

.office-window-glow {
  position: absolute;
  left: -5%;
  top: 5%;
  width: 35%;
  height: 45%;
  background: radial-gradient(ellipse, rgba(255, 176, 96, 0.22), transparent 70%);
  animation: glow-shift 8s ease-in-out infinite alternate;
}

@keyframes glow-shift {
  from {
    opacity: 0.7;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(8px);
  }
}

.office-stage > * {
  position: relative;
  z-index: 1;
}

.section-label {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  font-weight: 600;
}

/* ——— Wall panels ——— */
.wall-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(280px, 1.3fr) minmax(220px, 1fr);
  gap: 0.85rem;
}

.wall-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.wall-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
}

.wall-panel h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.panel-body {
  padding: 0.75rem 0.85rem 0.9rem;
}

.collapsible-panel.collapsed .panel-body {
  display: none;
}

.status-counts {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.status-counts li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.status-counts .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

.project-folders {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.folder-chip {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  color: var(--cream);
}

.folder-chip.active {
  border-color: #60a5fa;
  background: rgba(59, 130, 246, 0.2);
}

.sprint-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem 1rem;
}

.progress-ring {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.ring-fg {
  fill: none;
  stroke: url(#none);
  stroke: #3b82f6;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.6s ease;
}

.ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
}

.sprint-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  flex: 1;
}

.sprint-stats li {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.subs-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
}

.sub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
}

.sub-row:hover {
  border-color: var(--panel-border);
}

.sub-row .name {
  font-weight: 600;
  font-size: 0.84rem;
}

.sub-row .meta {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}
.badge.warn {
  background: rgba(234, 179, 8, 0.2);
  color: #fde68a;
}
.badge.limit {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
}
.badge.unknown {
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
}

.subs-summary {
  margin: 0.65rem 0 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ——— Management + desks ——— */
.management-desk,
.desk-floor {
  background: linear-gradient(180deg, rgba(15, 30, 52, 0.78), rgba(15, 30, 52, 0.55));
  border: 1px solid var(--panel-border);
  border-radius: calc(var(--radius) + 4px);
  padding: 0.85rem 1rem 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.mgmt-row,
.long-desk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: stretch;
  padding: 0.5rem 0.25rem 0.75rem;
  background: linear-gradient(180deg, #a67c52 0%, #7a4e2a 40%, #5c3a1a 100%);
  border-radius: 16px;
  border: 2px solid #3d2612;
  box-shadow:
    inset 0 2px 0 rgba(255, 220, 170, 0.25),
    inset 0 -8px 16px rgba(0, 0, 0, 0.25),
    0 12px 24px rgba(0, 0, 0, 0.35);
  min-height: 210px;
}

.mgmt-row {
  min-height: 200px;
  background: linear-gradient(180deg, #8b6914 0%, #5c4508 45%, #3d2e05 100%);
  border-color: #2a2004;
}

.station {
  width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.35rem 0.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  position: relative;
}

.station:hover,
.station:focus-visible {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  outline: none;
}

.station.drop-target {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.45);
}

.station.mgmt {
  width: 170px;
}

.avatar-wrap {
  position: relative;
  width: 110px;
  height: 145px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
}

.station.working .avatar-wrap::after {
  content: "";
  position: absolute;
  left: 28%;
  bottom: 22%;
  width: 44%;
  height: 10px;
  background: linear-gradient(90deg, transparent, #60a5fa, #a78bfa, transparent);
  opacity: 0.85;
  animation: screen-glow 1.4s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes screen-glow {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.station.working .avatar-wrap img {
  animation: typing-bob 1.6s ease-in-out infinite;
}

@keyframes typing-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.status-light {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px currentColor;
}

.status-light.working {
  background: var(--working);
  color: var(--working);
}
.status-light.available {
  background: var(--available);
  color: var(--available);
}
.status-light.reviewing {
  background: var(--reviewing);
  color: var(--reviewing);
}
.status-light.blocked {
  background: var(--blocked);
  color: var(--blocked);
}
.status-light.usage_limit {
  background: var(--limit);
  color: var(--limit);
}
.status-light.offline {
  background: var(--offline);
  color: var(--offline);
}
.status-light.task_completed {
  background: var(--done);
  color: var(--done);
  animation: done-pop 1.2s ease;
}

@keyframes done-pop {
  0% {
    transform: scale(0.6);
  }
  50% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

.nameplate {
  width: 100%;
  background: linear-gradient(180deg, #fff, #e8edf5);
  color: #0f172a;
  border-radius: 10px;
  padding: 0.4rem 0.45rem 0.45rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  text-align: left;
}

.nameplate .name {
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0;
}

.nameplate .role {
  margin: 0.05rem 0 0.25rem;
  font-size: 0.65rem;
  color: #475569;
}

.nameplate .status-pill {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  margin-bottom: 0.2rem;
}

.nameplate .task-line {
  margin: 0;
  font-size: 0.68rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nameplate .progress {
  margin-top: 0.25rem;
  height: 5px;
  background: #dbe3ef;
  border-radius: 999px;
  overflow: hidden;
}

.nameplate .progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  border-radius: inherit;
}

.mgmt-queue {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
}

.mgmt-queue h3 {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  color: var(--warm);
}

.mgmt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mgmt-chip {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  color: var(--text);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgmt-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ——— Task zone ——— */
.task-zone {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.85rem;
  align-items: stretch;
}

.task-cabinet {
  background: linear-gradient(180deg, #9a6a3a, #5a3518);
  border: 3px solid #3a220f;
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow:
    inset 0 2px 0 rgba(255, 220, 170, 0.2),
    var(--shadow);
}

.task-cabinet h2 {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  text-align: center;
  color: #fff7eb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.drawers {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drawer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #d4b48a, #b88955);
  color: #2a1a0c;
  border: 1px solid #7a5228;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.drawer:hover,
.drawer.active {
  filter: brightness(1.08);
  outline: 2px solid #fde68a;
}

.drawer .count {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
}

.cabinet-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: center;
}

.kanban {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0.65rem;
  box-shadow: var(--shadow);
  overflow: auto;
}

.kanban-cols {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 0.55rem;
  min-width: 920px;
}

.kanban-col {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  min-height: 180px;
  padding: 0.45rem;
}

.kanban-col.drop-target {
  border-color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
}

.kanban-col h3 {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.task-card {
  background: linear-gradient(180deg, #fff, #f3f6fb);
  color: #0f172a;
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
  margin-bottom: 0.45rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  cursor: grab;
  border: 1px solid #d9e2ef;
  text-align: left;
  width: 100%;
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.55;
}

.task-card.done {
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  border-color: #6ee7b7;
}

.task-card .title {
  font-weight: 700;
  font-size: 0.78rem;
  margin: 0 0 0.25rem;
}

.task-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
}

.task-card .chip {
  font-size: 0.62rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 600;
}

.task-card .chip.high {
  background: #fee2e2;
  color: #991b1b;
}
.task-card .chip.medium {
  background: #fef3c7;
  color: #92400e;
}
.task-card .chip.low {
  background: #e0e7ff;
  color: #3730a3;
}

.task-card .progress {
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.25rem 0;
}

.task-card .progress > span {
  display: block;
  height: 100%;
  background: #3b82f6;
}

.task-card .card-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.task-card .card-actions button {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 0.2rem;
  font-size: 0.65rem;
  color: #334155;
}

/* ——— Dialogs ——— */
.overlay-panel {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 1.5rem);
}

.overlay-panel::backdrop {
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, #132742, #0b1c33);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
}

.dialog-card.wide {
  width: min(720px, 100%);
}

.dialog-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--panel-border);
}

.dialog-card > header h2 {
  margin: 0;
  font-size: 1rem;
}

.dialog-body {
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.65rem;
  max-height: min(70vh, 640px);
  overflow: auto;
}

.dialog-body label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dialog-body textarea {
  min-height: 72px;
  resize: vertical;
}

.task-editor {
  grid-template-columns: 1fr 1fr;
}

.task-editor label.full {
  grid-column: 1 / -1;
}

.dialog-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.18);
}

.dialog-footer.wrap {
  flex-wrap: wrap;
}

.flex-spacer {
  flex: 1;
}

.conflict-banner {
  margin: 0 0.95rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde68a;
  font-size: 0.8rem;
}

.form-grid {
  display: grid;
  gap: 0.55rem;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.list-row .actions {
  display: flex;
  gap: 0.3rem;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--panel-border);
  background: rgba(6, 16, 28, 0.95);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #0f172a;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
}

.toast[hidden] {
  display: none;
}

/* V2.1 bridge status */
.bridge-badge {
  font-variant-numeric: tabular-nums;
}
.bridge-badge[data-state="online"] {
  color: #b8e0c8;
  border-color: #3d6b52;
}
.bridge-badge[data-state="offline"] {
  color: #c9b8a0;
}
.bridge-badge[data-state="reconnecting"] {
  color: #e0d4a8;
}
.bridge-adapters {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.bridge-adapter-card {
  border: 1px solid var(--panel-border);
  padding: 0.55rem 0.7rem;
  background: rgba(8, 18, 32, 0.55);
  font-size: 0.82rem;
}
.bridge-adapter-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.25rem;
}
.bridge-chip {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--panel-border);
  color: var(--muted);
}
.bridge-executions {
  font-size: 0.8rem;
  max-height: 220px;
  overflow: auto;
}
.bridge-executions article {
  border-bottom: 1px solid var(--panel-border);
  padding: 0.4rem 0;
}
/* Inline notice — never covers topbar navigation (Bridge/Inbox/modes/Workspace) */
.migration-notice {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin: 0;
  background: #152536;
  border-top: 1px solid var(--panel-border);
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.migration-notice p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.migration-notice[hidden] {
  display: none;
}
.bridge-status-block {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

/* Immersive office mode */
body.immersive .topbar {
  opacity: 0.15;
  transition: opacity 0.25s;
}
body.immersive .topbar:hover,
body.immersive .topbar:focus-within {
  opacity: 1;
}
body.immersive .app-footer,
body.immersive .wall-row .collapsible-panel {
  display: none;
}
body.immersive .office-bg-photo {
  opacity: 0.62;
}
body.immersive .office-stage {
  padding-top: 0.5rem;
}
body.immersive .sprint-panel {
  max-width: 420px;
  margin: 0 auto;
}

body.panels-collapsed .wall-row {
  grid-template-columns: 1fr;
}
body.panels-collapsed .team-status-panel,
body.panels-collapsed .subs-panel {
  display: none;
}

/* Status pill colors on nameplates */
.pill-working {
  background: #dcfce7;
  color: #166534;
}
.pill-available {
  background: #ede9fe;
  color: #5b21b6;
}
.pill-reviewing {
  background: #fef9c3;
  color: #854d0e;
}
.pill-blocked {
  background: #fee2e2;
  color: #991b1b;
}
.pill-usage_limit {
  background: #ffedd5;
  color: #9a3412;
}
.pill-offline {
  background: #e2e8f0;
  color: #475569;
}
.pill-task_completed {
  background: #d1fae5;
  color: #065f46;
}

.demo-banner {
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #ddd6fe;
  font-size: 0.78rem;
  text-align: center;
}

.empty-hint {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.5rem;
}

/* Responsive compact layout */
@media (max-width: 1100px) {
  .wall-row {
    grid-template-columns: 1fr 1fr;
  }
  .sprint-panel {
    grid-column: 1 / -1;
  }
  .task-zone {
    grid-template-columns: 1fr;
  }
  .drawers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .wall-row {
    grid-template-columns: 1fr;
  }
  .station,
  .station.mgmt {
    width: 132px;
  }
  .avatar-wrap {
    width: 96px;
    height: 126px;
  }
  .task-editor {
    grid-template-columns: 1fr;
  }
  .drawers {
    grid-template-columns: repeat(2, 1fr);
  }
  .brand h1 {
    font-size: 1.05rem;
  }
}

/* V1.1 — compact integrated office; all data remains live HTML. */
.office-stage > .office-atmosphere {position:absolute; inset:0; z-index:0;}
.office-bg-photo {opacity:.28; object-position:center;}
.office-bg-tint {background:linear-gradient(180deg,rgba(8,15,26,.58),rgba(8,15,26,.75));}
.office-window-glow {animation:none;}
.topbar {padding:8px 16px;}
.team-online {background:#20334a;color:#d4e2f3;}
.team-online::before {background:#91a8c5;box-shadow:none;animation:none;}
.office-stage {display:grid;grid-template-columns:minmax(255px,1fr) minmax(0,3fr);gap:10px;padding:10px 16px;align-content:start;}
/* Office room is the sole live content plane — span full stage (avoid right-side void) */
.office-stage > .office-room {grid-column:1 / -1;}
.wall-row,.task-zone,.demo-banner {grid-column:1/-1;}
body.mode-office .office-stage {
  display:flex;
  flex-direction:column;
  grid-template-columns:none;
}
.wall-row {gap:10px;grid-template-columns:1fr 1.2fr 1fr;}
.wall-panel {background:rgba(12,27,45,.94);border:1px solid #64778b;box-shadow:0 4px 0 #0a1421,0 8px 18px #0005;border-radius:9px;}
.wall-panel>header {padding:5px 10px;background:#1d324b;}
.wall-panel .btn.icon {width:24px;height:24px;}
.panel-body {padding:7px 10px;}
.status-counts {gap:4px;margin-bottom:6px;}
.status-counts li {padding:3px 6px;font-size:12px;}
.folder-chip {padding:3px 7px;}
.sprint-body {padding:7px 10px;gap:10px;}
.progress-ring {width:82px;height:82px;}
.ring-label {display:flex;align-items:center;justify-content:center;gap:1px;font:700 19px var(--font);}
.sprint-stats {grid-template-columns:1fr 1fr;gap:3px 12px;}
.sprint-stats li {font-size:11px;padding:3px 0;gap:5px;}
.subs-list {max-height:85px;gap:3px;}
.sub-row {padding:3px 6px;gap:1px 5px;}
.sub-row .meta {font-size:10px;}
.subs-summary {font-size:10px;margin:4px 0;}
.management-desk,.desk-floor {min-width:0;padding:8px;border-radius:10px;background:linear-gradient(145deg,#223247e8,#101e30e8);box-shadow:0 5px 16px #0005;}
.section-label {font-size:11px;margin:0 0 5px;color:#f1cf95;}
.mgmt-row,.long-desk {min-height:0;gap:5px;padding:4px;background:linear-gradient(180deg,#b18a60 0%,#8a6140 48%,#483424 49%,#302319 100%);border:1px solid #98714d;border-radius:8px;box-shadow:inset 0 2px 0 #e9bb8566,0 5px 0 #37271d;}
.mgmt-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
.long-desk {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));}
.long-desk.eight-seat {grid-template-columns:repeat(8,minmax(0,1fr));}
.station,.station.mgmt {width:100%;min-width:0;padding:3px;gap:3px;justify-content:start;}
.avatar-wrap {width:100%;height:clamp(65px,9vh,96px);border-radius:7px;overflow:hidden;background:linear-gradient(145deg,#1f3143,#64707a);}
.avatar-wrap img {object-fit:cover;filter:none;}
.station.mgmt .avatar-wrap img {object-fit:cover;filter:none;}
.status-light {z-index:2;top:5px;right:5px;width:10px;height:10px;}
.nameplate {background:linear-gradient(155deg,#edf2f8,#d7e1ed);padding:5px;border-radius:5px;min-height:78px;}
.nameplate .name {font-size:12px;}
.nameplate .role {font-size:10px;line-height:1.2;min-height:24px;}
.nameplate .task-line {font-size:10px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.station-progress {display:flex;gap:4px;align-items:center;}
.station-progress .progress {flex:1;margin:0;}
.station-progress small {font-size:10px;}
.mgmt-queue {margin:7px 0 0;padding:5px;max-height:62px;overflow:auto;}
.mgmt-queue h3 {font-size:10px;margin:0 0 2px;}
.empty-hint {font-size:11px;padding:3px;margin:0;}
.task-zone {grid-template-columns:155px minmax(0,1fr);gap:10px;}
.task-cabinet {padding:6px;border-width:2px;border-radius:8px;background:linear-gradient(90deg,#50321d,#956b42 12%,#735030 88%,#452e1b);}
.task-cabinet h2 {font-size:12px;margin:0 0 4px;}
.drawers {gap:3px;}
.drawer {position:relative;padding:4px 6px;font-size:11px;border-radius:4px;}
.drawer::after {content:"";position:absolute;left:50%;top:3px;width:18px;height:3px;background:#6d4f34;border-radius:3px;}
.cabinet-actions {margin-top:5px;}
.kanban {padding:6px;border-radius:8px;min-width:0;max-height:220px;}
.kanban-cols {min-width:0;grid-template-columns:repeat(7,minmax(96px,1fr));gap:5px;}
.kanban-col {min-height:150px;padding:5px;border-radius:5px;border-top:3px solid #8194ac;}
.kanban-col:nth-child(2){border-top-color:#5895e5}.kanban-col:nth-child(3){border-top-color:#279f90}.kanban-col:nth-child(4){border-top-color:#d9b35d}.kanban-col:nth-child(5){border-top-color:#cf6570}.kanban-col:nth-child(6){border-top-color:#c9a227}.kanban-col:nth-child(7){border-top-color:#6bb28d}
.kanban-col h3 {font-size:10px;}
.task-card {padding:5px;}
.app-footer {padding:4px 16px;font-size:10px;}
.demo-banner {margin:0;padding:4px;}
body.immersive .wall-row {grid-template-columns:1fr;}
body.immersive .sprint-panel {max-width:none;margin:0;}
@media(max-width:1150px){.office-stage{grid-template-columns:1fr;}.mgmt-row{grid-template-columns:repeat(2,minmax(0,160px));justify-content:center;}.wall-row{grid-template-columns:1fr 1fr 1fr;}.sprint-panel{grid-column:auto;}.long-desk{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:720px){.office-stage{padding:8px;}.wall-row{grid-template-columns:1fr;}.task-zone{grid-template-columns:1fr;}.long-desk{grid-template-columns:repeat(2,minmax(0,1fr));}.kanban-cols{min-width:690px;}.kanban{max-height:360px;}.topbar{position:relative;}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;}}
/* V1.2 local mail center; existing desk controls remain unchanged. */
.mail-desk-wrap{position:relative;min-width:0}.desk-mail{position:absolute;top:8px;left:8px;z-index:3;border:1px solid #b99b62;border-radius:6px;background:#182b3e;color:#f6dca7;padding:4px 7px;cursor:pointer;font-size:12px;box-shadow:0 2px 6px #0008}.desk-mail.has-mail{background:#e2ab53;color:#142234;animation:mailpulse 2s ease-in-out infinite}@keyframes mailpulse{50%{transform:translateY(-2px);box-shadow:0 0 9px #ffc86f}}.mail-cabinet{width:100%;margin:0 0 5px;background:#55391f;color:#ffdfab}.mgmt-queue{max-height:none}.mail-card{width:min(1050px,96vw)}.mail-toolbar,.mail-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.mail-toolbar{padding:10px;border-bottom:1px solid #344b64}.mail-layout{display:grid;grid-template-columns:minmax(210px,1fr) minmax(0,2fr);height:min(68vh,650px)}#mailList,#mailDetail{overflow:auto;padding:12px;min-width:0}#mailList{border-right:1px solid #344b64}.mail-item{display:grid;text-align:left;gap:5px;width:100%;padding:10px;margin-bottom:5px;background:#172b42;color:#e5edf7;border:1px solid #3a5067;border-radius:6px;cursor:pointer}.mail-item.unread{border-left:4px solid #edb85b}.mail-item small,.mail-origin,.mail-footer{color:#a9bdd3;font-size:12px}.mail-body{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#0b192b;padding:12px;border-radius:6px}.mail-actions button,#mailDetail button{background:#233d58;color:#f1f5fa;border:1px solid #536d85;border-radius:5px;padding:6px 9px;cursor:pointer}.mail-form{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mail-form label{display:grid;gap:4px;font-size:12px}.mail-wide{grid-column:1/-1}#mailDetail input,#mailDetail textarea,#mailDetail select,.mail-toolbar select{background:#0e2136;color:#e5edf7;border:1px solid #536d85;border-radius:5px;padding:6px;max-width:100%;min-width:0}#mailDetail textarea{width:100%}#mailDetail a{color:#91c8ff}.mail-footer{padding:8px 12px;border-top:1px solid #344b64}.mail-actions input{width:100px}body.immersive .topbar{opacity:1}body.immersive .wall-row{grid-template-columns:1fr 1.2fr 1fr}body.immersive .wall-row .collapsible-panel{display:block}body.immersive .office-stage{background:radial-gradient(ellipse at 50% 45%,#75533344,transparent 75%)}body.immersive .management-desk,body.immersive .desk-floor{background:linear-gradient(135deg,#3f3428e8,#152639e8);border-color:#92704b}body.immersive .avatar-wrap{height:clamp(90px,15vh,155px)}body.immersive .mgmt-row,body.immersive .long-desk{background:linear-gradient(180deg,#b18a60,#8a6140 56%,#483424 57%,#302319);padding:8px;gap:7px}body.immersive .station.working .status-light{animation:mailpulse 2s infinite}@media(max-width:720px){.mail-layout{grid-template-columns:1fr;grid-template-rows: minmax(90px,25vh) 1fr}body.immersive .wall-row{grid-template-columns:1fr}.mail-form{grid-template-columns:1fr}.mail-wide{grid-column:auto}}@media(prefers-reduced-motion:reduce){.desk-mail.has-mail,body.immersive .station.working .status-light{animation:none}}

/* ——— V2.0 Office / Dashboard ——— */
.mode-switch{display:inline-flex;border:1px solid var(--panel-border);border-radius:9px;overflow:hidden}
.mode-switch .btn{border:0;border-radius:0;background:transparent}
.mode-switch .btn.active{background:linear-gradient(135deg,#2f6fed,#1d4ed8);font-weight:600}
.approval-board{margin-top:.55rem;padding:.55rem .65rem;background:rgba(0,0,0,.28);border:1px solid rgba(201,162,39,.35);border-radius:12px}
.approval-board h3{margin:0 0 .4rem;font-size:.78rem;color:var(--warm)}
.approval-board-list{display:flex;flex-wrap:wrap;gap:.35rem}
.approval-chip{border:1px solid rgba(201,162,39,.45);background:rgba(201,162,39,.12);color:#fde68a;border-radius:8px;padding:.3rem .5rem;font-size:.72rem;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.approval-chip.task{border-color:rgba(96,165,250,.45);background:rgba(59,130,246,.12);color:#bfdbfe}
.blocker-line,.unread-line{margin:.15rem 0 0;font-size:.62rem;color:#9a3412;font-weight:600}
.unread-line{color:#92400e}
.evidence-list{display:grid;gap:.55rem}
.evidence-card{background:rgba(255,255,255,.04);border:1px solid var(--panel-border);border-radius:10px;padding:.55rem .65rem}
.evidence-card .meta{font-size:.72rem;color:var(--muted)}
.evidence-card header{display:flex;justify-content:space-between;gap:.5rem;align-items:center}

/* Office mode: fit primary desktop viewports — reduce blank band above desks; avoid clipping cabinets */
body.mode-office .office-stage{
  max-height:calc(100dvh - 92px);
  overflow:auto;
}
body.mode-office .office-room-inner{
  gap:6px;
  padding:8px 10px 10px;
}
body.mode-office .desk-bay{
  margin-top:0;
}
body.mode-office .section-label{
  margin:0 0 0.35rem;
}
@media (min-width:1366px) and (min-height:700px){
  body.mode-office:not(.immersive) .office-stage{
    display:flex; flex-direction:column;
    gap:0; padding:4px 10px 6px;
    max-height:calc(100dvh - 88px);
    overflow:hidden;
  }
  body.mode-office:not(.immersive) .office-room{
    flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column;
  }
  body.mode-office:not(.immersive) .office-room-inner{
    flex:1; min-height:0; display:grid;
    /* Wall compact · desks follow closely · cabinets remain visible */
    grid-template-rows:auto auto minmax(168px,1fr);
    gap:4px;
    padding:6px 10px 8px;
  }
  body.mode-office:not(.immersive) .wall-monitors{grid-template-columns:1fr 1.15fr 1fr;gap:.4rem}
  body.mode-office:not(.immersive) .desk-bay{
    min-height:0;
    overflow:visible;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-content:start;
  }
  body.mode-office:not(.immersive) .room-cabinets{
    max-height:none;
    min-height:0;
    overflow:visible;
  }
  body.mode-office:not(.immersive) .kanban{max-height:min(200px,22vh); overflow:auto}
  body.mode-office:not(.immersive) .task-cabinet{overflow:visible}
  body.mode-office:not(.immersive) .long-desk.eight-seat{grid-template-columns:repeat(8,minmax(0,1fr));display:grid;gap:4px}
  body.mode-office:not(.immersive) .station{width:auto;min-width:0}
  body.mode-office:not(.immersive) .nameplate{min-height:0; overflow:visible}
  body.mode-office:not(.immersive) .avatar-wrap{width:100%;height:clamp(88px,12vh,128px)}
  body.mode-office:not(.immersive) .wall-panel{max-height:128px}
  body.mode-office:not(.immersive) .subs-list{max-height:58px}
  body.mode-office:not(.immersive) .mgmt-sideboard{max-height:min(120px,16vh); overflow:auto}
}
@media (min-width:1366px) and (max-height:820px){
  body.mode-office:not(.immersive) .office-stage{
    overflow:auto;
    max-height:calc(100dvh - 88px);
  }
  body.mode-office:not(.immersive) .office-room{
    overflow:visible;
  }
  body.mode-office:not(.immersive) .office-room-inner{
    grid-template-rows:auto auto auto;
    gap:4px;
  }
  body.mode-office:not(.immersive) .avatar-wrap{height:clamp(64px,9vh,96px)}
  body.mode-office:not(.immersive) .wall-panel{max-height:100px}
  body.mode-office:not(.immersive) .kanban{max-height:140px}
}
@media (min-width:1900px) and (min-height:1000px){
  body.mode-office:not(.immersive) .office-room-inner{
    grid-template-rows:minmax(110px,auto) minmax(0,1.4fr) minmax(190px,auto);
  }
  body.mode-office:not(.immersive) .avatar-wrap{height:clamp(110px,14vh,148px)}
}

/* Dashboard mode: distinct management view (not a restyle of Virtual Office) */
body.mode-dashboard .office-atmosphere{opacity:.2}
body.mode-dashboard .office-bg-photo{opacity:.12;filter:blur(2px) saturate(.8)}
body.mode-dashboard .office-stage{
  display:block;
  max-height:calc(100dvh - 92px);
  overflow:auto;
}
body.mode-dashboard .office-room{display:none!important}
body.mode-dashboard .mgmt-dashboard{display:block}
body.mode-office .mgmt-dashboard{display:none!important}
body.mode-office .section-label{
  white-space:normal;
  overflow:visible;
  text-overflow:unset;
  line-height:1.25;
}
body.mode-office .kanban{
  max-height:min(42vh,420px);
  overflow:auto;
}
body.mode-office .kanban-cols{
  min-width:0;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
}

@media (max-width:1365px){
  body.mode-office .office-stage{overflow:auto;max-height:none}
}

/* ——— V2.0 correction: coherent cinematic office room ——— */
.office-room{
  position:relative;
  border:1px solid rgba(185,155,98,.35);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,160,.12);
  background:
    linear-gradient(180deg, rgba(18,28,42,.55) 0%, rgba(18,28,42,.15) 28%, rgba(12,18,28,.75) 100%);
}
.room-floor{
  position:absolute; left:0; right:0; bottom:0; height:34%;
  background:
    linear-gradient(180deg, transparent, rgba(40,28,16,.55) 18%, #2a1c10 100%),
    repeating-linear-gradient(90deg, rgba(255,220,160,.04) 0 2px, transparent 2px 28px);
  pointer-events:none; z-index:0;
}
.room-wall-back{
  position:absolute; left:0; right:0; top:0; height:38%;
  background:linear-gradient(180deg, rgba(22,34,52,.82), rgba(22,34,52,.2) 70%, transparent);
  pointer-events:none; z-index:0;
}
.room-wall-shelf{
  position:absolute; left:4%; right:4%; top:2%; height:10px;
  background:linear-gradient(180deg,#8b6844,#5a3f26);
  border-radius:3px; box-shadow:0 8px 18px rgba(0,0,0,.35); z-index:0; opacity:.65;
}
body.mode-office .wall-monitors .wall-panel{
  background:rgba(8,16,28,.78);
  border:2px solid #2a3d55;
  box-shadow:0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(120,160,200,.15);
}
body.mode-office .full-team-desk{position:relative}
body.mode-office .full-team-desk .desk-divider{
  position:absolute; left:calc(25% - 1px); top:8%; bottom:18%; width:2px;
  background:linear-gradient(180deg, transparent, rgba(255,220,160,.45), transparent);
  z-index:2; pointer-events:none;
}
body.mode-office .station.mgmt .nameplate{box-shadow:0 0 0 1px rgba(201,162,39,.45), 0 3px 0 #5a3d24}
.room-plant{
  position:absolute; width:54px; height:70px; z-index:0; pointer-events:none; opacity:.7;
  background:
    radial-gradient(ellipse at 50% 80%, #3f7a3a 0 28%, transparent 32%),
    radial-gradient(ellipse at 35% 55%, #4f9a48 0 22%, transparent 26%),
    radial-gradient(ellipse at 65% 50%, #2f6a2c 0 20%, transparent 24%),
    linear-gradient(180deg, transparent 55%, #6b4423 56% 100%);
}
.room-plant.left{left:10px; bottom:42%;}
.room-plant.right{right:12px; bottom:40%; transform:scaleX(-1);}
.room-lamp{
  position:absolute; top:12%; width:18px; height:70px; z-index:0; pointer-events:none;
  background:linear-gradient(180deg,#d8b57a,#7a5a32 30%, #3a2a18 32%, #3a2a18 100%);
  border-radius:4px; opacity:.55;
  box-shadow:0 0 40px 18px rgba(255,190,110,.18);
}
.room-lamp.left{left:18%;}
.room-lamp.right{right:16%;}
.office-room-inner{position:relative; z-index:1; display:flex; flex-direction:column; gap:10px; padding:10px 12px 12px;}

.continuous-desk{
  position:relative;
  z-index:1;
  border-radius:14px 14px 10px 10px;
  padding:10px 8px 14px;
  background:
    linear-gradient(180deg, #c49a6c 0%, #9a6b42 42%, #6e482c 58%, #3d2818 59%, #2a1c12 100%);
  border:1px solid #5c3d24;
  box-shadow:
    inset 0 2px 0 rgba(255,230,190,.35),
    inset 0 -10px 18px rgba(0,0,0,.28),
    0 14px 28px rgba(0,0,0,.4);
  /* Depth via lighting/shadows only — avoid 3D transforms that inflate hit-boxes over cabinets */
  transform:none;
  overflow:hidden;
}
.continuous-desk .desk-edge{
  position:absolute; left:2%; right:2%; bottom:6px; height:8px;
  background:linear-gradient(180deg,#5a3a22,#2a1a10);
  border-radius:0 0 6px 6px; opacity:.9;
}
.mgmt-desk-surface{background:
  linear-gradient(180deg, #b8954a 0%, #8a6a2e 40%, #5c4518 57%, #3a2e10 58%, #241c0a 100%);
  border-color:#4a3a14;
}
.team-desk-surface{min-height:0;}

body.mode-office .management-desk,
/* Keep desk-bay as a real box in office mode so wall→desk→cabinets grid stays tight */
body.mode-office .desk-floor,
body.mode-office #deskFloor{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-height:0;
}
/* legacy ids still used by JS */
#managementDesk, #deskFloor{display:contents}

.executive-bay,.team-bay{min-width:0; position:relative; z-index:1; overflow:hidden}
.room-cabinets, .task-zone{position:relative; z-index:4}
.mgmt-sideboard{
  display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px;
}
.mgmt-sideboard .mgmt-queue,
.mgmt-sideboard .approval-board{
  margin:0; background:rgba(8,16,28,.72); backdrop-filter:blur(6px);
  border:1px solid rgba(185,155,98,.28); border-radius:10px; padding:8px;
  max-height:88px; overflow:auto;
}

body.mode-office .station,
body.mode-office .station.mgmt{
  width:100%;
  background:transparent;
  border:0;
  padding:2px 4px 6px;
  gap:4px;
}
body.mode-office .station:hover,
body.mode-office .station:focus-visible{
  transform:translateY(-4px);
  background:rgba(255,255,255,.06);
  border-radius:10px;
}
body.mode-office .avatar-wrap{
  width:100%;
  height:clamp(96px, 14vh, 148px);
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,220,170,.18);
  box-shadow:0 10px 18px rgba(0,0,0,.4);
  background:#1a2433;
}
body.mode-office .avatar-wrap img{
  width:100%; height:100%; object-fit:cover; object-position:center top;
  filter:none;
}
body.mode-office .nameplate{
  background:linear-gradient(180deg,#fff8ef,#e8d7c0);
  border:1px solid #b89a6a;
  box-shadow:0 3px 0 #5a3d24, 0 6px 12px rgba(0,0,0,.35);
}

/* ——— V2 shell: neutralize legacy Virtual Office nested scroll / desk atmosphere ——— */
body.portal-authed .office-stage,
body.portal-authed .office-room,
body.portal-authed .office-room-inner,
body.portal-authed .desk-bay,
body.portal-authed .desk-floor,
body.portal-authed .task-zone,
body.portal-authed .kanban,
body.portal-authed .notification-list,
body.portal-authed .mgmt-sideboard {
  max-height: none !important;
  overflow: visible !important;
  position: static !important;
}

body.portal-authed .office-atmosphere,
body.portal-authed .office-bg-photo,
body.portal-authed .room-floor,
body.portal-authed .room-wall-back,
body.portal-authed .continuous-desk,
body.portal-authed .long-desk,
body.portal-authed .mgmt-row {
  display: none !important;
}

body.portal-authed .office-stage {
  display: block !important;
  padding: 0 !important;
  grid-template-columns: 1fr !important;
}

body.dest-office .app-main-scroll,
body.dest-dashboard .app-main-scroll,
body.dest-inbox .app-main-scroll,
body.dest-sysadmin .app-main-scroll,
body.dest-security .app-main-scroll {
  overflow-y: auto;
  overflow-x: hidden;
}
