@font-face {
  font-family: "LoginSans";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/login-sans-regular.woff2") format("woff2");
}

@font-face {
  font-family: "LoginSans";
  font-style: normal;
  font-weight: 650;
  font-display: block;
  src: url("/static/fonts/login-sans-semibold.woff2") format("woff2");
}

@font-face {
  font-family: "LoginDisplay";
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/static/fonts/login-display-title.woff2") format("woff2");
}

:root {
  --bg-base: #0b1120;
  --bg-panel: rgba(15, 23, 42, 0.72);
  --bg-panel-strong: rgba(15, 23, 42, 0.9);
  --bg-sidebar: rgba(15, 23, 42, 0.86);
  --bg-accent: rgba(56, 189, 248, 0.14);
  --line-soft: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(56, 189, 248, 0.28);
  --text-main: #e8f0ff;
  --text-muted: #8aa0c2;
  --text-soft: #5f7191;
  --primary: #38bdf8;
  --primary-strong: #0ea5e9;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #f43f5e;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-panel: 0 24px 60px rgba(2, 8, 23, 0.42);
  --transition: 220ms ease;
  --font-ui: "LoginSans", "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  --font-display: "LoginDisplay", "Noto Serif SC", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 18%, rgba(56, 189, 248, 0.12), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.09), transparent 28%),
    linear-gradient(180deg, #07101f 0%, #0b1120 100%);
  color: var(--text-main);
  font-family: "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

.control-login-body {
  align-items: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.ambient-bg {
  inset: 0;
  overflow: hidden;
  position: fixed;
  pointer-events: none;
}

.orb {
  border-radius: 999px;
  filter: blur(120px);
  position: absolute;
}

.orb-1 {
  animation: ambientDrift 14s ease-in-out infinite alternate;
  background: rgba(56, 189, 248, 0.2);
  height: 520px;
  left: -120px;
  top: -80px;
  width: 520px;
}

.orb-2 {
  animation: ambientDrift 16s ease-in-out infinite alternate-reverse;
  background: rgba(16, 185, 129, 0.12);
  bottom: -180px;
  height: 480px;
  right: -120px;
  width: 480px;
}

.login-shell,
.notice-shell,
.health-shell {
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-shell {
  max-width: 460px;
}

.notice-shell {
  max-width: 720px;
}

.health-shell {
  margin: 48px auto;
  max-width: 1080px;
  padding: 0 24px;
}

.login-card,
.notice-card,
.health-panel {
  backdrop-filter: blur(22px);
  background:
    linear-gradient(180deg, rgba(7, 14, 27, 0.9), rgba(10, 18, 34, 0.82)),
    rgba(10, 16, 30, 0.74);
  border: 1px solid rgba(134, 164, 208, 0.14);
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-panel),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.login-card {
  animation: panelReveal 0.72s ease-out both;
  overflow: hidden;
  padding: 42px 40px 30px;
  position: relative;
}

.notice-card {
  padding: 40px;
}

.login-brand {
  margin-bottom: 26px;
  position: relative;
  text-align: center;
}

.login-brand::after {
  animation: beamSweep 8.6s linear infinite;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.24), transparent);
  content: "";
  height: 140%;
  left: -38%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: -20%;
  transform: skewX(-20deg);
  width: 28%;
}

.login-brand-icon {
  animation: iconFloat 4.8s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.18));
  height: 62px;
  margin: 0 auto 18px;
  object-fit: contain;
  width: 62px;
}

.login-brand h1,
.notice-card h1,
.health-panel h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.02;
  margin: 0;
  text-shadow:
    0 12px 34px rgba(15, 23, 42, 0.4),
    0 0 20px rgba(148, 197, 255, 0.06);
}

.login-brand-subtitle {
  color: rgba(186, 208, 239, 0.64);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.32em;
  margin-top: 10px;
  text-indent: 0.32em;
  text-transform: uppercase;
}

