:root {
  color-scheme: light dark;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f7f6;
  color: #101820;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  gap: 16px;
}

.consoleHeader,
.command,
.panel {
  background: #ffffff;
  border: 1px solid #d8e0df;
  border-radius: 8px;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.consoleHeader {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.08);
}

.tabNav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.tabButton {
  min-height: 42px;
  border: 1px solid #c9d5d2;
  border-radius: 8px;
  background: #f5f9f8;
  color: #31534d;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tabButton.active {
  border-color: #173b35;
  background: #173b35;
  color: #ffffff;
}

.tabHidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 4px;
  color: #4a6f68;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.panelHeader {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.panelHeader h2 {
  margin-bottom: 0;
}

.panelActions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.state {
  min-width: 84px;
  text-align: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf3f1;
  color: #31534d;
  font-size: 13px;
  font-weight: 700;
}

.state.error {
  background: #ffe8e0;
  color: #8f2e18;
}

.inputLabel {
  display: block;
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.commandInputHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.commandInputHeader .inputLabel {
  margin: 0 0 8px;
}

.commandInputHeader .iconButton {
  margin-bottom: 8px;
}

.commandTools {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.hiddenInput {
  display: none;
}

.helperText {
  margin: 8px 0 12px;
  color: #5b716d;
  font-size: 13px;
  line-height: 1.45;
}

.helperText.compact {
  margin-top: 6px;
  margin-bottom: 0;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid #c9d5d2;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}

select,
input[type="file"],
input[type="search"],
input[type="password"],
input[type="text"] {
  min-height: 42px;
  border: 1px solid #c9d5d2;
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  background: white;
  color: #101820;
  caret-color: #173b35;
}

textarea {
  color: #101820;
  background: #ffffff;
  caret-color: #173b35;
}

input::placeholder,
textarea::placeholder {
  color: #6b7f7b;
  opacity: 1;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.controls.tight {
  margin: 0 0 12px;
}

.tokenRow {
  display: grid;
  grid-template-columns: max-content minmax(180px, 1fr) max-content;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.inputLabel.compact {
  margin: 0 0 10px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #163b35;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #9ed8cf;
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primaryAction {
  background: #123d36;
}

.secondaryAction {
  border: 1px solid #c9d5d2;
  background: #eef3f2;
  color: #173c36;
}

.hermesLearningBulkBar {
  margin: 8px 0 12px;
  gap: 10px;
}

.hermesApproveBtn {
  border: 1px solid #1f7a4f;
  background: linear-gradient(180deg, #3ecf7a 0%, #1f9d55 100%);
  color: #052a14;
  font-weight: 700;
  min-height: 48px;
}

.hermesApproveBtn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.hermesRejectBtn {
  border: 1px solid #b33a3a;
  background: linear-gradient(180deg, #ff8a80 0%, #e53935 100%);
  color: #3b0a0a;
  font-weight: 700;
  min-height: 48px;
}

.hermesRejectBtn:hover:not(:disabled) {
  filter: brightness(1.03);
}

button.hermesApproveBtn.smallAction,
button.hermesRejectBtn.smallAction {
  min-height: 40px;
  flex: 1 1 120px;
}

.smallAction {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.controls .primaryAction {
  flex: 1 1 180px;
}

.iconButton {
  width: 46px;
  padding: 0;
  background: #2f6f63;
}

.iconButton.small {
  width: 40px;
  min-height: 36px;
}

.approval {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.captureGrid,
.searchRow,
.academyFormGrid {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.searchRow input,
.academyFormGrid label {
  flex: 1 1 240px;
}

.academyFormGrid input,
.academyFormGrid select {
  width: 100%;
}

.academyPolicyLine {
  margin: 0 0 12px;
  border: 1px solid rgba(84, 214, 198, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(84, 214, 198, 0.08);
  color: #c8fff7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.ledgerMeta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.captureGrid .primaryAction {
  flex: 1 1 160px;
}

.controlRoomPanel {
  overflow: hidden;
}

.controlRoomMap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.controlRoom {
  min-height: 176px;
  border: 1px solid #d5dfdd;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.controlRoom::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: #7aa69d;
  border-radius: 8px 8px 0 0;
}

.controlRoom.active::before,
.controlRoom.clear::before {
  background: #2f7d69;
}

.controlRoom.blocked::before {
  background: #c46848;
}

.controlRoom.idle::before {
  background: #93a39f;
}

.controlRoomHeader {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.controlRoomTitle {
  margin: 0;
  font-weight: 900;
  color: #123d36;
}

.controlRoomKind {
  margin: 4px 0 0;
  color: #5b716d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.controlRoomCount {
  border-radius: 999px;
  padding: 5px 9px;
  background: #e8f1ef;
  color: #163b35;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.controlRoomSummary,
.controlRoomNext {
  margin: 0;
  color: #334844;
  font-size: 13px;
  line-height: 1.45;
}

.controlRoomNext {
  color: #31534d;
  font-weight: 700;
}

.controlMetrics,
.controlRoomAgents {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.controlMetric,
.agentToken {
  border-radius: 999px;
  padding: 6px 9px;
  background: #edf3f1;
  color: #173c36;
  font-size: 12px;
  font-weight: 800;
}

.agentToken {
  border: 1px solid #d5dfdd;
  background: #ffffff;
}

.agentToken.active,
.agentToken.online,
.agentToken.reviewing {
  border-color: #8dc8bc;
  background: #eaf7f4;
}

.agentToken.blocked,
.agentToken.limited {
  border-color: #dba084;
  background: #fff0e8;
}

.controlRoomLower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.controlRoomSignals .card {
  min-height: auto;
}

.securePanel {
  border-color: #b9d3ce;
}

.secureWorkbench {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(320px, 1.2fr) minmax(250px, 0.95fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.secureColumn {
  min-width: 0;
  border: 1px solid #d8e0df;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.secureColumnMain {
  background: #ffffff;
}

.secureColumn h3 {
  margin: 4px 0 12px;
  font-size: 16px;
}

.secureStep {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #173b35;
  color: #ffffff;
  font-weight: 800;
}

.secureSearchRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.secureTemplateHeader {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.optionalNote {
  color: #5d6d68;
  font-size: 12px;
  white-space: nowrap;
}

.secureTemplateGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.secureTemplateGrid input {
  margin-bottom: 0;
}

.secureColumn input[type="text"],
.secureColumn input[type="search"],
.secureColumn input[type="email"],
.secureColumn input[type="tel"] {
  width: 100%;
  margin-bottom: 8px;
}

.secureColumn textarea {
  min-height: 230px;
}

.secureColumn .secureExtraNotes {
  min-height: 72px;
  margin-bottom: 8px;
  resize: vertical;
}

.selectedTargetBox {
  border: 1px solid #9ec7bd;
  border-radius: 8px;
  background: #eef8f5;
  color: #14332f;
  padding: 10px;
  margin: 0 0 12px;
  font-size: 13px;
}

.selectedTargetBox:empty {
  display: none;
}

.selectedTargetHeader {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.selectedTargetTitle {
  font-weight: 800;
}

.selectedTargetMeta {
  white-space: pre-wrap;
  margin: 0;
}

.identitySelectButton {
  margin-top: 10px;
}

.identitySelectedCard {
  border-color: #20685e;
  box-shadow: 0 0 0 2px rgba(32, 104, 94, 0.12);
}

.secureToggleRow {
  justify-content: space-between;
}

.secureDraftToggle {
  margin: 4px 0 8px;
}

.compactCards {
  margin-bottom: 12px;
}

.compactCards .card {
  padding: 10px;
}

.compactCards .meta {
  font-size: 13px;
}

.limitedApp {
  max-width: 720px;
}

.limitedCommand textarea {
  min-height: 160px;
  font-size: 20px;
}

.limitedChoices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.limitedFileRow {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.limitedChoice,
.wideAction {
  min-height: 56px;
  font-size: 18px;
}

.wideAction {
  width: 100%;
  margin-top: 12px;
}

.limitedResultPanel .card {
  font-size: 18px;
}

.result,
.services {
  display: grid;
  gap: 10px;
}

.card {
  border: 1px solid #d8e0df;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.cardTitle {
  margin: 0 0 6px;
  font-weight: 800;
}

.meta {
  margin: 0;
  color: #47615d;
  line-height: 1.5;
  white-space: pre-wrap;
}

.badgeRow {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 2px;
}

.statusBadge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #b9d3ce;
  border-radius: 999px;
  padding: 0 9px;
  background: #edf7f5;
  color: #163b35;
  font-size: 12px;
  font-weight: 800;
}

.statusBadge.warningBadge {
  border-color: #f1bf98;
  background: #fff7ef;
  color: #8f2e18;
}

.warning {
  border-color: #f1bf98;
  background: #fff7ef;
}

.statusActions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.statusActions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 14px;
}

.activeStatus {
  border-color: #2f6f63;
  background: #dcefed;
}

.candidateList {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.candidateRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: start;
  border-top: 1px solid #d8e0df;
  padding-top: 10px;
}

.candidateActions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.candidateActions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.warningAction {
  border-color: #f1bf98;
  background: #fff7ef;
  color: #8f2e18;
}

.slackOffice {
  margin: 14px 0 12px;
}

.officeShell {
  overflow: hidden;
  border: 1px solid #1f2a2b;
  border-radius: 8px;
  background: #0f1414;
  color: #ecf6f2;
  box-shadow: 0 18px 36px rgba(16, 24, 32, 0.16);
}

.officeHud {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b0f10;
}

.officeTitle {
  display: grid;
  gap: 2px;
}

.officeTitle span {
  color: #39d5c7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.officeTitle strong {
  font-size: 19px;
  letter-spacing: 0;
}

.officeChips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.officeChip {
  display: grid;
  gap: 2px;
  min-width: 74px;
  border: 1px solid rgba(83, 225, 209, 0.36);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(23, 58, 55, 0.76);
}

.officeChip.warning {
  border-color: rgba(255, 185, 104, 0.5);
  background: rgba(90, 53, 25, 0.7);
}

.officeChip span {
  color: #a7bbb7;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.officeChip strong {
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0;
}

.officeStage {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.22)),
    #202b2b;
}

.officeFloor {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(30deg, rgba(255, 255, 255, 0.055) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.055) 87.5%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.055) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.055) 87.5%),
    linear-gradient(30deg, rgba(255, 255, 255, 0.055) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.055) 87.5%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.055) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.055) 87.5%),
    linear-gradient(90deg, rgba(93, 65, 42, 0.38), rgba(182, 145, 91, 0.42));
  background-position: 0 0, 0 0, 28px 49px, 28px 49px, 0 0;
  background-size: 56px 98px, 56px 98px, 56px 98px, 56px 98px, 100% 100%;
}

.officeFloor::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(75, 205, 147, 0.15), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(244, 118, 166, 0.16), transparent 17%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.22), transparent 48%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.officeZone {
  position: absolute;
  display: grid;
  place-items: start;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 22, 22, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.officeZone.control {
  left: 34%;
  top: 7%;
  width: 31%;
}

.officeZone.plan {
  left: 6%;
  top: 29%;
  width: 30%;
  min-height: 150px;
}

.officeZone.build {
  left: 38%;
  top: 42%;
  width: 28%;
  min-height: 164px;
}

.officeZone.report {
  right: 6%;
  top: 27%;
  width: 26%;
  min-height: 154px;
}

.agentToken {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(90px, 128px);
  gap: 8px;
  align-items: center;
  transform: translate(-50%, -50%);
}

.agentFigure {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: #f7f2e7;
  color: #142021;
  font-weight: 950;
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(10, 16, 17, 0.3);
}

.agentToken.active .agentFigure {
  animation: agentPulse 1.7s ease-in-out infinite;
}

.agentLabel {
  display: grid;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 6px 7px;
  background: rgba(9, 13, 14, 0.78);
  backdrop-filter: blur(8px);
}

.agentLabel strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agentLabel span {
  overflow: hidden;
  color: #72e3d4;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agentBubble {
  grid-column: 1 / -1;
  width: min(238px, 28vw);
  margin: -1px 0 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #13201f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.agentToken.plan .agentLabel span,
.agentToken.plan .agentBubble {
  color: #362513;
}

.agentToken.plan .agentLabel span {
  color: #ffd08a;
}

.agentToken.report .agentLabel span {
  color: #ff96bd;
}

.agentToken.build .agentLabel span {
  color: #9eeed2;
}

.officeLog {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #080b0c;
}

.officeLogHeader {
  padding: 9px 14px 2px;
  color: #39d5c7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.officeLogRow {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 70px;
  gap: 8px;
  align-items: center;
  padding: 7px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.officeLogRow span {
  color: #ff96bd;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 900;
}

.officeLogRow p {
  overflow: hidden;
  margin: 0;
  color: #d8e7e3;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.officeLogRow em {
  color: #9bb2ad;
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.officeEmpty {
  margin: 0;
  padding: 12px 14px 14px;
  color: #9bb2ad;
  font-size: 13px;
}

@keyframes agentPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 9px 0 rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(57, 213, 199, 0.12);
  }
  50% {
    transform: translateY(-5px);
    box-shadow: 0 14px 0 rgba(0, 0, 0, 0.14), 0 0 0 9px rgba(57, 213, 199, 0.18);
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100vw - 20px, 1120px);
    padding: 10px 0;
  }

  .topbar {
    display: grid;
  }

  .tabNav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panelHeader {
    align-items: stretch;
  }

  .panelActions {
    justify-content: stretch;
  }

  h1 {
    font-size: 22px;
  }

  .tokenRow {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .captureGrid,
  .searchRow,
  .academyFormGrid,
  .limitedChoices,
  .limitedFileRow,
  .secureWorkbench,
  .statusActions,
  .candidateRow {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .captureGrid > *,
  .searchRow > *,
  .academyFormGrid > * {
    flex: 1 1 100%;
  }

  .candidateActions {
    justify-content: stretch;
  }

  .candidateActions button {
    flex: 1 1 120px;
  }

  .inputLabel.compact {
    margin: 0;
  }

  .officeHud,
  .officeLogRow {
    grid-template-columns: 1fr;
  }

  .officeHud {
    display: grid;
    align-items: stretch;
  }

  .officeChips {
    justify-content: stretch;
  }

  .officeChip {
    flex: 1 1 120px;
  }

  .officeStage {
    padding: 10px;
  }

  .officeFloor {
    min-height: 560px;
  }

  .officeZone.control,
  .officeZone.plan,
  .officeZone.build,
  .officeZone.report {
    left: 5%;
    right: auto;
    width: 90%;
    min-height: 110px;
  }

  .officeZone.control {
    top: 5%;
  }

  .officeZone.plan {
    top: 27%;
  }

  .officeZone.build {
    top: 49%;
  }

  .officeZone.report {
    top: 71%;
  }

  .agentToken {
    grid-template-columns: 38px minmax(86px, 1fr);
    width: 82%;
    transform: translate(-50%, -50%);
  }

  .agentToken.control {
    left: 50% !important;
    top: 15% !important;
  }

  .agentToken.plan {
    left: 50% !important;
    top: 37% !important;
  }

  .agentToken.build {
    left: 50% !important;
    top: 59% !important;
  }

  .agentToken.report {
    left: 50% !important;
    top: 81% !important;
  }

  .agentFigure {
    width: 38px;
    height: 38px;
  }

  .agentBubble {
    width: min(100%, 360px);
    margin-left: 20px;
  }

  .officeLogRow p {
    white-space: normal;
  }

  .officeLogRow em {
    text-align: left;
  }
}

/* Sam dark workspace skin: compact operator console inspired by chat/workbench tools. */
:root {
  color-scheme: dark;
  --sam-bg: #070b12;
  --sam-rail: #0d1524;
  --sam-rail-2: #111c30;
  --sam-main: #0a1020;
  --sam-panel: #101a2d;
  --sam-panel-2: #0d1728;
  --sam-line: rgba(148, 163, 184, 0.16);
  --sam-line-strong: rgba(148, 163, 184, 0.28);
  --sam-text: #edf4ff;
  --sam-muted: #8fa1ba;
  --sam-dim: #667893;
  --sam-blue: #7aa7ff;
  --sam-teal: #54d6c6;
  --sam-pink: #ef78b7;
  --sam-amber: #f0a35c;
  background: var(--sam-bg);
  color: var(--sam-text);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #05070c 0, #070b12 34%, #0a1020 100%);
  color: var(--sam-text);
}

.app {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  grid-template-columns: 292px minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: 0;
  align-items: start;
  background:
    radial-gradient(circle at 24% 18%, rgba(84, 214, 198, 0.08), transparent 22%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 38%),
    var(--sam-main);
  overflow-x: hidden;
}

.consoleHeader,
.command,
.panel {
  border-color: var(--sam-line);
  border-radius: 0;
  background: rgba(16, 26, 45, 0.88);
  color: var(--sam-text);
  box-shadow: none;
}

.consoleHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  grid-row: 1 / span 40;
  flex-direction: column;
  min-height: 100vh;
  border-width: 0 1px 0 0;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(17, 28, 48, 0.96), rgba(8, 13, 23, 0.98)),
    var(--sam-rail);
}

.consoleHeader::after {
  content: "OpenCrab Connector\A\A상태 패널과 source file path는 검토 후 활성화됩니다.";
  display: block;
  margin-top: auto;
  border: 1px solid rgba(84, 214, 198, 0.18);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(84, 214, 198, 0.08), rgba(122, 167, 255, 0.05)),
    rgba(9, 16, 29, 0.86);
  color: var(--sam-muted);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.topbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.topbar::before {
  content: "H";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f39b55, #d8666c);
  color: #fff7ed;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  color: var(--sam-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  overflow: hidden;
  color: var(--sam-text);
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  color: var(--sam-text);
  font-size: 17px;
}

.state {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  border: 1px solid rgba(84, 214, 198, 0.22);
  border-radius: 8px;
  background: rgba(84, 214, 198, 0.09);
  color: #a7fff2;
  text-align: left;
}

.state.error {
  border-color: rgba(240, 163, 92, 0.42);
  background: rgba(240, 163, 92, 0.12);
  color: #ffd0a1;
}

.tabNav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 22px;
}

.tabNav::before {
  content: "CORE";
  margin: 0 2px 2px;
  color: var(--sam-dim);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.tabButton {
  display: flex;
  justify-content: flex-start;
  min-height: 32px;
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.045);
  color: #c8d5e8;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.tabButton::before {
  content: "";
  width: 8px;
  height: 8px;
  margin: auto 9px auto 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
}

.tabButton.active {
  border-color: rgba(122, 167, 255, 0.42);
  background:
    linear-gradient(90deg, rgba(122, 167, 255, 0.22), rgba(84, 214, 198, 0.08)),
    rgba(17, 29, 54, 0.92);
  color: #ffffff;
}

.tabButton.active::before {
  background: var(--sam-blue);
  box-shadow: 0 0 0 4px rgba(122, 167, 255, 0.14);
}

.command,
.panel {
  grid-column: 2;
  width: min(980px, calc(100vw - 340px));
  margin: 0 auto;
  border-width: 0 1px 1px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
    rgba(16, 26, 45, 0.8);
}

.command {
  margin-top: 20px;
  border-top-width: 1px;
  border-radius: 8px 8px 0 0;
}

.panel:last-of-type {
  margin-bottom: 28px;
  border-radius: 0 0 8px 8px;
}

.panelHeader {
  border-bottom: 1px solid var(--sam-line);
  padding-bottom: 10px;
}

.helperText,
.meta,
.optionalNote {
  color: var(--sam-muted);
}

.inputLabel {
  color: #d9e5f6;
  font-size: 12px;
}

textarea,
select,
input[type="file"],
input[type="search"],
input[type="password"],
input[type="text"],
input[type="email"],
input[type="tel"] {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(5, 10, 20, 0.72);
  color: var(--sam-text);
  caret-color: var(--sam-teal);
}

textarea {
  min-height: 128px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #6f819d;
}

button {
  border-radius: 8px;
  background: #243657;
  color: #f3f7ff;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(84, 214, 198, 0.78);
  outline-offset: 2px;
}

.primaryAction {
  background: linear-gradient(135deg, #3b6ff2, #2b9a93);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(43, 111, 242, 0.18);
}

.secondaryAction {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.055);
  color: #d7e4f7;
}

.iconButton {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(122, 167, 255, 0.12);
}

.approval {
  color: var(--sam-muted);
}

.result,
.services {
  gap: 8px;
}

.result {
  min-height: 180px;
  border: 1px solid rgba(122, 167, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(122, 167, 255, 0.06), transparent),
    rgba(6, 11, 23, 0.58);
  color: #cbd8ed;
}

.card {
  border-color: var(--sam-line);
  border-radius: 8px;
  background: rgba(7, 12, 24, 0.68);
}

.cardTitle {
  color: #f2f6ff;
}

.warning,
.warningAction {
  border-color: rgba(240, 163, 92, 0.42);
  background: rgba(240, 163, 92, 0.12);
  color: #ffd0a1;
}

.statusBadge {
  border-color: rgba(84, 214, 198, 0.22);
  background: rgba(84, 214, 198, 0.09);
  color: #b9fff4;
}

.statusBadge.warningBadge {
  border-color: rgba(240, 163, 92, 0.38);
  background: rgba(240, 163, 92, 0.12);
  color: #ffd0a1;
}

.candidateRow {
  border-top-color: var(--sam-line);
}

.securePanel {
  border-color: rgba(122, 167, 255, 0.22);
}

.secureWorkbench {
  grid-template-columns: minmax(230px, 0.82fr) minmax(300px, 1.18fr) minmax(230px, 0.92fr);
}

.secureColumn {
  border-color: var(--sam-line);
  background: rgba(8, 14, 27, 0.72);
}

.secureColumnMain {
  background: rgba(12, 19, 35, 0.86);
}

.secureStep {
  background: linear-gradient(135deg, var(--sam-blue), var(--sam-teal));
}

.selectedTargetBox {
  border-color: rgba(84, 214, 198, 0.28);
  background: rgba(84, 214, 198, 0.08);
  color: #dffefa;
}

.identitySelectedCard,
.activeStatus {
  border-color: rgba(84, 214, 198, 0.42);
  background: rgba(84, 214, 198, 0.11);
  box-shadow: 0 0 0 2px rgba(84, 214, 198, 0.08);
}

.officeShell {
  border-color: var(--sam-line-strong);
  background: #070b12;
}

.controlRoom {
  border-color: var(--sam-line);
  background: rgba(8, 14, 27, 0.72);
}

.controlRoomTitle {
  color: #f2f6ff;
}

.controlRoomKind,
.controlRoomSummary {
  color: var(--sam-muted);
}

.controlRoomNext {
  color: #b9fff4;
}

.controlRoomCount,
.controlMetric {
  background: rgba(84, 214, 198, 0.09);
  color: #b9fff4;
}

.agentToken {
  border-color: var(--sam-line);
  background: rgba(7, 12, 24, 0.68);
  color: #d7e4f7;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .consoleHeader {
    grid-row: auto;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    min-height: auto;
    border-width: 0 0 1px;
    padding: 14px;
  }

  .consoleHeader::after {
    display: none;
  }

  .tabNav {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tabNav::before {
    display: none;
  }

  .command,
  .panel {
    grid-column: 1;
    width: calc(100vw - 20px);
  }

  .command {
    margin-top: 10px;
  }

  .secureWorkbench {
    grid-template-columns: 1fr;
  }

  .controlRoomMap,
  .controlRoomLower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app {
    width: 100%;
    padding: 0;
  }

  .topbar {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .tabButton {
    flex: 0 0 auto;
    min-width: 96px;
  }

  .command,
  .panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    margin-left: 8px;
    margin-right: 8px;
    justify-self: start;
    padding: 14px;
  }

  .commandInputHeader {
    align-items: flex-start;
  }
}
