:root {
  font-family:
    "Pretendard Variable",
    Pretendard,
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  --font-sans:
    "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo",
    "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  color: #eaf2ff;
  background: #050b14;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 18% -10%,
      rgba(57, 105, 214, 0.24),
      transparent 34rem
    ),
    radial-gradient(
      circle at 92% 42%,
      rgba(26, 164, 128, 0.1),
      transparent 30rem
    ),
    #050b14;
}

button,
select,
input,
textarea {
  font: inherit;
}
button,
.button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(13rem, 24rem) minmax(
      20rem,
      1fr
    );
  gap: 1rem;
  align-items: center;
  min-height: 4.5rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid #213047;
  background: rgba(5, 11, 20, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand > span:last-child {
  display: grid;
  gap: 0.12rem;
}
.brand small {
  color: #71839d;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid #6e91ff;
  border-radius: 0.65rem;
  background: linear-gradient(145deg, #2e68e8, #5a51db);
  font-weight: 900;
}

.project-picker {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
}
.project-picker span {
  color: #8494aa;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid #2a3b54;
  border-radius: 0.58rem;
  outline: none;
  color: #eef4ff;
  background: #0a1422;
}

select,
input {
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
}
textarea {
  min-height: 7rem;
  padding: 0.75rem;
  resize: vertical;
}
select:focus,
input:focus,
textarea:focus {
  border-color: #6f95ff;
  box-shadow: 0 0 0 3px rgba(74, 113, 221, 0.2);
}

.top-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

.live-badge,
.count {
  padding: 0.36rem 0.58rem;
  border: 1px solid #286151;
  border-radius: 999px;
  color: #8ce8c9;
  background: rgba(31, 128, 99, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.button,
button {
  min-height: 2.45rem;
  padding: 0.55rem 0.8rem;
  border: 0;
  border-radius: 0.58rem;
  color: #fff;
  background: linear-gradient(135deg, #336ce2, #6157e0);
  font-weight: 800;
  text-decoration: none;
}

.button.secondary,
button.secondary {
  border: 1px solid #344b68;
  color: #cbd8ea;
  background: #101c2b;
}
.button.danger,
button.danger {
  border: 1px solid #71404a;
  color: #f0bdc6;
  background: #25141a;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.workspace {
  width: min(100% - 2rem, 1600px);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.metrics article,
.floor-panel,
.side-panel,
.project-strip {
  border: 1px solid #1e3047;
  border-radius: 0.85rem;
  background: rgba(8, 18, 31, 0.93);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}
.metrics article {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 1rem;
}
.metrics span {
  color: #71839b;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.metrics strong {
  font-size: 1.25rem;
}

.office-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  gap: 0.75rem;
}
.floor-panel {
  min-width: 0;
  padding: 1rem;
}
.side-column {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.side-panel {
  min-width: 0;
  padding: 0.9rem;
}

.panel-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.panel-head.compact {
  align-items: flex-start;
}
.panel-head h1,
.panel-head h2,
.project-strip h2,
.side-panel h2 {
  margin: 0;
}
.panel-head h1 {
  font-size: 1.45rem;
}
.panel-head h2,
.side-panel h2,
.project-strip h2 {
  font-size: 1rem;
}
.eyebrow {
  margin: 0 0 0.22rem;
  color: #6f95ff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.canvas-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.canvas-actions button {
  min-width: 2.45rem;
  padding: 0.4rem;
}
.canvas-actions output {
  min-width: 3.5rem;
  color: #8ea0b9;
  font-size: 0.72rem;
  text-align: center;
}

.truth-banner {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #5e4b28;
  border-radius: 0.58rem;
  color: #e6c987;
  background: rgba(117, 82, 26, 0.14);
  font-size: 0.72rem;
  line-height: 1.5;
}
.stage-hud {
  position: absolute;
  z-index: 4;
  bottom: 0.7rem;
  left: 0.7rem;
  display: grid;
  gap: 0.3rem;
  max-width: calc(100% - 26rem);
  pointer-events: none;
}
.stage-hud span {
  width: max-content;
  max-width: 100%;
  padding: 0.34rem 0.5rem;
  overflow: hidden;
  border: 1px solid #2a323f;
  border-radius: 0.38rem;
  color: #98a3b6;
  background: rgba(13, 16, 21, 0.88);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.stage-hud b {
  color: #e7ecf5;
}
.canvas-shell {
  overflow: auto;
  border: 1px solid #17283d;
  border-radius: 0.72rem;
  background: #07111d;
}
#office-canvas {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
  outline: none;
}
#office-canvas:focus {
  box-shadow: inset 0 0 0 3px rgba(96, 139, 255, 0.45);
}

.accessible-state {
  margin-top: 0.75rem;
  color: #93a5bd;
  font-size: 0.76rem;
}
.accessible-state summary {
  cursor: pointer;
  font-weight: 800;
}
table {
  width: 100%;
  margin-top: 0.7rem;
  border-collapse: collapse;
}
caption {
  padding: 0.5rem;
  color: #8ea0b9;
  text-align: left;
}
th,
td {
  padding: 0.55rem;
  border-bottom: 1px solid #1d2d42;
  text-align: left;
}

.team-list,
.meeting-list {
  display: grid;
  gap: 0.5rem;
  max-height: 18rem;
  overflow: auto;
}
.team-item,
.meeting-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #243850;
  border-radius: 0.62rem;
  color: #dfe9f8;
  background: #0a1524;
  text-align: left;
}
.team-item.selected {
  border-color: #668eff;
  background: #101f37;
}
.avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.58rem;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}
.item-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.item-copy strong,
.item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-copy small {
  color: #7f91a9;
  font-size: 0.68rem;
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #dfaa4c;
  box-shadow: 0 0 0 3px rgba(223, 170, 76, 0.13);
}

.status-dot.verified {
  background: #3ddc97;
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.12);
}

.status-dot.working {
  background: #62a8ff;
  box-shadow: 0 0 0 3px rgba(98, 168, 255, 0.16);
}

.status-dot.error {
  background: #ff6b74;
  box-shadow: 0 0 0 3px rgba(255, 107, 116, 0.14);
}
.meeting-item {
  grid-template-columns: 1fr auto;
}
.meeting-item .state {
  color: #8ce8c9;
  font-size: 0.64rem;
  font-weight: 900;
}
.meeting-item.open {
  border-color: rgba(169, 123, 255, 0.55);
  background: rgba(78, 51, 116, 0.18);
}
.meeting-item-actions {
  display: grid;
  gap: 0.28rem;
  justify-items: stretch;
}
.meeting-item-actions button {
  min-height: 1.75rem;
  padding: 0.25rem 0.48rem;
  border-radius: 0.38rem;
  font-size: 0.62rem;
}
.inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.9rem;
}
.employee-tasks {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid #1e3047;
}
.subhead {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}
.subhead h3 {
  margin: 0;
  color: #b9c8db;
  font-size: 0.78rem;
}
.task-list {
  display: grid;
  gap: 0.45rem;
  max-height: 15rem;
  overflow: auto;
}
.task-item {
  display: grid;
  gap: 0.28rem;
  padding: 0.65rem;
  border: 1px solid #263b55;
  border-radius: 0.58rem;
  background: #0a1524;
}
.task-item strong {
  color: #dfe9f8;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.task-actions {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.task-actions button,
.provider-state button {
  min-height: 30px;
  font-size: 11px;
}

.task-meta {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  color: #8395ae;
  font-size: 0.64rem;
  font-weight: 800;
}
.task-meta .not-dispatched {
  color: #dfb766;
}
.empty {
  padding: 0.9rem;
  color: #71839b;
  border: 1px dashed #2b3d54;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  text-align: center;
}

.inspector dl,
.project-strip dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 0.8rem;
  margin: 0.8rem 0 0;
}
dt {
  color: #71839b;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}
dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #c8d5e6;
  font-size: 0.74rem;
}

.project-strip {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(20rem, 2fr) minmax(
      15rem,
      1fr
    );
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.75rem;
  padding: 1rem;
}
.provider-state {
  display: grid;
  gap: 0.2rem;
}
.provider-state span {
  color: #71839b;
  font-size: 0.65rem;
  font-weight: 900;
}
.provider-state small {
  color: #8b9db4;
  overflow-wrap: anywhere;
}

.notice {
  display: block;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #653841;
  border-radius: 0.62rem;
  color: #f0bdc6;
  background: rgba(128, 37, 53, 0.15);
  font-size: 0.76rem;
  white-space: pre-wrap;
}
.notice:empty {
  display: none;
}
.notice.success {
  border-color: #2a6654;
  color: #9be7cf;
  background: rgba(31, 131, 99, 0.14);
}

dialog {
  width: min(100% - 2rem, 34rem);
  padding: 0;
  border: 1px solid #314762;
  border-radius: 0.9rem;
  color: #eaf2ff;
  background: #091422;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}
dialog::backdrop {
  background: rgba(1, 5, 10, 0.78);
  backdrop-filter: blur(6px);
}
dialog form,
.dialog-body {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}
.dialog-head,
.dialog-actions,
.form-row {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
}
.dialog-head h2 {
  margin: 0;
}
.icon-button {
  min-width: 2.4rem;
  padding: 0.3rem;
  background: #18263a;
}
dialog label {
  display: grid;
  gap: 0.35rem;
  color: #b9c8db;
  font-size: 0.76rem;
  font-weight: 800;
}
.form-row > * {
  flex: 1;
}
.form-row > .grow {
  flex: 2;
}
#task-assignee {
  color: #8fa3bd;
}
#employee-command-role,
#meeting-room-state {
  color: #8fa3bd;
}
.command-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.48rem 0.8rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid #263b55;
  border-radius: 0.58rem;
  background: #0a1524;
}
.command-actions > * {
  flex: 1;
}
.meeting-room-dialog {
  width: min(100% - 2rem, 48rem);
}
.meeting-room-section {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #263b55;
  border-radius: 0.58rem;
  background: #0a1524;
}
.meeting-room-section h3 {
  margin: 0;
  color: #b9c8db;
  font-size: 0.78rem;
}
.meeting-agenda {
  margin: 0;
  color: #d4ddeb;
  font-size: 0.76rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.participant-list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.participant-chip {
  display: grid;
  gap: 0.08rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid #324961;
  border-radius: 0.48rem;
  background: #121f31;
}
.participant-chip strong {
  color: #dfe9f8;
  font-size: 0.7rem;
}
.participant-chip small {
  color: #8395ae;
  font-size: 0.6rem;
}
.meeting-messages {
  display: grid;
  gap: 0.45rem;
  max-height: 14rem;
  overflow: auto;
}
.meeting-message {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem;
  border-left: 3px solid #668eff;
  border-radius: 0.35rem;
  background: #101b2a;
}
.meeting-message header {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  color: #8fa3bd;
  font-size: 0.62rem;
}
.meeting-message p {
  margin: 0;
  color: #dfe7f2;
  font-size: 0.74rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.meeting-message-form {
  padding: 0;
  border: 0;
}
.meeting-room-actions {
  padding-top: 0.2rem;
  border-top: 1px solid #263b55;
}
#employee-color {
  min-width: 5rem;
  padding: 0.25rem;
}
.dialog-note {
  margin: 0;
  color: #d4b879;
  font-size: 0.7rem;
  line-height: 1.5;
}
.dialog-actions {
  justify-content: flex-end;
}

@media (max-width: 1000px) {
  .topbar {
    grid-template-columns: 1fr 1fr;
  }
  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .office-grid {
    grid-template-columns: 1fr;
  }
  .side-column {
    grid-template-columns: repeat(3, 1fr);
  }
  .project-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .workspace {
    width: min(100% - 1rem, 1600px);
  }
  .topbar,
  .metrics,
  .side-column {
    grid-template-columns: 1fr;
  }
  .topbar {
    position: static;
  }
  .top-actions {
    grid-column: auto;
    flex-wrap: wrap;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-head,
  .canvas-actions,
  .dialog-head,
  .dialog-actions,
  .form-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Product shell: the LIVE office keeps the prototype's dense, spatial UI. */
body {
  height: 100vh;
  overflow: hidden;
  color: #e7ecf5;
  background: #0d1015;
  font-size: 13px;
}

.topbar {
  position: relative;
  display: flex;
  gap: 0.65rem;
  min-height: 3.2rem;
  padding: 0.45rem 0.85rem;
  border-color: #2a323f;
  background: #151a23;
  backdrop-filter: none;
}
.brand {
  flex: 0 0 auto;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
}
.brand small {
  font-size: 0.55rem;
}
.project-picker {
  display: flex;
  gap: 0.45rem;
  min-width: 12rem;
  margin-left: 0.45rem;
}
.project-picker select {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.4rem;
  background: #10151d;
}
.top-actions {
  margin-left: auto;
}
.topbar .button,
.topbar button {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
}
.live-badge {
  padding: 0.26rem 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.62rem;
}

.workspace {
  display: flex;
  width: 100%;
  height: calc(100vh - 3.2rem);
  flex-direction: column;
  margin: 0;
  padding: 0;
}
.metrics {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  margin: 0;
  padding: 0.38rem 0.8rem;
  border-bottom: 1px solid #2a323f;
  background: #11161e;
}
.metrics article,
.floor-panel,
.side-panel,
.project-strip {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.metrics article {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  min-width: 9rem;
  padding: 0.05rem 0.85rem;
  border-right: 1px solid #2a323f;
}
.metrics article:first-child {
  padding-left: 0;
}
.metrics span {
  font-size: 0.59rem;
  letter-spacing: 0.08em;
}
.metrics strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
}

.office-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0;
  min-height: 0;
}
.floor-panel {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 0;
  background: #0a0d12;
}
.floor-panel > .panel-head {
  position: absolute;
  z-index: 4;
  top: 0.65rem;
  left: 0.7rem;
  width: calc(100% - 1.4rem);
  margin: 0;
  pointer-events: none;
}
.floor-panel > .panel-head > div:first-child {
  padding: 0.4rem 0.58rem;
  border: 1px solid rgba(58, 69, 83, 0.9);
  border-radius: 0.42rem;
  background: rgba(13, 16, 21, 0.9);
  backdrop-filter: blur(8px);
}
.floor-panel > .panel-head h1 {
  font-size: 0.92rem;
}
.floor-panel > .panel-head .eyebrow {
  font-size: 0.5rem;
}
.canvas-actions {
  padding: 0.3rem;
  border: 1px solid rgba(58, 69, 83, 0.9);
  border-radius: 0.42rem;
  background: rgba(13, 16, 21, 0.9);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}
.canvas-actions button {
  min-width: 2rem;
  min-height: 1.85rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.68rem;
}
.truth-banner {
  position: absolute;
  z-index: 4;
  right: 0.7rem;
  bottom: 0.7rem;
  max-width: min(32rem, calc(100% - 1.4rem));
  margin: 0;
  padding: 0.42rem 0.65rem;
  border-color: #5e4b28;
  border-radius: 0.4rem;
  background: rgba(35, 28, 16, 0.9);
  font-size: 0.62rem;
  backdrop-filter: blur(8px);
}
.canvas-shell {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0a0d12;
}
#office-canvas {
  width: auto;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  cursor: grab;
  touch-action: none;
}
#office-canvas.dragging {
  cursor: grabbing;
}
#office-canvas.interactive:not(.dragging) {
  cursor: pointer;
}
#office-canvas.dragging-employee {
  cursor: move;
}
.accessible-state {
  position: absolute;
  z-index: 5;
  right: 0.7rem;
  top: 4.5rem;
  max-width: min(38rem, calc(100% - 1.4rem));
  margin: 0;
  padding: 0.38rem 0.55rem;
  border: 1px solid #3a4553;
  border-radius: 0.4rem;
  background: rgba(13, 16, 21, 0.94);
  font-size: 0.64rem;
}
.accessible-state[open] {
  max-height: calc(100% - 8rem);
  overflow: auto;
}