.login-brand p,
.notice-card p {
  color: var(--text-muted);
  margin: 10px 0 0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field span {
  color: rgba(177, 195, 221, 0.78);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.login-field input,
.filter-form input,
.filter-form select,
.area-user-form input,
.replay-inline-field input,
.replay-inline-field select {
  background:
    linear-gradient(180deg, rgba(18, 28, 47, 0.92), rgba(11, 19, 34, 0.9)),
    rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(129, 153, 191, 0.16);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    inset 0 -1px 0 rgba(2, 6, 23, 0.18);
  color: var(--text-main);
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
  min-width: 0;
  outline: none;
  padding: 15px 18px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.login-field input::placeholder {
  color: rgba(138, 160, 194, 0.54);
  font-weight: 500;
}

.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus,
.login-field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(12, 22, 38, 0.98) inset;
  -webkit-text-fill-color: var(--text-main);
  border: 1px solid rgba(129, 153, 191, 0.16);
  caret-color: var(--text-main);
  transition: background-color 9999s ease-in-out 0s;
}

.login-field input:focus,
.filter-form input:focus,
.filter-form select:focus,
.area-user-form input:focus,
.replay-inline-field input:focus,
.replay-inline-field select:focus {
  background:
    linear-gradient(180deg, rgba(18, 28, 47, 0.92), rgba(11, 19, 34, 0.9)),
    rgba(15, 23, 42, 0.76);
  border-color: rgba(151, 172, 206, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(151, 172, 206, 0.08);
}

.login-submit,
.toolbar-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-ui);
  font-size: 14px;
  gap: 8px;
  justify-content: center;
  padding: 12px 16px;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
}

.login-submit {
  background:
    linear-gradient(135deg, rgba(22, 78, 99, 0.96), rgba(30, 64, 175, 0.94)),
    rgba(255, 255, 255, 0.06);
  border-color: rgba(125, 211, 252, 0.22);
  box-shadow:
    0 14px 32px rgba(8, 47, 73, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.16em;
  min-height: 54px;
  text-indent: 0.16em;
}

.login-submit,
.toolbar-btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.24);
}

.toolbar-btn-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(234, 88, 12, 0.94));
  border-color: rgba(251, 191, 36, 0.32);
  box-shadow: 0 18px 34px rgba(234, 88, 12, 0.22);
  color: #fff8eb;
}

.login-submit:hover,
.toolbar-btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.toolbar-btn-primary:hover,
.login-submit:hover {
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.98), rgba(37, 99, 235, 0.96)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 36px rgba(8, 47, 73, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toolbar-btn-warning:hover {
  background: linear-gradient(135deg, #fbbf24, #ea580c);
}

.toolbar-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.toolbar-link {
  text-decoration: none;
}

.login-message {
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.login-message-info {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: #bfe9ff;
}

.login-message-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #ffc2cf;
}

.login-footer,
.notice-kicker,
.page-kicker,
.panel-kicker {
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-footer {
  margin-top: 22px;
  text-align: center;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambientDrift {
  from {
    transform: translate3d(-1.5%, 0, 0) scale(1);
  }

  to {
    transform: translate3d(1.5%, -1.2%, 0) scale(1.04);
  }
}

@keyframes beamSweep {
  0%,
  68% {
    opacity: 0;
    transform: translateX(-160%) skewX(-20deg);
  }

  76% {
    opacity: 0.34;
  }

  100% {
    opacity: 0;
    transform: translateX(420%) skewX(-20deg);
  }
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.notice-actions,
.panel-actions,
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.notice-actions {
  margin-top: 24px;
}

.notice-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--text-main);
  display: inline-flex;
  min-height: 46px;
  padding: 0 16px;
  text-decoration: none;
}

.notice-action-primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.control-app-body {
  display: flex;
  min-height: 100vh;
}

.control-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  transition: width 240ms ease;
  width: 78px;
}

.control-sidebar:hover {
  width: 240px;
}

.brand {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 14px;
  height: 76px;
  overflow: hidden;
  padding: 0 20px;
  white-space: nowrap;
}

.brand-icon {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.28);
  flex: 0 0 30px;
  height: 30px;
}

.brand-text {
  font-size: 17px;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition);
}

.control-sidebar:hover .brand-text,
.control-sidebar:hover .nav-text {
  opacity: 1;
}

.nav-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 10px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  gap: 16px;
  overflow: hidden;
  padding: 14px 18px;
  position: relative;
  text-align: left;
  white-space: nowrap;
}

.nav-item::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  inset: 12px auto 12px 0;
  position: absolute;
  transform: scaleY(0);
  transition: transform var(--transition);
  width: 3px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-main);
}

.nav-item.active::before {
  transform: scaleY(1);
}

.nav-icon {
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.04em;
}

.nav-text {
  opacity: 0;
  transition: opacity var(--transition);
}

.control-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.control-topbar {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(11, 17, 32, 0.74);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px 28px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 4px;
}

.topbar-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.user-chip {
  align-items: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  color: #d3f2ff;
  display: inline-flex;
  font-size: 13px;
  min-height: 40px;
  padding: 0 14px;
}

