:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-2: #e7dfd0;
  --panel: rgba(255, 250, 241, 0.84);
  --panel-strong: rgba(20, 31, 46, 0.94);
  --panel-border: rgba(34, 47, 69, 0.12);
  --text: #182131;
  --muted: #667287;
  --muted-strong: #4b5870;
  --navy: #1d2940;
  --navy-2: #263755;
  --teal: #0f766e;
  --teal-2: #1f9d93;
  --amber: #c36a14;
  --blue: #2455d8;
  --red: #c44536;
  --white: #fffdfa;
  --shadow: 0 22px 60px rgba(16, 26, 41, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 157, 147, 0.18), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(195, 106, 20, 0.12), transparent 22%),
    linear-gradient(180deg, #f7f2e8 0%, #f0eadf 42%, #ebe2d4 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 41, 64, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 41, 64, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

body:not(.is-authenticated) .app-shell {
  display: none;
}

body.is-authenticated .login-screen {
  display: none;
}

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-panel {
  width: min(440px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid rgba(34, 47, 69, 0.12);
  box-shadow: var(--shadow);
}

.login-panel .brand-mark {
  margin-bottom: 18px;
  border-radius: 12px;
}

.login-panel h1 {
  margin: 8px 0 22px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  line-height: 1;
}

.login-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  margin: 8px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 47, 69, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

.login-error {
  min-height: 20px;
  margin-bottom: 12px;
  color: var(--red);
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, rgba(16, 24, 38, 0.98), rgba(28, 39, 61, 0.95)),
    radial-gradient(circle at top right, rgba(31, 157, 147, 0.18), transparent 30%);
  color: #eef3fb;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand strong,
.command-bar h1,
.section-head h2,
.panel-head h3,
.inspector-name,
.kpi-value {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--white);
  font-weight: 700;
  background:
    linear-gradient(135deg, var(--teal-2), var(--blue));
  box-shadow: 0 12px 24px rgba(36, 85, 216, 0.24);
}

.brand span,
.sidebar-footer span,
.sidebar-footer small {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: rgba(238, 243, 251, 0.7);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.icon-button,
.primary-action,
.segment {
  border: 0;
  cursor: pointer;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  color: rgba(238, 243, 251, 0.84);
  background: transparent;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-footer {
  margin-top: 28px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer strong {
  display: block;
  margin: 8px 0 4px;
}

.logout-button {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #eef3fb;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.workspace {
  padding: 26px 26px 80px;
}

.command-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.command-bar h1 {
  margin: 6px 0 0;
  max-width: 15ch;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.96;
}

.eyebrow,
.section-note,
.panel-badge,
.field-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 700;
}

.eyebrow,
.section-note,
.field-label {
  color: var(--muted);
}

.bar-actions {
  display: flex;
  gap: 10px;
}

.icon-button,
.primary-action,
.segment,
.select-input,
.draft-box {
  border-radius: 16px;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--teal));
  box-shadow: 0 16px 36px rgba(15, 118, 110, 0.22);
}

.full-width {
  width: 100%;
}

.dashboard-section {
  display: none;
}

.dashboard-section.is-active {
  display: block;
}

.dashboard-section.is-active + .dashboard-section.is-active {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
}

.status-strip,
.kpi-grid,
.proof-grid,
.overview-grid,
.ops-grid,
.analytics-grid,
.agent-layout,
.agent-live-grid,
.office-layout,
.intelligence-grid,
.openclaw-grid,
.handoff-grid {
  display: grid;
  gap: 18px;
}

.status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 340px;
}

.status-chip {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(34, 47, 69, 0.08);
  box-shadow: var(--shadow);
}

.status-chip strong,
.status-chip span {
  display: block;
}

.status-chip strong {
  font-size: 0.9rem;
}

.status-chip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.merge-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 20px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(21, 31, 49, 0.96), rgba(13, 84, 79, 0.86));
  color: #f7fbff;
}

.merge-hero .eyebrow,
.merge-text {
  color: rgba(247, 251, 255, 0.76);
}

.merge-copy h3 {
  margin: 8px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.1vw, 3.5rem);
  line-height: 0.94;
  max-width: 12ch;
}

.merge-text {
  max-width: 56ch;
  line-height: 1.5;
  font-size: 1.03rem;
}