.side-column {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  border-left: 1px solid #2a323f;
  background: #151a23;
}
.side-panel {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #2a323f;
}
.side-panel .panel-head {
  margin-bottom: 0.45rem;
}
.side-panel h2,
.side-panel .panel-head h2 {
  font-size: 0.78rem;
}
.eyebrow {
  color: #69748a;
  font-size: 0.52rem;
}
.team-list,
.meeting-list {
  gap: 0.18rem;
  max-height: 12rem;
}
.team-item,
.meeting-item {
  gap: 0.48rem;
  padding: 0.38rem 0.42rem;
  border-color: transparent;
  border-radius: 0.38rem;
  background: transparent;
}
.team-item:hover {
  background: #1f2634;
}
.team-item.selected {
  border-color: #5b8cff;
  background: #233052;
}
.avatar {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.36rem;
  font-size: 0.56rem;
}
.item-copy strong {
  font-size: 0.72rem;
}
.item-copy small {
  font-size: 0.59rem;
}
.inspector {
  background: #121822;
}
.inspector dl {
  gap: 0.3rem 0.55rem;
  margin-top: 0.55rem;
}
.inspector-actions {
  margin-top: 0.65rem;
}
.inspector-actions button {
  min-height: 2rem;
  padding: 0.35rem;
  border-radius: 0.4rem;
  font-size: 0.67rem;
}
.employee-tasks {
  margin-top: 0.65rem;
  padding-top: 0.6rem;
}
.task-list {
  max-height: 10rem;
}
.task-item {
  padding: 0.48rem;
  border-radius: 0.38rem;
  background: #10151d;
}
.side-panel:last-child {
  flex: 1 0 auto;
}