.view-container {
  flex: 1;
  overflow: auto;
  padding: 24px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.workspace-grid {
  display: grid;
  gap: 20px;
}

.workspace-grid-monitor {
  gap: 16px;
  grid-template-areas:
    "summary summary"
    "trend timeline";
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: start;
}

.monitor-summary-panel {
  grid-area: summary;
}

.monitor-trend-panel {
  grid-area: trend;
}

.monitor-timeline-panel {
  grid-area: timeline;
}

.monitor-trend-panel,
.monitor-timeline-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.monitor-summary-panel {
  padding-bottom: 12px;
}

.workspace-grid-devices {
  gap: 16px;
  grid-template-columns: minmax(560px, 660px) minmax(320px, 1fr);
  align-items: start;
}

.device-directory-panel,
.device-inspector-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workspace-grid-log {
  gap: 16px;
  grid-template-areas:
    "filters filters"
    "table detail";
  grid-template-columns: minmax(360px, 0.92fr) minmax(520px, 1.08fr);
  align-items: start;
}

.logs-filter-panel {
  grid-area: filters;
}

.logs-table-panel {
  grid-area: table;
}

.logs-detail-panel {
  grid-area: detail;
}

.logs-table-panel .panel-note-inline {
  margin-bottom: 8px;
}

.workspace-grid-log-single {
  grid-template-areas: "detail";
  grid-template-columns: minmax(0, 1fr);
}

.workspace-grid-replay {
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
}

.replay-events-panel {
  grid-column: 1 / -1;
}

.workspace-grid-config {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.glass-panel {
  backdrop-filter: blur(12px);
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  min-width: 0;
  overflow: hidden;
  padding: 20px;
}

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

.panel-header h2 {
  font-size: 20px;
  margin: 4px 0 0;
}

.panel-note {
  color: var(--text-muted);
  font-size: 13px;
}

.panel-note-inline {
  align-self: center;
  min-height: 20px;
}

.replay-toolbar {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.replay-toolbar-secondary {
  margin-bottom: 14px;
}

.replay-toolbar-compact {
  align-items: flex-start;
}

.replay-inline-field {
  display: grid;
  gap: 8px;
  min-width: 156px;
}

.replay-inline-field-compact {
  min-width: 178px;
}

.replay-inline-field-wide {
  min-width: 220px;
}

.replay-inline-field span {
  color: var(--text-muted);
  font-size: 12px;
}

.replay-inline-actions {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-strip,
.logs-overview-cards,
.config-grid,
.status-grid,
.device-grid,
.health-grid {
  display: grid;
  gap: 12px;
}

.summary-band {
  display: grid;
  gap: 10px;
}

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

.summary-secondary {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.status-grid-inline {
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 8px;
}

.device-grid {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.device-grid-directory {
  gap: 8px;
  max-height: 540px;
  min-height: 210px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  padding-right: 8px;
}

.logs-overview-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 14px;
}

.summary-chip,
.config-card,
.health-card,
.status-card,
.device-card,
.log-overview-card,
.detail-card,
.detail-meta-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
}

.summary-chip {
  min-height: 72px;
  padding: 10px 12px;
}

.summary-chip span,
.summary-secondary-item span,
.config-card span,
.health-card span {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.summary-chip strong,
.summary-secondary-item strong,
.config-card strong,
.health-card strong {
  font-size: 17px;
  font-weight: 600;
}

.summary-secondary-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 12px;
}

.summary-secondary-item span,
.summary-secondary-item strong {
  margin: 0;
}

.summary-secondary-item strong {
  font-size: 13px;
}

.status-card {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.38)),
    rgba(255, 255, 255, 0.026);
  min-height: 0;
  padding: 9px 10px;
}

.status-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.status-card-title {
  align-items: center;
  color: var(--text-main);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.status-card-title i {
  background: rgba(148, 163, 184, 0.36);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.08);
  display: inline-block;
  height: 8px;
  width: 8px;
}

.status-ok .status-card-title i {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.11);
}

.status-warn .status-card-title i {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.status-badge {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.status-card p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.3;
  margin: 0;
}

.status-ok .status-badge {
  background: rgba(34, 197, 94, 0.14);
  color: #b8f1c8;
}

.status-warn .status-badge {
  background: rgba(245, 158, 11, 0.14);
  color: #ffd796;
}

.status-planned .status-badge {
  background: rgba(148, 163, 184, 0.12);
  color: #d1d8e4;
}

.device-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.device-list-shell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.device-list-head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-soft);
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(220px, 236px) minmax(160px, 1fr) 82px 52px 28px;
  padding: 12px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-stage {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  min-height: 0;
}

.device-filter {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

.device-filter.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.2);
  color: #d3f2ff;
}

.device-card {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(220px, 236px) minmax(160px, 1fr) 82px 52px 28px;
  padding: 10px 10px;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.device-grid-directory .device-card {
  gap: 4px;
  grid-template-columns: minmax(220px, 236px) minmax(160px, 1fr) 82px 52px 28px;
  padding: 10px 10px;
}

.device-card:hover,
.device-card.active {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.22);
  transform: translateY(-1px);
}

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

