
:root {
  --font: "Pretendard", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --speed: 180ms;

  --ok: #15b77f;
  --delay: #f59e0b;
  --bad: #ef4444;
  --info: #3b82f6;
  --violet: #7c3aed;
  --glass-blur: 16px;
  --glass-shine: rgba(255, 255, 255, .42);
  --card-glow: color-mix(in srgb, var(--brand) 22%, transparent);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090d14;
  --bg-soft: #101722;
  --surface: rgba(18, 25, 37, .94);
  --surface-2: rgba(24, 33, 49, .92);
  --surface-3: rgba(34, 45, 64, .78);
  --text: #eef4ff;
  --muted: #91a0b7;
  --subtle: #637187;
  --line: rgba(147, 169, 204, .15);
  --line-strong: rgba(147, 169, 204, .26);
  --brand: #8b5cf6;
  --brand-2: #22d3ee;
  --accent: #38bdf8;
  --shadow: 0 22px 60px rgba(0,0,0,.38);
  --shadow-soft: 0 14px 35px rgba(0,0,0,.22);
  --glass: rgba(255,255,255,.05);
  --glass-shine: rgba(255, 255, 255, .08);
}

body[data-theme="white"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef3f9;
  --surface: rgba(255, 255, 255, .96);
  --surface-2: rgba(255, 255, 255, .92);
  --surface-3: rgba(242, 246, 252, .92);
  --text: #121826;
  --muted: #607086;
  --subtle: #8a99ad;
  --line: rgba(32, 52, 84, .12);
  --line-strong: rgba(32, 52, 84, .20);
  --brand: #2563eb;
  --brand-2: #14b8a6;
  --accent: #0ea5e9;
  --shadow: 0 22px 50px rgba(27, 39, 66, .12);
  --shadow-soft: 0 12px 30px rgba(27, 39, 66, .08);
  --glass: rgba(15, 23, 42, .04);
}

/* Blue — 밝은 화이트/스카이블루 (Dark와 명확히 구분) */
body[data-theme="blue"] {
  color-scheme: light;
  --bg: #f4f8ff;
  --bg-soft: #e8f1ff;
  --surface: rgba(255, 255, 255, .98);
  --surface-2: rgba(248, 251, 255, .96);
  --surface-3: rgba(224, 236, 255, .94);
  --text: #0a1f3d;
  --muted: #4a6282;
  --subtle: #6b84a3;
  --line: rgba(37, 99, 235, .14);
  --line-strong: rgba(37, 99, 235, .26);
  --brand: #1d4ed8;
  --brand-2: #0284c7;
  --accent: #2563eb;
  --shadow: 0 22px 52px rgba(29, 78, 216, .14);
  --shadow-soft: 0 12px 32px rgba(29, 78, 216, .09);
  --glass: rgba(37, 99, 235, .07);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 16% 10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 30%),
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--brand-2) 15%, transparent), transparent 28%),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  overflow: hidden;
}

body[data-theme="blue"] {
  background:
    radial-gradient(circle at 12% 4%, rgba(37, 99, 235, .16), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, .14), transparent 30%),
    linear-gradient(155deg, var(--bg) 0%, #dceaff 45%, var(--bg-soft) 100%);
}

button, input, select, textarea { font: inherit; font-family: inherit; }
code, pre, kbd, samp {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}
.chart svg text,
.axis-text,
.line-label,
.bar-label,
.chart-data-label {
  font-family: var(--font);
}
button { color: inherit; }
kbd {
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 7px;
  padding: 2px 6px;
  color: var(--subtle);
  font-size: 11px;
}
code {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 6px;
}

.app {
  width: 100%;
  height: 100vh;
  display: block;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
}
.brand img { width: 44px; height: 44px; flex-shrink: 0; }
.brand strong {
  display: block;
  font-size: 14px;
  letter-spacing: .07em;
}
.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.app-header {
  position: relative;
  z-index: 6;
  margin-bottom: 4px;
}
.app-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* 타이틀 행(로고·메인타이틀·코너 PNG) 공통 높이 */
.app-header-row--brand {
  --header-brand-h: 72px;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: var(--header-brand-h);
  min-height: var(--header-brand-h);
  max-height: var(--header-brand-h);
  margin-left: -18px;
  margin-right: -18px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
.header-corner-logo {
  position: absolute;
  top: 0;
  left: auto;
  right: auto;
  height: var(--header-brand-h);
  max-height: var(--header-brand-h);
  width: auto;
  max-width: min(34vw, 240px);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.header-corner-logo--left {
  left: 0;
  object-position: left center;
}
/* INNO는 우측 클러스터 안에서 배치 (.header-brand-right-cluster) */
.header-brand-right-cluster .header-corner-logo--right {
  position: static;
  right: auto;
  object-position: right center;
}
.header-brand-right-cluster {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(6px, 1.2vw, 12px);
  padding-right: max(0px, env(safe-area-inset-right));
  max-width: min(56vw, 720px);
  pointer-events: auto;
}
.header-brand-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}
.header-brand-actions .theme-tabs {
  height: 34px;
  flex-shrink: 0;
}
.header-brand-actions .primary-btn,
.header-brand-actions .ghost-btn {
  min-height: 34px;
  font-size: 12px;
  padding: 0 10px;
  white-space: nowrap;
}
.header-brand-center.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: max-content;
  max-width: min(52vw, 520px);
  min-height: 0;
  padding: 0 12px;
  box-sizing: border-box;
  pointer-events: none;
}
.header-brand-center.brand .brand-title-block {
  pointer-events: auto;
}
.header-brand-center .brand-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  flex: 0 1 auto;
}
.header-brand-center .brand-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.12;
  white-space: nowrap;
}
.header-brand-center .brand-subtitle {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}
.app-header-row--toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
}
.header-page-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  grid-column: 2;
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  padding: 2px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.header-page-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.header-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.25;
  transition: color var(--speed), background var(--speed), box-shadow var(--speed);
  border-bottom: 3px solid transparent;
  margin: 0;
}
.header-tab-emoji {
  font-size: 1.15em;
  line-height: 1;
  flex-shrink: 0;
}
.header-tab-label {
  line-height: 1.2;
}
.header-tab:hover {
  color: var(--text);
  background: var(--glass);
}
.header-tab.active {
  color: var(--text);
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  border-bottom-color: var(--brand-2);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand-2) 35%, transparent);
}
.header-toolbar-source {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-self: start;
  grid-column: 1;
}
.header-toolbar-source .source-meta-line {
  justify-content: flex-start;
}
.page-title-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.source-meta-line {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--subtle);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}
.source-meta-line strong,
.source-meta-line .source-line-primary {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}
.source-line-secondary {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 14%, transparent), 0 0 18px var(--ok);
}

.main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 18px 28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.main::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.main-chrome-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -12px -18px 10px;
  padding: 10px 18px 10px;
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 92%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--bg) 55%, transparent);
}
.header-page-title.top-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.top-title-line1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  min-width: 0;
  width: 100%;
}
.top-title-line1-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.top-title-line1-main .eyebrow {
  flex: 0 0 auto;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
}
.top-title-line1-main h1 {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 22px;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.header-breadcrumb.crumbs {
  flex: 0 0 auto;
  margin-left: auto;
  max-width: min(48vw, 520px);
}
.top-title-line2 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.eyebrow {
  color: var(--brand-2);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.searchbox {
  width: min(320px, 32vw);
  height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  box-shadow: var(--shadow-soft);
}
.searchbox span { color: var(--subtle); font-size: 11px; }
.searchbox input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.theme-tabs {
  height: 36px;
  display: flex;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.theme-tabs button {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.theme-tabs button.active {
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-2) 65%, var(--brand)));
  color: white;
}
.primary-btn, .ghost-btn, .icon-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 11px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  transition: transform var(--speed), border-color var(--speed), background var(--speed);
}
.primary-btn {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-2) 70%, var(--brand)));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 22%, transparent);
}
.ghost-btn.full { width: 100%; }
.icon-btn {
  width: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.primary-btn:hover, .ghost-btn:hover, .icon-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }

.filter-bar {
  --filter-bar-h: 40px;
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 8px;
  min-width: 0;
  padding: 2px 0;
}
.filter-bar-main {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--filter-bar-h);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-bar-main::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.filter-bar .searchbox--filter-bar {
  flex: 0 0 clamp(260px, 26vw, 360px);
  width: clamp(260px, 26vw, 360px);
  height: var(--filter-bar-h);
  min-height: var(--filter-bar-h);
}
.filter-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
}
.filter-strip--inline {
  display: flex;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  margin-bottom: 0;
}
.filter-strip--inline label {
  flex: 0 1 auto;
  min-width: 68px;
  max-width: 118px;
  padding: 6px 8px 6px 10px;
  gap: 5px;
}
.filter-strip--inline span {
  font-size: 9px;
}
.filter-view-mode-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 4px 8px 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  min-height: var(--filter-bar-h);
  box-sizing: border-box;
}
.filter-view-mode-wrap.filter-is-active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.filter-view-mode-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--subtle);
  white-space: nowrap;
}
.filter-view-mode-group {
  display: inline-flex;
  gap: 3px;
}
.filter-view-mode-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 8px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--speed), border-color var(--speed), color var(--speed);
}
.filter-view-mode-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.filter-view-mode-btn.active {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: var(--text);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 20%, transparent) inset;
}

/* 7일/5일·8시간/24시간: 토글 버튼 */
.filter-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 4px 8px 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  min-height: var(--filter-bar-h);
  box-sizing: border-box;
}
.filter-toggle-wrap.filter-is-active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.filter-bar-page-extra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  min-height: var(--filter-bar-h);
}
.filter-bar-page-extra:not([hidden]) {
  display: inline-flex;
}
.filter-bar-page-extra-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.filter-bar-trends-dates {
  padding: 4px 8px 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  min-height: var(--filter-bar-h);
  box-sizing: border-box;
}
.filter-bar-date-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.filter-bar-date-field > span {
  font-size: 9px;
  font-weight: 700;
  color: var(--subtle);
  white-space: nowrap;
}
.filter-bar-date-field input[type="date"] {
  height: 28px;
  min-width: 8.5rem;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
.filter-bar-date-field input[type="date"]:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong));
}
.filter-toggle-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--subtle);
  white-space: nowrap;
}
.filter-toggle-group {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 3px;
}
.filter-toggle-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 8px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--speed), border-color var(--speed), color var(--speed);
}
.filter-toggle-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.filter-toggle-btn.active {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: var(--text);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 20%, transparent) inset;
}