.merge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.merge-tags span {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.merge-stage {
  display: grid;
  align-items: center;
}

.merge-map {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 20% 80%, rgba(36, 85, 216, 0.22), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(31, 157, 147, 0.18), transparent 24%),
    rgba(255, 255, 255, 0.06);
}

.map-node {
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  border: 3px solid rgba(255, 255, 255, 0.26);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.map-node strong,
.map-node span {
  display: block;
}

.map-node strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
}

.map-node span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
}

.node-studio {
  top: 36px;
  right: 88px;
  background: linear-gradient(135deg, #0f766e, #1f9d93);
}

.node-edge {
  left: 54px;
  bottom: 44px;
  background: linear-gradient(135deg, #2455d8, #4b7eff);
}

.node-natalie {
  right: 44px;
  bottom: 52px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.node-claudia {
  left: 40px;
  top: 34px;
  background: linear-gradient(135deg, #c36a14, #f59e0b);
}

.node-daphne {
  left: 168px;
  bottom: 18px;
  background: linear-gradient(135deg, #c44536, #f97363);
}

.node-bridgette {
  right: 168px;
  bottom: 18px;
  background: linear-gradient(135deg, #1d2940, #4b5870);
}

.map-link {
  position: absolute;
  height: 3px;
  background: rgba(255, 255, 255, 0.28);
  transform-origin: left center;
}

.map-link-top {
  top: 132px;
  right: 96px;
  width: 198px;
  transform: rotate(158deg);
}

.map-link-mid {
  right: 78px;
  bottom: 132px;
  width: 168px;
  transform: rotate(203deg);
}

.proof-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.proof-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(34, 47, 69, 0.08);
  box-shadow: var(--shadow);
}

.proof-card h3 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

.proof-card ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.kpi-card,
.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.merge-hero.panel {
  background:
    linear-gradient(135deg, rgba(21, 31, 49, 0.98), rgba(13, 84, 79, 0.9));
  border-color: rgba(255, 255, 255, 0.16);
  color: #f7fbff;
}

.merge-hero.panel .eyebrow,
.merge-hero.panel .merge-text {
  color: rgba(247, 251, 255, 0.82);
}

.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--accent, var(--teal));
}

.kpi-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-value {
  margin-top: 10px;
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1;
}

.kpi-note {
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 0.96rem;
  line-height: 1.35;
}

.overview-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
}

.ops-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 20px;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 6px 0 0;
  font-size: 1.4rem;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(36, 85, 216, 0.1);
  color: var(--blue);
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 220px;
  gap: 18px;
  align-items: center;
}

.chart-copy strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.2rem;
  line-height: 0.92;
}

.chart-copy span {
  display: block;
  margin-top: 8px;
  font-weight: 600;
}

.chart-copy p {
  color: var(--muted-strong);
  line-height: 1.5;
}

.priority-list,
.ops-list,
.report-grid,
.ladder,
.timeline,
.risk-stack,
.automation-list,
.live-feed,
.agent-feed,
.night-plan,
.checkin-grid,
.security-results,
.prompt-stack,
.schedule-stack,
.channel-status,
.source-list,
.crm-track {
  display: grid;
  gap: 12px;
}