.device-card-title {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-meta {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}

.device-card-summary {
  color: var(--text-muted);
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.35;
  max-height: calc(1.35em * 2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.device-card-status {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.device-card-status-flag {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  justify-self: flex-start;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  text-transform: uppercase;
}

.device-card-status-flag.tone-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #b8f1c8;
}

.device-card-status-flag.tone-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #ffd796;
}

.device-card-status-flag.tone-stale {
  background: rgba(244, 63, 94, 0.14);
  color: #ffc2cf;
}

.device-grid-directory .device-card-summary {
  font-size: 11px;
  padding-right: 6px;
}

.device-state-badge {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
}

.device-ok .device-state-badge {
  background: rgba(34, 197, 94, 0.14);
  color: #b8f1c8;
}

.device-warn .device-state-badge {
  background: rgba(245, 158, 11, 0.14);
  color: #ffd796;
}

.device-stale {
  background:
    linear-gradient(90deg, rgba(244, 63, 94, 0.08), transparent 24%),
    rgba(255, 255, 255, 0.03);
  border-color: rgba(244, 63, 94, 0.22);
}

.device-stale .device-state-badge {
  background: rgba(244, 63, 94, 0.16);
  color: #ffc2cf;
}

.device-warn {
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.08), transparent 22%),
    rgba(255, 255, 255, 0.03);
}

.device-card-grid {
  align-items: center;
  display: contents;
}

.device-grid-directory .device-card-grid span {
  display: none;
}

.device-grid-directory .device-card-grid strong {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-grid span {
  display: none;
}

.device-card-grid strong {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.device-card-metric span {
  color: var(--text-muted);
  display: block;
  font-size: 10px;
}

.device-card-metric strong {
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-detail-float {
  align-self: stretch;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(10, 16, 30, 0.94), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 16px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: sticky;
  top: 0;
}

.device-detail-panel {
  max-height: 760px;
  overflow: auto;
  position: sticky;
  top: 0;
}

.device-detail-empty {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 210px;
  padding: 20px;
  text-align: center;
}

.device-detail-card {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 16px;
}

.device-detail-card.pinned {
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.device-detail-tone-warn {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.device-detail-tone-stale {
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.14);
}

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

.device-detail-title {
  font-size: 15px;
  font-weight: 700;
}

.device-detail-meta,
.device-detail-summary,
.device-detail-pin {
  color: var(--text-muted);
  font-size: 11px;
}

.device-detail-side {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.device-detail-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  line-height: 1.45;
  padding: 10px 12px;
}

.device-detail-summary-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.device-detail-summary-head span {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-detail-summary-head strong {
  font-size: 12px;
}

.device-detail-summary p {
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.device-detail-summary-ok {
  border-color: rgba(34, 197, 94, 0.16);
}

.device-detail-summary-warn {
  border-color: rgba(245, 158, 11, 0.18);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.06);
}

.device-detail-summary-stale {
  border-color: rgba(244, 63, 94, 0.18);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.06);
}

.device-detail-sections {
  display: grid;
  gap: 12px;
}

.device-detail-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 14px;
  padding: 10px;
}

.device-detail-section-title {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.device-detail-grid {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.device-detail-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.device-detail-grid-navigation {
  display: grid;
  gap: 8px;
}

.device-detail-row-pair .device-detail-item {
  flex: 1 1 0;
}

.device-detail-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  flex: 1 1 148px;
  min-width: 0;
  padding: 9px 10px;
}

.device-detail-item-compact {
  flex: 0 1 118px;
}

.device-detail-item-medium {
  flex: 1 1 176px;
}

.device-detail-item-wide {
  flex-basis: 100%;
}

.device-detail-item span {
  color: rgba(148, 163, 184, 0.78);
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.device-detail-item strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-detail-item-wrap strong {
  line-height: 1.4;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.device-detail-item-primary {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 68%),
    rgba(255, 255, 255, 0.045);
  border-color: rgba(56, 189, 248, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(14, 165, 233, 0.08);
}

.device-detail-item-primary span {
  color: #a7e6ff;
}

.device-detail-item-primary strong {
  color: #f8fbff;
  font-size: 14px;
}

.device-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
  padding-bottom: 2px;
}

.device-pagination-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.device-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.device-page-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-width: 38px;
  padding: 8px 12px;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.device-page-btn:hover {
  border-color: rgba(56, 189, 248, 0.22);
}

.device-page-btn.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.26);
  color: #d3f2ff;
}

.device-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.device-ok {
  border-color: rgba(34, 197, 94, 0.16);
}

.device-warn {
  border-color: rgba(245, 158, 11, 0.18);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag-pill,
.filter-pill {
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
}

.tag-pill {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.tag-pill.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.18);
  color: #d3f2ff;
}

.timeline-list,
.event-list,
.detail-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.timeline-item,
.event-item,
.detail-card,
.detail-meta-card {
  min-width: 0;
  padding: 10px 12px;
}

.timeline-row {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.timeline-title,
.event-title {
  font-size: 12px;
  font-weight: 600;
}

.timeline-time,
.event-time,
.detail-subtitle {
  color: var(--text-muted);
  font-size: 11px;
  margin: 0;
  white-space: nowrap;
}

.timeline-item p,
.event-item p,
.detail-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.timeline-item {
  border-left: 3px solid rgba(148, 163, 184, 0.18);
}

.timeline-item.severity-ok {
  border-left-color: rgba(34, 197, 94, 0.72);
}

.timeline-item.severity-warn {
  border-left-color: rgba(245, 158, 11, 0.82);
}

.timeline-item.severity-info {
  border-left-color: rgba(56, 189, 248, 0.82);
}

.chart-list {
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.36));
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 16px;
}

.chart-list-head {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(86px, 1fr));
}

.chart-hero {
  align-content: start;
  display: grid;
  gap: 6px;
}

.chart-hero-kicker {
  color: #9bdcff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-hero strong {
  color: #f8fbff;
  font-size: 30px;
  line-height: 1;
}

.chart-hero p {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

.chart-metric span,
.chart-row-label,
.chart-row-value {
  color: var(--text-muted);
  font-size: 12px;
}

.chart-metric strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.chart-stage {
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.18), transparent 56%),
    linear-gradient(180deg, rgba(8, 47, 73, 0.22), rgba(15, 23, 42, 0.08));
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 18px;
  min-height: 0;
  overflow: hidden;
  padding: 14px 12px 12px;
  position: relative;
}