.org-equipment-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.org-table-block--pc .table-card {
  border-left: 4px solid var(--brand);
}
.org-table-block--device .table-card {
  border-left: 4px solid var(--info);
}
.inspector-device-stack .inspector-nested-table .table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: min(42vh, 360px);
}
.inspector-pc-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
/* PC(설비수)·설비(신호) 테이블 8번째 열 — 동일 너비 */
.data-table-org-eq col.org-eq-col-signal,
.data-table-org-pc col.org-eq-col-signal {
  width: 4.75rem;
  min-width: 4.75rem;
}
.data-table-org-eq th.th-signal,
.data-table-org-pc th.th-signal {
  text-align: center;
}
.data-table-org-eq .cell-signal {
  text-align: center;
  vertical-align: middle;
}
.signal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  white-space: nowrap;
}
.signal-badge--manual {
  color: #7c4a03;
  background: color-mix(in srgb, #f59e0b 22%, var(--surface-2));
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--line));
}
.signal-badge--auto {
  color: #0c4a6e;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}
.signal-badge--both {
  color: #4c1d95;
  background: color-mix(in srgb, #8b5cf6 18%, var(--surface-2));
  border: 1px solid color-mix(in srgb, #8b5cf6 40%, var(--line));
}
.signal-badge--unknown {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line);
}
.data-table-org-eq col.org-eq-col-summary,
.data-table-org-pc col.org-eq-col-summary {
  width: 5.75rem;
}
.data-table-org-eq th.th-summary,
.data-table-org-pc th.th-summary {
  text-align: center;
}
.data-table-org-eq .cell-summary,
.data-table-org-pc .cell-summary {
  text-align: center;
  white-space: nowrap;
  padding-left: 4px;
  padding-right: 4px;
}
.summary-view-btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-2));
  color: var(--text);
  border-radius: 8px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.summary-view-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
}
.data-table-org-eq tbody tr.org-eq-data-row {
  cursor: default;
}
.org-pc-filter-row {
  cursor: pointer;
}
.org-pc-filter-row:hover td {
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}
.org-pc-filter-row.pc-row-filter-active td {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  box-shadow: inset 3px 0 0 var(--brand);
}
.modal-backdrop:has(.modal--summary) {
  padding: 16px 20px;
}
/* 너비는 파일 하단 .modal.modal--summary 에서 지정 (기본 .modal 720px 보다 뒤에 와야 함) */
.modal--summary {
  max-height: min(92vh, 960px);
  min-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
}
.modal--summary .modal-head h2 {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.summary-modal-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  max-height: calc(92vh - 72px);
  padding: 16px 20px 22px;
  color: var(--text);
}
.summary-modal-inner {
  display: grid;
  gap: 14px;
}
.summary-modal-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1.35fr);
  gap: 12px;
  align-items: stretch;
}
.summary-modal-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin: 0;
  min-height: 72px;
}
.summary-modal-strip-rate {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.summary-modal-strip-donut {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.summary-modal-strip-donut .summary-gauge-svg {
  display: block;
  width: 100%;
  height: auto;
}
.summary-modal-strip-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}
.summary-modal-strip-k {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.summary-modal-strip-org {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
  flex: 1;
}
.summary-modal-strip-org-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.summary-modal-strip-org-item strong {
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-modal-strip-meta {
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
}
.summary-modal-strip-sep {
  width: 1px;
  height: 1.1em;
  background: var(--line);
  flex-shrink: 0;
}
.summary-modal-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 8px 10px;
  padding: 14px 16px;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}
.summary-modal-hero {
  margin: 0;
}
.summary-modal-hero--slim {
  padding: 10px 16px;
}
.summary-modal-hero--slim .metric-sub {
  margin: 0;
}
.summary-modal-hero .metric-value {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  line-height: 1.05;
}
.summary-modal-hero .metric-sub {
  font-size: 13px;
}
.modal--summary .summary-modal-facts.info-grid--split {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}
.modal--summary .summary-modal-facts .info-grid-col {
  display: grid;
  gap: 0;
  min-width: 0;
}
.modal--summary .summary-modal-facts .info-line {
  grid-template-columns: minmax(4.5rem, 34%) 1fr;
  padding: 9px 0;
}
.modal--summary .summary-modal-facts .info-line span {
  font-size: 12px;
}
.modal--summary .summary-modal-facts .info-line strong {
  font-size: 14px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 요약 모달 — 당일 가동률 근거(분모/분자) */
.summary-uptime-card {
  margin-top: 0;
}
.summary-uptime-head .panel-desc {
  margin-top: 4px;
}
.summary-uptime-card .mono,
.summary-uptime-card code.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.summary-uptime-card code {
  padding: 0 0.2em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--line) 52%, transparent);
}
.summary-uptime-body {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(268px, 1.08fr);
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}
.summary-uptime-viz {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}
.summary-uptime-donut-wrap {
  position: relative;
  align-self: center;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}
.summary-uptime-donut-wrap .summary-gauge-svg {
  display: block;
  width: 100%;
  height: auto;
}
.summary-uptime-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 14px;
}
.summary-uptime-donut-pct {
  font-size: clamp(20px, 2.8vw, 24px);
  font-weight: 900;
  line-height: 1.08;
}
.summary-uptime-donut-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 4px;
  text-align: center;
}
.summary-uptime-body--gauges {
  grid-template-columns: 1fr;
  gap: 16px;
}
.summary-uptime-body--gauges .summary-uptime-viz {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 20px 24px;
}
.summary-uptime-body--gauges .summary-uptime-donut-wrap {
  grid-row: span 2;
}
.summary-gauge-gantt-pair {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.summary-gantt-scale-hint {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}
.summary-gantt-scale-hint strong {
  color: var(--text);
  font-weight: 900;
}
.summary-gantt-gauge {
  margin: 0;
}
.summary-gantt-gauge-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}
.summary-gantt-gauge-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.summary-gantt-gauge-val {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.summary-gantt-gauge-val strong {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.summary-gantt-gauge-val small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 700;
}
.summary-gantt-gauge-track {
  position: relative;
  height: 22px;
  border-radius: 5px;
  background: color-mix(in srgb, #64748b 42%, #1e293b);
  overflow: visible;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}
.summary-gantt-gauge-rail {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.summary-gantt-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 4px;
  min-width: 2px;
  transition: width var(--speed) ease;
}
.summary-gantt-seg--denom {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #94a3b8 92%, #fff),
    #64748b
  );
  opacity: 0.92;
}
.summary-gantt-seg--num {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  box-shadow: 0 0 10px color-mix(in srgb, #22c55e 40%, transparent);
  z-index: 1;
}
.summary-gantt-gauge-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: #f59e0b;
  border-radius: 1px;
  box-shadow: 0 0 6px color-mix(in srgb, #f59e0b 70%, transparent);
  z-index: 2;
  pointer-events: none;
}
.summary-uptime-pc-table {
  margin-top: 4px;
}
.summary-uptime-bar-figure {
  width: 100%;
  margin: 0;
}
.summary-uptime-split-cap {
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}
.summary-uptime-split-bar {
  width: 100%;
  height: 18px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--line) 78%, transparent);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.summary-uptime-split-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--brand),
    color-mix(in srgb, var(--brand-2, var(--brand)) 76%, transparent)
  );
  transition: width var(--speed) ease;
}
.summary-uptime-split-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 8px 0 0;
  font-size: 11px;
}
.summary-uptime-split-meta dt {
  color: var(--muted);
  font-weight: 600;
}
.summary-uptime-split-meta dd {
  font-weight: 800;
  margin: 2px 0 0;
  font-size: 13px;
}
.summary-uptime-rule-quote {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--brand);
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  line-height: 1.52;
}
.summary-uptime-rule-fallback {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.summary-uptime-formula {
  margin: 0;
  padding: 0 0 0 1.08rem;
  font-size: 12px;
  line-height: 1.52;
}
.summary-uptime-formula li {
  margin-bottom: 6px;
}
.summary-uptime-formula strong {
  color: var(--text);
}
.summary-uptime-sum-note,
.summary-uptime-over-note,
.summary-uptime-check {
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 10px;
}
.summary-uptime-sum-note strong,
.summary-uptime-over-note strong {
  font-weight: 800;
}
.summary-uptime-over-note {
  color: color-mix(in srgb, #f59e0b 90%, var(--text));
}
.summary-breakdown-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border-radius: var(--radius-sm);
}
.summary-uptime-breakdown {
  width: 100%;
  min-width: 480px;
  font-size: 12px;
}
.summary-uptime-breakdown .summary-br-micro {
  height: 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--line) 76%, transparent);
  overflow: hidden;
  max-width: 120px;
}
.summary-uptime-breakdown .summary-br-micro span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  max-width: 100%;
}

