@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap");

:root {
  --ink: #16304a;
  --muted: #5d7790;
  --line: #d5e3ef;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --accent: #1f6bff;
  --accent-soft: #e8f0ff;
  --live: #1f9a6a;
  --shadow: 0 14px 40px rgba(28, 62, 104, 0.12);
  --radius: 18px;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: #c9def4;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #5aa0ff;
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sidebar {
  position: fixed;
  top: 12px;
  left: 12px;
  bottom: 12px;
  z-index: 12;
  width: 278px;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: transform .28s ease, opacity .2s ease;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-hide, .sidebar-open {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid #e3edf6;
  border-radius: 10px;
  background: #fff;
  color: #38536d;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(36, 70, 110, 0.08);
}
.sidebar-open {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 13;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--glass-strong);
}
body.sidebar-hidden .sidebar {
  transform: translateX(calc(-100% - 28px));
  pointer-events: none;
  opacity: 0;
}
body.sidebar-hidden .hud-top { left: 68px; }
body.sidebar-hidden .sidebar-open { display: grid; place-items: center; }
.sidebar-open[hidden] { display: none; }

.brand { display: block; text-decoration: none; min-width: 0; }
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}
.sidebar-kicker {
  margin: 10px 4px 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7d93aa;
  font-weight: 700;
}

nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 8px;
  border: 1px solid #e3edf6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: #4f6880;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}