.chart-stage-glow {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 70%);
  height: 180px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: -80px;
  transform: translateX(-50%);
  width: 240px;
}

.chart-area {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 168px;
  position: relative;
  z-index: 1;
}

.chart-bar {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}

.chart-bar-shaft {
  align-items: end;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0));
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 14px;
  display: flex;
  flex: 1 1 auto;
  min-height: 92px;
  overflow: hidden;
  padding: 8px;
}

.chart-bar-fill {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 52%, rgba(14, 165, 233, 0.4) 100%);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
  display: block;
  height: 100%;
  min-height: 8px;
  width: 100%;
}

.chart-bar-meta {
  display: grid;
  gap: 4px;
  text-align: center;
}

.chart-bar-meta strong {
  font-size: 12px;
  font-weight: 700;
}

.filter-form {
  display: grid;
  gap: 14px;
}

.filter-form label,
.area-user-form label {
  display: grid;
  gap: 8px;
}

.filter-form span,
.area-user-form span {
  color: var(--text-muted);
  font-size: 13px;
}

.area-user-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin-bottom: 18px;
}

.area-user-form .toolbar-btn {
  align-self: end;
}

.area-user-list {
  display: grid;
  gap: 10px;
}

.area-user-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.area-user-title {
  font-size: 16px;
  font-weight: 700;
}

.area-user-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 5px;
}

.area-user-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workspace-grid-area {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
}

.area-overview-filter {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(8, 47, 73, 0.28)),
    rgba(2, 6, 23, 0.24);
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) auto;
  margin-bottom: 16px;
  padding: 14px;
}

.area-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.area-scope-tabs {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.78)),
    rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 38px rgba(2, 6, 23, 0.24);
  display: inline-grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 230px;
  padding: 5px;
}

.area-scope-tab {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  min-height: 40px;
  padding: 0 18px;
  position: relative;
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.area-scope-tab:hover {
  color: #e0f2fe;
}

.area-scope-tab.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.98), rgba(37, 99, 235, 0.92));
  box-shadow:
    0 16px 32px rgba(14, 165, 233, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  transform: translateY(-1px);
}

.area-overview-filter label {
  display: grid;
  gap: 8px;
}

.area-overview-filter span {
  color: var(--text-muted);
  font-size: 13px;
}

.area-overview-filter select,
.area-overview-filter input {
  appearance: none;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.86)),
    rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 24px rgba(2, 6, 23, 0.14);
  color: #e5f0ff;
  font: inherit;
  font-size: 14px;
  min-height: 42px;
  outline: none;
  padding: 0 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  width: 100%;
}

.area-overview-filter select {
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center, right 12px center;
  background-repeat: repeat, no-repeat;
  padding-right: 38px;
}