@media (max-width: 900px) {
  .summary-uptime-body {
    grid-template-columns: 1fr;
  }
  .summary-uptime-body--gauges .summary-uptime-viz {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .summary-uptime-body--gauges .summary-uptime-donut-wrap {
    grid-row: auto;
  }
  .summary-gauge-gantt-pair {
    width: 100%;
  }
}

.summary-modal-panels {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}
.summary-modal-panels > .card,
.summary-modal-panels .summary-onoff-stack {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.summary-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.summary-chart-head .panel-title {
  margin: 0;
}
.summary-trend-grain-group {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 88%, var(--bg));
}
.summary-trend-grain-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
}
.summary-trend-grain-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.summary-trend-grain-btn.active {
  color: var(--text-strong);
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.summary-chart-panel .summary-chart-host {
  margin-top: 8px;
  width: 100%;
}
.modal--summary .summary-chart-panel .chart,
.modal--summary .summary-timeline-host .chart {
  min-height: 0;
}
.modal--summary .summary-chart-panel .chart--fluid,
.modal--summary .summary-timeline-host .chart--fluid {
  width: 100%;
  max-width: 100%;
}
.modal--summary .summary-chart-panel .chart--fluid svg,
.modal--summary .summary-timeline-host .chart-binary-line svg {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: block;
}
.summary-onoff-stack {
  gap: 0;
  padding: 14px 16px 16px;
}
.summary-onoff-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.summary-onoff-grid-section {
  flex: 0 1 auto;
  min-height: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.summary-onoff-timeline-section {
  display: flex;
  flex-direction: column;
}
.summary-onoff-grid-host {
  display: flex;
  align-items: stretch;
  margin-top: 10px;
}
.summary-onoff-grid-host .binary-grid {
  flex: 1;
  align-content: stretch;
  width: 100%;
  gap: 3px;
}
.summary-onoff-grid-host .binary-cell {
  height: auto;
  min-height: 28px;
  align-self: stretch;
  border-radius: 4px;
}
.summary-timeline-host {
  margin-top: 10px;
  width: 100%;
}
.summary-timeline-host .chart-binary-line {
  width: 100%;
}
.summary-timeline-host .chart--fluid {
  display: block;
  text-align: left;
}
.summary-timeline-host .chart--fluid svg {
  margin: 0;
}
.modal--summary .summary-onoff-card .summary-onoff-grid .binary-grid {
  gap: 2px;
}
.modal--summary .summary-onoff-card .binary-cell {
  height: 20px;
  border-radius: 4px;
}
.summary-devices-card {
  margin: 0;
}
.summary-devices-head {
  margin-bottom: 4px;
}
.summary-devices-head .panel-desc {
  margin-top: 2px;
}
.summary-devices-card > .table-card {
  margin-top: 10px;
  overflow-x: auto;
}
.modal--summary .summary-devices-card .data-table-org-eq {
  min-width: 720px;
}
.summary-devices-card .summary-dev-more {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
}
.modal--summary .data-table-summary-logs {
  table-layout: fixed;
  width: 100%;
}
.modal--summary .data-table-summary-logs .col-inspector-ts,
.modal--summary .data-table-summary-logs .th-inspector-ts,
.modal--summary .data-table-summary-logs .inspector-log-ts {
  width: 11.5rem;
}
.modal--summary .data-table-summary-logs .col-inspector-ch,
.modal--summary .data-table-summary-logs .th-inspector-ch {
  width: 5.25rem;
}
.modal--summary .data-table-summary-logs .col-inspector-payload {
  width: auto;
}
.modal--summary .data-table-summary-logs .td-payload .payload-code-brief {
  font-size: 11px;
  line-height: 1.45;
  max-height: 3.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.modal--summary .summary-log-section .inspector-log-wrap {
  max-height: 280px;
  overflow: auto;
}
@media (max-width: 900px) {
  .modal--summary {
    min-height: 0;
    width: min(98vw, 100%);
  }
  .summary-modal-panels {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .summary-chart-panel .summary-chart-host {
    min-height: 260px;
  }
  .summary-timeline-host {
    min-height: 220px;
  }
}
@media (max-width: 960px) {
  .summary-modal-top,
  .summary-modal-panels {
    grid-template-columns: 1fr;
  }
  .summary-modal-strip-org-item strong {
    white-space: normal;
  }
  .modal--summary .summary-modal-facts.info-grid--split {
    grid-template-columns: 1fr;
  }
}
body.summary-modal-open {
  overflow: hidden;
}
.filter-strip--inline select {
  font-size: 12px;
  min-height: 26px;
}
.filter-strip--inline label.filter-is-active {
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-2) 42%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-2) 22%, transparent);
}
.filter-strip--inline label.filter-is-active span {
  color: var(--brand-2);
}
.filter-bar-main .filter-bar-crumb.crumbs {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: var(--filter-bar-h);
  box-sizing: border-box;
}
.filter-strip label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  min-height: var(--filter-bar-h);
  height: var(--filter-bar-h);
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
}
.filter-strip span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}
.filter-strip select {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 28px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}
.filter-strip option { background: var(--bg); color: var(--text); }
.contextbar {
  display: none;
}
.crumbs {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  display: grid;
  gap: 12px;
  padding-bottom: 28px;
}
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 11px; }
.equipment-detail-top.grid-main {
  align-items: stretch;
}
.equipment-combined-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.eq-combo-section {
  min-width: 0;
}
.eq-combo-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.equipment-basic-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.equipment-basic-panel .panel-head-main.equipment-basic-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.equipment-basic-panel .equipment-basic-rows.panel-body {
  display: grid;
  gap: 0;
  margin: 0;
  padding-top: 4px;
}
.equipment-basic-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.equipment-basic-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--brand) 78%, white), var(--violet));
  box-shadow: 0 0 14px color-mix(in srgb, var(--brand) 42%, transparent);
}
.equipment-basic-rows {
  margin: 0;
  padding: 4px 0 0;
}
.equipment-basic-row {
  display: grid;
  grid-template-columns: minmax(104px, 38%) 1fr;
  gap: 8px 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.equipment-basic-row:last-child {
  border-bottom: 0;
}
.equipment-basic-row dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.equipment-basic-row dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.equipment-detail-lower {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.equipment-log-wrap {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.equipment-log-scroll {
  max-height: min(268px, 40vh);
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
}
.workspace-live-log-scroll {
  max-height: min(420px, 52vh);
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.workspace-live-log-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.data-table-live-logs {
  width: 100%;
  min-width: 640px;
  font-size: 12px;
}
.data-table-live-logs thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  box-shadow: 0 1px 0 var(--line);
}
.data-table-live-logs .live-log-ts {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data-table-live-logs .td-payload {
  max-width: 280px;
}
.payload-code-brief {
  font-size: 10px;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
}
.panel-workspace-issue-compact {
  margin-top: 4px;
}
.panel-workspace-issue-compact .panel-head {
  padding: 8px 12px;
  min-height: 40px;
}
.panel-workspace-issue-compact .panel-body {
  padding: 8px 12px 12px;
}
.panel-workspace-issue-compact .panel-title {
  font-size: 14px;
}
.panel-workspace-issue-compact .panel-desc {
  font-size: 11px;
}
.panel-workspace-issue-compact .panel-kicker {
  padding: 2px 6px;
  font-size: 8px;
}
.equipment-basic-panel .panel-head-main.equipment-basic-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.equipment-basic-panel .equipment-basic-head .panel-head-inline {
  flex: 1 1 auto;
}
.inspector-log-section .inspector-log-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.inspector-log-section .panel-title {
  font-size: 14px;
  font-weight: 800;
}
.panel-workspace-issue-compact .chip-xs {
  font-size: 10px;
  padding: 2px 7px;
}
.app-list-compact .app-row-compact {
  padding: 6px 8px;
  font-size: 12px;
  gap: 8px;
}
.app-list-compact .app-row-compact .row-title {
  gap: 6px;
}
.app-list-compact .app-row-compact .row-title strong {
  font-size: 12px;
  font-weight: 600;
}
.app-list-compact .app-row-compact .row-side small {
  font-size: 11px;
  color: var(--muted);
}
.empty-state-compact {
  padding: 10px 8px;
  font-size: 12px;
}
.data-table-eq-logs {
  width: 100%;
  min-width: 720px;
}
.data-table-eq-logs thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  box-shadow: 0 1px 0 var(--line);
}
.data-table-eq-logs td {
  vertical-align: top;
}
.data-table-eq-logs .td-payload {
  max-width: 520px;
}
.data-table-eq-logs .th-payload {
  min-width: 200px;
}
.payload-code {
  display: block;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
  color: var(--text);
}
.payload-empty {
  color: var(--subtle);
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

.metric-row-compact {
  gap: 8px;
}
.metric-row-compact .metric {
  min-height: 0;
  padding: 10px 12px;
  gap: 8px;
}
.metric-row-compact .metric-inner {
  gap: 5px;
}
.metric-row-compact .metric-donut {
  width: 42px;
  height: 42px;
}
.metric-row-compact .metric-gauge {
  width: 40px;
  height: 6px;
}
.metric-row-compact .metric::after {
  width: 80px;
  height: 80px;
  right: -18px;
  top: -18px;
}
.metric-row-compact .metric-head { gap: 6px; }
.metric-row-compact .metric-title {
  font-size: 11px;
  letter-spacing: -0.01em;
}
.metric-row-compact .metric-value {
  font-size: 22px;
  letter-spacing: -.04em;
}
.metric-row-compact .metric-value small {
  font-size: 11px;
}
.metric-row-compact .metric-sub {
  font-size: 10px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.metric-row-compact .metric-head .chip {
  padding: 0 6px;
  min-height: 20px;
  font-size: 10px;
  border-radius: 999px;
}

/* ── Glass card shell (공통) ── */
.card, .metric, .panel, .table-card, .list-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow:
    0 1px 0 var(--glass-shine) inset,
    0 12px 36px color-mix(in srgb, var(--text) 6%, transparent),
    var(--shadow-soft);
  overflow: hidden;
  isolation: isolate;
}
.card::before, .panel::before, .metric::before, .table-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-shine) 55%, transparent) 0%,
    transparent 42%,
    color-mix(in srgb, var(--brand) 4%, transparent) 100%
  );
  opacity: .65;
  z-index: 0;
}
.card > *, .panel > *, .metric > *, .table-card > * {
  position: relative;
  z-index: 1;
}

.card-pad { padding: 14px 16px; }
.card-pad > .panel-title,
.card-pad > .panel-desc,
.card-pad .subcard-head .panel-title,
.card-pad .subcard-head .panel-desc {
  display: inline;
  margin: 0;
}
.card-pad > .panel-desc::before,
.card-pad .subcard-head .panel-desc::before {
  content: "·";
  margin-right: 8px;
  color: var(--subtle);
  font-weight: 700;
}
.card-pad .subcard-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-bottom: 10px;
}
.card-pad .subcard-head .panel-desc {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-pad > .panel-title {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.card-pad > .panel-desc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel {
  padding: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  min-height: 44px;
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 55%, transparent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-2) 88%, var(--brand) 12%),
    color-mix(in srgb, var(--surface) 92%, transparent)
  );
}
.panel-head-main {
  min-width: 0;
  flex: 1 1 auto;
}
.panel-head-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.panel-head-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 0;
}
.panel-kicker {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-2) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--glass));
  color: var(--brand-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}
.panel-title {
  margin: 0;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}
.panel-desc {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-desc::before {
  content: "·";
  margin-right: 8px;
  color: var(--subtle);
  font-weight: 700;
}
.panel-head-inline .panel-title {
  display: inline;
}
.panel-head-inline h3.panel-title {
  display: inline;
  font-size: 15px;
}
.panel-body {
  padding: 14px 16px 16px;
}
.panel-body > .table-card,
.panel-body > .workspace-live-log-wrap,
.panel-body > .equipment-log-wrap {
  margin: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--text) 4%, transparent);
}
.panel-body > .table-card::before {
  opacity: .35;
}

