/* src/styles.css */
:root {
  color-scheme: dark;
  font-family:
    "Press Start 2P",
    "IBM Plex Sans",
    monospace;
  --bg: #110e1b;
  --panel: #1a1630;
  --panel-2: #0f1726;
  --line: #342b58;
  --text: #f8f5ec;
  --muted: #a79cc9;
  --accent: #f97316;
  --tile-size: 44px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(
      180deg,
      rgba(249, 115, 22, 0.16),
      transparent 20%),
    linear-gradient(
      120deg,
      rgba(59, 130, 246, 0.12),
      transparent 35%),
    #090612;
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
.office-app {
  min-height: 100vh;
  padding: 24px;
}
.entry-shell,
.office-shell {
  display: grid;
  gap: 24px;
}
.entry-shell {
  grid-template-columns: 1.1fr minmax(320px, 520px);
  align-items: center;
  min-height: calc(100vh - 48px);
}
.entry-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.05;
  max-width: 11ch;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
}
.office-shell {
  grid-template-columns: minmax(760px, 1.45fr) minmax(360px, 0.9fr);
  align-items: start;
}
.office-panel,
.card,
.auth-card {
  background:
    linear-gradient(
      180deg,
      rgba(32, 26, 57, 0.96),
      rgba(12, 16, 29, 0.98));
  border: 3px solid var(--line);
  box-shadow: 0 0 0 3px rgba(10, 7, 18, 0.9), 0 18px 40px rgba(0, 0, 0, 0.35);
}
.office-panel {
  padding: 18px;
}
.office-header,
.world-stats,
.control-panel,
.task-list,
.detail-grid,
.task-tags,
.dependency-graph,
.memory-strip {
  display: grid;
  gap: 12px;
}
.office-header {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 16px;
}
.office-header h1,
.section-head h2,
.section-head h3 {
  margin: 0;
  line-height: 1.35;
}
.office-header h1 {
  max-width: 18ch;
  font-size: 1.2rem;
}
.world-stats {
  justify-items: end;
  color: var(--muted);
  font-size: 0.72rem;
}
.office-stage {
  overflow: auto;
}
.office-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: rgba(17, 23, 38, 0.8);
  font-size: 0.64rem;
}
.office-banner strong,
.office-banner span {
  line-height: 1.6;
}
.office-banner span {
  color: var(--muted);
  text-align: right;
}
.office-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--grid-width), var(--tile-size));
  grid-template-rows: repeat(var(--grid-height), var(--tile-size));
  gap: 2px;
  padding: 10px;
  background:
    linear-gradient(
      180deg,
      rgba(10, 8, 18, 0.9),
      rgba(20, 16, 37, 0.95));
  border: 3px solid #08060e;
}
.office-tile {
  position: relative;
  background: #1c1730;
  outline: 1px solid rgba(255, 255, 255, 0.04);
}
.office-tile--desk {
  background: #24324d;
}
.office-tile--meeting {
  background: #3e2c4c;
}
.office-tile--ops {
  background: #273a2d;
}
.office-tile--rest {
  background: #4a311f;
}
.office-tile--transit {
  background: #2f2141;
}
.room-label {
  position: absolute;
  inset: auto 2px 2px 2px;
  font-size: 0.42rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.78);
}
.agent-sprite {
  position: absolute;
  width: var(--tile-size);
  margin: 0;
  padding: 0;
  transform: translate(2px, 2px);
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    left 0.45s linear,
    top 0.45s linear,
    transform 0.18s ease;
}
.agent-sprite strong {
  position: absolute;
  top: -12px;
  left: -6px;
  font-size: 0.45rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 4px;
}
.agent-rank {
  position: absolute;
  right: -4px;
  top: 2px;
  font-size: 0.4rem;
  background: #111827;
  color: #fde68a;
  padding: 2px 3px;
  border: 1px solid #f59e0b;
}
.agent-thought-bubble {
  position: absolute;
  left: 32px;
  top: 6px;
  min-width: 120px;
  max-width: 170px;
  padding: 4px 6px;
  background: rgba(7, 10, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  font-size: 0.44rem;
  line-height: 1.5;
  text-align: left;
  pointer-events: none;
}
.agent-sprite.is-selected {
  transform: translate(2px, 2px) scale(1.08);
}
.agent-body {
  display: block;
  width: 30px;
  height: 30px;
  margin: 7px;
  background: var(--agent-color);
  box-shadow: 0 0 0 4px #0b0913, inset 0 -10px 0 rgba(0, 0, 0, 0.22);
}
.agent-body--walking {
  clip-path: polygon(0 10%, 100% 10%, 100% 90%, 0 90%);
}
.agent-body--thinking {
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}
.agent-body--meeting {
  border-radius: 50%;
}
.agent-body--working {
  clip-path: polygon(18% 0, 82% 0, 100% 32%, 100% 100%, 0 100%, 0 32%);
}
.control-panel {
  grid-auto-rows: min-content;
}
.card,
.auth-card {
  padding: 18px;
}
.task-console textarea,
.auth-form input,
.settings-grid input,
.settings-grid select,
.chat-form textarea,
.code-form textarea {
  width: 100%;
  border: 2px solid var(--line);
  background: #0d1020;
  color: var(--text);
  padding: 14px;
  resize: vertical;
}
.primary-button,
.secondary-button,
.mode-toggle button,
.social-strip button {
  border: 2px solid #000;
  background:
    linear-gradient(
      180deg,
      #ffd166,
      var(--accent));
  color: #120d1a;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}
.mode-toggle,
.social-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.social-strip {
  grid-template-columns: repeat(3, 1fr);
}
.mode-toggle .active {
  outline: 2px solid var(--accent);
}
.auth-form,
.section-head {
  display: grid;
  gap: 12px;
}
.section-head {
  margin-bottom: 12px;
}
.mission-brief,
.muted,
.error-inline {
  font-size: 0.68rem;
  line-height: 1.7;
}
.mission-brief,
.muted {
  color: var(--muted);
}
.error-inline {
  color: #fca5a5;
}
.detail-grid {
  grid-template-columns: 86px 1fr;
  align-items: start;
  font-size: 0.68rem;
}
.detail-grid span {
  color: var(--muted);
}
.memory-strip {
  margin-top: 14px;
}
.memory-chip,
.dependency-edge,
.task-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border: 2px solid var(--line);
  background: rgba(10, 12, 22, 0.72);
  font-size: 0.58rem;
  line-height: 1.5;
}
.task-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 2px solid var(--line);
  background: rgba(10, 12, 22, 0.72);
  font-size: 0.7rem;
}
.task-card em {
  color: var(--muted);
  font-style: normal;
}
.task-tags,
.dependency-graph {
  gap: 8px;
}
.task-tag--done {
  border-color: #14532d;
}
.task-tag--assigned {
  border-color: #7c3aed;
}
.task-tag--queued {
  border-color: #7c2d12;
}
.task-card--done {
  border-color: #14532d;
}
.task-card--in_progress {
  border-color: #7c3aed;
}
.debug-card pre {
  margin: 0;
  max-height: 300px;
  overflow: auto;
  background: #090b16;
  padding: 12px;
  border: 2px solid var(--line);
  color: #9ae6b4;
  font-size: 0.58rem;
  line-height: 1.7;
}
.message-list {
  display: grid;
  gap: 10px;
}
.message-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 2px solid var(--line);
  background: rgba(8, 11, 20, 0.78);
  font-size: 0.64rem;
  line-height: 1.6;
}
.message-card span {
  color: var(--muted);
}
@media (max-width: 1200px) {
  .office-shell,
  .entry-shell {
    grid-template-columns: 1fr;
  }
  .office-panel {
    overflow: auto;
  }
}
@media (max-width: 720px) {
  .office-app {
    padding: 14px;
  }
  .office-banner {
    flex-direction: column;
  }
  .agent-thought-bubble {
    display: none;
  }
}