.area-overview-filter option {
  background: #0f172a;
  color: #e5f0ff;
}

.area-overview-filter input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.area-overview-filter select:focus,
.area-overview-filter input:focus {
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow:
    0 0 0 4px rgba(14, 165, 233, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.area-overview-filter .toolbar-btn {
  align-self: end;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 20px;
}

.area-overview-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 16px;
}

.area-overview-summary article {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 14px;
}

.area-overview-summary span {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.area-overview-summary strong {
  color: var(--text-main);
  font-size: 22px;
}

.area-overview-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 360px);
  min-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.area-overview-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 15px;
  text-align: left;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.area-overview-row:hover,
.area-overview-row.active {
  background: rgba(14, 165, 233, 0.09);
  border-color: rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
}

.area-overview-row-title {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 750;
}

.area-overview-row-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.area-overview-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.area-overview-row-tags b {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 11px;
  padding: 4px 8px;
}

.area-point-table-wrap {
  margin-top: 14px;
  overflow: auto;
}

.area-preview-map {
  background:
    radial-gradient(circle at 30% 20%, rgba(14, 165, 233, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.86));
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  height: min(46vh, 430px);
  margin-bottom: 16px;
  min-height: 300px;
  overflow: hidden;
  position: relative;
}

.area-preview-map.leaflet-container {
  color: var(--text-main);
  font-family: inherit;
}

.area-preview-map .leaflet-control-zoom {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28);
  overflow: hidden;
}

.area-preview-map .leaflet-bar a {
  background: rgba(15, 23, 42, 0.88);
  border: 0;
  color: #dbeafe;
}

.area-point-label {
  align-items: center;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.area-point-label span {
  align-items: center;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(224, 242, 254, 0.84);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.35);
  color: #f8fafc;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  width: 22px;
}

.area-point-table {
  border-collapse: collapse;
  width: 100%;
}

.area-point-table th,
.area-point-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  font-size: 12px;
  padding: 9px 8px;
  text-align: left;
}

.area-point-table th {
  color: var(--text-main);
  font-weight: 700;
}