.project-strip {
  display: flex;
  flex: 0 0 auto;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-top: 1px solid #2a323f;
  background: #151a23;
}
.project-strip > div:first-child {
  min-width: 10rem;
}
.project-strip h2 {
  font-size: 0.76rem;
}
.project-strip dl {
  display: flex;
  flex: 1;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  margin: 0;
}
.provider-state {
  min-width: 14rem;
  max-width: 28rem;
}
.provider-state small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice {
  position: fixed;
  z-index: 30;
  left: 0.8rem;
  bottom: 3.3rem;
  max-width: min(36rem, calc(100% - 1.6rem));
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.42rem;
  background: rgba(68, 22, 31, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.66rem;
}

dialog {
  border-color: #3a4553;
  border-radius: 0.7rem;
  background: #151a23;
}
dialog form {
  padding: 1rem 1.1rem;
}

@media (max-width: 900px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }
  .topbar {
    flex-wrap: wrap;
  }
  .project-picker {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .workspace {
    height: auto;
    min-height: calc(100vh - 3.2rem);
  }
  .metrics {
    overflow-x: auto;
  }
  .office-grid {
    grid-template-columns: 1fr;
  }
  .floor-panel {
    min-height: 34rem;
  }
  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #2a323f;
    border-left: 0;
  }
  .side-column > :last-child {
    grid-column: 1 / -1;
  }
  .project-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .project-strip dl {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .top-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
  .metrics article {
    min-width: 7.5rem;
  }
  .floor-panel {
    min-height: 28rem;
  }
  .stage-hud {
    display: none;
  }
  .floor-panel > .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .side-column {
    grid-template-columns: 1fr;
  }
  .side-column > :last-child {
    grid-column: auto;
  }
  .form-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* HiDPI LIVE office polish: Korean text stays vector-sharp over pixel scenery. */
body,
button,
select,
input,
textarea {
  font-family: var(--font-sans);
  letter-spacing: -0.012em;
}
.canvas-shell {
  position: relative;
  align-items: stretch;
  justify-items: stretch;
  background:
    radial-gradient(circle at 50% 45%, rgba(49, 67, 94, 0.18), transparent 65%),
    #080c12;
}
#office-canvas {
  width: 100%;
  max-width: none;
  height: 100%;
  image-rendering: auto;
}
.floor-panel > .panel-head h1 {
  font-size: 1rem;
  letter-spacing: -0.03em;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.025em;
}
.stage-hud span {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: -0.015em;
}
.truth-banner {
  font-size: 0.67rem;
  letter-spacing: -0.015em;
}
.item-copy strong {
  font-size: 0.76rem;
  letter-spacing: -0.02em;
}
.item-copy small {
  font-size: 0.64rem;
}
.notice {
  top: 3.85rem;
  right: 0.8rem;
  bottom: auto;
  left: auto;
  max-width: min(32rem, calc(100% - 1.6rem));
  pointer-events: none;
  font-family: var(--font-sans);
  font-size: 0.71rem;
  line-height: 1.55;
}

/* Compact task cards open a full, readable evidence dialog. */
.task-item {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.task-open {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 0.35rem;
  padding: 0.58rem;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.task-open:hover {
  background: #172335;
}
.task-open:focus-visible {
  outline: 2px solid #6f95ff;
  outline-offset: -2px;
}
.task-open strong {
  color: #edf3fb;
  font-size: 0.77rem;
}
.task-preview {
  display: -webkit-box;
  overflow: hidden;
  color: #8fa0b5;
  font-size: 0.67rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.task-item .task-actions {
  margin: 0;
  padding: 0 0.58rem 0.58rem;
}

/* Operational sidebar: presence first, details second, actionable work last. */
.team-summary,
.inspector-status {
  display: flex;
  gap: 0.32rem;
  flex-wrap: wrap;
}
.team-summary {
  margin-bottom: 0.45rem;
}
.team-summary span,
.presence-chip,
.team-item-meta span {
  padding: 0.2rem 0.38rem;
  border: 1px solid #31445b;
  border-radius: 999px;
  color: #9fb0c4;
  background: #111b28;
  font-size: 0.56rem;
  font-weight: 800;
}
.team-summary .working,
.presence-chip.working,
.presence-label.working {
  border-color: #2b6654;
  color: #8fe3c5;
}
.team-summary .meeting,
.presence-chip.meeting,
.presence-label.meeting {
  border-color: #5a4982;
  color: #c7afff;
}
.team-summary .idle,
.presence-chip.idle,
.presence-label.idle {
  border-color: #665329;
  color: #e8c67e;
}
.team-list {
  gap: 0.34rem;
  max-height: 15rem;
}
.team-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  padding: 0.52rem;
  border-color: #263648;
  background: #101721;
  text-align: left;
}
.team-item:hover {
  border-color: #455d7b;
  background: #172231;
}
.team-item.selected {
  border-color: #587bc1;
  background: linear-gradient(90deg, #1d3152, #172131);
  box-shadow: inset 3px 0 #76a1ff;
}
.team-item .avatar {
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.58rem;
}
.team-item-meta {
  display: grid;
  gap: 0.18rem;
  justify-items: end;
}
.team-item-meta span {
  padding: 0.14rem 0.3rem;
}
.inspector-hero {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0.35rem 0 0.5rem;
}
.inspector-hero > div {
  min-width: 0;
}
.inspector-hero small {
  display: block;
  margin-top: 0.18rem;
  overflow: hidden;
  color: #8ea0b6;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspector-avatar {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.75rem;
  color: #fff;
  background: #28364a;
  font-size: 0.68rem;
  font-weight: 900;
}
.inspector-status {
  margin-bottom: 0.55rem;
}
.presence-chip.verified {
  border-color: #2b6654;
  color: #8fe3c5;
}
.presence-chip.error,
.presence-chip.warning {
  border-color: #71404a;
  color: #f0bdc6;
}
.employee-tasks .subhead {
  align-items: end;
}
.employee-tasks .subhead .eyebrow {
  margin-bottom: 0.08rem;
}
.task-list {
  max-height: 16rem;
}
.task-item {
  border-left: 3px solid #41536b;
  background: #0d141e;
}
.task-item.task-running,
.task-item.task-queued {
  border-left-color: #43d39e;
}
.task-item.task-failed,
.task-item.task-timeout,
.task-item.task-orphaned {
  border-left-color: #e47c8e;
}
.task-item.task-succeeded,
.task-item.task-completed,
.task-item.task-reported {
  border-left-color: #6f95ff;
}
.work-item-detail-dialog {
  width: min(100% - 2rem, 64rem);
  max-height: 92vh;
}
.work-item-detail-dialog .dialog-body {
  max-height: 90vh;
  overflow: auto;
}
.task-detail-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.task-detail-meta span {
  padding: 0.28rem 0.52rem;
  border: 1px solid #38516e;
  border-radius: 999px;
  color: #bfd0e5;
  background: #122035;
  font-size: 0.68rem;
  font-weight: 800;
}
.task-detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}
.task-detail-section {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #263b55;
  border-radius: 0.58rem;
  background: #0a1524;
}
.task-detail-section h3 {
  margin: 0 0 0.55rem;
  color: #b9c8db;
  font-size: 0.76rem;
}
.task-detail-section pre {
  margin: 0;
  overflow-wrap: anywhere;
  color: #e0e8f3;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  line-height: 1.65;
  white-space: pre-wrap;
}
.task-detail-run {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.4rem 0.8rem;
  margin: 0;
}
.task-result-section pre {
  max-height: 22rem;
  padding-right: 0.35rem;
  overflow: auto;
}

@media (max-width: 700px) {
  .task-detail-columns {
    grid-template-columns: 1fr;
  }
}

/* One-step project bootstrap and spatial LIVE histories. */
.project-dialog {
  width: min(100% - 2rem, 62rem);
  max-height: 94vh;
}
.project-dialog form {
  max-height: 92vh;
  overflow: auto;
}
.project-dialog .dialog-head small,
.project-team-template small {
  color: #8fa3bd;
}
.project-budget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.project-team-template {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid #2b4059;
  border-radius: 0.62rem;
  background: #0d1724;
}
.project-team-template .subhead {
  align-items: end;
  margin: 0;
}
.project-team-template h3 {
  margin: 0 0 0.18rem;
  color: #d8e3f1;
  font-size: 0.82rem;
}
.source-project-label {
  width: min(22rem, 50%);
}
.template-toolbar {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2rem;
  color: #94a5ba;
  font-size: 0.69rem;
}
.template-toolbar > span:last-child {
  display: flex;
  gap: 0.35rem;
}
.compact-button {
  min-height: 1.8rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.64rem;
}
.project-team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  max-height: 13rem;
  overflow: auto;
}
.project-team-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid #263b55;
  border-radius: 0.48rem;
  background: #101b2a;
  cursor: pointer;
}
.project-team-option:has(input:checked) {
  border-color: #5b8cff;
  background: #172644;
}
.project-team-option input {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
  accent-color: #5b8cff;
}
.project-team-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.project-team-copy strong,
.project-team-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-team-copy strong {
  font-size: 0.73rem;
}
.project-team-copy small {
  font-size: 0.62rem;
}
.project-progress {
  display: block;
  min-height: 2.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #354b65;
  border-radius: 0.48rem;
  color: #acc1dc;
  background: #101b2a;
  font-size: 0.7rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.project-progress:empty {
  display: none;
}
.project-progress.success {
  border-color: #2a6654;
  color: #9be7cf;
}
.project-progress.error {
  border-color: #71404a;
  color: #f0bdc6;
}

.provider-dialog {
  width: min(100% - 2rem, 58rem);
  max-height: 94vh;
}
.provider-dialog > .dialog-body {
  max-height: 92vh;
  overflow: auto;
}
.settings-tabs {
  position: sticky;
  z-index: 4;
  top: -1rem;
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0;
  overflow-x: auto;
  background: #111b28;
}
.settings-tabs button {
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #31445b;
  border-radius: 999px;
  color: #9eb0c7;
  background: #101824;
  font-size: 0.68rem;
  font-weight: 800;
}
.settings-tabs button.active {
  border-color: #7197ff;
  color: #eef4ff;
  background: #253b66;
}
.settings-panel {
  display: grid;
  gap: 0.75rem;
}
.settings-panel[hidden] {
  display: none;
}
.settings-card,
.provider-registry-section,
#provider-profile-form {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #2b4059;
  border-radius: 0.62rem;
  background: #0d1724;
}
.settings-card h3,
.provider-registry-section h3,
#provider-profile-form h3 {
  margin: 0 0 0.18rem;
  color: #d8e3f1;
  font-size: 0.82rem;
}
.settings-card .subhead,
.provider-registry-section .subhead,
#provider-profile-form .subhead {
  align-items: end;
  margin: 0;
}
.provider-profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: 18rem;
  overflow: auto;
}
.provider-profile-item {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid #293e56;
  border-radius: 0.52rem;
  background: #101b2a;
}
.provider-profile-item header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}
.provider-profile-item strong,
.provider-profile-item p,
.provider-profile-item small {
  overflow-wrap: anywhere;
}
.provider-profile-item strong {
  color: #edf3fb;
  font-size: 0.76rem;
}
.provider-profile-item p {
  margin: 0;
  color: #b9c8db;
  font-size: 0.69rem;
}
.provider-profile-status {
  flex: 0 0 auto;
  padding: 0.22rem 0.38rem;
  border: 1px solid #73582c;
  border-radius: 999px;
  color: #e7c580;
  font-size: 0.58rem;
  font-weight: 800;
}
.provider-profile-status.verified {
  border-color: #2b6654;
  color: #92e5ca;
}
.provider-profile-item .provider-profile-verify {
  justify-self: end;
}
.settings-item-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}
.settings-list {
  display: grid;
  gap: 0.45rem;
  max-height: 19rem;
  overflow: auto;
}
.settings-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid #293e56;
  border-radius: 0.52rem;
  background: #101b2a;
}
.settings-definition {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid #293e56;
  border-radius: 0.52rem;
  background: #101b2a;
  font-size: 0.7rem;
}
.settings-definition dt {
  color: #8294aa;
}
.settings-definition dd {
  min-width: 0;
  margin: 0;
  color: #d7e2ef;
  overflow-wrap: anywhere;
}
.settings-budget-row label {
  min-width: 0;
}
.settings-close-actions {
  margin-top: 0;
}
.settings-create-details {
  border-top: 1px solid #293e56;
  padding-top: 0.55rem;
}
.settings-create-details summary {
  cursor: pointer;
  color: #aebfd3;
  font-size: 0.68rem;
  font-weight: 800;
}
.settings-create-details form {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding: 0.7rem;
  border: 1px solid #293e56;
  border-radius: 0.5rem;
  background: #0a131f;
}
.provider-adapter-note {
  color: #d5aa72;
}
.employee-provider-help {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border: 1px solid #2b4059;
  border-radius: 0.5rem;
  background: #0d1724;
}
.employee-provider-help small {
  color: #9aacbf;
  line-height: 1.45;
}
.employee-provider-help button {
  flex: 0 0 auto;
}