/* 패널 유형별 액센트 */
.panel--hero .panel-head {
  border-left: 4px solid var(--brand);
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--brand) 16%, var(--surface-2)),
    color-mix(in srgb, var(--brand-2) 8%, var(--surface)) 55%,
    color-mix(in srgb, var(--surface) 95%, transparent)
  );
}
.panel--hero .panel-kicker {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: color-mix(in srgb, var(--brand) 14%, var(--glass));
}
.panel--hero .panel-body {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 4%, transparent), transparent 48%);
}
.panel--hero .workspace-uptime-hero {
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 32px color-mix(in srgb, var(--brand) 12%, transparent);
}
.panel--hero .card.card-pad {
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
  border-color: color-mix(in srgb, var(--line-strong) 80%, transparent);
}

.panel--chart .panel-head {
  border-left: 4px solid var(--violet);
}
.panel--chart .panel-kicker {
  color: var(--violet);
  border-color: color-mix(in srgb, var(--violet) 35%, var(--line));
  background: color-mix(in srgb, var(--violet) 10%, var(--glass));
}
.panel--chart .panel-body {
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--violet) 7%, transparent), transparent 42%);
}

.panel--table .panel-head {
  border-left: 4px solid var(--accent);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
}
.panel--table .panel-kicker {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}
.panel--logs .panel-head {
  border-left: 4px solid var(--brand-2);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand-2) 10%, var(--surface-2)),
    var(--surface)
  );
}
.panel--logs .panel-kicker {
  font-family: var(--font);
  letter-spacing: 0.04em;
  color: var(--brand-2);
}
.panel--logs .panel-body {
  padding-top: 10px;
  background: color-mix(in srgb, var(--brand-2) 3%, transparent);
}

.panel--tree .panel-head {
  border-left: 4px solid var(--ok);
}
.panel--tree .panel-kicker {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
  background: color-mix(in srgb, var(--ok) 10%, var(--glass));
}

.panel--cards .panel-head {
  border-left: 4px solid var(--delay);
}
.panel--cards .panel-kicker {
  color: color-mix(in srgb, var(--delay) 85%, var(--text));
}

.panel--alert .panel-head {
  border-left: 4px solid var(--bad);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bad) 12%, var(--surface-2)),
    var(--surface)
  );
}
.panel--alert .panel-kicker {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 35%, var(--line));
  background: color-mix(in srgb, var(--bad) 10%, var(--glass));
}

.panel--info .panel-head {
  border-left: 4px solid var(--info);
}
.panel--info .panel-kicker {
  color: var(--info);
}

.panel--default .panel-head {
  border-left: 4px solid color-mix(in srgb, var(--muted) 55%, var(--line));
}

.metric {
  min-height: 132px;
  padding: 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  border-top: 3px solid var(--metric-color, var(--brand));
}
.metric-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.metric-viz {
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.metric-donut {
  display: block;
  flex-shrink: 0;
}
.metric-donut-track {
  stroke: color-mix(in srgb, var(--subtle) 38%, transparent);
}
.metric-donut-fill {
  stroke: var(--metric-color, var(--brand));
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.metric-gauge {
  width: 48px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--subtle) 28%, transparent);
  overflow: hidden;
}
.metric-gauge-fill {
  height: 100%;
  width: var(--gw, 0%);
  max-width: 100%;
  background: var(--metric-color, var(--brand));
  border-radius: inherit;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .metric-donut-fill,
  .metric-gauge-fill {
    transition: none;
  }
  .card, .panel, .metric, .table-card, .list-card, .location-card, .org-node {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .location-card:hover {
    transform: none;
  }
}
.metric::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--metric-color, var(--brand)) 18%, transparent);
  filter: blur(2px);
  z-index: 0;
}
.metric.info {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--info) 12%, var(--surface)),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
}
.metric.good {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--ok) 12%, var(--surface)),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
}
.metric.warn {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--delay) 14%, var(--surface)),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
}
.metric.bad {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--bad) 12%, var(--surface)),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
}
.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}
.metric-title { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-value {
  position: relative;
  font-size: 35px;
  letter-spacing: -.055em;
  font-weight: 900;
}
.metric-value small { font-size: 15px; color: var(--subtle); margin-left: 3px; }
.metric-sub { color: var(--subtle); font-size: 12px; }
.metric.good { --metric-color: var(--ok); }
.metric.warn { --metric-color: var(--delay); }
.metric.bad { --metric-color: var(--bad); }
.metric.info { --metric-color: var(--info); }

.metric-row-hero .metric {
  min-height: 118px;
  border-top-width: 4px;
}
.metric-row-hero .metric:nth-child(1) { border-top-color: var(--info); }
.metric-row-hero .metric:nth-child(2) { border-top-color: var(--ok); }
.metric-row-hero .metric:nth-child(3) { border-top-color: var(--brand); }
.metric-row-hero .metric:nth-child(4) { border-top-color: var(--delay); }
.chip, .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.status-chip.delay { color: var(--delay); border-color: color-mix(in srgb, var(--delay) 30%, transparent); background: color-mix(in srgb, var(--delay) 12%, transparent); }
.status-chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); }

.progress {
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--subtle) 20%, transparent);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: var(--w);
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ok), color-mix(in srgb, var(--ok) 55%, var(--brand-2)));
}
.progress.warn > span { background: linear-gradient(90deg, var(--delay), #f97316); }
.progress.bad > span { background: linear-gradient(90deg, var(--bad), #f97316); }

.chart { min-height: 220px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart--fluid { min-height: 0; width: 100%; }
.chart--fluid svg { max-width: 100%; }
.inspector .card.inspector-chart-card {
  overflow: visible;
}
.inspector .inspector-chart-card .chart--fluid {
  min-height: 0;
  margin-top: 4px;
}
.inspector .inspector-chart-card .panel-title {
  margin-bottom: 2px;
}
.axis { stroke: var(--line); stroke-width: 1; }
.axis-text { fill: var(--subtle); font-size: 11px; }
.line-label { fill: var(--muted); font-size: 12px; font-weight: 800; }
.table-card-report-org {
  overflow: auto;
  max-width: 100%;
}
.data-table-report-org thead th {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.data-table-report-org tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
}
.bar-label { fill: var(--text); font-size: 11px; font-weight: 900; }
.chart-data-label {
  fill: var(--text);
  font-size: 10px;
  font-weight: 800;
  paint-order: stroke fill;
  stroke: color-mix(in srgb, var(--surface) 92%, transparent);
  stroke-width: 3px;
}

.app-list { display: grid; gap: 10px; }
.app-row {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 15px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: transform var(--speed), border-color var(--speed), background var(--speed);
}
.app-row:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-3);
}
.row-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.row-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-side { text-align: right; }
.row-side strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.row-side small { color: var(--subtle); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.data-table th {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  background: var(--glass);
}
.data-table tr { cursor: pointer; }
.data-table tr:hover td { background: var(--glass); }
.data-table .num { text-align: right; }

.data-table th.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table th.th-sort .th-sort-label {
  border-bottom: 1px dashed transparent;
}
.data-table th.th-sort:hover .th-sort-label {
  border-bottom-color: color-mix(in srgb, var(--muted) 50%, transparent);
}
.data-table th.th-sort .sort-ind {
  display: inline-block;
  margin-left: 5px;
  width: 0.75em;
  font-size: 10px;
  opacity: 0.55;
  vertical-align: middle;
  line-height: 1;
}
.data-table th.th-sort.sort-asc .sort-ind::after { content: "▲"; }
.data-table th.th-sort.sort-desc .sort-ind::after { content: "▼"; }
.data-table thead tr { cursor: default; }

.org-tree { display: grid; gap: 10px; max-height: 510px; overflow: auto; padding-right: 4px; }
.org-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 65%, transparent);
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--glass-shine) inset;
}
.org-node.level-1 { margin-left: 18px; }
.org-node.level-2 { margin-left: 36px; }
.org-node strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-node small { color: var(--muted); }
.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.location-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface-2) 85%, var(--brand) 15%),
    color-mix(in srgb, var(--surface) 90%, transparent)
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  box-shadow:
    0 1px 0 var(--glass-shine) inset,
    0 10px 28px color-mix(in srgb, var(--text) 5%, transparent);
  transition: transform var(--speed), border-color var(--speed), box-shadow var(--speed);
}
.location-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--glass-shine) 40%, transparent), transparent 50%);
  opacity: .5;
}
.location-card > * { position: relative; z-index: 1; }
.location-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow:
    0 1px 0 var(--glass-shine) inset,
    0 16px 36px color-mix(in srgb, var(--brand) 12%, transparent);
}
.location-card.location-card-active {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: color-mix(in srgb, var(--brand) 13%, var(--surface-2));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--brand) 38%, transparent),
    0 10px 30px color-mix(in srgb, var(--brand) 18%, transparent);
  animation: locationCardActivePulse 2.2s ease-in-out infinite;
}
.location-card.location-card-active:hover {
  border-color: color-mix(in srgb, var(--brand) 70%, var(--line-strong));
}
.location-card.location-card-active .location-card-head .chip {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand) 16%, var(--glass));
}
@keyframes locationCardActivePulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--brand) 32%, transparent),
      0 8px 22px color-mix(in srgb, var(--brand) 12%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--brand) 52%, transparent),
      0 14px 36px color-mix(in srgb, var(--brand) 22%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .location-card.location-card-active { animation: none; }
}

.data-table tr.row-location-filter-active td {
  background: color-mix(in srgb, var(--brand) 11%, var(--surface-2)) !important;
}
.data-table tr.row-location-filter-active:hover td {
  background: color-mix(in srgb, var(--brand) 14%, var(--glass)) !important;
}
.data-table tr.row-location-filter-active {
  box-shadow: inset 4px 0 0 0 color-mix(in srgb, var(--brand) 78%, transparent);
}

.location-card-head { display: flex; justify-content: space-between; gap: 12px; }
.location-card strong { font-size: 15px; }
.location-card .big { font-size: 30px; font-weight: 900; letter-spacing: -.05em; margin: 13px 0 8px; }

.segment {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--glass);
}
.segment span { min-width: 3px; }
.segment .ok { background: var(--ok); }
.segment .delay { background: var(--delay); }
.segment .bad { background: var(--bad); }

.binary-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 48), minmax(2px, 1fr));
  gap: 3px;
  align-items: end;
}
.binary-grid--empty {
  display: block;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
}
.binary-cell {
  height: 18px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--subtle) 18%, transparent);
}
.binary-cell.on { background: color-mix(in srgb, var(--ok) 85%, white 3%); }
.binary-cell.mid { background: color-mix(in srgb, var(--delay) 85%, white 3%); }
.binary-cell.off { background: color-mix(in srgb, var(--bad) 78%, transparent); }