.logs-table {
  display: grid;
  gap: 8px;
  max-height: 780px;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.log-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.log-device-list-shell {
  min-height: 0;
}

.log-device-list-head {
  grid-template-columns: minmax(220px, 236px) minmax(180px, 1fr) 82px 64px;
}

.log-device-directory-grid {
  gap: 6px;
  max-height: 780px;
}

.log-device-pagination {
  margin-top: 10px;
}

.log-device-card {
  gap: 4px;
  grid-template-columns: minmax(220px, 236px) minmax(180px, 1fr) 82px 64px;
}

.log-device-card .device-card-grid {
  align-items: center;
}

.log-device-card .device-card-grid .device-card-metric {
  align-items: center;
  display: flex;
  justify-content: center;
  text-align: center;
}

.log-device-card .device-card-grid .device-card-metric strong {
  font-size: 11px;
  line-height: 1.4;
}

.log-device-card .device-card-grid .device-card-metric span {
  display: none;
}

.log-row:hover,
.log-row.active {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.log-row-compact {
  gap: 8px;
  padding: 12px 14px 10px;
}

.log-row-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.log-row-head-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.log-row-title-line {
  align-items: baseline;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.log-row-head-side {
  align-items: flex-end;
  display: grid;
  gap: 0;
  justify-items: end;
  min-width: 0;
}

.log-row-title {
  font-size: 14px;
  font-weight: 700;
}

.log-row-version-inline {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.log-row-time,
.log-row-id,
.log-row-summary,
.log-row-meta {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.log-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.log-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.log-row-actions-compact {
  gap: 6px;
}

.log-row-icon-btn {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0;
  width: 34px;
}

.log-row-icon-btn.subtle {
  min-width: 34px;
  width: 34px;
}

.logs-filter-form-inline {
  align-items: end;
  gap: 10px 12px;
  grid-template-columns: minmax(200px, 1.5fr) repeat(3, minmax(120px, 0.75fr)) auto;
  margin-bottom: 14px;
}

.log-overview-card,
.config-card,
.health-card {
  padding: 16px;
}

.log-overview-card {
  align-content: start;
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 12px 14px;
}

.log-overview-card span {
  color: var(--text-muted);
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.log-overview-card strong {
  color: var(--text-main);
  display: block;
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}

.detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.logs-detail-panel .detail-stack {
  gap: 10px;
}

.logs-record-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 480px;
  overflow: auto;
  padding-right: 4px;
}

.log-device-records-card {
  padding: 14px;
}

.log-device-records-card .detail-title {
  font-size: 18px;
}


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

.detail-grid-adaptive {
  display: flex;
  flex-wrap: wrap;
}

.detail-grid-log-detail {
  gap: 6px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.detail-meta-card-adaptive {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  justify-content: space-between;
  max-width: 100%;
}

.detail-meta-card-compact {
  flex-basis: 140px;
}

.detail-meta-card-medium {
  flex-basis: 210px;
}

.detail-meta-card-wide {
  flex: 1 1 320px;
}

.detail-grid-log-detail .detail-meta-card {
  min-width: 0;
  padding: 8px 10px;
}

.detail-grid-log-detail .detail-meta-card:nth-child(-n+5) {
  grid-column: span 2;
}

.detail-grid-log-detail .detail-meta-card:nth-child(1),
.detail-grid-log-detail .detail-meta-card:nth-child(2) {
  grid-column: span 3;
}

.detail-grid-log-detail .detail-meta-card:nth-child(6),
.detail-grid-log-detail .detail-meta-card:nth-child(7) {
  grid-column: span 4;
}

.detail-grid-log-detail .detail-meta-card:nth-child(8),
.detail-grid-log-detail .detail-meta-card:nth-child(9) {
  grid-column: span 2;
}

.detail-meta-card span {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-meta-card strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.detail-code {
  background: rgba(8, 12, 24, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  color: #dce9ff;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  max-height: 260px;
  min-width: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-preview-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.log-preview-file {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  max-width: min(100%, 320px);
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 12px;
  white-space: normal;
}

.log-preview-file.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.24);
  color: #d8f4ff;
}

.log-preview-meta {
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  margin-top: 10px;
  min-width: 0;
}

.log-preview-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.log-preview-code {
  max-height: 420px;
  min-height: 220px;
  margin-top: 10px;
}

.trace-preview {
  contain: layout paint;
  height: clamp(420px, 52vh, 560px);
  isolation: isolate;
  max-height: clamp(420px, 52vh, 560px);
  min-height: clamp(420px, 52vh, 560px);
  overflow: hidden;
  position: relative;
}

.trace-embed-frame {
  background: #08101d;
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.trace-map {
  background: rgba(6, 11, 24, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  height: 100%;
  max-height: 100%;
  min-height: 100%;
  overflow: hidden;
  transform: translateZ(0);
}

.trace-map.leaflet-container {
  background: #08101d;
  font: inherit;
}

.trace-map .leaflet-pane,
.trace-map .leaflet-top,
.trace-map .leaflet-bottom {
  will-change: transform;
}

.trace-map .leaflet-pane svg {
  overflow: visible;
}

.trace-map .leaflet-overlay-pane path {
  vector-effect: non-scaling-stroke;
}

.trace-map .leaflet-tile {
  backface-visibility: hidden;
  filter: none !important;
  image-rendering: auto;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

.trace-map .leaflet-tile-container,
.trace-map .leaflet-layer {
  mix-blend-mode: normal !important;
}

.trace-map .leaflet-control-zoom {
  border: none;
  margin: 16px;
}

.trace-map .leaflet-bar {
  border: none;
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.38);
}

.trace-map .leaflet-bar a {
  background: rgba(8, 15, 29, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-main);
  height: 38px;
  line-height: 36px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  width: 38px;
}

.trace-map .leaflet-bar a:hover,
.trace-map .leaflet-bar a:focus {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(56, 189, 248, 0.34);
  color: #ffffff;
}

.trace-map .leaflet-bar a:first-child {
  border-radius: 12px 12px 0 0;
}

.trace-map .leaflet-bar a:last-child {
  border-radius: 0 0 12px 12px;
  border-top: none;
}

.trace-empty-state {
  align-items: center;
  backdrop-filter: blur(2px);
  background: linear-gradient(180deg, rgba(4, 10, 21, 0.2), rgba(4, 10, 21, 0.58));
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  color: var(--text-muted);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  z-index: 420;
}

.replay-trace-panel {
  align-self: start;
  backdrop-filter: none;
  background: rgba(9, 15, 28, 0.94);
}

html.runtime-map-page,
body.runtime-map-body {
  height: 100%;
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}

body.runtime-map-body {
  background: #08101d;
  color: var(--text-main);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.runtime-map-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 100%;
  padding: 0;
}

.runtime-map-root {
  background: #08101d;
  border-radius: 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.runtime-map-canvas {
  border: 0;
  border-radius: 0;
}

.runtime-map-legend {
  margin-top: 0;
  min-height: 30px;
  padding: 0 2px 2px;
}

.runtime-map-debug {
  backdrop-filter: blur(16px);
  background: rgba(5, 10, 20, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.34);
  color: #dbeafe;
  max-width: min(360px, calc(100% - 28px));
  padding: 12px 14px;
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 520;
}

.runtime-map-debug-title {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.runtime-map-debug-grid {
  column-gap: 10px;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1.2fr);
  row-gap: 6px;
}

.runtime-map-debug-grid span {
  color: rgba(191, 219, 254, 0.76);
  font-size: 12px;
}

.runtime-map-debug-grid strong {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.trace-stage {
  background: rgba(6, 11, 24, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  min-height: 440px;
  overflow: hidden;
  padding: 14px;
}

.trace-stage svg {
  display: block;
  height: 100%;
  min-height: 380px;
  width: 100%;
}

.trace-legend {
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.legend-item-note {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
}

.legend-item {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.legend-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.legend-dot.trace {
  background: #38bdf8;
}

.legend-dot.mission {
  background: #22c55e;
}

.legend-dot.home {
  background: #f59e0b;
}

.legend-dot.current {
  background: #f43f5e;
}

.config-flash {
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.panel-actions-service {
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

#service-restart-status {
  margin-bottom: 0;
  margin-top: 14px;
}

.config-flash.info {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: #bfe9ff;
}

.config-flash.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #ffc2cf;
}

.hidden {
  display: none !important;
}

.empty-note,
.empty-state {
  align-items: center;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  min-height: 120px;
  padding: 18px;
  text-align: center;
}

.health-grid {
  margin-top: 18px;
}

@media (max-width: 1280px) {
  .logs-overview-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-grid-log,
  .workspace-grid-monitor,
  .workspace-grid-replay,
  .workspace-grid-config,
  .workspace-grid-area {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .workspace-grid-monitor {
    grid-template-areas:
      "summary"
      "trend"
      "timeline";
    align-items: stretch;
  }

  .workspace-grid-log {
    grid-template-areas:
      "filters"
      "table"
      "detail";
  }

  .workspace-grid-devices {
    grid-template-columns: 1fr;
  }

  .device-grid,
  .status-grid,
  .summary-strip,
  .summary-secondary,
  .health-grid,
  .config-grid,
  .area-overview-summary,
  .area-user-form {
    grid-template-columns: 1fr 1fr;
  }

  .status-grid-inline,
  .device-stage {
    grid-template-columns: 1fr;
  }

  .logs-filter-form-inline {
    grid-template-columns: 1fr 1fr;
  }

  .device-detail-float {
    position: static;
  }

  .device-detail-panel {
    max-height: none;
    overflow: visible;
  }

  .device-list-head,
  .device-grid-directory .device-card,
  .log-device-list-head,
  .log-device-card {
    gap: 4px;
    grid-template-columns: minmax(208px, 224px) minmax(144px, 1fr) 72px 56px;
  }

  .area-overview-filter {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .logs-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-app-body {
    flex-direction: column;
  }

  .control-sidebar {
    width: 100%;
  }

  .control-sidebar:hover {
    width: 100%;
  }

  .brand-text,
  .nav-text {
    opacity: 1;
  }

  .nav-menu {
    flex-direction: row;
    overflow: auto;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .control-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .logs-overview-cards {
    grid-template-columns: 1fr;
  }

  .log-overview-card {
    min-height: 72px;
    padding: 11px 12px;
  }

  .log-row-top {
    flex-direction: column;
  }

  .log-row-title-line {
    flex-wrap: wrap;
  }

  .log-row-head-side {
    justify-items: start;
    width: 100%;
  }

  .log-row-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .view-container,
  .health-shell {
    padding: 16px;
  }

  .login-card,
  .notice-card,
  .glass-panel {
    padding: 18px;
  }

  .summary-strip,
  .device-grid,
  .status-grid,
  .summary-secondary,
  .detail-grid,
  .health-grid,
  .config-grid,
  .area-overview-summary,
  .area-overview-filter,
  .area-user-form {
    grid-template-columns: 1fr;
  }

  .device-card {
    grid-template-columns: 1fr;
  }

  .detail-meta-card-adaptive {
    flex-basis: 100%;
    min-width: 0;
  }

  .log-device-card {
    grid-template-columns: 1fr;
  }

  .device-card-summary {
    white-space: normal;
  }

  .device-list-head {
    display: none;
  }

  .device-grid-directory .device-card {
    grid-template-columns: 1fr;
  }

  .device-detail-grid {
    flex-direction: column;
  }

  .logs-filter-form-inline {
    grid-template-columns: 1fr;
  }

  .log-preview-meta {
    flex-direction: column;
    gap: 6px;
  }

  .chart-list-head,
  .chart-area {
    grid-template-columns: 1fr;
  }

  .area-user-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