.priority-item,
.ops-item,
.report-card,
.ladder-row,
.timeline-item,
.risk-item,
.automation-item,
.feed-item,
.agent-feed-item,
.night-plan-item,
.checkin-card,
.security-result,
.prompt-item,
.schedule-item,
.channel-item,
.source-item,
.crm-item {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(34, 47, 69, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.priority-item,
.ladder-row,
.security-result,
.agent-feed-item,
.schedule-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ops-item {
  position: relative;
  overflow: hidden;
}

.ops-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.ops-item[data-state="active"]::before,
.ops-item[data-state="done"]::before {
  background: var(--teal);
}

.ops-item[data-state="access_blocked"]::before,
.ops-item[data-state="pending_checkin"]::before,
.ops-item[data-state="noted"]::before {
  background: var(--amber);
}

.ops-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ops-meta strong,
.ops-meta span {
  display: block;
}

.ops-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.ops-task {
  margin-top: 10px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.mini-pill {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(36, 85, 216, 0.1);
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.mini-pill.active,
.mini-pill.done {
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal);
}

.mini-pill.noted,
.mini-pill.pending_checkin,
.mini-pill.access_blocked {
  background: rgba(195, 106, 20, 0.12);
  color: var(--amber);
}

.rollup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rollup-card {
  min-height: 164px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(34, 47, 69, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.rollup-card h4 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.rollup-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.rollup-card.green h4 {
  color: var(--teal);
}

.rollup-card.yellow h4 {
  color: var(--amber);
}

.rollup-card.red h4 {
  color: var(--red);
}

.rollup-card.approval h4 {
  color: var(--blue);
}

.report-panel {
  margin-top: 18px;
}

.report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-card {
  min-height: 240px;
}

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-card-head strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
}

.report-card ul {
  margin: 16px 0;
  padding-left: 20px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.report-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.48;
}

.priority-item strong,
.ladder-row strong,
.prompt-item strong,
.schedule-item strong,
.memory-item strong,
.channel-item strong,
.feed-item strong,
.agent-feed-item strong,
.night-plan-item strong,
.checkin-card strong,
.security-result strong,
.source-item strong,
.crm-item strong,
.risk-item strong,
.automation-item strong {
  display: block;
  font-size: 1rem;
}

.priority-item span,
.ladder-row span,
.timeline-item span,
.prompt-item span,
.schedule-item span,
.memory-item span,
.channel-item span,
.feed-item p,
.agent-feed-item p,
.agent-feed-item small,
.night-plan-item span,
.checkin-card p,
.security-result p,
.source-item span,
.crm-item span,
.risk-item span,
.automation-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted-strong);
  line-height: 1.42;
}

.priority-score,
.ladder-score {
  min-width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--navy);
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.analytics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.ladder-bar {
  flex: 1;
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(29, 41, 64, 0.08);
  overflow: hidden;
}

.ladder-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline-item {
  min-height: 148px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(239, 244, 255, 0.72));
}

.timeline-time {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}

.agent-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
}

.agent-live-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.agent-feed-item,
.night-plan-item,
.checkin-card {
  position: relative;
  overflow: hidden;
}

.agent-feed-item::before,
.night-plan-item::before,
.checkin-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.agent-feed-item.pending::before {
  background: var(--amber);
}

.agent-feed-item.ready::before,
.agent-feed-item.stable::before,
.agent-feed-item.supporting::before,
.agent-feed-item.monitoring::before {
  background: var(--blue);
}

.agent-feed-item div {
  min-width: 116px;
}

.agent-feed-item p {
  flex: 1;
  margin: 0;
}

.agent-feed-item small {
  max-width: 190px;
}

.checkin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkin-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.checkin-times span {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
}

.checkin-card p {
  margin-bottom: 0;
}

.office-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
}

.office-floor-panel {
  min-height: 520px;
}

.office-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.office-hud div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(29, 41, 64, 0.06);
  border: 1px solid rgba(34, 47, 69, 0.08);
}

.office-hud span,
.office-hud strong {
  display: block;
}

.office-hud span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.office-hud strong {
  margin-top: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
}