.fleet-gantt {
  display: block;
  width: 100%;
  max-width: 100%;
}
.fleet-gantt--compact {
  flex-shrink: 0;
}
.fleet-gantt-track {
  fill: color-mix(in srgb, var(--subtle) 22%, transparent);
}
.fleet-gantt-on {
  fill: color-mix(in srgb, var(--ok) 88%, white 4%);
}
.fleet-gantt-axis {
  font-size: 10px;
  fill: var(--muted);
}
.fleet-gantt--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}
.fleet-gantt-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.fleet-gantt-wrap::-webkit-scrollbar {
  display: none;
}
.fleet-gantt-wrap--fluid {
  overflow-x: hidden;
}

/* —— 운영 워크스페이스 (컴팩트) —— */
.workspace-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.workspace-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.workspace-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 4.5rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.workspace-kpi--primary {
  padding-left: 12px;
  padding-right: 14px;
  border-color: color-mix(in srgb, var(--ok) 22%, var(--line));
  background: color-mix(in srgb, var(--ok) 6%, var(--surface));
}
.workspace-kpi--ok .workspace-kpi-val { color: var(--ok); }
.workspace-kpi--bad .workspace-kpi-val { color: var(--bad); }
.workspace-kpi-val {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.workspace-kpi--primary .workspace-kpi-val {
  font-size: 22px;
}
.workspace-kpi-val small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.workspace-kpi-lab {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.workspace-kpi-lab--block { display: block; margin-bottom: 2px; }
.workspace-kpi--scope,
.workspace-kpi--time {
  flex: 1 1 8rem;
  min-width: 7rem;
  max-width: 14rem;
}
.workspace-kpi-scope {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 10px;
  align-items: stretch;
}
.workspace-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.workspace-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}
.workspace-section-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.workspace-section-hint {
  font-size: 11px;
  color: var(--muted);
  flex: 1 1 auto;
}
.workspace-section-action { margin-left: auto; }
.workspace-section-body {
  padding: 10px 12px 12px;
  flex: 1 1 auto;
  min-height: 0;
}
.workspace-section--logs .workspace-section-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.workspace-page .workspace-live-log-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 auto;
  min-height: 0;
}
.workspace-page .workspace-live-log-scroll {
  max-height: min(340px, 42vh);
  min-height: 200px;
}
.workspace-gantt-block { margin-bottom: 8px; }
.workspace-gantt-note {
  margin: 6px 0 0;
  font-size: 10px;
  color: var(--muted);
}
.workspace-inline-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.workspace-inline-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.workspace-inline-lab {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.workspace-inline-meta {
  font-size: 10px;
  color: var(--muted);
}
.workspace-page .segment {
  height: 10px;
  border-radius: 999px;
}
.workspace-page .binary-cell {
  height: 12px;
  border-radius: 3px;
}
.workspace-page .binary-grid {
  gap: 2px;
}
.workspace-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.workspace-bottom .workspace-section-body .chart svg {
  width: 100%;
  height: auto;
  max-height: 148px;
}
.workspace-loc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}
.workspace-loc-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--speed), border-color var(--speed);
}
.workspace-loc-item:hover {
  background: color-mix(in srgb, var(--brand) 6%, var(--surface-2));
  border-color: var(--line);
}
.workspace-loc-item--active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-2));
  box-shadow: inset 3px 0 0 0 var(--brand);
}
.workspace-loc-name {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-loc-meta {
  grid-column: 1;
  font-size: 10px;
  color: var(--muted);
}
.workspace-loc-pct {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.workspace-loc-bar {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--subtle) 20%, transparent);
  overflow: hidden;
}
.workspace-loc-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--ok) 80%, transparent);
}
.workspace-loc-more {
  padding: 4px 8px;
  font-size: 10px;
  list-style: none;
}
.workspace-bottom .app-list-compact {
  max-height: 220px;
  overflow-y: auto;
}
.workspace-bottom .app-row-compact {
  padding: 6px 8px;
}
.workspace-bottom .app-row-compact .row-title {
  font-size: 12px;
  gap: 6px;
}
.workspace-bottom .app-row-compact strong {
  font-size: 12px;
}

.workspace-uptime-hero {
  border: 1px solid color-mix(in srgb, var(--ok) 28%, var(--line));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--ok) 8%, var(--surface)) 0%,
    var(--surface) 55%
  );
}
.workspace-uptime-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.workspace-uptime-pct {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}
.workspace-uptime-pct small {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}
.workspace-uptime-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.metric-row-compact .fleet-gantt--compact {
  width: 120px;
  height: 28px;
}

.onoff-stack { display: flex; flex-direction: column; gap: 10px; }
.onoff-stack .onoff-meta { margin: 0; }
.onoff-timeline-wrap .chart.chart-binary-line { min-height: 0; margin-top: 0; }

/* 조직 내 설비 리스트: 설비열 ~25ch 말줄임, 컴팩트 컬럼, 그래프 ~2배 너비 */
.data-table-org-eq {
  table-layout: fixed;
  width: 100%;
}
.data-table-org-eq th,
.data-table-org-eq td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.22;
  vertical-align: middle;
  white-space: normal;
}
.data-table-org-eq th {
  font-size: 14px;
  font-weight: 800;
  padding-top: 8px;
  padding-bottom: 8px;
}
.data-table-org-eq .num { white-space: nowrap; }

.data-table-org-eq col.org-eq-col-name { width: 30ch; min-width: 30ch; max-width: 30ch; }
.data-table-org-pc col.org-eq-col-name { width: 30ch; min-width: 30ch; max-width: 30ch; }
.data-table-org-eq col.org-eq-col-status { width: 8.5rem; }
.data-table-org-eq col.org-eq-col-org { width: 16ch; }
.data-table-org-eq col.org-eq-col-loc { width: 10ch; }
/* 그래프 열: 테이블 너비의 약 30%(최소 240px), SVG는 셀 가로 100% 채움 */
.data-table-org-eq col.org-eq-col-spark { width: 30%; }
.data-table-org-eq col.org-eq-col-pct { width: 4.25rem; }
.data-table-org-pc col.org-eq-col-pct { width: 4.25rem; }
.data-table-org-eq col.org-eq-col-log { width: 5.25rem; }
.data-table-org-pc col.org-eq-col-log { width: 5.25rem; }
.data-table-org-pc col.org-eq-col-status { width: 8.5rem; }
.data-table-org-pc col.org-eq-col-org { width: 16ch; }
.data-table-org-pc col.org-eq-col-loc { width: 10ch; }
.data-table-org-pc col.org-eq-col-spark { width: 30%; }

.data-table-org-eq .org-eq-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.data-table-org-eq .cell-eq-name,
.data-table-org-pc .cell-eq-name {
  width: 30ch;
  max-width: 30ch;
  min-width: 30ch;
  overflow: hidden;
  box-sizing: border-box;
}
.data-table-org-eq thead th:first-child,
.data-table-org-pc thead th:first-child,
.data-table-org-eq tbody td:first-child,
.data-table-org-pc tbody td:first-child {
  width: 30ch;
  max-width: 30ch;
  overflow: hidden;
}
.data-table-org-eq .eq-name-line {
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: -0.02em;
}
.data-table-org-eq .eq-id-line { font-size: 11px; margin-top: 1px; }
.data-table-org-eq .org-eq-sub { font-size: 11px; margin-top: 1px; }

.data-table-org-eq .cell-st-compact .st-ago-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
}
.data-table-org-eq .cell-st-compact .st-ago-meta {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}
.data-table-org-eq .cell-st-compact .status-chip {
  min-height: 22px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  gap: 4px;
  flex-shrink: 0;
}
.data-table-org-eq .cell-st-compact .status-chip::before {
  width: 5px;
  height: 5px;
}
.data-table-org-eq .org-eq-org-line {
  font-weight: 700;
  font-size: 12px;
}
.data-table-org-eq .org-eq-center-team {
  font-size: 11px;
  line-height: 1.25;
}