.space-history-dialog {
  width: min(100% - 2rem, 54rem);
  max-height: 92vh;
}
.space-shortcuts {
  position: absolute;
  z-index: 5;
  top: 4.5rem;
  left: 0.7rem;
  display: flex;
  gap: 0.32rem;
}
.space-shortcuts button {
  min-height: 1.8rem;
  padding: 0.28rem 0.48rem;
  border: 1px solid #3a4553;
  border-radius: 0.35rem;
  color: #aebed2;
  background: rgba(13, 16, 21, 0.9);
  font-size: 0.62rem;
  backdrop-filter: blur(8px);
}
.space-shortcuts button:hover,
.space-shortcuts button:focus-visible {
  border-color: #6f95ff;
  color: #e7effa;
}
.space-history-dialog .dialog-body {
  max-height: 90vh;
  overflow: auto;
}
.space-history-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
.space-history-metric {
  display: grid;
  gap: 0.18rem;
  padding: 0.65rem;
  border: 1px solid #2b4059;
  border-radius: 0.52rem;
  background: #101b2a;
}
.space-history-metric span {
  color: #8395ae;
  font-size: 0.62rem;
  font-weight: 800;
}
.space-history-metric strong {
  color: #e4edf8;
  font-size: 1rem;
}
.space-history-list {
  position: relative;
  display: grid;
  gap: 0.48rem;
  max-height: 32rem;
  overflow: auto;
}
.history-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.68rem;
  border: 1px solid #263b55;
  border-radius: 0.54rem;
  background: #0d1724;
}
.history-marker {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.25rem;
  border: 2px solid #101b2a;
  border-radius: 50%;
  background: #6f95ff;
  box-shadow: 0 0 0 2px #375681;
}
.history-marker.success {
  background: #43d39e;
  box-shadow: 0 0 0 2px #2c6b58;
}
.history-marker.warning {
  background: #e4b75d;
  box-shadow: 0 0 0 2px #715c32;
}
.history-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
.history-copy header {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.history-copy strong {
  overflow-wrap: anywhere;
  color: #e2ebf7;
  font-size: 0.76rem;
}
.history-copy time,
.history-copy small {
  color: #8294ad;
  font-size: 0.63rem;
}
.history-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #aebed2;
  font-size: 0.69rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.history-entry > button {
  min-height: 1.85rem;
  padding: 0.3rem 0.52rem;
  font-size: 0.64rem;
}

@media (max-width: 700px) {
  .project-budget-grid,
  .project-team-list,
  .provider-profile-list,
  .space-history-metrics {
    grid-template-columns: 1fr;
  }
  .employee-provider-help {
    align-items: stretch;
    flex-direction: column;
  }
  .source-project-label {
    width: 100%;
  }
  .template-toolbar,
  .history-copy header {
    align-items: stretch;
    flex-direction: column;
  }
  .history-entry {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .history-entry > button {
    grid-column: 2;
  }
  .space-shortcuts {
    top: 7.2rem;
    flex-wrap: wrap;
    max-width: calc(100% - 1.4rem);
  }
}