nav button.active {
  background: #fff;
  border-color: #8db4ff;
  color: #1c5ad4;
  box-shadow: 0 6px 16px rgba(40, 96, 210, 0.12);
}
.floor-number {
  font: 700 12px Manrope, sans-serif;
  color: #7d93aa;
}
nav button.active .floor-number { color: var(--accent); }
.all-floors { grid-column: 1 / -1; justify-content: center; }

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 4px 8px;
}
.feed-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.feed-head span {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
#agentFeed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.feed-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #24415d;
  text-align: left;
}
.feed-item img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  object-position: 50% 8%;
  border-radius: 50%;
  background: #eaf0f5;
  flex: none;
}
.feed-item strong {
  display: block;
  font-size: 12px;
  letter-spacing: -0.01em;
}
.feed-item small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #6d849b;
  line-height: 1.35;
}
.feed-item i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #9aadc0;
}
.feed-item.is-work { background: #eef4ff; border-color: #d5e3ff; }
.feed-item.is-work i { background: var(--accent); }
.feed-item.is-wait { background: #fff6e8; border-color: #f3dfb4; }
.feed-item.is-wait i { background: #d0892a; }
.feed-item.is-done { background: #e8f7ef; border-color: #c6e8d4; }
.feed-item.is-done i { background: var(--live); }
.feed-item.is-off { opacity: 0.55; }
.feed-item:hover { border-color: #8db4ff; }

main { height: 100%; }
.stage {
  position: relative;
  height: 100dvh;
  background:
    radial-gradient(circle at 18% 12%, #eef6ff 0, transparent 28%),
    linear-gradient(180deg, #d4e6f7 0%, #b9d4ee 100%);
  overflow: hidden;
}

.stage::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 55% 42%, transparent 46%, rgba(74, 110, 150, 0.14) 100%);
}

#scene, #agentLabels { position: absolute; inset: 0; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#agentLabels { pointer-events: none; overflow: hidden; z-index: 4; }

.hud-top, .hud-bottom, .camera-command, .roster-dock, #loading, .stage-title, .toolbar {
  z-index: 5;
}

.hud-top {
  position: absolute;
  top: 18px;
  left: 308px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.stage-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}
.stage-title strong {
  display: block;
  font: 800 15px Manrope, sans-serif;
  letter-spacing: -0.03em;
}
.stage-title span:not(.live-dot) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.live-dot, .demo i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(31, 154, 106, 0.14);
}
.demo.live i { background: var(--live); }
.demo.offline i { background: #d0892a; box-shadow: none; }

#zones {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: 0 4px 14px rgba(36, 70, 110, 0.08);
}
#zones::-webkit-scrollbar { display: none; }
#zones:empty { display: none; }
#zones button {
  flex: none;
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #3d5872;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
#zones button:hover { background: rgba(23, 58, 88, 0.08); color: #173a58; }
#zones button.selected { background: #173a58; color: #fff; }
#zones .dashboard-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  background: var(--accent);
  color: #fff;
}
#zones .dashboard-button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
}
#zones .dashboard-button:hover { background: #1858d6; color: #fff; }
.demo, .stage-title strong, .stage-title span:not(.live-dot) { white-space: nowrap; }
@media (max-width: 1640px) {
  .hud-top { flex-wrap: wrap; row-gap: 8px; }
  #zones { order: 3; flex-basis: auto; max-width: 100%; }
  .hud-top::after { content: ""; order: 2; flex-basis: 100%; }
  body.panel-open #zones { max-width: calc(100% - 340px); }
}

.hud-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.demo, .logout, .toolbar button, .zoom-cluster button, .camera-command button {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--glass-strong);
  color: #38536d;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(36, 70, 110, 0.08);
}
.demo {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
.demo.live { color: #176848; background: #e8f7ef; }
.demo.offline { color: #8a5a1a; background: #fff6e8; }
.logout { padding: 8px 12px; font-size: 12px; }
.toolbar { display: flex; gap: 6px; }
.toolbar button {
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
}
.toolbar button[aria-pressed="true"] {
  background: #173a58;
  color: #fff;
  border-color: #173a58;
}

.camera-command {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(280px, 42vw);
  padding: 3px 3px 3px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e3edf6;
}
.camera-command input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font: inherit;
  color: var(--ink);
}
.camera-command button {
  padding: 8px 14px;
  font-weight: 700;
  background: #173a58;
  color: #fff;
  border-color: #173a58;
}
.camera-command p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hud-bottom {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zoom-cluster { display: flex; flex-direction: column; gap: 6px; }
.zoom-cluster button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
}

.agent-label[hidden] { display: none !important; }
.agent-label {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -108%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(24, 54, 88, 0.1);
  color: #2a4663;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.agent-label i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0;
  border-radius: 50%;
  background: var(--color);
  flex: none;
}
.agent-label .activity-label { display: none; font-weight: 500; opacity: 0.88; }
.agent-label.is-busy .activity-label { display: inline; }
.agent-label.is-busy .activity-label::before { content: "· "; }
.agent-label.is-busy {
  background: #173a58;
  color: #fff;
  border-color: #173a58;
}
/* Lampu status (ADR-066): warna & gerak titik mengikuti data-signal dari /v1/workspace. */
.agent-label[data-signal="idle"] i { background: #9aa9b8; }
.agent-label[data-signal="off"] { opacity: 0.55; }
.agent-label[data-signal="off"] i { background: #c3ccd6; }
.agent-label[data-signal="received"] i { background: #4d9bff; animation: sig-ping 0.9s ease-out infinite; }
.agent-label[data-signal="working"] i { background: #3ddc84; animation: sig-breathe 1.6s ease-in-out infinite; }
.agent-label[data-signal="queued"] i { background: #7fb3e6; }
.agent-label[data-signal="approval"] i { background: #f2b705; animation: sig-blink 1.4s ease-in-out infinite; }
.agent-label[data-signal="failed"] i { background: #e5484d; }
.agent-label[data-signal="done"] i { background: #22a861; }
.agent-label.is-busy[data-signal="queued"] { background: rgba(255, 255, 255, 0.95); color: #2a4663; border-color: #7fb3e6; }
.agent-label.is-busy[data-signal="approval"] { background: #fff4d6; color: #6b4a00; border-color: #f2b705; }
.agent-label.is-busy[data-signal="failed"] { background: #fde8e8; color: #8f1d22; border-color: #e5484d; }
.agent-label.is-busy[data-signal="done"] { background: #e3f7ec; color: #135c33; border-color: #22a861; }
.agent-label .signal-bars { display: none; align-items: flex-end; gap: 1px; height: 8px; }
.agent-label[data-signal="working"] .signal-bars { display: inline-flex; }
.agent-label .signal-bars s {
  display: block;
  width: 2px;
  height: 8px;
  border-radius: 1px;
  background: #3ddc84;
  transform-origin: bottom;
  animation: sig-bar 0.9s ease-in-out infinite;
}
.agent-label .signal-bars s:nth-child(2) { animation-delay: 0.15s; }
.agent-label .signal-bars s:nth-child(3) { animation-delay: 0.3s; }
@keyframes sig-ping {
  0% { box-shadow: 0 0 0 0 rgba(77, 155, 255, 0.85); }
  100% { box-shadow: 0 0 0 7px rgba(77, 155, 255, 0); }
}
@keyframes sig-breathe { 50% { opacity: 0.35; } }
@keyframes sig-blink { 50% { opacity: 0.15; } }
@keyframes sig-bar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .agent-label i, .agent-label .signal-bars s { animation: none !important; }
}
.agent-label:hover { z-index: 6; }

.sidebar .camera-command {
  width: 100%;
  margin-top: 8px;
  background: #fff;
}
.config-open {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #d5e3ef;
  border-radius: 12px;
  background: #173a58;
  color: #e8fff6;
  font-size: 13px;
  font-weight: 700;
}
.config-open:hover { filter: brightness(1.08); }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 4px 8px;
}
.section-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.section-header h2 span {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}
.section-header > span { font-size: 11px; color: var(--muted); }
#roster {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.agent-card {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 188px;
  padding: 7px;
  border: 1px solid #e3edf6;
  border-radius: 12px;
  background: #fff;
  color: #24415d;
  text-align: left;
}
.agent-card:hover { border-color: #8db4ff; }
.agent-card img {
  width: 36px;
  height: 44px;
  object-fit: cover;
  object-position: 50% 0;
  border-radius: 8px;
  background: #eaf0f5;
}
.agent-card strong { display: block; font-size: 12px; }
.agent-card small { display: block; margin-top: 2px; font-size: 11px; color: #7d93aa; }
.agent-card i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--live);
}
.agent-card.is-off { opacity: 0.5; }

#loading {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: #d4e6f7;
  color: #5d7790;
  z-index: 8;
}
#loading small { display: block; margin-top: 8px; }
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid #c5d4de;
  border-top-color: #1f6bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-error { text-align: center; padding: 30px; }
.boot-error button { margin-top: 14px; padding: 10px 14px; }

dialog {
  padding: 0;
  max-width: 400px;
  width: calc(100% - 30px);
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  box-shadow: 0 25px 100px rgba(16, 33, 54, 0.28);
}
dialog::backdrop { background: rgba(19, 38, 60, 0.46); backdrop-filter: blur(6px); }
.close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  font-size: 20px;
  z-index: 1;
}
.portrait {
  height: 230px;
  background: radial-gradient(ellipse at bottom, #c6e8e1, #e6eff8);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.portrait img {
  height: 370px;
  width: 247px;
  object-fit: contain;
  object-position: top;
}
.portrait > span {
  position: absolute;
  left: 22px;
  bottom: 18px;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: #4e7778;
}
.detail-content { padding: 22px; }
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #7b8a9b;
  font-weight: 700;
}
.detail-content h2 { font: 800 24px Manrope, sans-serif; margin: 6px 0 10px; }
.status {
  font-size: 12px;
  color: #176848;
  background: #edf8f1;
  padding: 5px 9px;
  border-radius: 999px;
}
.detail-content p { font-size: 14px; color: #748599; line-height: 1.6; }
.task {
  padding: 14px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  border-radius: 12px;
}
.task small { display: block; font-size: 10px; letter-spacing: 0.12em; color: #93a0af; }
.task strong { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; }
.primary {
  width: 100%;
  background: #173a58;
  color: #cef7e7;
  border: 0;
  padding: 13px;
  border-radius: 12px;
  margin-top: 18px;
  font-weight: 700;
}
.ticket-close {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #e7b8b0;
  border-radius: 12px;
  background: #fff6f4;
  color: #a2382a;
  font-weight: 700;
}
.ticket-close:disabled { opacity: 0.6; }
.ticket-close-note { margin-top: 6px; font-size: 12px; color: #a2382a; }
.activity-control { display: block; margin-top: 16px; font-size: 13px; color: #587085; }
.activity-control select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid #ccdae4;
  border-radius: 8px;
  background: #f5f9fc;
  font: inherit;
}
.hidden-live, .activity-control.hidden-live { display: none; }

#dashboard {
  max-width: 790px;
  width: calc(100% - 30px);
  padding: 28px;
  background: #f2f6fc;
}
.dashboard-header h2 { font: 800 26px Manrope, sans-serif; margin: 8px 0; }
.dashboard-header p { font-size: 14px; color: #73859a; }
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.dashboard-metrics > div {
  background: #fff;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dashboard-metrics span, .dashboard-metrics small { display: block; color: #7990a5; font-size: 12px; }
.dashboard-metrics strong { display: block; font: 800 28px Manrope, sans-serif; color: #1c596f; margin: 8px 0; }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.dashboard-grid section { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.dashboard-grid h3 { font-size: 15px; margin: 0 0 16px; }
.dashboard-grid h3 small { float: right; font-size: 11px; color: #8da1b1; font-weight: 400; }
.metric-row {
  display: grid;
  grid-template-columns: 95px 1fr 32px;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  font-size: 12px;
}
.metric-row meter { width: 100%; height: 12px; }
.dashboard-grid ul { list-style: none; padding: 0; margin: 0; }
.dashboard-grid li { padding: 10px 0; border-bottom: 1px solid #edf1f4; }
.dashboard-grid li b { display: block; font-size: 13px; }
.dashboard-grid li span { display: block; margin-top: 4px; font-size: 12px; color: #8a9aab; }

#login-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(14, 28, 46, 0.72);
  backdrop-filter: blur(10px);
}
#login-gate[hidden] { display: none; }
.login-card {
  width: min(420px, calc(100% - 32px));
  background: #f7fbff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(16, 33, 54, 0.34);
}
.login-card .brand-logo { height: 36px; width: auto; margin-bottom: 10px; }
.login-card h2 { font: 800 26px Manrope, sans-serif; margin: 8px 0 10px; }
.login-card p { color: #73859a; font-size: 14px; line-height: 1.6; }
.login-card label { display: block; font-size: 13px; color: #587085; margin: 18px 0; }
.login-card input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #ccdae4;
  border-radius: 10px;
}
#login-error { color: #b42318; font-size: 13px; }
body.gated .sidebar, body.gated main { filter: blur(4px); pointer-events: none; }

@media (max-width: 1100px) {
  .sidebar { width: 240px; }
  .hud-top, .roster-dock { left: 260px; }
  .camera-command { width: min(420px, calc(100vw - 280px)); }
  .toolbar button { padding: 0 10px; }
}

@media (max-width: 900px) {
  .dashboard-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .sidebar {
    position: sticky;
    top: 0;
    left: 0;
    bottom: auto;
    width: auto;
    max-height: none;
    margin: 8px;
    padding: 10px;
  }
  .brand-logo { height: 26px; }
  nav { display: flex; gap: 6px; margin: 0; }
  #agentFeed { max-height: 180px; }
  nav button { margin: 0; padding: 8px; font-size: 11px; }
  nav small, .all-floors { display: none; }
  main { height: auto; }
  .stage { height: 78dvh; min-height: 520px; }
  .hud-top, .roster-dock { left: 10px; right: 10px; }
  .hud-top { top: 10px; flex-wrap: wrap; }
  .hud-tools { width: 100%; justify-content: flex-end; }
  body.panel-open #zones { max-width: 100%; }
  .camera-command { width: 100%; }
  .hud-bottom { right: 10px; bottom: 108px; }
  .demo, .section-header > span { display: none; }
  .dashboard-grid, .dashboard-metrics { grid-template-columns: 1fr; }
}

#config-gate {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(14, 28, 46, 0.62);
  backdrop-filter: blur(10px);
}
#config-gate[hidden] { display: none; }
.config-panel {
  width: min(980px, calc(100vw - 24px));
  height: min(860px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #f4f8fc;
  box-shadow: 0 28px 90px rgba(16, 33, 54, 0.36);
}
.config-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 8px;
}
.config-head h1 {
  margin: 4px 0 0;
  font: 800 28px Manrope, sans-serif;
}
.config-tabs {
  display: flex;
  gap: 6px;
  padding: 0 22px;
  overflow-x: auto;
}
.config-tabs button {
  flex: none;
  width: auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #e6eef6;
  color: #3d5872;
  font-size: 13px;
  font-weight: 700;
}
.config-tabs button.active { background: #173a58; color: #e8fff6; }
.cfg-note {
  min-height: 1.2em;
  margin: 8px 24px 0;
  font-size: 13px;
  color: #5d7790;
}
.cfg-note.is-ok { color: #176848; }
.cfg-note.is-err { color: #b42318; }
.config-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 22px 24px;
}
.cfg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.cfg-stat, .cfg-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cfg-stat { padding: 14px; }
.cfg-stat span, .cfg-stat small { display: block; color: #7990a5; font-size: 12px; }
.cfg-stat strong { display: block; margin: 6px 0; font: 800 22px Manrope, sans-serif; color: #1c596f; }
.cfg-card { padding: 16px 18px; margin-bottom: 12px; }
.cfg-card h3 { margin: 0 0 8px; font: 800 16px Manrope, sans-serif; }
.cfg-card h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #7d93aa; }
.cfg-card p { margin: 0 0 10px; color: #5d7790; font-size: 14px; line-height: 1.55; }
.cfg-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cfg-form .primary, .cfg-card .primary { grid-column: 1 / -1; margin-top: 4px; }
.cfg-form label, .cfg-team label {
  display: block;
  font-size: 13px;
  color: #587085;
}
.cfg-form input, .cfg-team input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #ccdae4;
  border-radius: 10px;
  font: inherit;
}
.cfg-list { margin: 0; padding-left: 18px; color: #3d5872; font-size: 14px; line-height: 1.55; }
.cfg-form textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 280px;
  padding: 10px 12px;
  border: 1px solid #ccdae4;
  border-radius: 10px;
  resize: vertical;
}
.cfg-empty, .cfg-soon { color: #7d93aa; font-size: 13px; }
.cfg-soon { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.cfg-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: #173a58; }
.cfg-meta { font-size: 12px !important; color: #7d93aa !important; }
.cfg-pill {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf8f1;
  color: #176848;
  font-size: 11px;
  font-weight: 700;
}
.cfg-pill.is-off { background: #f3e8e8; color: #8a3030; }
.cfg-team {
  padding: 12px 0;
  border-top: 1px solid #edf1f4;
}
.cfg-team header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.cfg-team code { font-size: 11px; color: #7d93aa; }
.cfg-agents {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.cfg-agent {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #e3edf6;
  border-radius: 12px;
  background: #f7fbff;
  color: #24415d;
}
.cfg-agent small { color: #7d93aa; font-size: 11px; }
.cfg-agent span { font-size: 11px; font-weight: 700; color: #176848; }
.cfg-agent.is-off { opacity: 0.55; }
.cfg-agent.is-off span { color: #8a3030; }
.cfg-detail { margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f4; }
.cfg-detail header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cfg-toggle {
  flex: none;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #173a58;
  color: #e8fff6;
  font-weight: 700;
}
.cfg-quality-list { display: grid; gap: 8px; }
.cfg-quality {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #e3edf6;
  border-radius: 14px;
  background: #f7fbff;
  cursor: pointer;
}
.cfg-quality strong { grid-column: 2; font-size: 14px; }
.cfg-quality span { grid-column: 2; color: #5d7790; font-size: 13px; line-height: 1.45; }
.cfg-quality input { margin-top: 3px; }
.cfg-quality.is-on { border-color: #173a58; background: #eef5ff; }
.cfg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cfg-timeline { list-style: none; margin: 0; padding: 0; }
.cfg-timeline li { padding: 8px 0; border-bottom: 1px solid #edf1f4; font-size: 13px; }
.cfg-timeline time, .cfg-timeline span { display: block; color: #7d93aa; font-size: 12px; }
/* Studio agent (ADR-069) */
.st-badge {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6eef6;
  color: #3d5872;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.st-badge.is-ok { background: #edf8f1; color: #176848; }
.st-badge.is-warn { background: #fff4e5; color: #9a5b00; }
.st-badge.is-info { background: #e8f0ff; color: #1f4fbf; }
.st-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.st-controls label { display: grid; gap: 4px; font-size: 12px; color: #587085; }
.st-controls select { padding: 8px 10px; border: 1px solid #ccdae4; border-radius: 10px; font: inherit; min-width: 200px; }
.st-controls button, .st-mini {
  padding: 8px 12px;
  border: 1px solid #ccdae4;
  border-radius: 10px;
  background: #fff;
  color: #173a58;
  font-weight: 700;
}
.st-controls button:disabled { opacity: 0.5; }
.st-controls .primary, .st-ask .primary { width: auto; flex: none; margin-top: 0; padding: 9px 16px; }
.st-mini { float: right; padding: 4px 10px; font-size: 12px; }
.st-check { display: flex !important; grid-auto-flow: column; align-items: center; gap: 6px !important; padding-bottom: 8px; }
.st-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.st-chat { display: flex; flex-direction: column; height: 560px; padding: 12px; }
.st-messages { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.st-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.st-msg.is-me { align-self: flex-end; background: #1f6bff; color: #fff; border-bottom-right-radius: 4px; }
.st-msg.is-bot { align-self: flex-start; background: #f2f6fa; color: #24415d; border-bottom-left-radius: 4px; }
.st-msg.is-err { background: #fdecec; color: #8a3030; }
.st-msg.is-pending { opacity: 0.6; font-style: italic; }
.st-msg-meta { margin-top: 6px; white-space: normal; }
.st-msg-meta small { color: #7d93aa; font-size: 11px; }
.st-msg-trace { padding: 2px 8px; border: 1px solid #ccdae4; border-radius: 999px; background: #fff; font-size: 11px; font-weight: 700; color: #173a58; }
.st-msg-trace.active { background: #173a58; color: #e8fff6; }
.st-ask { display: flex; gap: 8px; margin-top: 8px; }
.st-ask input { flex: 1; padding: 10px 12px; border: 1px solid #ccdae4; border-radius: 10px; font: inherit; }
.st-trace { max-height: 640px; overflow: auto; }
.st-trace-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-bottom: 6px; }
.st-trace-head .cfg-meta { margin-left: auto; }
.st-question { font-size: 13px !important; color: #24415d !important; }
.st-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 8px; padding: 0; }
.st-steps li { padding: 3px 8px; border-radius: 8px; background: #f2f6fa; font-size: 11px; color: #587085; }
.st-steps b { margin-left: 4px; color: #173a58; }
.st-section { border-top: 1px solid #edf1f4; padding: 8px 0; }
.st-section summary { cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #587085; }
.st-section > *:not(summary) { margin-top: 8px; }
.st-pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7fbff;
  border: 1px solid #e3edf6;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #173a58;
}
.st-list { margin: 0; padding-left: 18px; font-size: 13px; color: #3d5872; line-height: 1.55; }
.st-list small { color: #7d93aa; }
.st-list code, .st-brief code { font-size: 11px; color: #7d93aa; }
.st-brief { padding: 8px 10px; margin-bottom: 8px; border: 1px solid #e3edf6; border-radius: 10px; background: #fbfdff; }
.st-brief header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 13px; }
.st-brief p { margin: 0; font-size: 13px; }
.st-traces { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.st-traces button {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid #e3edf6;
  border-radius: 10px;
  background: #f7fbff;
  color: #24415d;
  font-size: 13px;
}
.st-traces button span { font-size: 11px; color: #7d93aa; }
.st-traces button.active { border-color: #1f6bff; background: #eef4ff; }
.st-summary { font-weight: 700; color: #173a58 !important; }
.st-cases { list-style: none; margin: 0; padding: 0; }
.st-case { padding: 10px 12px; margin-bottom: 8px; border: 1px solid #e3edf6; border-left-width: 4px; border-radius: 10px; background: #fbfdff; }
.st-case.is-ok { border-left-color: #1f9a6a; }
.st-case.is-fail { border-left-color: #c2410c; }
.st-case header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 13px; }
.st-case header span { color: #3d5872; }
.st-case header small { margin-left: auto; color: #7d93aa; }
.st-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; }
.st-checks .is-ok { color: #176848; }
.st-checks .is-fail { color: #b42318; font-weight: 700; }
.st-checks small { color: #7d93aa; font-weight: 400; }

@media (max-width: 860px) {
  .cfg-grid, .cfg-form, .cfg-agents, .cfg-split, .st-play { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .loader { animation: none; }
}

/* Pusat Kendali (panel kanan) */
.ops-panel {
  position: absolute;
  top: 78px;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  width: 324px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.ops-panel[hidden] { display: none; }
.ops-panel > * { pointer-events: auto; }
body.panel-open .hud-bottom { right: 354px; }
.ops-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.ops-head h2 { margin: 0; font: 800 15px Manrope, sans-serif; letter-spacing: -0.03em; }
.ops-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.ops-head-tools { display: flex; gap: 6px; }
.ops-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e3edf6;
  border-radius: 10px;
  background: #fff;
  color: #38536d;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(36, 70, 110, 0.08);
}
.ops-icon svg, .ops-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ops-icon[aria-expanded="true"] { background: #173a58; color: #fff; border-color: #173a58; }
.ops-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 2;
  width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e3edf6;
  box-shadow: 0 18px 40px rgba(28, 62, 104, 0.18);
}
.ops-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 12.5px;
  color: #24415d;
  cursor: pointer;
}
.ops-menu label:hover { background: #f2f7fc; }
.ops-menu input { accent-color: var(--accent); }
.ops-reset {
  width: 100%;
  margin-top: 4px;
  padding: 7px;
  border: 0;
  border-top: 1px solid #edf2f7;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.ops-cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 2px 2px 0;
  scrollbar-width: thin;
}
.ops-card {
  flex: none;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.ops-card > header { display: flex; align-items: center; gap: 4px; padding: 8px 8px 0 10px; }
.ops-card.is-folded > header { padding-bottom: 8px; }
.ops-fold {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.ops-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.ops-card h3 { margin: 0; flex: 1; font-size: 13px; font-weight: 700; }
.ops-caret { color: #8aa0b6; font-size: 14px; transition: transform .2s ease; }
.ops-card.is-folded .ops-caret { transform: rotate(-90deg); }
.ops-x {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8aa0b6;
  font-size: 17px;
  line-height: 1;
}
.ops-x:hover { background: #fdecec; color: #c43d3d; }
.ops-body { padding: 8px 12px 12px; font-size: 12px; color: #24415d; }
.ops-card.is-folded .ops-body { display: none; }
.ops-empty { margin: 2px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.ops-skeleton {
  height: 54px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef3f8 25%, #f7fafc 50%, #eef3f8 75%);
  background-size: 200% 100%;
  animation: ops-shimmer 1.4s infinite linear;
}
@keyframes ops-shimmer { to { background-position: -200% 0; } }

.ops-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ops-stats > div, .ops-wa > div {
  padding: 8px;
  border-radius: 11px;
  background: #f4f8fc;
  text-align: center;
}
.ops-stats strong, .ops-wa strong { display: block; font: 800 18px Manrope, sans-serif; color: var(--ink); }
.ops-stats span, .ops-wa span { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted); }
.ops-stats .is-wait strong, .ops-wa .is-wait strong { color: #b4701a; }
.ops-wa .is-bad strong { color: #c43d3d; }
.ops-meter { height: 6px; margin-top: 10px; border-radius: 99px; background: #e6eef6; overflow: hidden; }
.ops-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1f6bff, #5aa0ff); }
.ops-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.ops-meta-top { margin: 0 0 8px; }
.ops-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ops-chips span { padding: 3px 8px; border-radius: 99px; background: #eef3f8; color: #4f6880; font-size: 11px; font-weight: 600; }
.ops-chips .is-wait { background: #fff3df; color: #a4620f; }
.ops-chips .is-bad { background: #fdecec; color: #b23535; }

.tag { padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; font-style: normal; white-space: nowrap; }
.tag.is-done { background: #e3f6ec; color: #17734e; }
.tag.is-wait { background: #fff1db; color: #a4620f; }
.tag.is-bad { background: #fde8e8; color: #b23535; }
.tag.is-info { background: #eef3f8; color: #4f6880; }
.tag.is-work { background: var(--accent-soft); color: #1c5ad4; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #9aadc0; }
.dot.is-wait { background: #d0892a; }
.dot.is-bad { background: #d24545; }
.dot.is-work { background: var(--accent); }

.ops-list, .ops-probes, .ops-quotes, .ops-schedule, .ops-timeline { list-style: none; margin: 0; padding: 0; }
.ops-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  color: inherit;
  text-align: left;
}
.ops-list li:last-child .ops-row { border-bottom: 0; }
.ops-row:hover strong { color: var(--accent); }
.ops-row-main { flex: 1; min-width: 0; }
.ops-row-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ops-row-main small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; }

.ops-probes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.ops-probes li { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; }
.ops-probes li i { width: 7px; height: 7px; border-radius: 50%; background: #2bb37a; flex: none; }
.ops-probes li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-probes li small { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.ops-probes li.is-down i { background: #d24545; box-shadow: 0 0 0 3px rgba(210, 69, 69, 0.15); }
.ops-probes li.is-down small { color: #b23535; font-weight: 700; }
.ops-sub { margin: 10px 0 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ops-wa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ops-wa strong { font-size: 15px; }

.ops-quotes { margin-top: 8px; }
.ops-quotes li { padding: 7px 0; border-top: 1px solid #edf2f7; }
.ops-q { display: flex; justify-content: space-between; gap: 8px; }
.ops-q strong { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-q small { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.ops-quotes p { margin: 2px 0 4px; color: #3d5872; line-height: 1.4; }

.ops-timeline li { position: relative; display: flex; gap: 10px; padding: 0 0 10px; }
.ops-timeline li:last-child { padding-bottom: 0; }
.ops-timeline li::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1px; background: #e1e9f1; }
.ops-timeline li:last-child::before { display: none; }
.ops-timeline i { position: relative; margin-top: 3px; width: 9px; height: 9px; border-radius: 50%; flex: none; background: #9aadc0; }
.ops-timeline .is-done i { background: #2bb37a; }
.ops-timeline .is-work i { background: var(--accent); }
.ops-timeline .is-wait i { background: #d0892a; }
.ops-timeline .is-bad i { background: #d24545; }
.ops-timeline strong { font-size: 12px; }
.ops-timeline p { margin: 1px 0 0; color: #3d5872; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ops-timeline small { display: block; margin-top: 1px; color: var(--muted); font-size: 10.5px; }

.ops-schedule li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #edf2f7; }
.ops-schedule li:last-child { border-bottom: 0; }
.ops-schedule strong { display: block; font-size: 12px; }
.ops-schedule small { color: var(--muted); font-size: 10.5px; }
.ops-schedule time { padding: 3px 8px; border-radius: 8px; background: #f2f7fc; color: #24415d; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* Grafik uptime 24 jam (strip bawah) */
.ops-strip {
  position: absolute;
  left: 308px;
  right: 76px;
  bottom: 18px;
  z-index: 5;
  max-width: 1040px;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.ops-strip[hidden] { display: none; }
body.sidebar-hidden .ops-strip { left: 68px; }
body.panel-open .ops-strip { right: 412px; }
.ops-strip-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0 10px; }
.ops-strip.is-folded .ops-strip-head { padding-bottom: 8px; }
.ops-strip .ops-fold { flex: none; }
.ops-strip h3 { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ops-strip.is-folded .ops-caret { transform: rotate(-90deg); }
.ops-strip-sum { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ops-strip-sum .is-bad { color: #b23535; font-weight: 700; }
.ops-strip-body { padding: 6px 14px 10px; }
.ops-strip.is-folded .ops-strip-body { display: none; }
.up-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.up-rows li, .up-axis {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 88px 52px 52px;
  align-items: center;
  gap: 10px;
}
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: #24415d; }
.up-bars { display: flex; gap: 1px; height: 14px; }
.up-bars i { flex: 1; min-width: 1px; border-radius: 1.5px; background: #e3eaf2; }
.up-bars i.is-up { background: #34b77f; }
.up-bars i.is-down { background: #d84a4a; }
.up-bars i:hover { outline: 1px solid #173a58; outline-offset: 1px; }
.up-spark { width: 88px; height: 18px; overflow: visible; }
.up-spark path { fill: none; stroke: var(--accent); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.up-spark .up-down line { stroke: rgba(216, 74, 74, 0.55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.up-pct { text-align: right; font: 800 12px Manrope, sans-serif; color: #17734e; font-variant-numeric: tabular-nums; }
.up-pct.is-low { color: #b23535; }
.up-ms { text-align: right; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.up-axis { margin-top: 5px; color: #8aa0b6; font-size: 10px; }
.up-axis > span:nth-child(n + 3) { text-align: right; }
.up-axis > span:nth-child(3) { text-align: center; }
.up-axis-time { display: flex; justify-content: space-between; }
.up-axis-time b { font-weight: 600; }

@media (max-width: 1100px) {
  .ops-panel { width: 284px; }
  body.panel-open .hud-bottom { right: 314px; }
  .ops-strip { left: 262px; }
  body.panel-open .ops-strip { right: 372px; }
  .up-rows li, .up-axis { grid-template-columns: 72px minmax(0, 1fr) 46px 46px; }
  .up-spark, .up-axis > span:nth-child(3) { display: none; }
}
@media (max-width: 760px) {
  .ops-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 48vh; }
  body.panel-open .hud-bottom { right: 18px; bottom: calc(48vh + 18px); }
  .ops-strip, #uptimeToggle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ops-skeleton { animation: none; }
}