.data-table-org-eq th.th-graph,
.data-table-org-eq td.cell-spark {
  text-align: center;
  min-width: 240px;
}
.data-table-org-eq th.th-graph-with-range {
  vertical-align: middle;
  padding-top: 8px;
  padding-bottom: 8px;
}
.data-table-org-eq th.th-graph .th-graph-head {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.data-table-org-eq th.th-graph .th-sort-label {
  display: inline;
  flex-shrink: 0;
  text-align: center;
}
.data-table-org-eq th.th-graph .th-graph-times {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.data-table-org-eq th.th-graph .th-graph-time-sep {
  opacity: 0.65;
  font-weight: 600;
  padding: 0 1px;
}
.data-table-org-eq th.th-graph .th-graph-time-start,
.data-table-org-eq th.th-graph .th-graph-time-end {
  flex: 0 0 auto;
}
.data-table-org-eq th.th-graph .sort-ind {
  vertical-align: middle;
}
.data-table-org-eq td.cell-spark {
  padding: 4px 6px;
  vertical-align: middle;
}
.data-table-org-eq .cell-spark .spark-binary {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
}
.data-table-org-eq .cell-spark .spark-binary--fill {
  min-width: 0;
}

.table-card:has(.data-table-org-eq),
.table-card:has(.data-table-org-pc) {
  overflow-x: auto;
  max-width: 100%;
}

.inspector {
  position: fixed;
  top: 0;
  right: 0;
  width: min(920px, 96vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 56px color-mix(in srgb, var(--text) 10%, transparent);
  z-index: 14;
  transform: translateX(102%);
  transition: transform 240ms ease, box-shadow 240ms ease;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* 인스펙터 — 메인 테마와 동일 토큰, 살짝만 떠 보이게 */
body[data-theme="dark"] .inspector {
  background: color-mix(in srgb, var(--surface) 96%, var(--bg-soft) 4%);
  border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 56px rgba(0, 0, 0, .34);
}

body[data-theme="white"] .inspector,
body[data-theme="blue"] .inspector {
  background: color-mix(in srgb, var(--surface) 99%, white 1%);
  border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 56px color-mix(in srgb, var(--text) 10%, transparent);
}

body[data-theme="dark"] .inspector.open,
body[data-theme="white"] .inspector.open,
body[data-theme="blue"] .inspector.open {
  box-shadow: -28px 0 64px color-mix(in srgb, var(--text) 14%, transparent);
}

.inspector.open { transform: translateX(0); }

/* 인스펙터 열림 — 메인 영역 살짝 눌림 */
body.inspector-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 13;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 18%, rgba(0, 0, 0, .22));
  animation: inspectorScrimIn 220ms ease;
}
body[data-theme="white"].inspector-open::before,
body[data-theme="blue"].inspector-open::before {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
@keyframes inspectorScrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inspector .inspector-head {
  background: color-mix(in srgb, var(--surface) 94%, var(--brand) 6%);
}
.inspector .inspector-head .eyebrow {
  color: var(--muted);
  font-weight: 600;
}
.inspector .card,
.inspector .table-card {
  background: var(--surface);
  border-color: var(--line);
}
.inspector .icon-btn {
  background: var(--glass);
  border: 1px solid var(--line);
}
.inspector .icon-btn:hover {
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-2));
  border-color: var(--line-strong);
}
.inspector-head {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.inspector-head h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.04em; }
.inspector-body {
  padding: 18px;
  overflow: auto;
  display: grid;
  gap: 14px;
}
.inspector-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.inspector-ago {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.inspector-meta {
  font-size: 12px;
  line-height: 1.35;
  margin-top: -6px;
}
.inspector-log-section .panel-desc {
  font-size: 11px;
}
.inspector-log-wrap {
  padding: 0;
  overflow: hidden;
}
.data-table-inspector-logs {
  width: 100%;
  font-size: 11px;
  table-layout: fixed;
}
.data-table-inspector-logs th,
.data-table-inspector-logs td {
  padding: 7px 8px;
  vertical-align: top;
}
.data-table-inspector-logs .col-inspector-ts,
.data-table-inspector-logs .th-inspector-ts,
.data-table-inspector-logs .inspector-log-ts {
  width: 108px;
  max-width: 108px;
}
.data-table-inspector-logs .col-inspector-ch,
.data-table-inspector-logs .th-inspector-ch {
  width: 64px;
  max-width: 64px;
}
.data-table-inspector-logs .col-inspector-payload,
.data-table-inspector-logs .th-inspector-payload,
.data-table-inspector-logs .td-payload {
  width: auto;
  max-width: none;
}
.data-table-inspector-logs .inspector-log-ts {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.data-table-inspector-logs th.th-inspector-ch,
.data-table-inspector-logs .inspector-log-ch {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table-inspector-logs .payload-code-brief {
  font-size: 10px;
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
  max-height: 4.2em;
  overflow: hidden;
}

.inspector-row-active td {
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-2)) !important;
  box-shadow: inset 3px 0 0 0 var(--brand);
}
.inspector-row-active:hover td {
  background: color-mix(in srgb, var(--brand) 16%, var(--glass)) !important;
}
@media (max-width: 720px) {
  .inspector .info-grid--split {
    grid-template-columns: 1fr;
  }
}
.info-grid { display: grid; gap: 8px; }
.inspector .info-grid--split {
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.inspector .info-grid-col {
  display: grid;
  gap: 0;
  min-width: 0;
}
.inspector .info-grid-col .info-line:last-child {
  border-bottom: 0;
}
.info-line {
  display: grid;
  grid-template-columns: minmax(72px, 38%) 1fr;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.info-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.info-line strong {
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.info-line span { color: var(--muted); }
.info-line strong { overflow-wrap: anywhere; }
.empty-state {
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  background: var(--glass);
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.45);
  padding: 20px;
}
/* [hidden]은 UA 기본 display:none인데, 위 display:grid가 이겨서 닫기가 동작하지 않음 → 명시 */
.modal-backdrop[hidden] {
  display: none !important;
  pointer-events: none;
}
.modal {
  width: min(720px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
/* 요약 모달: .modal(720px)과 동일 특이도·뒤에 선언해야 넓이가 적용됨 */
.modal.modal--summary {
  width: min(1480px, 92vw);
  max-width: 92vw;
  max-height: min(92vh, 960px);
  min-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
}
.modal.modal--summary .modal-body.summary-modal-body {
  color: var(--text);
}
.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h2 { margin: 0; }
.modal-body {
  padding: 20px;
  color: var(--muted);
  line-height: 1.75;
}
.modal-body li { margin: 8px 0; }

.data-updated-flash {
  animation: flashUpdate 1200ms ease;
}
.row-data-updated td,
.log-row-live td,
.app-row.row-data-updated {
  animation: rowFlash 1200ms ease;
}
@keyframes flashUpdate {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-2) 60%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand-2) 12%, transparent); }
  100% { box-shadow: var(--shadow-soft); }
}
@keyframes rowFlash {
  0% { background: color-mix(in srgb, var(--brand-2) 18%, transparent); }
  100% { background: transparent; }
}

.text-ok { color: var(--ok); }
.text-delay { color: var(--delay); }
.text-bad { color: var(--bad); }
.text-muted { color: var(--muted); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

@media (max-width: 1440px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .workspace-layout,
  .workspace-bottom,
  .workspace-inline-stats { grid-template-columns: 1fr; }
  .workspace-kpi--scope,
  .workspace-kpi--time { max-width: none; }
  .span-2, .span-3, .span-4 { grid-column: auto; }
  .filter-strip--inline label {
    min-width: 64px;
    max-width: none;
    flex: 1 1 calc(50% - 4px);
  }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .main { height: auto; overflow: visible; padding: 12px 14px 24px; }
  .app-header-row--toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .header-toolbar-source {
    grid-column: 1;
    justify-self: stretch;
  }
  .header-page-tabs {
    grid-column: 1;
    justify-self: center;
    justify-content: center;
    overflow-y: hidden;
  }
  .main-chrome-sticky {
    margin: -12px -14px 10px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .app-header-row--brand {
    --header-brand-h: 62px;
    margin-left: -14px;
    margin-right: -14px;
  }
  .header-brand-center.brand {
    max-width: min(72vw, 360px);
    padding: 0 8px;
  }
  .header-brand-right-cluster {
    max-width: min(72vw, 360px);
    flex-wrap: nowrap;
    gap: 4px;
  }
  .header-brand-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 4px;
    max-width: calc(100% - 76px);
  }
  .header-brand-actions .ghost-btn,
  .header-brand-actions .primary-btn {
    min-height: 30px;
    font-size: 11px;
    padding: 0 6px;
  }
  .header-brand-actions .theme-tabs {
    height: 30px;
    font-size: 11px;
  }
  .header-brand-center .brand-title {
    font-size: 18px;
  }
  .header-brand-center .brand-subtitle {
    font-size: 12px;
  }
  .header-corner-logo {
    max-width: min(40vw, 140px);
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar-main {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .filter-bar .searchbox--filter-bar {
    flex: 1 1 100%;
    width: 100%;
  }
  .filter-strip--inline {
    flex: 1 1 100%;
    min-width: 0;
    flex-wrap: wrap;
  }
  .filter-strip--inline label {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
  }
  .filter-bar-main .filter-bar-crumb.crumbs {
    margin-left: 0;
    width: 100%;
    text-align: right;
  }
  .filter-strip { grid-template-columns: 1fr; }
  .contextbar { flex-direction: column; align-items: stretch; }
  .location-grid { grid-template-columns: 1fr; }
  .org-gauge-strip { flex-wrap: nowrap; overflow-x: auto; }
  .chamber-center-banner { width: 100%; min-width: 0; }
}

/* —— 통합 요약 (인증·교정) —— */
.content:has(.summary-page) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - 200px);
  gap: 0;
  padding-bottom: 8px;
}
.summary-page {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 12px;
  min-height: auto;
}
.summary-period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.summary-period-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.summary-period-bar-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.summary-period-toggle .filter-toggle-btn {
  min-width: 3.25rem;
}
.summary-period-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  flex: 1 1 12rem;
}
.summary-groups-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  flex: 0 0 auto;
  min-height: auto;
}
.summary-groups-grid--single {
  grid-template-columns: 1fr;
}
.summary-group-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px 20px;
  min-height: auto;
  overflow: visible;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--group-accent, var(--brand)) 22%, var(--line));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface) 92%, var(--group-accent, var(--brand)) 8%) 0%,
    var(--surface) 48%
  );
  box-shadow:
    0 1px 0 var(--glass-shine) inset,
    0 12px 32px color-mix(in srgb, var(--text) 4%, transparent);
}
.summary-group-col--placeholder,
.summary-group-col--empty {
  opacity: 0.55;
  border-style: dashed;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.summary-group-head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}
