:root {
  color-scheme: dark;
  --bg: #071016;
  --surface: #0d1821;
  --surface-soft: #101e28;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f3f8fb;
  --muted: rgba(229, 240, 246, 0.68);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #10b981;
  --amber: #f59e0b;
  --bad: #f9735b;
  --shadow: 0 24px 70px rgba(4, 17, 29, 0.22);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(34, 211, 238, 0.08), transparent 28%),
    radial-gradient(circle at 82% 42%, rgba(16, 185, 129, 0.06), transparent 24%),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
button:hover:not(:disabled) { border-color: rgba(34, 211, 238, 0.48); }
button:disabled { opacity: 0.52; cursor: not-allowed; }
button.primary { color: #031017; background: linear-gradient(135deg, #effcff, #8df2ff); border-color: transparent; font-weight: 700; }
button.small { min-height: 30px; padding: 0 10px; font-size: 12px; gap: 6px; }
button.icon-small { width: 30px; min-height: 30px; padding: 0; font-size: 18px; font-weight: 650; }
button.icon-ghost { border-color: transparent; background: transparent; color: var(--muted); }
button.icon-ghost:hover:not(:disabled) { border-color: transparent; background: rgba(255, 255, 255, 0.055); color: var(--text); }
button.danger { color: #fff; border-color: rgba(249, 115, 91, 0.7); background: rgba(249, 115, 91, 0.18); }
input, select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 auto;
  padding: 0;
  accent-color: #a77b31;
}
select {
  color-scheme: dark;
  background-color: #0f1c26;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}
select:focus {
  border-color: rgba(34, 211, 238, 0.56);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.12);
}
select option {
  background: #0f1c26;
  color: var(--text);
}
select option:checked { background: #16404a; color: #e8fbff; }
textarea { min-height: 76px; resize: vertical; }
textarea.content-point-outline-textarea { min-height: 152px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 23, 0.86);
  backdrop-filter: blur(18px);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 220px; }
.topbar-brand img { width: 42px; height: 42px; }
.topbar-brand strong { display: block; font-size: 16px; line-height: 1.1; }
.topbar-brand small { color: var(--muted); font-size: 11px; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.nav button.active { color: #061219; background: #dffbff; border-color: transparent; font-weight: 700; }
.top-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.top-nav-button {
  min-width: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.top-nav-button:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}
.top-nav-button.active { color: #061219; background: #dffbff; border-color: transparent; font-weight: 700; }
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.topbar-user {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.topbar-action-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.main { min-width: 0; width: min(100% - 40px, 1320px); margin: 0 auto; padding: 24px 0 40px; }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 24, 33, 0.88);
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand img { width: 48px; height: 48px; }
.form-grid { display: grid; gap: 14px; }
.login-form { gap: 16px; }
.login-submit { margin-top: 8px; }
.inline-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.send-code { min-width: 96px; height: 38px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.035); }
.segmented button { min-height: 32px; border: 0; background: transparent; }
.segmented button.active { color: #031017; background: #dffbff; font-weight: 700; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head .muted { font-size: 14px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 14px; }
.robot-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.scene-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.card, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.12);
}
.card { padding: 16px; cursor: pointer; }
.card:hover { border-color: rgba(34, 211, 238, 0.42); background: rgba(255, 255, 255, 0.085); }
.card-title { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.scene-card { position: relative; min-height: 250px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 0; padding: 17px 18px 15px; overflow: hidden; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.scene-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--scene-accent, var(--cyan)); opacity: 0.85; }
.scene-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--scene-accent, var(--cyan)) 60%, var(--line)); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22); }
.scene-card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 46px; }
.scene-card-type-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--scene-accent, var(--cyan)) 55%, transparent); border-radius: 8px; color: var(--scene-accent, var(--cyan)); background: color-mix(in srgb, var(--scene-accent, var(--cyan)) 12%, transparent); }
.scene-card-type-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.scene-card-duty-count { min-width: 78px; height: 44px; display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; margin-left: auto; color: var(--muted); white-space: nowrap; }
.scene-card-duty-count strong { color: var(--muted); font-size: 30px; font-weight: 760; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.scene-card-duty-count span { font-size: 11px; font-weight: 700; }
.scene-card-duty-count.active { color: var(--green); }
.scene-card-duty-count.active strong { color: #6ee7b7; text-shadow: 0 0 18px rgba(16, 185, 129, 0.28); }
.scene-card-heading { min-width: 0; margin-top: 15px; }
.scene-card-heading h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; letter-spacing: 0; }
.scene-card-kicker { display: flex; align-items: center; gap: 7px; min-height: 24px; margin-bottom: 5px; color: var(--scene-accent, var(--cyan)); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.scene-card-kicker .pill { min-height: 22px; padding: 0 7px; color: var(--muted); font-size: 10px; font-weight: 650; }
.scene-card-kicker .pill.online { color: var(--green); }
.scene-card-kicker .pill.offline { color: var(--bad); }
.scene-card-description { min-height: 42px; margin: 10px 0 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.scene-card-facts { flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-start; gap: 9px; flex-wrap: wrap; min-width: 0; color: var(--muted); font-size: 11px; }
.scene-card-facts span { white-space: nowrap; }
.scene-card-facts strong { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.scene-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.09); color: var(--muted); font-size: 11px; }
.scene-card-welcome { --scene-accent: #22d3ee; }
.scene-card-exhibition { --scene-accent: #60a5fa; }
.scene-card-activity { --scene-accent: #f59e0b; }
.scene-card-performance { --scene-accent: #f472b6; }
.scene-card-custom { --scene-accent: #34d399; }
.scene-page-description,
.scene-card-description,
.scene-new-card-description {
  font-size: 12px;
  line-height: 1.45;
}
.scene-card-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.scene-card-icon-button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.scene-card-icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene-card-icon-button:hover:not(:disabled) {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}
.scene-card-icon-button.danger:hover:not(:disabled) {
  background: rgba(249, 115, 91, 0.15);
  color: #ffb3a4;
}
.new-scene-card {
  min-height: 156px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(34, 211, 238, 0.46);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(34, 211, 238, 0.035);
  box-shadow: none;
  text-align: center;
  cursor: pointer;
}
.new-scene-card:hover {
  border-color: rgba(34, 211, 238, 0.82);
  background: rgba(34, 211, 238, 0.085);
  color: var(--text);
}
.new-scene-plus {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 28px;
  line-height: 1;
}
.new-scene-card strong { color: var(--text); font-size: 15px; }
.robot-card { min-height: 210px; display: grid; grid-template-columns: 126px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.055); cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.robot-card:hover, .robot-card:focus-visible { border-color: rgba(45, 212, 191, 0.56); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2); outline: none; }
.robot-card-visual { position: relative; min-width: 0; display: grid; place-items: end center; padding: 14px 8px 0; overflow: hidden; background: #e8eef2; }
.robot-card-visual img { width: 100%; height: 190px; object-fit: contain; object-position: center bottom; transition: filter 180ms ease, opacity 180ms ease; }
.robot-card.offline .robot-card-visual img, .robot-card.disabled .robot-card-visual img { filter: grayscale(0.85); opacity: 0.68; }
.robot-card-presence { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 8px; border: 1px solid rgba(15, 23, 42, 0.16); border-radius: 6px; color: #334155; background: rgba(255, 255, 255, 0.86); font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.robot-card-presence i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.robot-card.online .robot-card-presence { color: #047857; }
.robot-card.online .robot-card-presence i { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16); }
.robot-card.disabled .robot-card-presence { color: #b45309; }
.robot-card.disabled .robot-card-presence i { background: #f59e0b; }
.robot-card-model-fallback { align-self: center; display: grid; justify-items: center; gap: 5px; color: #334155; text-align: center; }
.robot-card-model-fallback::before { content: ""; width: 64px; height: 92px; border: 3px solid #64748b; border-radius: 24px 24px 14px 14px; background: rgba(255, 255, 255, 0.5); }
.robot-card-model-fallback strong { font-size: 12px; }
.robot-card-model-fallback span { color: #64748b; font-size: 12px; }
.robot-card-body { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; padding: 15px; }
.robot-card-heading { min-width: 0; }
.robot-card-model { display: block; margin-bottom: 4px; color: #5eead4; font-size: 12px; font-weight: 700; }
.robot-card-heading h2 { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-number { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-location { align-self: start; margin-top: 10px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-telemetry { align-self: end; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 0; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.09); border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.robot-card-telemetry > div { min-width: 0; padding-right: 10px; }
.robot-card-telemetry > div + div { padding-left: 12px; padding-right: 0; border-left: 1px solid rgba(255, 255, 255, 0.09); }
.robot-card-telemetry dt { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-telemetry dd { margin: 4px 0 3px; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-charge { margin-left: 5px; color: #86efac; font-size: 12px; font-weight: 600; }
.robot-card-task { min-width: 0; margin-top: 8px; overflow: hidden; color: #a7f3d0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-footer { align-self: end; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: 11px; color: var(--muted); font-size: 12px; }
.robot-card-footer > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.robot-card-footer-arrow { width: 24px; height: 24px; display: grid; place-items: center; color: #5eead4; transition: transform 180ms ease; }
.robot-card-footer-arrow svg { width: 20px; height: 20px; }
.robot-card:hover .robot-card-footer-arrow { transform: translateX(3px); }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
}
.pill.online { color: var(--green); border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.08); }
.pill.offline { color: var(--bad); border-color: rgba(249, 115, 91, 0.38); background: rgba(249, 115, 91, 0.08); }
.robot-detail {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.side-card { position: sticky; top: 90px; padding: 14px; display: grid; gap: 12px; }
.info-row { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.info-row span { color: var(--muted); font-size: 12px; }
.info-row strong { font-size: 13px; overflow-wrap: anywhere; }
.robot-overview { display: grid; gap: 14px; min-width: 0; }
.robot-overview-loading { min-height: 360px; }
.robot-overview-loading .robot-status-band { opacity: 0.82; }
.robot-overview-loading .robot-status-band strong { color: var(--muted); font-size: 16px; }
.robot-loading-state { min-height: 96px; }
.robot-loading-state strong { color: var(--cyan); }
.robot-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.robot-title-block, .robot-title-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.robot-title-block > div { min-width: 0; }
.robot-title-line h1 { margin: 0; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.robot-refresh-button { position: relative; min-width: 68px; }
.robot-refresh-spinner {
  position: absolute;
  left: 9px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
}
.robot-refresh-button.is-loading .robot-refresh-spinner {
  opacity: 1;
  animation: robotRefreshSpin 0.7s linear infinite;
}
@keyframes robotRefreshSpin { to { transform: rotate(360deg); } }
.robot-overview { --robot-key-font-size: 11px; --robot-value-font-size: 13px; }
.robot-status-band { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.robot-status-band > div { min-width: 0; padding: 13px 14px; border-right: 1px solid var(--line); }
.robot-status-band > div:last-child { border-right: 0; }
.robot-status-band span, .robot-status-band small { display: block; color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-status-band strong { display: block; margin: 6px 0 4px; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.robot-status-value.positive { color: var(--green); }
.robot-status-value.warning { color: var(--amber); }
.robot-status-value.danger { color: var(--bad); }
.robot-status-value.accent { color: var(--cyan); }
.robot-status-value.neutral { color: var(--text); }
.robot-period-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.robot-period-bar strong { font-size: 16px; }
.robot-period-bar .scene-period-tabs button.active { color: #041217; border-color: transparent; background: var(--cyan); font-weight: 700; }
.robot-performance-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.robot-performance-strip > div { min-width: 0; min-height: 88px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); }
.robot-performance-strip span { display: block; color: var(--muted); font-size: 11px; }
.robot-performance-strip strong { display: block; margin-top: 8px; color: var(--text); font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.robot-performance-strip .has-anomaly strong { color: var(--bad); }
.robot-health-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: 10px; }
.robot-health-grid > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.robot-health-grid > div:last-child { border-bottom: 0; }
.robot-health-grid span { color: var(--muted); font-size: 11px; }
.robot-health-grid strong { font-size: 13px; overflow-wrap: anywhere; text-align: right; }
.robot-health-value.positive { color: var(--green); }
.robot-health-value.warning { color: var(--amber); }
.robot-health-value.danger { color: var(--bad); }
.robot-health-value.accent { color: var(--cyan); }
.robot-health-value.neutral { color: var(--text); }
.robot-alert-row { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.robot-alert-row > div { display: grid; gap: 2px; min-width: 0; }
.robot-alert-row small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.robot-alert-severity { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: var(--bad); }
.robot-alert-severity.warning { background: var(--amber); }
.robot-alert-severity.info { background: var(--cyan); }
.robot-activity-list { display: grid; padding: 0; }
.robot-activity-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(76px, auto) 132px; gap: 12px; align-items: center; min-height: 62px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.robot-activity-row:last-child { border-bottom: 0; }
.robot-activity-main { display: grid; gap: 3px; min-width: 0; }
.robot-activity-main strong, .robot-activity-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.robot-activity-main strong { font-size: var(--robot-value-font-size); }
.robot-activity-main small, .robot-activity-row time { color: var(--muted); font-size: 11px; }
.robot-activity-row time { text-align: right; white-space: nowrap; }
.robot-activity-kind, .robot-activity-status, .robot-state-badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: rgba(255,255,255,.03); font-size: 11px; line-height: 1; white-space: nowrap; }
.robot-activity-kind.positive, .robot-activity-status.positive, .robot-state-badge.positive { color: var(--green); border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.08); }
.robot-activity-kind.accent, .robot-activity-status.accent, .robot-state-badge.accent { color: var(--cyan); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }
.robot-activity-kind.warning, .robot-activity-status.warning, .robot-state-badge.warning { color: var(--amber); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); }
.robot-activity-kind.danger, .robot-activity-status.danger, .robot-state-badge.danger { color: var(--bad); border-color: rgba(249,115,91,.4); background: rgba(249,115,91,.08); }
.robot-position-panel .panel-head { align-items: flex-start; }
.robot-mini-map { position: relative; min-height: 190px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #14242b; }
.robot-mini-map-cross { position: absolute; inset: 0; opacity: .34; background-image: linear-gradient(rgba(167,243,208,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(167,243,208,.16) 1px, transparent 1px); background-size: 28px 28px; }
.robot-mini-map-dot { position: absolute; width: 15px; height: 15px; transform: translate(-50%, -50%); border: 3px solid #e8fbff; border-radius: 50%; background: var(--cyan); }
.robot-mini-map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.robot-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.robot-overview-main, .robot-overview-side { display: grid; gap: 14px; min-width: 0; }
.robot-overview-main > .panel, .robot-overview-main .table-wrap { min-width: 0; max-width: 100%; }
.robot-overview-main > .panel { overflow: hidden; }
.robot-overview-side { position: sticky; top: 82px; }
.robot-current-duty-layout { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(0, 1.6fr) auto; gap: 18px; align-items: center; }
.robot-duty-scene-link { min-width: 0; display: grid; justify-items: start; gap: 5px; padding: 0; border: 0; background: transparent; text-align: left; }
.robot-duty-scene-link span { color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-duty-scene-link strong { max-width: 100%; overflow: hidden; color: var(--text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.robot-duty-scene-link:hover:not(:disabled) strong { color: #dffbff; text-decoration: underline; }
.robot-current-duty-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-width: 0; margin: 0; }
.robot-current-duty-facts div { min-width: 0; }
.robot-current-duty-facts dt { color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-current-duty-facts dd { margin: 5px 0 0; overflow: hidden; font-size: var(--robot-value-font-size); text-overflow: ellipsis; white-space: nowrap; }
.robot-current-duty-actions { display: flex; justify-content: flex-end; }
.robot-current-run-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.robot-current-run-table th,
.robot-current-run-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.robot-current-run-table tr:last-child th,
.robot-current-run-table tr:last-child td { border-bottom: 0; }
.robot-current-run-table th { width: 86px; color: var(--muted); font-size: var(--robot-key-font-size); font-weight: 500; white-space: nowrap; }
.robot-current-run-table td { font-size: var(--robot-value-font-size); overflow-wrap: anywhere; }
.robot-current-scene-link {
  min-height: auto;
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--robot-value-font-size);
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
}
.robot-current-scene-link:hover:not(:disabled) { color: #dffbff; text-decoration: underline; }
.robot-device-facts dl { display: grid; gap: 8px; margin: 0; }
.robot-device-facts dl div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.robot-device-facts dt { color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-device-facts dd { margin: 0; font-size: var(--robot-value-font-size); overflow-wrap: anywhere; }
.robot-low-frequency > summary { min-height: 52px; display: flex; align-items: center; padding: 12px 14px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 700; }
.robot-low-frequency > summary::marker { color: var(--muted); }
.robot-low-frequency[open] > summary { border-bottom: 1px solid var(--line); }
.info-placeholder { width: 100%; padding: 20px 12px; }
.empty-state { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 16px 12px; }
.robot-scene-list { display: grid; padding: 0; }
.robot-scene-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 260px) auto; gap: 18px; align-items: center; min-height: 82px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.robot-scene-row:last-child { border-bottom: 0; }
.robot-scene-link { width: 100%; display: grid; justify-content: stretch; justify-items: start; align-items: start; gap: 5px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.robot-scene-link strong,
.robot-scene-link span { display: block; width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.robot-scene-link strong { font-size: var(--robot-value-font-size); line-height: 1.35; }
.robot-scene-link span { color: var(--muted); font-size: 12px; }
.robot-scene-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 0; }
.robot-scene-facts div { min-width: 0; }
.robot-scene-facts dt { color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-scene-facts dd { margin: 5px 0 0; font-size: var(--robot-value-font-size); }
.robot-scene-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.robot-run-table { min-width: 760px; }
.robot-detail-tabs { overflow: hidden; }
.robot-detail-tablist { display: flex; align-items: stretch; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.robot-detail-tab { min-height: 44px; padding: 0 8px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); background: transparent; font-size: 13px; }
.robot-detail-tab:hover:not(:disabled) { border-color: transparent; color: var(--text); background: transparent; }
.robot-detail-tab.active { border-bottom-color: var(--cyan); color: var(--text); font-weight: 700; }
.robot-detail-tab-panel { min-width: 0; }
.robot-detail-tab-panel > .table-wrap { padding: 14px; }
.robot-tab-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; color: var(--muted); font-size: 12px; }
.robot-tab-panel-head + .robot-scene-list { border-top: 1px solid var(--line); }
.robot-volume-value, .audio-volume-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.robot-volume-value span { color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-volume-value strong { font-size: var(--robot-value-font-size); line-height: 1.35; }
.robot-audio-settings input[type="range"], .audio-volume-control input[type="range"] { width: 100%; margin: 16px 0; accent-color: var(--cyan); }
.robot-volume-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.robot-power-form { display: grid; gap: 10px; }
.robot-power-form label { display: grid; gap: 6px; color: var(--muted); font-size: var(--robot-key-font-size); }
.robot-power-form input[type="time"] { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: var(--panel-soft); }
.robot-power-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.robot-power-form code { color: var(--cyan); }
.audio-sync-badge { font-size: 11px; color: var(--muted); }
.audio-sync-badge.applied, .audio-sync.applied { color: var(--green); }
.audio-sync-badge.failed, .audio-sync.failed { color: var(--bad); }
.audio-sync-badge.pending { color: #f8c36a; }
.audio-volume-control { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); }
.audio-volume-label label { margin: 0; }
.audio-volume-label output { color: var(--cyan); font-weight: 700; }
.audio-volume-meta { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.audio-volume-meta input { width: 64px; }
.panel-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head.compact { min-height: 42px; padding: 6px 14px; }
.panel-head .muted { color: rgba(229, 240, 246, 0.52); font-size: 12px; }
.panel-body { padding: 14px; }
.scenario-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.scenario-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); cursor: pointer; }
.scenario-card.active { border-color: var(--cyan); background: rgba(34, 211, 238, 0.08); }
.scene-operations-dashboard { display: grid; gap: 14px; min-width: 0; }
.scene-period-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.scene-period-bar > div:first-child { display: flex; align-items: center; min-width: 0; min-height: 30px; }
.scene-period-bar strong { font-size: 16px; }
.scene-period-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.scene-period-tabs button.active { color: #041217; border-color: transparent; background: var(--cyan); font-weight: 700; }
.scene-metric-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.scene-metric { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 6px; padding: 12px 13px; border-right: 1px solid var(--line); }
.scene-metric:last-child { border-right: 0; }
.scene-metric span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; white-space: nowrap; }
.scene-metric strong { margin-top: 5px; font-size: 19px; line-height: 1.1; overflow-wrap: anywhere; }
.scene-metric small { color: var(--muted); font-size: 11px; }
.scene-operations-grid, .scene-operations-lower { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 14px; align-items: start; }
.scene-operations-side { display: grid; gap: 14px; min-width: 0; align-content: start; }
.scene-live-map { position: relative; min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #13252b center / cover no-repeat; }
.scene-overview-map { min-height: 330px; }
.scene-overview-map .map-canvas-content { background: #eef2f5; }
.scene-overview-map .map-marker-layer { pointer-events: none; }
.scene-overview-robot-marker { pointer-events: none; }
.scene-overview-location-warning { margin-top: 0; }
.scene-map-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(167,243,208,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(167,243,208,.12) 1px, transparent 1px); background-size: 34px 34px; }
.scene-map-robot { position: absolute; z-index: 1; display: grid; gap: 3px; justify-items: center; min-height: 0; padding: 0; transform: translate(-50%, -50%); border: 0; background: transparent; color: var(--text); font-size: 10px; white-space: nowrap; }
.scene-map-robot i { width: 16px; height: 16px; display: block; border: 3px solid #e8fbff; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,238,.16); }
.scene-map-robot.running i, .scene-map-legend i.running { background: var(--green); }
.scene-map-robot.standby i, .scene-map-legend i.standby { background: var(--amber); }
.scene-map-robot.offline i, .scene-map-robot.error i, .scene-map-legend i.offline { background: var(--bad); }
.scene-map-unknown { position: relative; z-index: 1; display: inline-grid; gap: 2px; margin: 12px; padding: 7px 9px; border: 1px dashed rgba(229,240,246,.35); border-radius: 6px; color: var(--muted); font-size: 11px; }
.scene-map-unknown small { color: var(--text); }
.scene-map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.scene-map-legend { position: absolute; right: 10px; bottom: 9px; z-index: 2; display: flex; gap: 9px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: rgba(7,16,22,.86); font-size: 10px; }
.scene-map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.scene-map-legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--muted); }
.scene-robot-list, .scene-schedule-list, .scene-activity-list { display: grid; padding-top: 0; padding-bottom: 0; }
.scene-robot-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 69px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.scene-robot-row:last-child { border-bottom: 0; }
.scene-robot-row:hover { background: rgba(34,211,238,.05); }
.scene-robot-main { min-width: 0; display: grid; gap: 4px; }
.scene-robot-main strong, .scene-robot-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-robot-main small, .scene-robot-facts { color: var(--muted); font-size: 11px; }
.scene-robot-facts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
.scene-robot-facts > span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-robot-alerts.has-alert { color: var(--bad); font-weight: 700; }
.scene-schedule-row, .scene-activity-row { display: flex; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); }
.scene-activity-row { display: grid; grid-template-columns: 52px minmax(120px, 1fr) 72px minmax(120px, 1.3fr) 128px; gap: 10px; align-items: center; }
.scene-schedule-row:last-child, .scene-activity-row:last-child { border-bottom: 0; }
.scene-schedule-row strong { width: 120px; flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-schedule-row span { min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-trend-list { display: grid; gap: 0; padding-top: 0; padding-bottom: 0; }
.scene-trend-row { display: grid; grid-template-columns: minmax(86px, auto) minmax(64px, auto) minmax(0, 1fr); align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--line); color: var(--muted); }
.scene-trend-row:last-child { border-bottom: 0; }
.scene-trend-time { font-size: 12px; line-height: 1.3; white-space: nowrap; }
.scene-trend-status, .scene-activity-kind, .scene-activity-status { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 22px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; line-height: 1; white-space: nowrap; }
.scene-trend-status.positive, .scene-activity-status.positive, .scene-activity-kind.run { color: var(--green); border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.08); }
.scene-trend-status.neutral, .scene-activity-status.neutral, .scene-activity-kind.event { color: var(--muted); background: rgba(255,255,255,.04); }
.scene-activity-status.warning { color: var(--amber); border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); }
.scene-activity-status.danger, .scene-activity-kind.danger { color: var(--bad); border-color: rgba(249,115,91,.4); background: rgba(249,115,91,.08); }
.scene-trend-row strong { color: var(--text); font-size: 12px; text-align: right; }
.scene-activity-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.scene-activity-dot.bad { background: var(--bad); }
.scene-activity-content { min-width: 0; overflow: hidden; }
.scene-activity-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.35; }
.scene-activity-detail { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.scene-activity-time { color: var(--muted); font-size: 12px; line-height: 1.3; white-space: nowrap; text-align: right; }

.operation-notification-root { position: fixed; top: 78px; right: clamp(16px, 3vw, 38px); z-index: 30; display: grid; justify-items: end; }
.operation-notification-bubble { min-height: 38px; padding: 0 13px; border: 1px solid rgba(34,211,238,.42); border-radius: 999px; background: rgba(13,24,33,.94); box-shadow: 0 12px 32px rgba(0,0,0,.24); color: var(--text); font-size: 12px; font-weight: 700; }
.operation-notification-bubble:hover { background: rgba(22,54,65,.96); }
.operation-notification-bell { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border: 1px solid var(--cyan); border-radius: 50%; color: var(--cyan); font-size: 11px; }
.operation-notification-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 7px; padding: 0 5px; border-radius: 999px; color: #071016; background: var(--cyan); font-size: 10px; }
.operation-notification-panel { width: min(390px, calc(100vw - 24px)); max-height: min(70vh, 560px); margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(13,24,33,.98); box-shadow: 0 22px 60px rgba(0,0,0,.36); }
.operation-notification-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.operation-notification-head strong { font-size: 14px; }
.operation-notification-head .muted { margin-right: auto; font-size: 11px; }
.operation-notification-list { max-height: min(62vh, 500px); overflow: auto; }
.operation-notification-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.operation-notification-item:last-child { border-bottom: 0; }
.operation-notification-item.unread { background: rgba(34,211,238,.055); }
.operation-notification-content { min-width: 0; }
.operation-notification-title { font-size: 12px; font-weight: 700; }
.operation-notification-body { display: -webkit-box; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.operation-notification-body.expanded { display: block; -webkit-line-clamp: unset; }
.operation-notification-content time { display: block; margin-top: 6px; color: rgba(229,240,246,.46); font-size: 10px; }
.operation-notification-actions { display: flex; align-items: flex-start; gap: 2px; }
.operation-notification-actions .icon-button { width: 26px; min-height: 26px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.operation-notification-actions .icon-button:hover { color: var(--text); background: rgba(255,255,255,.07); }
.operation-notification-actions .icon-button.danger:hover { color: var(--bad); }
.operation-notification-item.error .operation-notification-title { color: var(--bad); }
.operation-notification-item.warning .operation-notification-title { color: var(--amber); }
.operation-notification-empty { padding: 34px 16px; color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 620px) {
  .operation-notification-root { top: 72px; right: 12px; }
  .operation-notification-bubble { padding: 0 10px; }
  .operation-notification-panel { width: min(390px, calc(100vw - 24px)); }
}