.office-floor {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(34, 47, 69, 0.08);
  background:
    linear-gradient(90deg, rgba(29, 41, 64, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(29, 41, 64, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(31, 157, 147, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.58);
  background-size: 58px 58px, 58px 58px, auto, auto;
}

.office-floor::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  border: 2px solid rgba(29, 41, 64, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 0 70px rgba(36, 85, 216, 0.08);
}

.office-floor::before,
.office-floor::after {
  position: absolute;
  border-radius: 22px;
}

.office-floor::after {
  left: 10%;
  right: 10%;
  top: 45%;
  height: 64px;
  content: "";
  background: rgba(29, 41, 64, 0.05);
}

.desk-zone {
  position: absolute;
  min-width: 132px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(34, 47, 69, 0.08);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
}

.desk-zone strong,
.desk-zone span {
  display: block;
}

.desk-zone span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.zone-command {
  left: 39%;
  top: 8%;
}

.zone-build {
  left: 8%;
  top: 28%;
}

.zone-crm {
  right: 8%;
  top: 34%;
}

.zone-security {
  right: 13%;
  bottom: 10%;
}

.office-avatar {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 124px;
  min-height: 118px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(34, 47, 69, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: var(--shadow);
  color: var(--text);
  z-index: 2;
  animation:
    agentWalk 8s ease-in-out infinite,
    agentPulse 2.6s ease-in-out infinite;
  animation-delay: var(--delay), calc(var(--delay) * 0.5);
  will-change: transform;
}

.office-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 58px;
  height: 16px;
  border-radius: 50%;
  background: rgba(24, 33, 49, 0.16);
  transform: translateX(-50%);
  filter: blur(2px);
}

.office-avatar em {
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
  font-size: 0.7rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.office-avatar.is-talking {
  border-color: rgba(195, 106, 20, 0.36);
  box-shadow: 0 0 0 8px rgba(195, 106, 20, 0.1), var(--shadow);
}

.office-avatar.is-talking::before {
  content: "updating...";
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 94px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 700;
}

.avatar-bubble {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.avatar-bubble.small {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.office-avatar small,
.feed-item span,
.security-result span,
.skill-card-head span {
  color: var(--muted);
}

.office-avatar.building .avatar-bubble,
.office-avatar.coordinating .avatar-bubble {
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.office-avatar.monitoring .avatar-bubble {
  background: linear-gradient(135deg, var(--blue), #4b7eff);
}

.office-ticker {
  min-height: 48px;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--navy);
  color: #f7fbff;
  font-weight: 700;
  line-height: 1.35;
  animation: tickerGlow 2.8s ease-in-out infinite;
}

@keyframes agentWalk {
  0% {
    transform: translate(-50%, -50%) translate(0, 0);
  }
  25% {
    transform: translate(-50%, -50%) translate(var(--dx), -10px);
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--dx2), var(--dy));
  }
  75% {
    transform: translate(-50%, -50%) translate(10px, var(--dy2));
  }
  100% {
    transform: translate(-50%, -50%) translate(0, 0);
  }
}

@keyframes agentPulse {
  0%, 100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.24);
  }
}

@keyframes tickerGlow {
  0%, 100% {
    box-shadow: 0 12px 28px rgba(29, 41, 64, 0.16);
  }
  50% {
    box-shadow: 0 12px 34px rgba(15, 118, 110, 0.24);
  }
}

.feed-item {
  position: relative;
  padding-left: 42px;
}

.feed-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.1);
}

.feed-item p,
.security-result p {
  margin: 6px 0 0;
}

.skill-memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.skill-memory-card {
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(34, 47, 69, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-card-head strong,
.skill-card-head span {
  display: block;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.skill-tags span {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(36, 85, 216, 0.1);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
}

.skill-memory-card p {
  margin: 14px 0 0;
  color: var(--muted-strong);
  line-height: 1.45;
}

.security-panel {
  background: var(--panel-strong);
  color: #f3f6fb;
}

.security-panel .eyebrow,
.security-panel .security-result span,
.security-panel .security-result p {
  color: rgba(243, 246, 251, 0.72);
}

.security-result {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.security-result::after {
  content: "";
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--amber);
}

.security-result.active::after {
  background: var(--teal-2);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.agent-card {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(246, 246, 244, 0.76));
  border: 1px solid rgba(34, 47, 69, 0.08);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: 160ms ease;
}

.agent-card:hover,
.agent-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(36, 85, 216, 0.22);
}

.agent-top,
.inspector-meta,
.source-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.agent-name,
.inspector-name {
  margin: 0;
  font-size: 1.3rem;
}

.agent-role,
.inspector-role {
  color: var(--muted);
  line-height: 1.4;
}

.health-pill {
  min-height: 32px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal);
}

.health-pill.attention {
  background: rgba(195, 106, 20, 0.12);
  color: var(--amber);
}

.health-pill.busy {
  background: rgba(196, 69, 54, 0.12);
  color: var(--red);
}

.agent-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stat-box {
  padding: 10px;
  border-radius: 14px;
  background: rgba(29, 41, 64, 0.04);
}

.stat-box strong,
.stat-box span {
  display: block;
}

.stat-box strong {
  font-size: 1.1rem;
}

.stat-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agent-action {
  margin-top: 14px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.inspector {
  background: var(--panel-strong);
  color: #f3f6fb;
}

.inspector .section-note,
.inspector .eyebrow,
.inspector .inspector-role,
.inspector .inspector-copy,
.inspector .inspector-list span {
  color: rgba(243, 246, 251, 0.72);
}

.inspector-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.inspector-list div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.inspector-list strong,
.inspector-list span {
  display: block;
}

.inspector-copy {
  margin-top: 14px;
  line-height: 1.5;
}

.intelligence-grid,
.openclaw-grid,
.handoff-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.openclaw-lead {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(29, 41, 64, 0.96), rgba(15, 118, 110, 0.88));
  color: #f7fbff;
}

.openclaw-lead .eyebrow,
.openclaw-lead p {
  color: rgba(247, 251, 255, 0.76);
}

.openclaw-lead p {
  margin: 0 0 16px;
  max-width: 78ch;
  line-height: 1.5;
}

.openclaw-checks,
.memory-grid {
  display: grid;
  gap: 12px;
}

.openclaw-checks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.openclaw-check,
.memory-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(34, 47, 69, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.openclaw-check {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

.openclaw-check span,
.openclaw-check strong,
.openclaw-check small,
.memory-item code {
  display: block;
}

.openclaw-check span {
  color: rgba(247, 251, 255, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.openclaw-check strong {
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
}

.openclaw-check small {
  margin-top: 8px;
  color: rgba(247, 251, 255, 0.74);
  line-height: 1.35;
}

.schedule-time {
  min-width: 62px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.schedule-item.fallback .schedule-time {
  background: rgba(195, 106, 20, 0.12);
  color: var(--amber);
}

.memory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.memory-item code {
  margin-top: 8px;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.channel-item {
  position: relative;
  overflow: hidden;
}

.channel-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.channel-item.blocked::before {
  background: var(--amber);
}

.select-input,
.draft-box {
  width: 100%;
  border: 1px solid rgba(34, 47, 69, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.select-input {
  min-height: 46px;
  padding: 0 14px;
  margin-top: 8px;
  margin-bottom: 14px;
}

.draft-box {
  padding: 14px;
  resize: vertical;
  min-height: 164px;
  margin-top: 8px;
  margin-bottom: 14px;
  color: var(--text);
}

.source-item,
.crm-item {
  position: relative;
  overflow: hidden;
}

.source-item::before,
.crm-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--teal);
}

.source-item.pending::before,
.crm-item.pending::before {
  background: var(--amber);
}

canvas {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .status-strip,
  .kpi-grid,
  .proof-grid,
  .overview-grid,
  .ops-grid,
  .analytics-grid,
    .report-grid,
    .agent-layout,
    .agent-live-grid,
    .office-layout,
    .intelligence-grid,
  .openclaw-grid,
  .handoff-grid {
    grid-template-columns: 1fr;
  }

  .openclaw-lead {
    grid-column: auto;
  }

  .span-2 {
    grid-column: auto;
  }

  .timeline,
  .report-grid,
  .agent-grid,
  .checkin-grid,
  .skill-memory-grid {
    grid-template-columns: 1fr 1fr;
  }

  .merge-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 18px 18px 54px;
  }

  .command-bar,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .command-bar h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 10vw, 3.6rem);
  }

  .kpi-grid,
  .proof-grid,
  .agent-grid,
  .timeline,
  .report-grid,
  .skill-memory-grid,
  .checkin-grid,
  .openclaw-checks,
  .memory-grid,
  .rollup-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .agent-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-floor {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .office-floor::before,
  .office-floor::after {
    display: none;
  }

  .desk-zone {
    display: none;
  }

  .office-avatar {
    position: static;
    width: auto;
    min-height: 118px;
    transform: none;
    animation: agentPulse 2.6s ease-in-out infinite;
  }

  .office-hud {
    grid-template-columns: 1fr;
  }

  .merge-hero.panel {
    background: #142033;
    border-color: rgba(255, 255, 255, 0.18);
  }

  .merge-copy h3 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 3.15rem);
    line-height: 1.02;
  }

  .merge-text {
    font-size: 1rem;
  }

  .merge-tags span {
    background: rgba(255, 255, 255, 0.16);
  }

  .merge-map {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .map-link {
    display: none;
  }

  .map-node {
    position: static;
    width: auto;
    height: 108px;
    border-radius: 18px;
  }

  .map-node strong {
    font-size: 1rem;
  }

  .map-node span {
    font-size: 0.88rem;
  }
}