.summary-group-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.summary-group-title-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.summary-group-title-btn:hover {
  color: var(--group-accent, var(--brand));
}
.summary-group-title-btn--active {
  color: var(--group-accent, var(--brand));
  text-decoration: underline;
  text-underline-offset: 4px;
}
.summary-group-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.summary-delta {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.summary-delta--up {
  color: #0d9488;
  background: color-mix(in srgb, #14b8a6 14%, transparent);
}
.summary-delta--down {
  color: #dc2626;
  background: color-mix(in srgb, #ef4444 12%, transparent);
}
.summary-delta--muted {
  color: var(--muted);
  background: color-mix(in srgb, var(--subtle) 12%, transparent);
}
.summary-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 auto;
  min-height: auto;
  gap: 14px;
  padding: 4px 0 6px;
  width: 100%;
  overflow: visible;
}
.summary-hero-main {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: start;
  width: 100%;
}
.summary-hero-gauge {
  width: min(100%, 260px);
  justify-self: center;
  flex-shrink: 0;
  line-height: 0;
}
.summary-trend {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.summary-trend-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.summary-trend-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.summary-trend-range {
  font-size: 11px;
  color: var(--muted);
}
.summary-trend .chart {
  width: 100%;
}
.summary-trend-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.summary-donut {
  display: block;
  width: 100%;
  height: auto;
  max-width: 260px;
}
.summary-donut-track {
  stroke: color-mix(in srgb, var(--subtle) 30%, transparent);
}
.summary-donut-fill {
  transition: stroke-dashoffset 0.45s ease;
}
.summary-donut-pct {
  font-size: 40px;
  font-weight: 800;
  fill: var(--text);
  letter-spacing: -0.04em;
}
.summary-donut-unit {
  font-size: 18px;
  font-weight: 700;
  fill: var(--muted);
}
.summary-donut-lab {
  font-size: 12px;
  font-weight: 600;
  fill: var(--muted);
}
.summary-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.summary-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  min-width: 0;
}
.summary-kpi-lab {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.summary-kpi-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.summary-kpi-val small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}
.summary-kpi--ok .summary-kpi-val { color: var(--ok); }
.summary-kpi--delay .summary-kpi-val { color: var(--delay); }
.summary-kpi--bad .summary-kpi-val { color: var(--bad); }
.summary-kpi--total .summary-kpi-val { color: var(--text); }
.summary-centers-block {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
  min-height: 0;
}
.summary-centers-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}
.summary-centers-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.summary-centers-hint {
  font-size: 12px;
  color: var(--muted);
}
.summary-center-grid {
  display: grid;
  gap: 12px;
}
.summary-center-grid--row4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 1fr;
}
.summary-centers-more {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.summary-center-card {
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color var(--speed), box-shadow var(--speed);
}
.summary-center-card:hover {
  border-color: color-mix(in srgb, var(--center-accent, var(--brand)) 40%, var(--line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--center-accent, var(--brand)) 10%, transparent);
}
.summary-center-card--active {
  border-color: color-mix(in srgb, var(--center-accent, var(--brand)) 55%, var(--line));
  box-shadow: inset 3px 0 0 0 var(--center-accent, var(--brand));
}
.summary-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.summary-center-name {
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-center-link {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.summary-center-pct {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 8px 0 6px;
  color: var(--center-accent, var(--brand));
}
.summary-center-pct small {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.summary-center-bar {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--subtle) 22%, transparent);
  overflow: hidden;
  margin-bottom: 8px;
}
.summary-center-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--center-accent, var(--brand)) 82%, white 4%);
}
.summary-center-foot {
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
}
.summary-page-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 4px 0;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
@media (max-width: 1280px) {
  .summary-hero-main {
    grid-template-columns: 1fr;
  }
  .summary-hero-gauge {
    width: min(72vw, 260px);
    margin: 0 auto;
  }
  .summary-center-grid--row4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }
}
@media (max-width: 1100px) {
  .summary-groups-grid {
    grid-template-columns: 1fr;
  }
  .summary-page,
  .content:has(.summary-page) {
    min-height: auto;
  }
  .summary-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .summary-center-grid--row4 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .summary-kpi-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— 조직 보드 —— */
.org-board-page {
  display: block;
}
.org-board-split {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 5.5fr);
  gap: 16px;
  align-items: start;
}
.org-board-col {
  min-width: 0;
}
.org-board-col--gauges .panel {
  position: sticky;
  top: 8px;
}
.org-board-col--gauges .org-gauge-strip {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
}
.org-board-col--gauges .org-gauge-card {
  flex: 0 1 160px;
  min-width: 150px;
  max-width: 220px;
  width: auto;
}
/* 챔버 모니터링: 패널 안쪽 스크롤 없음 — 카드 전체 높이 노출, .main 페이지 스크롤 */
.org-board-col--chamber .panel {
  overflow: visible;
  height: auto;
}
.org-board-col--chamber .panel-body {
  max-height: none;
  height: auto;
  overflow: visible;
  padding-right: 16px;
}
.org-board-col--chamber .chamber-status-wall {
  overflow: visible;
}
@media (max-width: 1100px) {
  .org-board-split {
    grid-template-columns: 1fr;
  }
  .org-board-col--gauges .panel {
    position: static;
  }
}
.org-board-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
}
.org-board-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.org-gauge-section {
  margin-bottom: 20px;
}
.org-gauge-section:last-child {
  margin-bottom: 0;
}
.org-gauge-section-head {
  margin-bottom: 10px;
}
.org-gauge-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.org-gauge-section-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.org-gauge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.org-gauge-card {
  flex: 1 1 160px;
  min-width: 150px;
  max-width: 220px;
  text-align: left;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--brand));
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: box-shadow var(--speed), border-color var(--speed), transform var(--speed);
}
.org-gauge-card:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent, var(--brand)) 18%, transparent);
  transform: translateY(-1px);
}
.org-gauge-card-active {
  border-color: color-mix(in srgb, var(--accent, var(--brand)) 55%, var(--line));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent),
    0 8px 22px color-mix(in srgb, var(--accent, var(--brand)) 18%, transparent);
  transform: translateY(-1px);
}
.org-gauge-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.org-gauge-card-pct {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--accent, var(--brand));
}
.org-gauge-card-pct small {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.85;
}
.org-gauge-card-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  overflow: hidden;
}
.org-gauge-card-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, var(--brand));
}
.org-gauge-card-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.chamber-status-wall {
  display: flex;
  flex-direction: column;
  gap: 14px;
  --chamber-team-badge-px: 96px;
}
.chamber-center-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 5px solid var(--row-accent, var(--brand));
  background: var(--surface);
}
.chamber-center-row--active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--row-accent, var(--brand)) 25%, transparent);
}
.chamber-center-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.chamber-center-title {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font: inherit;
  width: 100%;
}
.chamber-center-title strong {
  font-size: clamp(15px, 1.05rem, 18px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.chamber-center-pct {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  opacity: 0.82;
  font-variant-numeric: tabular-nums;
}
.chamber-center-pct::before {
  content: "·";
  margin-right: 10px;
  opacity: 0.45;
  font-weight: 700;
}
.chamber-center-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  overflow: hidden;
}
.chamber-center-bar > span {
  display: block;
  height: 100%;
  background: var(--row-accent, var(--brand));
  border-radius: inherit;
}
.chamber-center-teams {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chamber-team-block {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}
.chamber-team-card {
  flex: 0 0 var(--chamber-team-badge-px);
  min-width: var(--chamber-team-badge-px);
  max-width: var(--chamber-team-badge-px);
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 8px 9px 9px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--team-badge-accent, var(--muted)) 40%, var(--line));
  border-left: 4px solid var(--team-badge-accent, var(--muted));
  background: color-mix(in srgb, var(--team-badge-accent, var(--muted)) 16%, var(--surface));
}
.chamber-team-card-name {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.22;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.chamber-team-card-gauge {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}
.chamber-team-card-pct {
  font-size: clamp(14px, 2.3vw, 16px);
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.04em;
  line-height: 1;
  color: color-mix(in srgb, var(--team-badge-accent, var(--brand)) 82%, var(--text));
}
.chamber-team-card-pct small {
  font-size: 10px;
  font-weight: 800;
  opacity: 0.88;
  margin-left: 1px;
}
.chamber-team-card-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  overflow: hidden;
}
.chamber-team-card-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--team-badge-accent, var(--brand)),
    color-mix(in srgb, var(--team-badge-accent, var(--brand)) 68%, transparent)
  );
}
.chamber-team-block--center-active .chamber-team-card {
  background: color-mix(
    in srgb,
    var(--team-badge-accent, var(--muted)) 22%,
    color-mix(in srgb, var(--row-accent, var(--brand)) 10%, var(--surface))
  );
  border-color: color-mix(in srgb, var(--team-badge-accent, var(--muted)) 45%, var(--line));
  border-left-color: var(--team-badge-accent, var(--muted));
}
.chamber-team-block--center-active .chamber-team-card-name {
  font-weight: 900;
}
.chamber-team-block--center-active {
  padding: 8px 10px 8px 10px;
  margin: 0;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--row-accent, var(--brand)) 10%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--row-accent, var(--brand)) 22%, transparent);
}
.chamber-chip-grid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chamber-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 6px 8px 6px;
  min-height: 0;
  width: min(100%, 252px);
  min-width: 208px;
  font-size: inherit;
  font-weight: inherit;
  cursor: default;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.chamber-chip:hover {
  transform: none;
}
.chamber-chip-spark-btn {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 4px 6px 3px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.chamber-chip-spark-btn:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}
.chamber-chip-spark-btn:hover {
  filter: brightness(1.08) saturate(1.05);
}
.chamber-chip-spark-btn:active {
  transform: scale(0.99);
}
.chamber-chip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chamber-chip-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1;
  text-align: left;
}
.chamber-chip-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chamber-chip-pct {
  flex: 0 0 auto;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chamber-chip-label,
.chamber-chip-pct {
  font-family: var(--font);
  font-size: clamp(15px, 1.05rem, 17px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.chamber-chip--on .chamber-chip-spark-btn {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.58) 100%);
  border-color: rgba(0, 0, 0, 0.35);
}
.chamber-chip--off .chamber-chip-spark-btn {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(0, 0, 0, 0.65) 100%);
  border-color: rgba(255, 255, 255, 0.14);
}
.chamber-chip-spark-btn .spark-binary {
  display: block;
  width: 100%;
  height: 42px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
.chamber-chip--on .chamber-chip-spark-btn .spark-binary path {
  stroke: #fde047 !important;
  stroke-width: 2.6 !important;
}
.chamber-chip--off .chamber-chip-spark-btn .spark-binary path {
  stroke: #f87171 !important;
  stroke-width: 2.6 !important;
}
.chamber-chip--on .chamber-chip-spark-btn .spark-axis-text {
  fill: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 10px;
}
.chamber-chip--off .chamber-chip-spark-btn .spark-axis-text {
  fill: #fecaca;
  font-weight: 700;
  font-size: 10px;
}
.chamber-chip--on .chamber-chip-label,
.chamber-chip--on .chamber-chip-pct {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}
.chamber-chip--off .chamber-chip-label,
.chamber-chip--off .chamber-chip-pct {
  color: #f9fafb;
}
.chamber-chip--on {
  background: linear-gradient(145deg, #34d399, #16a34a 55%, #15803d);
  color: #fff;
  border-color: color-mix(in srgb, #4ade80 70%, white);
  animation: chamber-chip-live-glow 2.2s ease-in-out infinite;
}
.chamber-chip--on:hover {
  filter: brightness(1.05);
}
.chamber-chip--off {
  background: linear-gradient(180deg, #6b7280, #4b5563);
  color: #e5e7eb;
  border-color: #9ca3af;
  opacity: 0.92;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}
.chamber-chip--off:hover {
  opacity: 1;
}
.chamber-chip-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chamber-chip--on .chamber-chip-dot {
  background: #ef4444;
  box-shadow:
    0 0 0 3px rgba(254, 202, 202, 0.55),
    0 0 10px rgba(239, 68, 68, 0.75);
  animation: chamber-dot-pulse 1.4s ease-in-out infinite;
}
.chamber-chip--on .chamber-chip-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(248, 113, 113, 0.85);
  animation: chamber-dot-ring 1.8s ease-out infinite;
}
.chamber-chip--off .chamber-chip-dot {
  background: transparent;
  border: 3px solid #9ca3af;
}
@keyframes chamber-chip-live-glow {
  0%, 100% {
    box-shadow:
      0 0 0 0 color-mix(in srgb, #4ade80 45%, transparent),
      0 6px 20px color-mix(in srgb, #16a34a 40%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 8px color-mix(in srgb, #4ade80 12%, transparent),
      0 10px 28px color-mix(in srgb, #16a34a 55%, transparent);
  }
}
@keyframes chamber-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.9; }
}
@keyframes chamber-dot-ring {
  0% { transform: scale(0.65); opacity: 0.85; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chamber-chip--on {
    animation: none;
    box-shadow: 0 6px 20px color-mix(in srgb, #16a34a 40%, transparent);
  }
  .chamber-chip--on .chamber-chip-dot,
  .chamber-chip--on .chamber-chip-dot::after {
    animation: none;
  }
}

/* 금일 버킷 · 분해 스택 간트 */
.fleet-gantt-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.fleet-gantt-stack--empty .empty-state {
  margin: 0;
}

.fleet-gantt-stack-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fleet-gantt-stack-label {
  flex: 0 0 132px;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-gantt-stack-row .fleet-gantt--row {
  flex: 1;
  min-width: 0;
  display: block;
}

.fleet-gantt-stack-axis {
  display: block;
  margin-top: 4px;
  max-width: 100%;
}

/* —— 기간 분석 페이지 —— */
.trends-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trends-page--mockup > .trends-toolbar {
  margin-bottom: 0;
}
.trends-mockup-top {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  gap: 12px;
  align-items: stretch;
}
.trends-mock-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.trends-mock-side .panel {
  flex: 1;
  min-height: 0;
}
.trends-mockup-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.trends-mock-gantt .panel-body {
  padding-top: 8px;
}
.trends-toolbar-note {
  margin: 0;
  font-size: 12px;
  align-self: center;
  flex: 1;
  min-width: 200px;
}
.trends-toolbar-note strong {
  color: var(--text);
}
.trends-side-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.trends-side-table th,
.trends-side-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.trends-side-table .num {
  text-align: right;
  white-space: nowrap;
}
.trends-pick-row {
  cursor: pointer;
}
.trends-pick-row:hover {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.trends-low-bar {
  min-width: 72px;
}
.trends-low-bar span {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f87171, #fbbf24 40%, #34d399);
  max-width: 100%;
}
.trends-alarm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trends-alarm-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 6px 8px;
  align-items: center;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.trends-alarm-item:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}
.trends-alarm-time {
  color: var(--muted);
  font-weight: 700;
}
.trends-alarm-eq {
  font-weight: 800;
  color: var(--text);
}
.trends-alarm-msg {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}
.trends-alarm-st {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}
.trends-alarm-st--bad {
  background: color-mix(in srgb, #ef4444 18%, transparent);
  color: #b91c1c;
}
.trends-alarm-st--ok {
  background: color-mix(in srgb, #22c55e 16%, transparent);
  color: #15803d;
}
.trends-alarm-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
}
.trends-cal-month-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trends-cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.trends-cal-month-nav strong {
  font-size: 14px;
}
.trends-cal-mo-cell--selected {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  z-index: 1;
}
.trends-cal-mo-cell[data-trends-cal-day] {
  cursor: pointer;
}
.trends-mock-hourly-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trends-hourly-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.trends-base-donuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.trends-base-donut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.trends-mini-donut {
  position: relative;
  width: 72px;
  height: 72px;
}
.trends-mini-donut-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.trends-mini-donut-track {
  stroke: color-mix(in srgb, var(--line) 70%, transparent);
}
.trends-mini-donut-fill {
  stroke: var(--brand);
}
.trends-base-donut-meta strong {
  display: block;
  font-size: 12px;
}
.trends-base-donut-meta span {
  font-size: 10px;
  color: var(--muted);
}
.trends-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.trends-detail-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.trends-detail-tab {
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
}
.trends-detail-tab.active {
  background: var(--brand);
  color: #fff;
}
.trends-detail-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
}
.trends-detail-kpis span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
}
.trends-detail-kpis strong {
  font-size: 15px;
}
.trends-detail-avg-line {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.trends-gantt-row--active .trends-gantt-row-label {
  color: var(--brand);
  font-weight: 800;
}
.trends-gantt-row[data-trends-pick-eq] {
  cursor: pointer;
}
.trends-gantt-row-track {
  background: color-mix(in srgb, var(--muted) 22%, transparent);
}
.trends-gantt-seg--alarm {
  background: #ef4444;
  z-index: 2;
}
.trends-gantt-seg--maint {
  background: #eab308;
  z-index: 2;
}
.trends-gantt-swatch--alarm {
  background: #ef4444;
}
.trends-gantt-swatch--maint {
  background: #eab308;
}
@media (max-width: 1200px) {
  .trends-mockup-top {
    grid-template-columns: 1fr;
  }
  .trends-mockup-bottom {
    grid-template-columns: 1fr;
  }
}
.trends-page--ops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  align-items: start;
}
.trends-page--ops > .trends-toolbar,
.trends-page--ops > .trends-summary-strip {
  grid-column: 1 / -1;
}
.trends-toolbar {
  margin-bottom: 12px;
}
.trends-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 22px;
}
.trends-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.trends-field span {
  letter-spacing: -0.02em;
}
.trends-field input[type="date"],
.trends-field select {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
.trends-toolbar-hint {
  margin: 12px 0 0;
  line-height: 1.5;
}
.trends-toolbar-hint strong {
  font-weight: 800;
  color: var(--text);
}
.trends-page-intro code.mono-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0 0.2em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--line) 48%, transparent);
}
.trends-grid-pair .panel {
  min-width: 0;
}
@media (max-width: 900px) {
  .trends-grid-pair {
    grid-template-columns: 1fr;
  }
}
.trends-chart-host {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.trends-chart-host .chart.chart--fluid svg {
  width: 100%;
}
.trends-gantt-host {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.trends-gantt-host::-webkit-scrollbar {
  display: none;
}

/* 기간 분석 — 관제 목업형 */
.trends-page--ops .panel--chart .panel-body {
  background: color-mix(in srgb, var(--surface) 92%, #0b1220 8%);
}
.trends-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 12px;
  align-items: flex-end;
}
.trends-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 88px;
}
.trends-summary-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.trends-summary-value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.trends-gantt-wall {
  position: relative;
  --trends-gantt-label-w: 150px;
  --trends-gantt-row-h: 26px;
}
.trends-gantt-axis {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.trends-gantt-axis-spacer {
  flex: 0 0 var(--trends-gantt-label-w);
  min-width: var(--trends-gantt-label-w);
}
.trends-gantt-axis-times {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: space-between;
  min-height: 18px;
}
.trends-gantt-now-tag {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  color: #f87171;
  white-space: nowrap;
}
.trends-gantt-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
}
.trends-gantt-body::-webkit-scrollbar {
  display: none;
}
.trends-gantt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--trends-gantt-row-h);
}
.trends-gantt-row-label {
  flex: 0 0 var(--trends-gantt-label-w);
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.trends-gantt-row-track {
  position: relative;
  flex: 1;
  height: 18px;
  border-radius: 4px;
  background: color-mix(in srgb, #64748b 55%, #1e293b);
  overflow: hidden;
}
.trends-gantt-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}
.trends-gantt-seg--on {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  box-shadow: 0 0 8px color-mix(in srgb, #22c55e 45%, transparent);
}
.trends-gantt-now-line {
  pointer-events: none;
  position: absolute;
  top: 32px;
  bottom: 36px;
  left: calc(var(--trends-gantt-label-w) + 8px);
  width: calc(100% - var(--trends-gantt-label-w) - 8px);
  z-index: 2;
}
.trends-gantt-now-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--trends-now-ratio, 0.5) * 100%);
  width: 2px;
  margin-left: -1px;
  background: #ef4444;
  box-shadow: 0 0 10px color-mix(in srgb, #ef4444 65%, transparent);
}
.trends-gantt-more {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.trends-gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.trends-gantt-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -2px;
}
.trends-gantt-swatch--on { background: #22c55e; }
.trends-gantt-swatch--off { background: #64748b; }
.trends-gantt-swatch--now { background: #ef4444; width: 3px; border-radius: 1px; }

.trends-cal-month { width: 100%; max-width: 100%; }
.trends-cal-mo-head,
.trends-cal-mo-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.trends-cal-mo-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  padding: 4px 0;
}
.trends-cal-mo-cell {
  aspect-ratio: 1;
  min-height: 52px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
}
.trends-cal-mo-cell--pad {
  background: transparent;
  border-color: transparent;
  min-height: 0;
}
.trends-cal-mo-day {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 70%, transparent);
}
.trends-cal-mo-pct {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.trends-cal-mo-cell--hi { background: color-mix(in srgb, #15803d 88%, #052e16); color: #ecfdf5; }
.trends-cal-mo-cell--mid-hi { background: color-mix(in srgb, #22c55e 75%, #14532d); color: #f0fdf4; }
.trends-cal-mo-cell--mid { background: color-mix(in srgb, #eab308 70%, #422006); color: #fffbeb; }
.trends-cal-mo-cell--low { background: color-mix(in srgb, #f97316 65%, #431407); color: #fff7ed; }
.trends-cal-mo-cell--crit { background: color-mix(in srgb, #ef4444 72%, #450a0a); color: #fef2f2; }
.trends-cal-mo-cell--none { background: color-mix(in srgb, var(--surface-2) 90%, transparent); color: var(--muted); }
.trends-cal-mo-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.trends-cal-mo-scale-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #eab308, #22c55e, #15803d);
}

.trends-line-panel { display: flex; flex-direction: column; gap: 10px; }
.trends-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.trends-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  border: 1px solid var(--line);
}
.trends-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.trends-line-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.trends-line-pager-meta {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.trends-line-pager-btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.trends-page--ops .panel.span-2,
.trends-page--ops .trends-grid-pair .panel:first-child:last-child {
  grid-column: 1 / -1;
}

.trends-cal-heatmap-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.45;
}
.trends-cal-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 6px;
  max-width: 520px;
}
.trends-cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--brand, #3b82f6) calc(var(--u, 0) * 1%), var(--surface));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 12%, transparent);
  cursor: default;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px;
}
body[data-theme="dark"] .trends-cal-cell,
body[data-theme="white"] .trends-cal-cell {
  color: color-mix(in srgb, var(--text) 92%, transparent);
}
@media (max-width: 520px) {
  .trends-cal-heatmap-grid {
    grid-template-columns: repeat(7, minmax(28px, 1fr));
    max-width: none;
  }
  .trends-cal-cell {
    font-size: 9px;
  }
}
