:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --sidebar: #22334a;
  --sidebar-soft: #2b3e57;
  --text: #26364a;
  --muted: #6f7d90;
  --subtle: #8190a3;
  --border: #e3e9f0;
  --border-strong: #d4dee8;
  --primary: #4f87c7;
  --primary-dark: #3b70ad;
  --cyan: #5daeb5;
  --indigo: #7b82bd;
  --orange: #d7a164;
  --green: #55a584;
  --red: #d97676;
  --yellow: #d0a154;
  --shadow: 0 18px 50px rgba(45, 66, 94, 0.075);
  --shadow-soft: 0 8px 24px rgba(45, 66, 94, 0.055);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-width: 236px;
  --topbar-height: 68px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button, select { cursor: pointer; }

button { color: inherit; }

button, input, select, textarea { outline: none; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(79, 135, 199, .22);
  outline-offset: 2px;
}

h1, h2, h3, p { margin-top: 0; }

h1 { margin-bottom: 7px; font-size: clamp(25px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 3px; font-size: 17px; line-height: 1.35; letter-spacing: -.015em; }
p { color: var(--muted); }

.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon.tiny { width: 14px; height: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  color: #dce6f0;
  background:
    radial-gradient(circle at 12% 7%, rgba(105, 169, 211, .15), transparent 27%),
    linear-gradient(180deg, #26384f 0%, #1d2c40 100%);
  box-shadow: 14px 0 38px rgba(34, 49, 70, .1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-height);
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand strong { display: block; color: #fff; font-size: 18px; letter-spacing: .01em; }
.brand small { display: block; margin-top: -1px; color: #8ca0bd; font-size: 10px; font-weight: 700; letter-spacing: .12em; }

.brand-mark { position: relative; width: 34px; height: 34px; flex: 0 0 auto; transform: rotate(45deg); border-radius: 10px; background: linear-gradient(135deg, #67c3bc, #5689c8); box-shadow: 0 8px 18px rgba(70, 128, 180, .24); }
.brand-mark span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: white; }
.brand-mark span:nth-child(1) { top: 8px; left: 8px; }
.brand-mark span:nth-child(2) { right: 8px; bottom: 8px; }
.brand-mark span:nth-child(3) { top: 8px; right: 8px; opacity: .58; }

.workspace-card {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 18px 14px 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: rgba(255,255,255,.045);
}

.workspace-card small, .workspace-card strong { display: block; }
.workspace-card small { color: #91a2b8; font-size: 10px; }
.workspace-card strong { overflow: hidden; color: #dce7f6; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 9px; color: #99dfda; background: rgba(103,195,188,.13); font-weight: 800; }
.workspace-badge { padding: 3px 6px; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; color: #b1e7e3; background: rgba(103,195,188,.1); font-size: 10px; font-weight: 750; }

.nav-list { flex: 1; overflow-y: auto; padding: 6px 12px 20px; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin: 3px 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: #a7b5c7;
  background: transparent;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item:hover { color: #f1f6fb; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(91,146,200,.28), rgba(102,190,184,.09)); box-shadow: inset 3px 0 #77c7c1; }
.nav-item.active .icon { color: #9bded9; }
.nav-item span:nth-child(2) { flex: 1; }
.nav-count, .nav-dot { min-width: 24px; padding: 1px 7px; border-radius: 999px; font-size: 10px; text-align: center; }
.nav-count { color: #8192ad; background: rgba(255,255,255,.06); }
.nav-dot { color: #ffd5d5; background: rgba(232,83,83,.24); }
.nav-label, .nav-section-label { padding: 22px 12px 6px; color: #71839a; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.sidebar-footer { margin: auto 14px 14px; padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.035); }
.server-health { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 13px; }
.server-health strong, .server-health small { display: block; }
.server-health strong { color: #dfe9f7; font-size: 12px; }
.server-health small, .sidebar-footer > small { color: #8293ae; font-size: 10px; }
.pulse-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #27ce8c; box-shadow: 0 0 0 5px rgba(39,206,140,.1); animation: pulse 2.4s infinite; }
.pulse-dot.offline { background: #f0a241; box-shadow: 0 0 0 5px rgba(240,162,65,.1); animation: none; }
.resource-line { display: flex; justify-content: space-between; color: #91a1bb; font-size: 11px; }
.resource-line strong { color: #afbed1; }
.progress { height: 4px; margin: 7px 0 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1cc4cc, #277cff); }
.progress.capacity i { background: linear-gradient(90deg, #19c2ca, #7b70e6); }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; height: var(--topbar-height); align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid rgba(218,226,237,.86); background: rgba(255,255,255,.92); box-shadow: 0 4px 18px rgba(50,70,98,.035); backdrop-filter: blur(15px); }
.topbar-left, .topbar-actions, .breadcrumb, .heading-actions { display: flex; align-items: center; }
.breadcrumb { gap: 8px; color: var(--subtle); font-size: 12px; }
.breadcrumb strong { color: #49566b; }
.topbar-actions { gap: 11px; }

.global-search, .table-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-soft); transition: border .18s ease, box-shadow .18s ease; }
.global-search { width: min(320px, 28vw); height: 38px; padding: 0 9px 0 12px; border-radius: 9px; }
.global-search:focus-within, .table-search:focus-within { border-color: rgba(22,119,255,.45); box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.global-search .icon, .table-search .icon { width: 17px; color: #8491a5; }
.global-search input, .table-search input { min-width: 0; flex: 1; border: 0; color: var(--text); background: transparent; }
.global-search input::placeholder, .table-search input::placeholder { color: #9ba6b6; }
kbd { padding: 2px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; color: #8f9bad; background: #fff; font-size: 9px; font-family: inherit; }

.icon-button { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: #5b687c; background: #fff; }
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.notification-button { position: relative; }
.notification-button span { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid white; border-radius: 99px; color: white; background: var(--red); font-size: 9px; line-height: 13px; }
.mobile-menu { display: none; }
.mobile-search { display: none; }
.fuxa-entry { color: #3e5c82; text-decoration: none; white-space: nowrap; }

.user-menu { display: flex; align-items: center; gap: 9px; padding: 2px 5px 2px 3px; border: 0; border-radius: 9px; background: transparent; }
.user-menu:hover { background: var(--surface-soft); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #5f83c2, #62aeb5); font-size: 12px; font-weight: 700; }
.user-copy { min-width: 65px; text-align: left; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { font-size: 11px; }
.user-copy small { color: var(--subtle); font-size: 9px; }

.content-wrap { width: min(1540px, 100%); margin: 0 auto; padding: 29px 30px 45px; }
.mode-banner { display: flex; align-items: center; gap: 13px; margin: 16px 30px 0; padding: 12px 15px; border: 1px solid #f0d7ac; border-radius: 11px; color: #724d14; background: linear-gradient(90deg, #fff8e8, #fffdf7); box-shadow: 0 4px 14px rgba(99,68,17,.05); }
.mode-banner[hidden] { display: none; }
[data-demo-only][hidden] { display: none !important; }
.mode-banner.mode-error { border-color: #efc3c3; color: #8e3333; background: #fff4f4; }
.mode-banner-icon { display: grid; min-width: 54px; height: 30px; padding: 0 8px; place-items: center; border-radius: 7px; color: #fff; background: #d68a20; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.mode-error .mode-banner-icon { background: #d65353; }
.mode-banner > div { min-width: 0; flex: 1; }
.mode-banner strong { display: block; font-size: 13px; }
.mode-banner p { margin: 1px 0 0; color: inherit; font-size: 12px; opacity: .82; }
.mode-banner-state { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; background: rgba(214,138,32,.1); font-size: 11px; font-weight: 700; }
.view { display: none; animation: fade-in .22s ease; }
.view.active { display: block; }
.page-heading { margin-bottom: 24px; }
.page-heading p { max-width: 650px; margin-bottom: 0; }
.heading-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.heading-actions { flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.eyebrow { display: block; margin-bottom: 7px; color: #738198; font-size: 11px; font-weight: 800; letter-spacing: .12em; }

.primary-button, .secondary-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; font-weight: 650; transition: transform .16s ease, background .16s ease, border .16s ease; }
.primary-button { min-height: 38px; padding: 8px 15px; border: 1px solid var(--primary); color: #fff; background: linear-gradient(180deg, #5b92cf, #467dbb); box-shadow: 0 6px 14px rgba(69,123,183,.16); }
.primary-button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.primary-button .icon { width: 17px; }
.secondary-button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--border-strong); color: #536176; background: #fff; }
.secondary-button:hover { border-color: #bfcadb; background: #f9fbfd; }
.secondary-button.compact { min-height: 33px; padding: 6px 11px; font-size: 11px; }
.secondary-button.full { width: 100%; }
.text-button { padding: 5px 0; border: 0; color: var(--primary); background: transparent; font-size: 11px; }
.text-button:hover { color: var(--primary-dark); }

.live-chip, .subtle-badge, .service-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.live-chip { padding: 6px 10px; border: 1px solid #dbeee7; border-radius: 99px; color: #25795e; background: #f1fbf7; font-size: 10px; font-weight: 700; }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: #24ba80; box-shadow: 0 0 0 4px rgba(36,186,128,.1); }
.live-chip.demo { border-color: #f0d8b0; color: #956018; background: #fff8e9; }
.live-chip.demo i { background: #e8a23b; box-shadow: 0 0 0 4px rgba(232,162,59,.1); }
.subtle-badge { padding: 3px 7px; border-radius: 5px; color: #8290a5; background: #eef2f6; font-size: 8px; font-weight: 800; letter-spacing: .12em; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 17px; }
.stat-card { position: relative; min-height: 158px; overflow: hidden; padding: 18px 19px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.stat-card::after { position: absolute; top: -45px; right: -45px; width: 115px; height: 115px; border-radius: 50%; content: ""; opacity: .09; background: currentColor; }
.accent-cyan { color: var(--cyan); }
.accent-indigo { color: var(--indigo); }
.accent-orange { color: var(--orange); }
.accent-green { color: var(--green); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: currentColor; }
.stat-icon .icon { width: 17px; color: white; }
.trend { padding: 3px 7px; border-radius: 6px; font-size: 9px; font-weight: 750; }
.trend.up { color: #16865e; background: #eaf9f3; }
.trend.down { color: #b86f1b; background: #fff6e7; }
.trend.neutral { color: #328069; background: #edf9f5; }
.stat-value { display: flex; align-items: baseline; gap: 5px; margin-top: 13px; color: var(--text); }
.stat-value strong { font-size: 28px; line-height: 1; letter-spacing: -.045em; }
.stat-value span { color: #8a96a8; font-size: 10px; }
.stat-card p { margin: 6px 0 10px; color: #718096; font-size: 11px; }
.mini-progress { height: 4px; overflow: hidden; border-radius: 99px; background: #edf2f6; }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #17bec7, #32d6c2); }
.sparkline { display: flex; height: 22px; align-items: flex-end; gap: 3px; }
.sparkline i { width: 7%; min-width: 3px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, rgba(104,87,229,.72), rgba(104,87,229,.15)); }
.alarm-levels { display: flex; gap: 12px; color: #718096; font-size: 9px; }
.level { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; }
.level.high { background: var(--red); }
.level.medium { background: var(--yellow); }
.health-bars { display: flex; height: 20px; align-items: flex-end; gap: 3px; }
.health-bars i { width: 9%; border-radius: 2px 2px 0 0; background: #34c493; }
.health-bars i:nth-child(1) { height: 46%; }.health-bars i:nth-child(2) { height: 60%; }.health-bars i:nth-child(3) { height: 52%; }.health-bars i:nth-child(4) { height: 72%; }.health-bars i:nth-child(5) { height: 63%; }.health-bars i:nth-child(6) { height: 78%; }.health-bars i:nth-child(7) { height: 68%; }.health-bars i:nth-child(8) { height: 88%; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 17px; }
.panel, .table-panel, .settings-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.empty-state { padding: 22px 12px; color: #718097; font-size: 12px; text-align: center; }
.panel { min-width: 0; padding: 18px 19px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.panel-header h2 { color: #202b3c; }
.panel-header p { margin: 0; color: #6f7e94; font-size: 12px; }
.telemetry-panel { grid-row: span 2; min-height: 440px; }
.protocol-panel { min-height: 260px; }
.alarms-panel { min-height: 285px; }
.ranking-panel { min-height: 285px; }

.segmented { display: inline-flex; padding: 3px; border-radius: 8px; background: #f0f3f7; }
.segmented button { padding: 5px 9px; border: 0; border-radius: 6px; color: #6f7d92; background: transparent; font-size: 11px; }
.segmented button.active { color: #2d405d; background: #fff; box-shadow: 0 2px 7px rgba(39,55,80,.08); }
.chart-legend { display: flex; align-items: center; gap: 20px; margin-bottom: 9px; color: #5b697e; font-size: 12px; }
.chart-legend strong { margin-left: 4px; color: #253246; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; }
.legend-dot.cyan { background: #17bdc6; }.legend-dot.violet { background: #7b6ce2; }
.chart-updated { margin-left: auto; color: #9aa5b5; }
.detail-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; min-height: 24px; margin: -6px 0 8px; color: #5b697e; font-size: 12px; }
.detail-legend span { display: inline-flex; align-items: center; gap: 6px; }
.detail-legend i { width: 9px; height: 9px; border-radius: 50%; }
.canvas-wrap { position: relative; height: 330px; min-width: 0; }
.canvas-wrap.tall { height: 410px; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.chart-tooltip { position: absolute; z-index: 5; min-width: 115px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; color: #fff; background: rgba(20,31,50,.9); box-shadow: 0 8px 22px rgba(18,29,47,.2); pointer-events: none; font-size: 9px; backdrop-filter: blur(8px); }
.chart-status { position: absolute; top: 12px; right: 12px; z-index: 4; max-width: calc(100% - 24px); padding: 7px 10px; border: 1px solid #efd6aa; border-radius: 8px; color: #8a5b16; background: rgba(255,248,232,.94); font-size: 11px; box-shadow: 0 5px 16px rgba(70,49,18,.07); }
.chart-status[hidden] { display: none; }
.chart-status[data-state="empty"] { inset: 50% auto auto 50%; width: max-content; max-width: calc(100% - 40px); transform: translate(-50%,-50%); color: #637087; border-color: #dce4ed; background: rgba(248,250,252,.96); text-align: center; }

.online-chart-wrap { display: grid; place-items: center; padding: 4px 0 17px; }
.donut { --value: 86; position: relative; display: grid; width: 132px; height: 132px; place-items: center; border-radius: 50%; background: conic-gradient(#19bcbf calc(var(--value) * 1%), #eaf0f3 0); }
.donut::after { position: absolute; width: 92px; height: 92px; border-radius: 50%; content: ""; background: #fff; }
.donut > div { position: relative; z-index: 1; text-align: center; }
.donut strong, .donut span { display: block; }
.donut strong { font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.donut span { margin-top: 5px; color: #8b97a8; font-size: 9px; }
.device-state-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.device-state-list > div { padding: 13px 8px 0; text-align: center; }
.device-state-list > div + div { border-left: 1px solid var(--border); }
.device-state-list span, .device-state-list strong { display: block; }
.device-state-list span { color: #8995a7; font-size: 9px; }
.device-state-list strong { margin-top: 3px; font-size: 16px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; }
.status-dot.online { background: #20bb83; }.status-dot.idle { background: #9faabb; }.status-dot.unknown { background: #6f7f96; }.status-dot.warning { background: #ef9e36; }

.protocol-list { display: grid; gap: 2px; }
.protocol-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid #edf1f5; }
.protocol-row:last-child { border-bottom: 0; }
.protocol-logo { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; font-size: 10px; font-weight: 850; letter-spacing: -.02em; }
.protocol-logo.large { width: 43px; height: 43px; font-size: 11px; }
.protocol-logo.mqtt { color: #7364e4; background: #efedff; }.protocol-logo.modbus { color: #147ca5; background: #e6f5fb; }.protocol-logo.api { color: #178b66; background: #e8f8f2; }.protocol-logo.wss { color: #77849a; background: #edf1f5; }
.protocol-row > div strong, .protocol-row > div small { display: block; }
.protocol-row > div strong { color: #344156; font-size: 12px; }
.protocol-row > div small { color: #748197; font-size: 11px; }
.service-status { padding: 3px 7px; border-radius: 99px; font-size: 10px; font-weight: 750; }
.service-status.ok { color: #1c825e; background: #eaf8f3; }.service-status.planned { color: #7c8798; background: #eef2f5; }
.protocol-metric { min-width: 43px; text-align: right; font-size: 13px; }
.protocol-metric small { color: #9ba5b4; font-size: 7px; font-weight: 500; }

.alarm-feed, .ranking-list { display: grid; gap: 3px; }
.alarm-item { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #eef2f5; }
.alarm-item:last-child { border-bottom: 0; }
.alarm-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 800; }
.alarm-icon.critical { color: #d84343; background: #fff0f0; }.alarm-icon.warning { color: #ca7a17; background: #fff6e8; }.alarm-icon.info { color: #3477d6; background: #edf5ff; }
.alarm-item strong, .alarm-item small { display: block; }
.alarm-item strong { overflow: hidden; color: #3b475a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.alarm-item small { color: #748197; font-size: 10px; }
.alarm-time { color: #748197; font-size: 10px; }
.ranking-item { display: grid; grid-template-columns: 20px 34px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 2px; }
.rank-number { color: #a1abb9; font-size: 9px; font-weight: 800; }
.rank-device-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; color: #2875d9; background: #eaf3ff; font-size: 8px; font-weight: 800; }
.rank-copy strong, .rank-copy small { display: block; }
.rank-copy strong { color: #3a4658; font-size: 11px; }.rank-copy small { color: #748197; font-size: 10px; }
.rank-bar { height: 4px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: #eef2f6; }
.rank-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #42c2c7, #5287ef); }
.rank-value { color: #566276; font-size: 11px; font-weight: 700; }

.table-panel { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; gap: 10px; padding: 16px 17px; border-bottom: 1px solid var(--border); }
.table-search { width: min(330px, 38%); height: 37px; padding: 0 11px; border-radius: 8px; }
.table-toolbar select, .device-picker, .settings-card select { height: 37px; padding: 0 31px 0 11px; border: 1px solid var(--border); border-radius: 8px; color: #586579; background: #fff; }
.table-result { margin-left: auto; color: #6f7d91; font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf1f5; text-align: left; white-space: nowrap; }
th { color: #6d7b90; background: #fafbfd; font-size: 11px; font-weight: 750; letter-spacing: .025em; }
td { color: #526075; font-size: 12px; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f9fbfd; }
.device-cell { display: flex; align-items: center; gap: 10px; }
.device-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: #1a7ab0; background: #e8f6fb; font-size: 10px; font-weight: 800; }
.device-cell strong, .device-cell small { display: block; }.device-cell strong { color: #2f3c50; font-size: 12px; }.device-cell small { color: #748197; font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.status-badge::before { width: 5px; height: 5px; border-radius: 50%; content: ""; }
.status-badge.online { color: #197856; background: #ebf8f3; }.status-badge.online::before { background: #20b77e; }
.status-badge.warning { color: #a96818; background: #fff5e6; }.status-badge.warning::before { background: #efa23e; }
.status-badge.offline { color: #798496; background: #eff2f5; }.status-badge.offline::before { background: #9fa8b6; }
.status-badge.unknown { color: #5e6d82; background: #edf1f6; }.status-badge.unknown::before { background: #6f7f96; }
.protocol-tag { padding: 3px 7px; border: 1px solid #dfe6ef; border-radius: 5px; color: #637087; background: #f8fafc; font-size: 10px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-delete-action { min-height: 32px; padding: 5px 9px; border: 1px solid #f0d2d2; border-radius: 7px; color: #bd5959; background: #fff8f8; font-size: 10px; font-weight: 700; }
.row-delete-action:hover { border-color: #e5b8b8; color: #a63f3f; background: #fff0f0; }
.row-delete-action:disabled { opacity: .55; cursor: wait; }
.row-action { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 8px; color: #758298; background: transparent; }
.row-action:hover { color: var(--primary); background: #edf5ff; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 13px 17px; color: #6f7d91; font-size: 11px; }
.pagination { display: flex; gap: 4px; }
.pagination button { min-width: 29px; height: 28px; padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; color: #6f7c90; background: #fff; font-size: 9px; }
.pagination button.active { border-color: var(--primary); color: #fff; background: var(--primary); }.pagination button:disabled { opacity: .45; cursor: not-allowed; }

.metric-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.metric-strip article { padding: 17px 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-soft); }
.metric-strip span, .metric-strip strong, .metric-strip small { display: block; }
.metric-strip span { color: #69778c; font-size: 12px; }.metric-strip strong { margin: 5px 0 3px; font-size: 22px; letter-spacing: -.035em; }.metric-strip small { color: #748197; font-size: 11px; }.metric-strip small.positive { color: #19835e; }
.large-live-panel { margin-bottom: 16px; }
.chart-actions { display: flex; gap: 7px; }
.telemetry-bottom { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.live-telemetry-layout { display: grid; grid-template-columns: minmax(230px,280px) minmax(0,1fr); gap: 16px; align-items: start; }
.live-device-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-soft); }
.live-device-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 17px 18px 14px; border-bottom: 1px solid #e7edf5; background: linear-gradient(180deg,#fbfdff,#f6f9fd); }
.live-device-panel-head h2 { margin: 2px 0 0; color: #344258; font-size: 16px; }.live-device-panel-head > strong { color: #2675cf; font-size: 11px; }
.industrial-kicker { color: #3998df; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.live-device-search { display: flex; align-items: center; gap: 8px; margin: 10px 10px 2px; padding: 0 10px; border: 1px solid #dce6f1; border-radius: 8px; color: #8391a4; background: #f8fafc; }
.live-device-search:focus-within { border-color: #72aae4; background: #fff; box-shadow: 0 0 0 3px rgba(33,126,221,.09); }.live-device-search .icon { width: 14px; height: 14px; flex: 0 0 auto; }.live-device-search input { width: 100%; min-width: 0; height: 34px; border: 0; outline: 0; color: #3f4d61; background: transparent; font-size: 10px; }
.live-device-list { display: grid; max-height: 610px; overflow-y: auto; padding: 8px; gap: 5px; }
.live-device-option { display: grid; width: 100%; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 10px; border: 1px solid transparent; border-radius: 9px; color: #536176; background: transparent; text-align: left; cursor: pointer; }
.live-device-option:hover { border-color: #d9e7f7; background: #f5f9fe; }.live-device-option.active { border-color: #89b9ed; color: #174f8d; background: linear-gradient(135deg,#eaf4ff,#f4f9ff); box-shadow: inset 3px 0 #1779df; }
.live-device-option-copy { min-width: 0; }.live-device-option-copy strong,.live-device-option-copy small,.live-device-option-location { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.live-device-option-copy strong { color: inherit; font-size: 11px; }.live-device-option-copy small { margin-top: 3px; color: #7d8ca0; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 8px; }.live-device-option-location { margin-top: 4px; color: #97a3b3; font-size: 8px; }
.live-device-option-meta { display: grid; min-width: 54px; justify-items: end; gap: 5px; }.live-device-option-meta > strong { color: #5f6e82; font-size: 8px; }.live-device-option.active .live-device-option-meta > strong { color: #2071c7; }.live-device-option-time { color: #8996a8; font-size: 8px; white-space: nowrap; }.device-presence-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ba6b5; box-shadow: 0 0 0 3px rgba(155,166,181,.12); }.device-presence-dot.online { background: #20c987; box-shadow: 0 0 0 3px rgba(32,201,135,.13); }.device-presence-dot.offline { background: #e46b6b; box-shadow: 0 0 0 3px rgba(228,107,107,.12); }.device-presence-dot.warning { background: #efa43c; box-shadow: 0 0 0 3px rgba(239,164,60,.14); }
.live-device-list-state { display: grid; min-height: 180px; place-content: center; justify-items: center; padding: 20px; color: #718096; text-align: center; }.live-device-list-state strong { color: #46556a; font-size: 11px; }.live-device-list-state p { margin: 6px 0 0; font-size: 9px; line-height: 1.6; }.live-device-list-state .secondary-button { margin-top: 12px; }
.industrial-monitor { min-width: 0; overflow: hidden; border: 1px solid #2f83bd; border-radius: 14px; color: #e8f7ff; background: radial-gradient(circle at 83% 0,rgba(42,160,222,.2),transparent 32%),linear-gradient(150deg,#083f70 0%,#075789 52%,#063c6c 100%); box-shadow: 0 18px 42px rgba(7,61,105,.22),inset 0 0 0 1px rgba(255,255,255,.06); }
.industrial-monitor-head { display: flex; min-height: 83px; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid rgba(156,220,255,.28); background: linear-gradient(90deg,rgba(4,42,78,.78),rgba(12,105,166,.46)); }
.industrial-monitor-head h2 { margin: 3px 0 2px; color: #fff; font-size: 20px; }.industrial-monitor-head p { margin: 0; color: #a9d7f1; font-size: 9px; }.industrial-monitor .industrial-kicker { color: #7dd9ff; }
.industrial-monitor-meta { display: grid; justify-items: end; gap: 7px; text-align: right; }.industrial-monitor-meta small { color: #a9d5ed; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 8px; }
.industrial-state { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid rgba(117,226,183,.28); border-radius: 99px; color: #9ff0c9; background: rgba(14,64,72,.42); font-size: 9px; font-weight: 750; }.industrial-state i { width: 7px; height: 7px; border-radius: 50%; background: #31e394; box-shadow: 0 0 8px rgba(49,227,148,.75); }.industrial-state.offline { border-color: rgba(255,159,159,.3); color: #ffc0c0; background: rgba(91,31,48,.4); }.industrial-state.offline i { background: #ff7777; box-shadow: 0 0 8px rgba(255,119,119,.65); }.industrial-state.unknown { border-color: rgba(190,211,226,.25); color: #c4d8e6; background: rgba(35,66,91,.45); }.industrial-state.unknown i { background: #9fb5c5; box-shadow: none; }
.live-telemetry-body { min-height: 430px; padding: 14px; }
.industrial-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.industrial-metric-card { position: relative; min-width: 0; min-height: 126px; overflow: hidden; border: 1px solid rgba(151,220,255,.42); border-radius: 5px; background: linear-gradient(145deg,rgba(24,117,177,.96),rgba(10,83,139,.98)); box-shadow: inset 0 1px rgba(255,255,255,.09),0 5px 14px rgba(1,31,62,.13); }
.industrial-metric-card::after { position: absolute; right: -22px; bottom: -31px; width: 90px; height: 90px; border: 1px solid rgba(96,198,249,.12); border-radius: 50%; content: ''; }
.industrial-metric-head { position: relative; z-index: 1; display: flex; min-height: 32px; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid rgba(154,218,251,.22); background: linear-gradient(90deg,rgba(5,35,65,.92),rgba(12,51,83,.8)); }.industrial-metric-head strong { overflow: hidden; color: #dff4ff; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.industrial-metric-head small { overflow: hidden; color: #7cbddd; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 7px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.industrial-metric-value { position: relative; z-index: 1; display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; gap: 6px; padding: 21px 10px 15px; }.industrial-metric-value > strong { min-width: 0; overflow: hidden; color: #82edff; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: clamp(22px,2.35vw,36px); font-weight: 560; line-height: 1; letter-spacing: -.055em; text-overflow: ellipsis; text-shadow: 0 0 15px rgba(82,224,255,.32); white-space: nowrap; }.industrial-metric-value > span:not(.metric-signal-stack) { color: #b2ddf2; font-size: 9px; font-weight: 700; white-space: nowrap; }
.metric-signal-stack { display: grid; align-self: center; gap: 3px; padding-left: 3px; }.metric-signal-stack i { display: block; width: 4px; height: 4px; border-radius: 50%; background: #32f082; box-shadow: 0 0 6px rgba(50,240,130,.78); }.industrial-metric-card.stale .metric-signal-stack { opacity: .42; }.industrial-metric-card.stale .industrial-metric-value > strong { color: #a7d5e7; text-shadow: none; }
.telemetry-refresh-notice { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid rgba(255,194,117,.32); border-radius: 6px; color: #ffe0b7; background: rgba(75,52,36,.42); }.telemetry-refresh-notice strong { display: block; font-size: 10px; }.telemetry-refresh-notice p { margin: 3px 0 0; color: #dcbf9c; font-size: 8px; }.telemetry-refresh-notice .secondary-button { flex: 0 0 auto; border-color: rgba(255,216,170,.35); color: #fff0dd; background: rgba(94,61,35,.42); }
.telemetry-screen-state { display: grid; min-height: 400px; place-content: center; justify-items: center; padding: 35px 20px; color: #aed6ec; text-align: center; }.telemetry-screen-state strong { margin-top: 11px; color: #e9f7ff; font-size: 15px; }.telemetry-screen-state p { max-width: 390px; margin: 7px 0 0; color: #98c6df; font-size: 10px; line-height: 1.65; }.telemetry-state-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(157,218,250,.28); border-radius: 13px; color: #9edcff; background: rgba(4,43,78,.35); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 17px; }.telemetry-screen-state.error .telemetry-state-icon { border-color: rgba(255,154,154,.32); color: #ffb3b3; background: rgba(102,29,47,.32); }.telemetry-screen-state .secondary-button { margin-top: 15px; border-color: rgba(167,219,249,.42); color: #e6f6ff; background: rgba(15,75,119,.58); }
.industrial-loading-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }.industrial-loading-card { min-height: 126px; border: 1px solid rgba(151,220,255,.2); border-radius: 5px; background: linear-gradient(110deg,rgba(22,100,156,.65) 25%,rgba(66,145,195,.65) 40%,rgba(22,100,156,.65) 55%); background-size: 240% 100%; animation: telemetry-loading 1.35s linear infinite; }
@keyframes telemetry-loading { to { background-position-x: -240%; } }
.point-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.point-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border: 1px solid #edf1f5; border-radius: 9px; background: #fbfcfd; }
.point-item span, .point-item small { display: block; }.point-item span { color: #4f5d71; font-size: 12px; }.point-item small { color: #748197; font-size: 10px; }.point-item strong { font-size: 13px; }
.quality-score { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 18px; min-height: 160px; }
.score-ring { display: grid; width: 110px; height: 110px; place-items: center; border: 10px solid #e6f6f1; border-top-color: #22b888; border-radius: 50%; text-align: center; transform: rotate(-35deg); }
.score-ring strong, .score-ring span { display: block; transform: rotate(35deg); }.score-ring strong { font-size: 22px; }.score-ring span { color: #8e9aab; font-size: 8px; }
.quality-score ul { margin: 0; padding: 0; list-style: none; }.quality-score li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #edf1f5; color: #7e899b; font-size: 9px; }.quality-score li strong { color: #3c485a; }

.alarm-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.alarm-summary article { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-soft); }
.alarm-symbol { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 10px; font-size: 15px; font-weight: 850; }.alarm-symbol.critical { color: #d94343; background: #ffeded; }.alarm-symbol.warning { color: #ca7915; background: #fff5e5; }.alarm-symbol.resolved { color: #1c8a64; background: #eaf9f3; }.alarm-symbol.rate { color: #4c70d9; background: #edf2ff; }
.alarm-symbol .icon { width: 18px; }.alarm-summary strong, .alarm-summary span:not(.alarm-symbol) { display: block; }.alarm-summary strong { font-size: 20px; }.alarm-summary span:not(.alarm-symbol) { color: #8995a7; font-size: 9px; }
.filter-tabs { display: flex; gap: 4px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.filter-tabs button { padding: 8px 12px; border: 0; border-radius: 7px; color: #69778c; background: transparent; font-size: 12px; }.filter-tabs button.active { color: #176ee0; background: #edf5ff; }.filter-tabs span { padding: 1px 5px; border-radius: 99px; color: #fff; background: #e85c5c; font-size: 10px; }
.alarm-level-badge { padding: 4px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; }.alarm-level-badge.critical { color: #c63d3d; background: #fff0f0; }.alarm-level-badge.warning { color: #af6c18; background: #fff6e7; }.alarm-level-badge.info { color: #3b6db7; background: #eef5ff; }
.ack-button { min-height: 34px; padding: 6px 10px; border: 1px solid #cfe0f7; border-radius: 6px; color: #216fc8; background: #f4f8fe; font-size: 11px; }

.connection-banner { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid #cfece2; border-radius: 12px; background: linear-gradient(90deg, #effbf7, #f8fdfb); }
.banner-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #1c956b; background: #dff5ed; }.banner-icon .icon { width: 19px; }.connection-banner > div { flex: 1; }.connection-banner strong { display: block; font-size: 13px; }.connection-banner p { margin: 2px 0 0; font-size: 12px; }
.protocol-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.connection-card { padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-soft); }
.connection-card.featured { border-color: #d6d2fb; background: linear-gradient(155deg, #fff, #faf9ff); }.connection-card.muted { background: #fafbfd; }
.connection-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }.connection-card h2 { font-size: 18px; }.connection-card > p { min-height: 42px; margin-bottom: 13px; font-size: 12px; }
.connection-card dl { margin: 0 0 17px; }.connection-card dl > div { display: flex; align-items: center; justify-content: space-between; min-height: 40px; border-bottom: 1px solid #edf1f5; }.connection-card dt { color: #6f7d91; font-size: 11px; }.connection-card dd { display: flex; align-items: center; gap: 6px; margin: 0; color: #465367; font-size: 11px; font-weight: 600; text-align: right; }.connection-card code { color: #285ea6; background: #edf4fc; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }.copy-button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 0; border-radius: 6px; color: #6b788c; background: #f1f4f7; }.copy-button .icon { width: 14px; }

.settings-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 16px; align-items: start; }
.settings-nav { display: grid; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-soft); }
.settings-nav button { padding: 10px 11px; border: 0; border-radius: 8px; color: #66758a; background: transparent; text-align: left; font-size: 12px; cursor: pointer; }.settings-nav button:hover { color: #315f98; background: #f5f8fc; }.settings-nav button.active, .settings-nav button[aria-selected="true"] { color: #186fdc; background: #edf5ff; font-weight: 700; }
.settings-content { display: grid; gap: 14px; }.settings-panel { display: grid; gap: 14px; }.settings-panel[hidden] { display: none !important; }.settings-card { padding: 20px; }.settings-card > div:first-child > p { margin-bottom: 16px; font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }.form-grid label { display: grid; gap: 6px; }.form-grid label > span { color: #69768a; font-size: 9px; font-weight: 650; }.full-field { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea, .settings-card input[type="text"], .settings-card input[type="url"], .settings-card input[type="password"], .settings-card input[type="number"], .settings-card textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; color: #425064; background: #fff; resize: vertical; }.form-grid input:focus, .form-grid textarea:focus, .settings-card input:focus { border-color: rgba(22,119,255,.5); box-shadow: 0 0 0 3px rgba(22,119,255,.08); outline: 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid #edf1f5; }.setting-row strong, .setting-row span { display: block; }.setting-row strong { color: #435065; font-size: 10px; }.setting-row span { color: #95a0af; font-size: 8px; }
.security-checks { display: grid; gap: 8px; }.security-checks > div { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #e3f0eb; border-radius: 9px; background: #f8fcfa; }.security-checks > div > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #1a8b65; background: #e3f6ee; }.security-checks .icon { width: 15px; }.security-checks strong, .security-checks small { display: block; }.security-checks strong { color: #405064; font-size: 9px; }.security-checks small { color: #8d99aa; font-size: 8px; }.security-checks .security-warning { border-color: #f1dfc6; background: #fffaf2; }.security-checks .security-warning > span { color: #b86e15; background: #fff0d8; }
.setting-checkbox { display: inline-flex; align-items: center; gap: 7px; color: #657389; cursor: pointer; }.setting-checkbox input { width: 17px; height: 17px; margin: 0; accent-color: #1677ff; }.setting-checkbox span { font-size: 9px; }.compact-number { width: 92px !important; text-align: right; }.settings-field { display: grid; gap: 7px; margin-top: 14px; }.settings-field > span { color: #69768a; font-size: 9px; font-weight: 650; }
.runtime-grid, .account-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }.runtime-grid > div, .account-summary > div { padding: 14px; border: 1px solid #e8edf3; border-radius: 9px; background: #f8fafc; }.runtime-grid span, .account-summary span { display: block; margin-bottom: 6px; color: #8a96a7; font-size: 8px; }.runtime-grid strong, .account-summary strong { color: #405064; font-size: 11px; overflow-wrap: anywhere; }
.settings-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #dce8f7; border-radius: 9px; color: #58708d; background: #f6faff; }.settings-notice > span { display: grid; flex: 0 0 23px; height: 23px; place-items: center; border-radius: 50%; color: #176ed0; background: #e7f2ff; font-size: 10px; font-weight: 800; }.settings-notice p { margin: 2px 0 0; font-size: 9px; line-height: 1.6; }.settings-notice.warning { border-color: #f1dfc6; color: #876130; background: #fffaf2; }.settings-notice.warning > span { color: #b86e15; background: #fff0d8; }
.account-actions { display: flex; justify-content: flex-end; margin-top: 16px; }.settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }.settings-actions > span { color: #98a3b2; font-size: 9px; }.settings-actions > span[data-state="success"] { color: #238466; }.settings-actions > span[data-state="error"] { color: #c04444; }.settings-actions > span[data-state="dirty"] { color: #a56717; }.settings-actions.account-active { display: none; }.settings-card input:disabled { color: #9aa5b3; background: #f3f5f7; cursor: not-allowed; }

.modal, .drawer, .command-palette { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open, .drawer.open, .command-palette.open { display: block; }
.modal-backdrop, .drawer-backdrop, .command-backdrop, .sidebar-backdrop { position: absolute; inset: 0; background: rgba(8,17,31,.48); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(590px, calc(100% - 30px)); max-height: calc(100dvh - 30px); margin: min(8vh, 70px) auto 0; overflow-y: auto; padding: 22px; border-radius: 15px; background: #fff; box-shadow: 0 30px 80px rgba(10,20,38,.22); animation: modal-up .2s ease; }
.modal-header, .drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }.modal-header h2, .drawer-header h2 { margin-bottom: 0; font-size: 20px; }
.modal-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 11px 12px; border-radius: 8px; color: #526177; background: #f1f6fd; font-size: 12px; }.modal-note span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #4a89d7; font-size: 11px; font-weight: 800; }.modal-note p { margin: 1px 0 0; font-size: inherit; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border); }

.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(470px, 92vw); overflow-y: auto; padding: 23px; background: #fff; box-shadow: -20px 0 70px rgba(8,19,37,.18); animation: drawer-in .22s ease; }
.drawer-device-head { display: flex; align-items: center; gap: 13px; padding: 15px; border-radius: 11px; background: #f6f9fc; }.drawer-device-head .device-avatar { width: 48px; height: 48px; font-size: 11px; }.drawer-device-head h3 { margin: 0 0 2px; font-size: 15px; }.drawer-device-head p { margin: 0; font-size: 11px; }
.drawer-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 15px 0; }.drawer-stats > div { padding: 12px 8px; border: 1px solid var(--border); border-radius: 9px; text-align: center; }.drawer-stats span, .drawer-stats strong { display: block; }.drawer-stats span { color: #6f7d91; font-size: 10px; }.drawer-stats strong { margin-top: 4px; font-size: 12px; }
.detail-list { margin: 0; }.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 2px; border-bottom: 1px solid #edf1f5; }.detail-list dt { color: #6f7d91; font-size: 11px; }.detail-list dd { overflow-wrap: anywhere; margin: 0; color: #455267; font-size: 11px; font-weight: 600; text-align: right; }
.drawer-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 14px; border: 1px solid #f0d2d2; border-radius: 10px; background: #fff8f8; }
.drawer-danger-zone strong { display: block; color: #9f4444; font-size: 12px; }
.drawer-danger-zone p { margin: 3px 0 0; color: #9a7070; font-size: 10px; line-height: 1.5; }
.danger-button { min-height: 36px; flex: 0 0 auto; padding: 7px 12px; border: 1px solid #df9e9e; border-radius: 8px; color: #fff; background: #cf6262; font-size: 11px; font-weight: 750; }
.danger-button:hover { border-color: #c75555; background: #bd5050; }
.danger-button:disabled { opacity: .55; cursor: wait; }
.drawer-section-title { margin: 20px 0 8px; font-size: 13px; }

.command-card { position: relative; width: min(620px, calc(100% - 30px)); margin: 10vh auto 0; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 30px 90px rgba(8,18,36,.25); }
.command-card > label { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--border); }.command-card input { flex: 1; border: 0; font-size: 14px; }.command-card .icon { color: #7f8c9e; }
#commandResults { max-height: 360px; overflow-y: auto; padding: 8px; }.command-result { display: flex; width: 100%; min-height: 42px; align-items: center; gap: 10px; padding: 10px 11px; border: 0; border-radius: 8px; color: #536075; background: transparent; text-align: left; }.command-result:hover { background: #f1f6fc; }.command-result small { margin-left: auto; color: #748197; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; width: min(360px, calc(100vw - 40px)); gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #dce7e3; border-radius: 10px; color: #3d514b; background: rgba(255,255,255,.96); box-shadow: 0 14px 36px rgba(20,42,63,.15); animation: toast-in .2s ease; backdrop-filter: blur(8px); }.toast > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #fff; background: #21ad7c; font-size: 12px; }.toast p { margin: 0; color: inherit; font-size: 12px; }

.sidebar-backdrop { position: fixed; z-index: 35; display: none; }

@keyframes fade-in { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes modal-up { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { transform: translateX(25px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(39,206,140,.1); } 50% { box-shadow: 0 0 0 7px rgba(39,206,140,0); } }

@media (max-width: 1240px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: minmax(0,1.4fr) minmax(260px,.8fr); }
  .telemetry-panel { grid-row: span 1; }
  .protocol-panel { grid-column: 1 / -1; }
  .protocol-list { grid-template-columns: repeat(3,1fr); gap: 12px; }
  .protocol-row { grid-template-columns: 38px minmax(0,1fr) auto; border: 1px solid var(--border); border-radius: 9px; padding: 11px; }
  .protocol-metric { display: none; }
}

@media (max-width: 1024px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 236px; transform: translateX(-100%); transition: transform .22s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }
  .mobile-menu { display: grid; }
  .topbar-left { gap: 10px; }
  .content-wrap { padding: 25px 22px 40px; }
  .mode-banner { margin-right: 22px; margin-left: 22px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .online-panel, .alarms-panel, .ranking-panel { min-height: auto; }
  .protocol-panel { grid-column: auto; }
  .telemetry-bottom { grid-template-columns: 1fr; }
  .live-telemetry-layout { grid-template-columns: 1fr; }
  .live-device-list { max-height: none; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
  .industrial-metric-grid, .industrial-loading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-strip, .alarm-summary { grid-template-columns: repeat(2,1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav button { flex: 0 0 auto; }
}

@media (max-width: 768px) {
  .topbar { padding: 0 15px; }
  .global-search { display: none; }
  .mobile-search { display: grid; }
  .fuxa-entry { display: none; }
  .user-copy, .user-menu > .icon { display: none; }
  .content-wrap { padding: 20px 15px 35px; }
  .mode-banner { align-items: flex-start; margin: 12px 15px 0; }
  .heading-split { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 148px; }
  .protocol-list { grid-template-columns: 1fr; }
  .protocol-card-grid { grid-template-columns: 1fr; }
  .table-toolbar { align-items: stretch; flex-wrap: wrap; }
  .table-search { width: 100%; }
  .table-result { width: 100%; margin-left: 0; }
  .table-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .metric-strip, .alarm-summary { grid-template-columns: 1fr 1fr; }
  .industrial-monitor-head { align-items: flex-start; flex-direction: column; }
  .industrial-monitor-meta { justify-items: start; text-align: left; }
  .industrial-metric-grid,.industrial-loading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .telemetry-refresh-notice { align-items: flex-start; flex-direction: column; }
  .canvas-wrap { height: 280px; }
  .canvas-wrap.tall { height: 330px; }
  .quality-score { grid-template-columns: 1fr; justify-items: center; }
  .quality-score ul { width: 100%; }
  .point-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .runtime-grid, .account-summary { grid-template-columns: 1fr; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .setting-row select, .setting-row .compact-number { width: 100% !important; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-actions .primary-button { width: 100%; }
  .connection-banner { align-items: flex-start; flex-wrap: wrap; }
  .connection-banner .live-chip { margin-left: 50px; }
}

@media (max-width: 480px) {
  .breadcrumb span, .breadcrumb .icon { display: none; }
  .content-wrap { padding-left: 12px; padding-right: 12px; }
  .mode-banner { margin-right: 12px; margin-left: 12px; }
  .mode-banner-state { display: none; }
  .mode-banner p { font-size: 11px; }
  .drawer-danger-zone { align-items: stretch; flex-direction: column; }
  .danger-button { width: 100%; }
  .modal-card { max-height: calc(100dvh - 20px); margin-top: 10px; padding: 18px; }
  .metric-strip, .alarm-summary { grid-template-columns: 1fr; }
  .live-device-list { grid-template-columns: 1fr; }
  .industrial-metric-grid,.industrial-loading-grid { grid-template-columns: 1fr; }
  .chart-legend { align-items: flex-start; flex-wrap: wrap; gap: 8px 15px; }
  .chart-updated { width: 100%; margin-left: 0; }
  .device-state-list { grid-template-columns: 1fr; }
  .device-state-list > div { display: flex; justify-content: space-between; padding: 10px 3px; text-align: left; }
  .device-state-list > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .device-state-list strong { margin-top: 0; }
  .heading-actions .live-chip { display: none; }
  .primary-button, .secondary-button { min-height: 36px; }
}

/* Soft monitoring workspace ------------------------------------------------ */
.app-shell {
  background:
    radial-gradient(circle at 74% -12%, rgba(102, 174, 192, .075), transparent 30%),
    var(--bg);
}

.app-shell .panel,
.app-shell .table-panel,
.app-shell .settings-card,
.app-shell .stat-card,
.app-shell .metric-strip article,
.app-shell .alarm-summary article,
.app-shell .connection-card {
  border-color: rgba(221, 229, 238, .94);
  box-shadow: var(--shadow-soft);
}

.workspace-tabs {
  position: sticky;
  top: var(--topbar-height);
  z-index: 28;
  min-width: 0;
  height: 45px;
  overflow: hidden;
  border-bottom: 1px solid rgba(216, 225, 235, .9);
  background: rgba(247, 249, 252, .93);
  box-shadow: 0 5px 14px rgba(48, 67, 93, .03);
  backdrop-filter: blur(14px);
}

.workspace-tabs[hidden] { display: none; }

.workspace-tabs-track {
  display: flex;
  height: 100%;
  min-width: 0;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  padding: 7px 30px 0;
  scrollbar-width: none;
}

.workspace-tabs-track::-webkit-scrollbar { display: none; }

.workspace-tab {
  position: relative;
  display: inline-flex;
  min-width: 0;
  max-width: 220px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: #718095;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.workspace-tab:hover {
  color: #486b94;
  background: rgba(255, 255, 255, .62);
}

.workspace-tab.active {
  color: #385f8e;
  border-color: #dce5ef;
  background: #fff;
  box-shadow: 0 -4px 14px rgba(58, 82, 113, .045);
}

.workspace-tab.active::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  border-radius: 99px 99px 0 0;
  content: "";
  background: linear-gradient(90deg, #6bb8b5, #5d8fc7);
}

.workspace-tab > span:not(.workspace-tab-close) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-tab-label {
  display: inline-flex;
  min-width: 0;
  height: 100%;
  flex: 1;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.workspace-tab-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tab-label .icon { width: 14px; height: 14px; }

.workspace-tab-home {
  min-width: 36px;
  justify-content: center;
  padding-right: 9px;
  padding-left: 9px;
}

.workspace-tab-home .icon { width: 15px; height: 15px; }

.workspace-tab-close {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: #95a1b0;
  background: transparent;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.workspace-tab-close:hover { color: #b45f64; background: #f8e9ea; }

.overview-live-shell { display: grid; min-width: 0; gap: 18px; }

.monitor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.monitor-summary-card {
  --summary-accent: #5d91c3;
  --summary-soft: #eef5fb;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 108px;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(221, 229, 238, .96);
  border-radius: var(--radius);
  color: inherit;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-soft);
}

.monitor-summary-card::after {
  position: absolute;
  top: -43px;
  right: -38px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  content: "";
  background: var(--summary-soft);
  opacity: .78;
}

.monitor-summary-card:nth-child(2),
.monitor-summary-card.accent-green { --summary-accent: #5ba186; --summary-soft: #edf7f3; }
.monitor-summary-card:nth-child(3),
.monitor-summary-card.accent-orange { --summary-accent: #c9955a; --summary-soft: #fbf4e9; }
.monitor-summary-card:nth-child(4),
.monitor-summary-card.accent-indigo { --summary-accent: #7d83b8; --summary-soft: #f1f1fa; }
.monitor-summary-card.tone-blue { --summary-accent: #5d91c3; --summary-soft: #eef5fb; }
.monitor-summary-card.tone-green { --summary-accent: #5ba186; --summary-soft: #edf7f3; }
.monitor-summary-card.tone-coral { --summary-accent: #c87979; --summary-soft: #fbefef; }
.monitor-summary-card.tone-slate { --summary-accent: #7f8da0; --summary-soft: #f0f3f6; }

.monitor-summary-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--summary-accent);
  background: var(--summary-soft);
}

.monitor-summary-icon .icon { width: 21px; height: 21px; }

.monitor-summary-copy { position: relative; z-index: 1; min-width: 0; }
.monitor-summary-copy > span,
.monitor-summary-copy > strong,
.monitor-summary-copy > small { display: block; }
.monitor-summary-copy > span { color: #7c899b; font-size: 11px; }
.monitor-summary-copy > strong { margin: 3px 0 4px; color: #2f4055; font-size: clamp(22px, 2.1vw, 29px); line-height: 1.05; letter-spacing: -.035em; }
.monitor-summary-copy > small { overflow: hidden; color: #94a0af; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.monitor-dashboard-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  align-items: stretch;
}

.monitor-status-panel {
  min-width: 0;
  overflow: hidden;
  padding: 19px;
  border: 1px solid rgba(221, 229, 238, .96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-soft);
}

.monitor-status-panel > h2 { color: #314157; }
.monitor-status-panel > p { margin-bottom: 17px; font-size: 11px; }

.monitor-status-ring {
  --value: 72;
  --ring-color: #69aaa5;
  position: relative;
  display: grid;
  width: 144px;
  height: 144px;
  margin: 10px auto 20px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--value) * 1%), #edf1f5 0);
  box-shadow: inset 0 0 0 1px rgba(100, 128, 156, .04);
}

.monitor-status-ring::after {
  position: absolute;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  content: "";
  background: #fff;
  box-shadow: 0 5px 18px rgba(57, 77, 104, .055);
}

.monitor-status-ring > * { position: relative; z-index: 1; }
.monitor-status-ring > div { text-align: center; }
.monitor-status-ring strong,
.monitor-status-ring span { display: block; }
.monitor-status-ring strong { color: #304258; font-size: 29px; line-height: 1; letter-spacing: -.04em; }
.monitor-status-ring span { margin-top: 6px; color: #8895a6; font-size: 10px; }

.monitor-location-list,
.monitor-recent-list { display: grid; gap: 5px; }

.monitor-location-row,
.monitor-recent-row {
  display: grid;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #5f6d80;
  background: #f8fafc;
  transition: border-color .16s ease, background .16s ease;
}

.monitor-location-row { grid-template-columns: minmax(0, 1fr) auto; }
.monitor-recent-row { width: 100%; grid-template-columns: auto minmax(0, 1fr) auto auto; text-align: left; }

.monitor-location-row:hover,
.monitor-recent-row:hover { border-color: #dce7f1; background: #f5f9fc; }
.monitor-location-row > div,
.monitor-recent-row > div { min-width: 0; }
.monitor-location-row > span:first-child { display: inline-flex; min-width: 0; align-items: center; gap: 8px; }
.monitor-location-row > span:first-child i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #6ca9a1; box-shadow: 0 0 0 4px rgba(108,169,161,.1); }
.monitor-location-row strong,
.monitor-location-row span,
.monitor-location-row small,
.monitor-recent-row strong,
.monitor-recent-row span,
.monitor-recent-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-location-row strong,
.monitor-recent-row strong { display: block; color: #3d4c61; font-size: 11px; }
.monitor-location-row small,
.monitor-recent-row small { display: block; margin-top: 3px; color: #8e9aaa; font-size: 9px; }
.monitor-location-row > :last-child,
.monitor-recent-row > :last-child { justify-self: end; }
.monitor-recent-row > em { color: #4e6f8e; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }

.soft-empty-panel {
  display: grid;
  min-height: 260px;
  place-content: center;
  justify-items: center;
  padding: 34px 24px;
  border: 1px dashed #d6e0ea;
  border-radius: var(--radius);
  color: #7a8799;
  background:
    radial-gradient(circle at 50% 30%, rgba(107, 171, 186, .085), transparent 31%),
    rgba(250, 252, 254, .92);
  text-align: center;
}

.soft-empty-panel h2,
.soft-empty-panel h3,
.soft-empty-panel strong { color: #46566b; }
.soft-empty-panel p { max-width: 430px; margin: 7px 0 0; font-size: 11px; line-height: 1.7; }
.soft-empty-panel .primary-button,
.soft-empty-panel .secondary-button { margin-top: 16px; }
.soft-empty-panel.compact { min-height: 230px; margin: 10px; padding: 25px 18px; border-radius: 12px; }

.soft-empty-visual {
  display: grid;
  width: min(100%, 430px);
  min-width: 0;
  place-items: center;
  color: #6798ac;
  text-align: center;
}

.soft-empty-visual .icon {
  box-sizing: content-box;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #dbe8ef;
  border-radius: 21px;
  color: #6798ac;
  background: linear-gradient(145deg, #fff, #eef6f8);
  box-shadow: 0 12px 28px rgba(69, 104, 126, .09);
}
.soft-empty-visual strong { display: block; color: #46566b; font-size: 13px; }
.soft-empty-visual p { max-width: 390px; margin: 7px 0 0; color: #7d8999; font-size: 10px; line-height: 1.7; }

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

.capability-card {
  position: relative;
  min-width: 0;
  min-height: 148px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(221, 229, 238, .96);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 21px rgba(48, 68, 96, .045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.capability-card:hover { border-color: #cedce9; box-shadow: 0 12px 28px rgba(48, 68, 96, .07); transform: translateY(-2px); }
.capability-card h3 { margin: 12px 0 6px; color: #35465b; font-size: 14px; }
.capability-card p { margin: 0; font-size: 11px; line-height: 1.7; }
.capability-card > span:first-child {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  color: #5689b9;
  background: #eef5fb;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}
.capability-card > .icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #5689b9;
  background: #eef5fb;
}
.capability-card > .icon { padding: 8px; }
.capability-card > strong,
.capability-card > small { display: block; }
.capability-card > strong { margin: 13px 0 5px; color: #3b4b60; font-size: 13px; }
.capability-card > small { color: #8390a2; font-size: 10px; line-height: 1.65; }
.capability-card.available > span:first-child { color: #468c70; background: #edf7f3; }
.capability-card.pending > span:first-child { color: #ad7a42; background: #faf3e9; }

.gis-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: 17px;
  align-items: stretch;
}

.gis-map-panel,
.gis-location-panel {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(221, 229, 238, .96);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.gis-map-panel > .panel-header,
.gis-location-panel > .panel-header { margin: 0; padding: 18px 19px; border-bottom: 1px solid #e8edf3; }

.gis-map-canvas {
  position: relative;
  display: grid;
  min-height: 570px;
  overflow: hidden;
  isolation: isolate;
  place-items: center;
  background:
    radial-gradient(circle at 24% 33%, rgba(112, 180, 169, .2), transparent 18%),
    radial-gradient(circle at 72% 63%, rgba(94, 145, 194, .17), transparent 20%),
    linear-gradient(145deg, #edf5f4 0%, #f5f8f9 48%, #eaf1f6 100%);
}

.gis-map-canvas::before,
.gis-map-canvas::after {
  position: absolute;
  z-index: -1;
  border: 22px solid rgba(255, 255, 255, .58);
  border-radius: 48% 52% 55% 45%;
  content: "";
  transform: rotate(-12deg);
}
.gis-map-canvas::before { top: 13%; left: 8%; width: 48%; height: 27%; }
.gis-map-canvas::after { right: 4%; bottom: 12%; width: 42%; height: 22%; transform: rotate(18deg); }

.gis-map-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .48;
  background-image:
    linear-gradient(rgba(100, 131, 156, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 131, 156, .09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,.22));
  pointer-events: none;
}

.gis-map-canvas > .soft-empty-visual { position: relative; z-index: 2; padding: 24px; }

.gis-map-canvas [data-map-marker] {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 4px solid rgba(255,255,255,.9);
  border-radius: 50% 50% 50% 8px;
  color: #fff;
  background: #5b94c5;
  box-shadow: 0 8px 20px rgba(57, 91, 124, .22);
  transform: translate(-50%, -50%) rotate(-45deg);
}
.gis-map-canvas [data-map-marker] > * { transform: rotate(45deg); }

.gis-location-list {
  display: grid;
  max-height: 570px;
  overflow-y: auto;
  padding: 10px;
  gap: 5px;
  scrollbar-color: #d7e0e8 transparent;
  scrollbar-width: thin;
}

.video-grid {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 15px;
}

.video-tile {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 230px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  place-content: center;
  justify-items: center;
  padding: 20px;
  border: 1px solid #d9e2ec;
  border-radius: var(--radius);
  color: #c6d4df;
  background:
    radial-gradient(circle at 50% 45%, rgba(117, 171, 190, .18), transparent 28%),
    linear-gradient(145deg, #33475b, #253647);
  box-shadow: 0 12px 30px rgba(35, 51, 69, .11);
  text-align: center;
}

.video-tile::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.video-tile > video,
.video-tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-tile h3,
.video-tile strong { position: relative; z-index: 1; color: #eef5fa; }
.video-tile p,
.video-tile small { position: relative; z-index: 1; max-width: 330px; color: #a8bac8; }
.video-tile .soft-empty-visual { position: relative; z-index: 1; }
.video-tile .soft-empty-visual .icon { border-color: rgba(189, 215, 228, .18); color: #bdd7e3; background: rgba(255,255,255,.055); box-shadow: none; }
.video-tile .soft-empty-visual strong { color: #eef5fa; }
.video-tile .soft-empty-visual p { color: #a8bac8; }
.video-tile-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-top: 1px solid rgba(207, 225, 235, .12);
  color: #b8c8d4;
  background: rgba(26, 41, 55, .56);
  font-size: 10px;
  backdrop-filter: blur(10px);
}

.statistics-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.statistics-grid > * { min-width: 0; }
.statistics-grid > .soft-empty-panel:last-child { grid-column: 1 / -1; }

.distribution-list { display: grid; gap: 7px; }
.distribution-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(92px, .8fr) minmax(120px, 1.6fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 2px;
  color: #627084;
  font-size: 11px;
}
.distribution-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.distribution-row > strong:last-child { min-width: 38px; color: #415166; font-size: 11px; text-align: right; }
.distribution-row > div:first-child { min-width: 0; }
.distribution-row > div:first-child span,
.distribution-row > div:first-child strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.distribution-row > div:first-child span { color: #627084; }
.distribution-row > div:first-child strong { margin-top: 3px; color: #3f5065; font-size: 12px; }
.distribution-row > small:last-child { min-width: 38px; color: #7f8c9e; font-size: 10px; text-align: right; }
.distribution-bar { height: 8px; overflow: hidden; border-radius: 99px; background: #edf2f5; }
.distribution-bar > i,
.distribution-bar > span { display: block; width: var(--value, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #75b9b2, #6a92c2); }

.data-query-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfd;
}

.data-query-toolbar label { display: flex; min-width: 0; align-items: center; gap: 7px; color: #738095; font-size: 10px; }
.data-query-toolbar > input,
.data-query-toolbar > select {
  min-width: 130px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #526176;
  background: #fff;
}
.data-query-toolbar > input:focus,
.data-query-toolbar > select:focus { border-color: rgba(79,135,199,.58); box-shadow: 0 0 0 3px rgba(79,135,199,.08); }
.data-query-toolbar .table-search input { height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.data-query-toolbar > span { color: #8a96a7; font-size: 10px; }
.data-query-toolbar .primary-button { min-height: 36px; margin-left: auto; }

.latest-data-table { min-width: 0; overflow-x: auto; }
.latest-data-table table,
table.latest-data-table { min-width: 760px; }
.latest-data-table th,
table.latest-data-table th { color: #66758a; background: #f7f9fb; }
.latest-data-table tbody tr:last-child td,
table.latest-data-table tbody tr:last-child td { border-bottom: 0; }

@media (min-width: 1440px) {
  .gis-layout { grid-template-columns: minmax(0, 1fr) 350px; }
  .video-grid { grid-template-columns: 350px minmax(0, 1fr); }
}

@media (max-width: 1280px) {
  .monitor-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-summary-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gis-layout { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 1100px) {
  .monitor-dashboard-grid,
  .gis-layout { grid-template-columns: 1fr; }
  .gis-location-list { max-height: 360px; }
  .statistics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .workspace-tabs-track { padding-right: 22px; padding-left: 22px; }
  .gis-map-canvas { min-height: 480px; }
  .video-tile { min-height: 210px; }
}

@media (max-width: 768px) {
  .workspace-tabs { height: 43px; }
  .workspace-tabs-track { padding: 6px 15px 0; }
  .workspace-tab { height: 33px; max-width: 180px; }
  .overview-live-shell { gap: 14px; }
  .monitor-summary-grid { gap: 11px; }
  .monitor-summary-card { min-height: 98px; padding: 14px; }
  .monitor-summary-icon { width: 41px; height: 41px; border-radius: 11px; }
  .monitor-summary-copy > strong { font-size: 22px; }
  .monitor-dashboard-grid,
  .gis-layout,
  .statistics-grid { gap: 13px; }
  .monitor-status-panel { padding: 16px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .gis-map-canvas { min-height: 390px; }
  .video-grid { grid-template-columns: 1fr; }
  .video-tile { min-height: 0; }
  .data-query-toolbar { align-items: stretch; }
  .data-query-toolbar label { flex: 1 1 210px; }
  .data-query-toolbar > input,
  .data-query-toolbar > select { min-width: 0; flex: 1; }
  .data-query-toolbar .primary-button { margin-left: 0; }
}

@media (max-width: 540px) {
  .monitor-summary-grid,
  .capability-grid { grid-template-columns: 1fr; }
  .monitor-summary-card { min-height: 92px; }
  .monitor-location-row,
  .monitor-recent-row { padding: 10px 8px; }
  .monitor-recent-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .monitor-recent-row > em { display: none; }
  .soft-empty-panel { min-height: 225px; padding: 28px 18px; }
  .gis-map-canvas { min-height: 330px; }
  .distribution-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .distribution-bar { grid-column: 1 / -1; grid-row: 2; }
  .data-query-toolbar label,
  .data-query-toolbar > input,
  .data-query-toolbar > select,
  .data-query-toolbar .primary-button,
  .data-query-toolbar .secondary-button { width: 100%; flex-basis: 100%; }
  .data-query-toolbar > span { width: 100%; text-align: center; }
}

@media (max-width: 390px) {
  .workspace-tabs-track { padding-right: 10px; padding-left: 10px; }
  .workspace-tab { max-width: 158px; padding-right: 8px; padding-left: 8px; }
  .workspace-tab-close { width: 16px; height: 16px; }
  .monitor-summary-card,
  .monitor-status-panel,
  .capability-card { padding: 14px; }
  .monitor-status-ring { width: 130px; height: 130px; }
  .monitor-status-ring::after { width: 96px; height: 96px; }
  .gis-map-panel > .panel-header,
  .gis-location-panel > .panel-header { padding: 15px 14px; }
  .gis-map-canvas { min-height: 290px; }
  .video-tile { border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.connection-actions { display: grid; gap: 8px; }
.connection-actions a { text-decoration: none; }

.guide-page {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #162033;
  --muted: #68758a;
  --subtle: #718097;
  --border: #e3e9f1;
  --border-strong: #d5deea;
  --primary: #1677ff;
  --primary-dark: #0d5fd6;
  --cyan: #10bfc8;
  --indigo: #6857e5;
  --orange: #f59e42;
  --green: #19a974;
  --red: #e65353;
  --yellow: #e9a526;
  --shadow: 0 12px 35px rgba(28, 45, 75, 0.08);
  --shadow-soft: 0 4px 18px rgba(28, 45, 75, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  background:
    radial-gradient(circle at 80% -10%, rgba(22, 119, 255, .12), transparent 32%),
    linear-gradient(180deg, #f7faff 0, #f3f6fa 420px, #f3f6fa 100%);
}
.guide-page a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 9px 13px; border-radius: 8px; color: #fff !important; background: #0d5fd6; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.guide-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 30px;
  padding: 0 max(24px, calc((100vw - 1220px) / 2));
  border-bottom: 1px solid rgba(218, 226, 237, .88);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 20px rgba(28, 45, 75, .04);
  backdrop-filter: blur(18px);
}
.guide-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.guide-brand > span:last-child, .guide-brand strong, .guide-brand small { display: block; }
.guide-brand strong { color: #162033; font-size: 16px; line-height: 1.2; }
.guide-brand small { margin-top: 2px; color: #7b899d; font-size: 11px; }
.guide-brand-mark { position: relative; width: 32px; height: 32px; flex: 0 0 auto; transform: rotate(45deg); border-radius: 9px; background: linear-gradient(135deg, #16c9d2, #1778ff); box-shadow: 0 7px 17px rgba(18, 143, 255, .25); }
.guide-brand-mark i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.guide-brand-mark i:nth-child(1) { top: 8px; left: 8px; }
.guide-brand-mark i:nth-child(2) { right: 8px; bottom: 8px; }
.guide-brand-mark i:nth-child(3) { top: 8px; right: 8px; opacity: .58; }
.guide-topbar nav { display: flex; align-items: center; gap: 25px; margin-left: auto; }
.guide-topbar nav a { color: #647188; font-size: 13px; font-weight: 600; }
.guide-topbar nav a:hover { color: var(--primary); }
.guide-portal-link { min-height: 36px; padding: 8px 13px; border: 1px solid #d4deea; border-radius: 8px; color: #536176 !important; background: #fff; font-size: 12px; font-weight: 650; }
.guide-portal-link:hover { border-color: #b8c6d8; background: #f8fafc; }

.guide-shell { width: min(1220px, calc(100% - 48px)); margin: 0 auto; }
.guide-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 410px); align-items: center; gap: 70px; min-height: 420px; padding: 70px 0 54px; }
.guide-hero h1 { max-width: 760px; margin: 13px 0 16px; font-size: clamp(38px, 5vw, 62px); line-height: 1.04; letter-spacing: -.055em; }
.guide-hero-copy > p { max-width: 690px; margin-bottom: 27px; color: #617088; font-size: 16px; line-height: 1.8; }
.guide-eyebrow { color: #1677ff; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.guide-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.guide-primary-link, .guide-secondary-link { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 17px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.guide-primary-link { color: #fff !important; background: linear-gradient(180deg, #2185ff, #106ce7); box-shadow: 0 8px 20px rgba(22, 119, 255, .22); }
.guide-secondary-link { border: 1px solid #d2dce9; color: #536176 !important; background: #fff; }
.guide-endpoint-card { padding: 25px; border: 1px solid rgba(206, 219, 235, .92); border-radius: 17px; background: rgba(255, 255, 255, .92); box-shadow: 0 24px 70px rgba(34, 62, 104, .13); }
.guide-endpoint-card > span { color: #748198; font-size: 12px; font-weight: 650; }
.guide-endpoint-card > code { display: block; margin: 8px 0 13px; overflow-wrap: anywhere; color: #17263d; background: transparent; font-size: clamp(18px, 2.2vw, 25px); font-weight: 750; }
.guide-endpoint-card > div { display: flex; align-items: center; gap: 8px; color: #19855f; font-size: 12px; font-weight: 650; }
.guide-endpoint-card > div i { width: 8px; height: 8px; border-radius: 50%; background: #20bc82; box-shadow: 0 0 0 5px rgba(32, 188, 130, .11); }
.guide-endpoint-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 0; }
.guide-endpoint-card dl > div { padding: 11px; border-radius: 9px; background: #f5f8fc; }
.guide-endpoint-card dt, .guide-endpoint-card dd { margin: 0; }
.guide-endpoint-card dt { color: #8491a5; font-size: 11px; }
.guide-endpoint-card dd { margin-top: 4px; color: #3f4e64; font-size: 12px; font-weight: 700; }

.guide-notice { padding: 18px 20px; border: 1px solid; border-radius: 12px; }
.guide-notice strong { display: block; margin-bottom: 4px; font-size: 13px; }
.guide-notice p { margin: 0; color: inherit; font-size: 13px; line-height: 1.7; }
.guide-notice.important { border-color: #cbdff8; color: #315c90; background: #edf5ff; }
.guide-notice.safe { margin: 20px 0; border-color: #c9e9de; color: #2d705b; background: #effaf6; }

.guide-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 52px; align-items: start; padding: 58px 0 90px; }
.guide-toc { position: sticky; top: 98px; padding: 17px 15px; border: 1px solid #e0e7f0; border-radius: 12px; background: rgba(255, 255, 255, .78); }
.guide-toc > strong { display: block; margin-bottom: 10px; color: #405068; font-size: 12px; }
.guide-toc nav { display: grid; gap: 2px; }
.guide-toc nav a { padding: 7px 8px; border-radius: 7px; color: #718097; font-size: 12px; }
.guide-toc nav a:hover { color: #146fe8; background: #edf5ff; }
.guide-content { min-width: 0; }
.guide-section { scroll-margin-top: 95px; padding: 0 0 68px; }
.guide-section + .guide-section { padding-top: 4px; }
.guide-section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.guide-section-heading > span { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #176fdc; background: #e8f2ff; font-size: 12px; font-weight: 800; }
.guide-section-heading h2 { margin: -2px 0 4px; color: #172238; font-size: 25px; }
.guide-section-heading p { margin: 0; font-size: 13px; }
.guide-section h3 { margin: 28px 0 11px; color: #26354c; font-size: 15px; }
.guide-section > p { font-size: 13px; line-height: 1.8; }
.guide-section code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.guide-section :not(pre) > code { padding: 2px 5px; border-radius: 5px; color: #225d9f; background: #edf4fc; overflow-wrap: anywhere; }
.guide-section pre { margin: 13px 0 18px; overflow-x: auto; padding: 19px 21px; border: 1px solid #1b2c47; border-radius: 12px; color: #dce8f8; background: #0d1829; box-shadow: 0 12px 26px rgba(12, 25, 45, .12); font-size: 12px; line-height: 1.75; tab-size: 2; }
.guide-section pre code { color: inherit; background: transparent; }

.guide-parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guide-parameter-grid > div { min-width: 0; padding: 14px 16px; border: 1px solid #e1e8f1; border-radius: 10px; background: #fff; }
.guide-parameter-grid span, .guide-parameter-grid strong { display: block; }
.guide-parameter-grid span { margin-bottom: 5px; color: #8290a4; font-size: 11px; }
.guide-parameter-grid strong { overflow-wrap: anywhere; color: #344359; font-size: 13px; }
.guide-callout { display: flex; align-items: flex-start; gap: 11px; margin: 18px 0; padding: 15px 17px; border: 1px solid #dbe7f5; border-radius: 10px; color: #46617f; background: #f4f8fd; }
.guide-callout > span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #3b83de; font-size: 11px; font-weight: 800; }
.guide-callout p { margin: 0; color: inherit; font-size: 12px; line-height: 1.7; }
.guide-callout.warning { border-color: #f0dfbc; color: #795c25; background: #fff9ed; }
.guide-callout.warning > span { background: #d79a2c; }
.guide-table-wrap { margin: 18px 0; overflow-x: auto; border: 1px solid #e1e8f1; border-radius: 11px; background: #fff; }
.guide-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.guide-table-wrap caption { padding: 13px 15px; color: #344359; font-weight: 750; text-align: left; }
.guide-table-wrap th { padding: 11px 14px; color: #68768b; background: #f6f8fb; font-size: 11px; text-align: left; white-space: nowrap; }
.guide-table-wrap td { padding: 13px 14px; border-top: 1px solid #edf1f5; color: #526076; vertical-align: top; }
.guide-table-wrap td code { white-space: nowrap; }

.guide-steps { display: grid; margin: 0; padding: 0; gap: 9px; list-style: none; }
.guide-steps li { display: flex; align-items: flex-start; gap: 13px; padding: 14px 16px; border: 1px solid #e1e8f1; border-radius: 10px; background: #fff; }
.guide-steps li > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #1971dc; background: #e9f3ff; font-size: 11px; font-weight: 800; }
.guide-steps strong { color: #35445b; font-size: 13px; }
.guide-steps p { margin: 3px 0 0; font-size: 12px; }
.guide-certificate { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.guide-certificate > div { min-width: 0; padding: 13px 15px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; }
.guide-certificate .full { grid-column: 1 / -1; }
.guide-certificate span, .guide-certificate strong, .guide-certificate code { display: block; }
.guide-certificate span { margin-bottom: 5px; color: #8290a4; font-size: 11px; }
.guide-certificate strong { color: #405068; font-size: 12px; }
.guide-certificate code { overflow-wrap: anywhere; color: #285e9f; font-size: 11px; line-height: 1.7; }
.guide-caption { margin-top: 9px !important; color: #8491a4 !important; font-size: 11px !important; }

.guide-prefix { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border: 1px solid #cfe0f6; border-radius: 11px; background: linear-gradient(135deg, #f6faff, #edf5ff); }
.guide-prefix span { color: #61758e; font-size: 12px; }
.guide-prefix code { color: #1b64ba !important; background: transparent !important; font-size: 15px; font-weight: 750; }
.guide-direction { display: inline-flex; min-width: 42px; justify-content: center; padding: 3px 7px; border-radius: 99px; font-size: 10px; font-weight: 750; }
.guide-direction.up { color: #187a58; background: #e8f8f2; }
.guide-direction.down { color: #255faf; background: #e9f2ff; }
.guide-rules { display: grid; margin: 18px 0 0; padding-left: 20px; gap: 8px; color: #59677b; font-size: 12px; line-height: 1.7; }
.guide-field-grid, .guide-practice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guide-field-grid > div, .guide-practice-grid > div { padding: 14px 16px; border: 1px solid #e1e8f1; border-radius: 10px; background: #fff; }
.guide-field-grid p, .guide-practice-grid p { margin: 5px 0 0; font-size: 12px; }
.guide-practice-grid strong { color: #35445b; font-size: 13px; }
.guide-lwt { padding: 17px; border: 1px solid #d9e5f3; border-radius: 11px; background: #f8fbff; }
.guide-lwt dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: 8px; }
.guide-lwt dl > div { min-width: 0; padding: 10px 12px; border-radius: 8px; background: #fff; }
.guide-lwt dt { color: #8793a6; font-size: 10px; }
.guide-lwt dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #405068; font-size: 12px; font-weight: 700; }
.guide-lwt p { margin: 12px 2px 0; font-size: 12px; line-height: 1.7; }
.guide-security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.guide-security-grid > div { display: flex; align-items: flex-start; gap: 11px; padding: 14px 15px; border: 1px solid #e1e8f1; border-radius: 10px; background: #fff; }
.guide-security-grid span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #16815b; background: #e8f8f1; font-size: 10px; font-weight: 800; }
.guide-security-grid p { margin: 2px 0 0; color: #4e5d72; font-size: 12px; line-height: 1.65; }
.guide-footer { display: flex; min-height: 80px; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1220px) / 2)); border-top: 1px solid #dfe6ef; color: #7c899c; background: #fff; font-size: 12px; }
.guide-footer a { color: #176fdc; font-weight: 650; }

@media (max-width: 900px) {
  .guide-topbar nav { display: none; }
  .guide-portal-link { margin-left: auto; }
  .guide-hero { grid-template-columns: 1fr; gap: 30px; padding: 54px 0 42px; }
  .guide-endpoint-card { max-width: 520px; }
  .guide-layout { grid-template-columns: 1fr; gap: 25px; padding-top: 40px; }
  .guide-toc { position: static; }
  .guide-toc nav { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 650px) {
  .guide-shell { width: min(100% - 28px, 1220px); }
  .guide-topbar { min-height: 62px; padding: 0 14px; }
  .guide-brand small { display: none; }
  .guide-portal-link { padding: 7px 10px; font-size: 11px; }
  .guide-hero { min-height: 0; padding-top: 42px; }
  .guide-hero h1 { font-size: 38px; }
  .guide-hero-copy > p { font-size: 14px; }
  .guide-endpoint-card dl { grid-template-columns: 1fr; }
  .guide-toc nav { grid-template-columns: repeat(2, 1fr); }
  .guide-parameter-grid, .guide-field-grid, .guide-practice-grid, .guide-security-grid, .guide-certificate { grid-template-columns: 1fr; }
  .guide-certificate .full { grid-column: auto; }
  .guide-prefix { align-items: flex-start; flex-direction: column; gap: 7px; }
  .guide-lwt dl { grid-template-columns: 1fr; }
  .guide-section { padding-bottom: 52px; }
  .guide-section-heading h2 { font-size: 22px; }
  .guide-section pre { padding: 16px; font-size: 11px; }
  .guide-footer { padding: 18px 14px; gap: 15px; }
}

/* Soft real-time monitoring workspace ------------------------------------ */
[data-live-only][hidden] { display: none !important; }

#view-telemetry.telemetry-workspace {
  --telemetry-bg: #f5f8fb;
  --telemetry-card: #fff;
  --telemetry-border: #e1e8ef;
  --telemetry-border-strong: #d4e0ea;
  --telemetry-text: #34465a;
  --telemetry-muted: #7d8b9b;
  --telemetry-primary: #568fc2;
  --telemetry-primary-soft: #edf5fb;
  --telemetry-teal: #62aaa5;
  --telemetry-teal-soft: #edf8f6;
  --telemetry-online: #43a681;
  --telemetry-online-soft: #ecf8f3;
  --telemetry-offline: #97a3ae;
  --telemetry-offline-soft: #f1f4f6;
  --telemetry-warning: #cf9748;
  --telemetry-warning-soft: #fff7e9;
  --telemetry-danger: #d66e6e;
  --telemetry-danger-soft: #fff1f1;
  --telemetry-shadow: 0 8px 24px rgba(54, 75, 99, .055);
  min-width: 0;
}

.telemetry-page-heading { margin-bottom: 17px; }
.telemetry-page-heading p { max-width: 760px; }

.telemetry-toolbar {
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 14px;
  padding: 9px 11px;
  border: 1px solid var(--telemetry-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--telemetry-shadow);
}

.telemetry-toolbar-primary,
.telemetry-toolbar-secondary,
.telemetry-source-switch,
.telemetry-status-filters {
  display: flex;
  min-width: 0;
  align-items: center;
}

.telemetry-toolbar-primary { flex: 1 1 auto; gap: 11px; }
.telemetry-toolbar-secondary { flex: 0 1 auto; justify-content: flex-end; gap: 7px; }

.telemetry-source-switch {
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dce6ee;
  border-radius: 9px;
  background: #f5f8fa;
}

.telemetry-source-button {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  color: #758497;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.telemetry-source-button .icon { width: 14px; height: 14px; }
.telemetry-source-button:hover { color: #4f739a; background: rgba(255, 255, 255, .75); }
.telemetry-source-button.active,
.telemetry-source-button[aria-pressed="true"] {
  color: #386d9f;
  background: #fff;
  box-shadow: 0 3px 10px rgba(54, 79, 103, .08);
}

.telemetry-status-filters {
  gap: 2px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.telemetry-status-filters::-webkit-scrollbar { display: none; }

.telemetry-filter-button {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  color: #7b8999;
  background: transparent;
  font-size: 10px;
  white-space: nowrap;
}

.telemetry-filter-button:hover { color: #4f718f; background: #f4f8fb; }
.telemetry-filter-button.active,
.telemetry-filter-button[aria-pressed="true"] { color: #3d74a6; background: var(--telemetry-primary-soft); font-weight: 700; }

.filter-state-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--telemetry-offline); }
.filter-state-dot.online { background: var(--telemetry-online); }
.filter-state-dot.offline { background: var(--telemetry-offline); }
.filter-state-dot.warning { background: var(--telemetry-warning); }
.filter-state-dot.unknown { background: #8796a7; }

.telemetry-toolbar-search {
  display: flex;
  width: clamp(180px, 17vw, 250px);
  min-width: 150px;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #dbe5ed;
  border-radius: 8px;
  color: #8290a1;
  background: #f8fafc;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.telemetry-toolbar-search:focus-within { border-color: #9dbedc; background: #fff; box-shadow: 0 0 0 3px rgba(86, 143, 194, .09); }
.telemetry-toolbar-search .icon { width: 14px; height: 14px; }
.telemetry-toolbar-search input { width: 100%; min-width: 0; border: 0; color: var(--telemetry-text); background: transparent; font-size: 10px; }
.telemetry-toolbar-search input::placeholder { color: #a0abb7; }

.telemetry-refresh-control {
  display: flex;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 9px;
  border: 1px solid #dbe5ed;
  border-radius: 8px;
  color: #8190a0;
  background: #fff;
  font-size: 9px;
  white-space: nowrap;
}

.telemetry-refresh-control select { height: 26px; padding: 0 20px 0 5px; border: 0; color: #506276; background: #f5f8fa; font-size: 9px; }

.telemetry-tool-button {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #dbe5ed;
  border-radius: 8px;
  color: #65768a;
  background: #fff;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.telemetry-tool-button.icon-only { width: 36px; padding: 0; }
.telemetry-tool-button .icon { width: 14px; height: 14px; }
.telemetry-tool-button:hover { color: #3f75a5; border-color: #bfd3e5; background: #f4f8fc; }
.telemetry-tool-button.active { color: #3973a6; border-color: #b9d1e4; background: #edf5fb; }
.telemetry-tool-button.refreshing .icon { animation: telemetry-refresh-spin .9s linear infinite; }
@keyframes telemetry-refresh-spin { to { transform: rotate(360deg); } }

.telemetry-console {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(250px, 286px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.telemetry-device-pane {
  position: sticky;
  top: calc(var(--topbar-height) + 61px);
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--telemetry-border);
  border-radius: 12px;
  background: var(--telemetry-card);
  box-shadow: var(--telemetry-shadow);
}

#view-telemetry .live-device-panel-head {
  align-items: center;
  padding: 15px 16px 13px;
  border-bottom: 1px solid #e8eef3;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

#view-telemetry .live-device-panel-head h2 { color: var(--telemetry-text); font-size: 15px; }
#view-telemetry .live-device-panel-head > strong {
  padding: 4px 8px;
  border-radius: 99px;
  color: #4f80ad;
  background: var(--telemetry-primary-soft);
  font-size: 9px;
}

#view-telemetry .industrial-kicker,
.telemetry-section-kicker { color: #6a9ac3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 7px; font-weight: 800; letter-spacing: .14em; }

#view-telemetry .live-device-list {
  display: grid;
  max-height: calc(100dvh - 280px);
  overflow-y: auto;
  padding: 8px;
  gap: 5px;
  scrollbar-color: #d5dfe8 transparent;
  scrollbar-width: thin;
}

#view-telemetry .live-device-group { display: grid; min-width: 0; grid-column: 1 / -1; gap: 5px; }
#view-telemetry .live-device-group + .live-device-group { margin-top: 3px; padding-top: 8px; border-top: 1px solid #edf1f4; }
#view-telemetry .live-device-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 7px; color: #7c8a99; }
#view-telemetry .live-device-group-heading strong { overflow: hidden; color: #63768a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
#view-telemetry .live-device-group-heading span { flex: 0 0 auto; color: #9aa6b2; font-size: 8px; }
#view-telemetry .live-device-group-items { display: grid; min-width: 0; gap: 5px; }

#view-telemetry .live-device-option {
  min-height: 68px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #536377;
  background: transparent;
}

#view-telemetry .live-device-option:hover { border-color: #dde8f1; background: #f7fafc; }
#view-telemetry .live-device-option.active {
  border-color: #bdd5e8;
  color: #356d9f;
  background: linear-gradient(135deg, #edf6fc, #f7fbfd);
  box-shadow: inset 3px 0 #65a4cf;
}

#view-telemetry .live-device-option-copy strong { font-size: 11px; }
#view-telemetry .live-device-option-copy small { color: #8492a2; font-size: 8px; }
#view-telemetry .live-device-option-location { color: #9aa6b3; font-size: 8px; }
#view-telemetry .live-device-option-meta > strong { color: #667688; font-size: 8px; }
#view-telemetry .live-device-option-time { color: #929eab; font-size: 8px; }
#view-telemetry .device-presence-dot.online { background: var(--telemetry-online); box-shadow: 0 0 0 3px rgba(67, 166, 129, .12); }
#view-telemetry .device-presence-dot.offline { background: var(--telemetry-offline); box-shadow: 0 0 0 3px rgba(151, 163, 174, .12); }
#view-telemetry .device-presence-dot.warning { background: var(--telemetry-warning); box-shadow: 0 0 0 3px rgba(207, 151, 72, .13); }

.telemetry-detail-pane { display: grid; min-width: 0; gap: 14px; }

#view-telemetry .telemetry-device-summary {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid var(--telemetry-border);
  border-radius: 12px;
  color: var(--telemetry-text);
  background:
    radial-gradient(circle at 92% -50%, rgba(98, 170, 165, .13), transparent 38%),
    linear-gradient(135deg, #fff, #f8fbfd);
  box-shadow: var(--telemetry-shadow);
}

.telemetry-device-summary-copy { min-width: 0; }
#view-telemetry .telemetry-device-summary h2 { margin: 3px 0 3px; overflow: hidden; color: #34465a; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
#view-telemetry .telemetry-device-summary p { margin: 0; overflow: hidden; color: #7d8b9b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

#view-telemetry .telemetry-device-summary-meta { flex: 0 0 auto; justify-items: end; gap: 7px; text-align: right; }
#view-telemetry .telemetry-device-summary-meta small { color: #8290a0; font-family: inherit; font-size: 8px; }

#view-telemetry .industrial-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #cce9dd;
  border-radius: 99px;
  color: #367f66;
  background: var(--telemetry-online-soft);
  font-size: 9px;
  font-weight: 750;
}

#view-telemetry .industrial-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--telemetry-online); box-shadow: 0 0 0 3px rgba(67, 166, 129, .12); }
#view-telemetry .industrial-state.offline { border-color: #e1e6ea; color: #73808d; background: var(--telemetry-offline-soft); }
#view-telemetry .industrial-state.offline i { background: var(--telemetry-offline); box-shadow: 0 0 0 3px rgba(151, 163, 174, .12); }
#view-telemetry .industrial-state.warning { border-color: #f0dfc1; color: #9a6c2a; background: var(--telemetry-warning-soft); }
#view-telemetry .industrial-state.warning i { background: var(--telemetry-warning); box-shadow: 0 0 0 3px rgba(207, 151, 72, .12); }
#view-telemetry .industrial-state.unknown { border-color: #e0e6eb; color: #768493; background: #f3f6f8; }
#view-telemetry .industrial-state.unknown i { background: #94a1ad; box-shadow: none; }

.telemetry-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }

.telemetry-overview-card {
  --overview-accent: #5d91c3;
  --overview-soft: #edf5fb;
  display: grid;
  min-width: 0;
  min-height: 94px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--telemetry-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--telemetry-shadow);
}

.telemetry-overview-card.tone-green { --overview-accent: #55a584; --overview-soft: #edf8f3; }
.telemetry-overview-card.tone-blue { --overview-accent: #5d91c3; --overview-soft: #edf5fb; }
.telemetry-overview-card.tone-teal { --overview-accent: #5ea7a4; --overview-soft: #edf8f6; }
.telemetry-overview-card.tone-slate { --overview-accent: #7f8d9e; --overview-soft: #f1f4f6; }

.telemetry-overview-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: var(--overview-accent); background: var(--overview-soft); }
.telemetry-overview-icon .icon { width: 17px; height: 17px; }
.telemetry-overview-card > div { min-width: 0; }
.telemetry-overview-card small,
.telemetry-overview-card strong,
.telemetry-overview-card > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telemetry-overview-card small { color: #8794a3; font-size: 8px; }
.telemetry-overview-card strong { margin: 4px 0 2px; color: #405268; font-size: 13px; font-variant-numeric: tabular-nums; }
.telemetry-overview-card > div > span { color: #9ba6b2; font-size: 7px; }

.telemetry-surface {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--telemetry-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--telemetry-shadow);
}

.telemetry-section-head,
.telemetry-feed-head {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid #e8eef3;
  background: linear-gradient(180deg, #fff, #fafcfd);
}

.telemetry-section-head h2 { margin: 2px 0 2px; color: var(--telemetry-text); font-size: 15px; }
.telemetry-section-head p { margin: 0; color: #8995a3; font-size: 8px; }
.telemetry-section-note { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; color: #6786a5; background: #f0f5fa; font-size: 8px; }

#view-telemetry .live-telemetry-body { min-height: 284px; padding: 14px; color: var(--telemetry-text); }
#view-telemetry .industrial-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

#view-telemetry .industrial-metric-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  overflow: hidden;
  border: 1px solid #e0e9f0;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f8fbfd);
  box-shadow: 0 5px 16px rgba(54, 75, 99, .045);
}

#view-telemetry .industrial-metric-card::after {
  right: -29px;
  bottom: -40px;
  width: 94px;
  height: 94px;
  border-color: rgba(86, 143, 194, .09);
}

#view-telemetry .industrial-metric-head {
  min-height: 35px;
  padding: 10px 12px 5px;
  border: 0;
  background: transparent;
}

#view-telemetry .industrial-metric-head strong { color: #526579; font-size: 10px; }
#view-telemetry .industrial-metric-head small { color: #9ba7b3; font-size: 7px; }

#view-telemetry .industrial-metric-value {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 6px;
  padding: 14px 12px 16px;
}

#view-telemetry .industrial-metric-value > strong {
  color: #467eaf;
  font-size: clamp(22px, 2.25vw, 34px);
  font-weight: 600;
  letter-spacing: -.045em;
  text-shadow: none;
}

#view-telemetry .industrial-metric-value > span:not(.metric-signal-stack) { color: #7f91a3; font-size: 9px; }
#view-telemetry .metric-signal-stack i { width: 4px; height: 4px; background: var(--telemetry-online); box-shadow: 0 0 5px rgba(67, 166, 129, .35); }

#view-telemetry .industrial-metric-card.stale { border-color: #e3e8ec; background: #f7f9fa; box-shadow: none; }
#view-telemetry .industrial-metric-card.stale .industrial-metric-value > strong { color: #7e8e9d; }

#view-telemetry .telemetry-refresh-notice {
  margin-bottom: 11px;
  padding: 10px 12px;
  border: 1px solid #efdfc4;
  border-radius: 8px;
  color: #8f672d;
  background: var(--telemetry-warning-soft);
}

#view-telemetry .telemetry-refresh-notice strong { font-size: 10px; }
#view-telemetry .telemetry-refresh-notice p { color: #a4804e; font-size: 8px; }
#view-telemetry .telemetry-refresh-notice .secondary-button { border-color: #e6d2b1; color: #8b652e; background: #fffaf0; }

#view-telemetry .telemetry-screen-state {
  min-height: 254px;
  padding: 30px 20px;
  color: #8496a8;
}

#view-telemetry .telemetry-screen-state strong { color: #4c5f73; font-size: 14px; }
#view-telemetry .telemetry-screen-state p { color: #8998a8; font-size: 9px; }
#view-telemetry .telemetry-state-icon { border-color: #d7e5ef; color: #6799c3; background: #eff6fb; }
#view-telemetry .telemetry-screen-state.error .telemetry-state-icon { border-color: #f0d2d2; color: #bf6262; background: var(--telemetry-danger-soft); }
#view-telemetry .telemetry-screen-state .secondary-button { border-color: #caddeb; color: #4f7fa8; background: #f5f9fc; }

#view-telemetry .industrial-loading-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#view-telemetry .industrial-loading-card {
  min-height: 116px;
  border-color: #e0e8ee;
  border-radius: 10px;
  background: linear-gradient(110deg, #f2f5f7 25%, #e7edf1 40%, #f2f5f7 55%);
  background-size: 240% 100%;
}

.telemetry-feed-head { min-height: 51px; padding-top: 8px; padding-bottom: 8px; }
.telemetry-feed-head > small { color: #919daa; font-size: 8px; }
.telemetry-feed-tabs { display: flex; align-self: stretch; align-items: flex-end; gap: 4px; }
.telemetry-feed-tab { position: relative; align-self: stretch; padding: 0 12px; border: 0; color: #7c8998; background: transparent; font-size: 10px; font-weight: 650; }
.telemetry-feed-tab:hover { color: #4e779c; }
.telemetry-feed-tab.active,
.telemetry-feed-tab[aria-selected="true"] { color: #3e76a9; }
.telemetry-feed-tab.active::after,
.telemetry-feed-tab[aria-selected="true"]::after { position: absolute; right: 10px; bottom: -9px; left: 10px; height: 2px; border-radius: 99px; content: ""; background: linear-gradient(90deg, var(--telemetry-teal), var(--telemetry-primary)); }

.telemetry-feed-body { min-width: 0; }
.telemetry-feed-body[hidden] { display: none !important; }
.telemetry-table-scroll { min-width: 0; overflow-x: auto; }
.telemetry-latest-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.telemetry-latest-table th { padding: 11px 14px; color: #7d8998; background: #f8fafc; font-size: 8px; font-weight: 700; text-align: left; white-space: nowrap; }
.telemetry-latest-table td { padding: 12px 14px; border-top: 1px solid #edf1f4; color: #536477; font-size: 9px; }
.telemetry-latest-table tbody tr:hover td { background: #fbfcfd; }
.telemetry-table-empty { display: grid; min-height: 86px; place-items: center; color: #929eaa; font-size: 9px; text-align: center; }
.telemetry-data-state { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 99px; color: #3d8269; background: #edf8f3; font-size: 8px; font-weight: 700; white-space: nowrap; }
.telemetry-data-state::before { width: 5px; height: 5px; border-radius: 50%; content: ""; background: var(--telemetry-online); }
.telemetry-data-state.stale { color: #7a8793; background: #f1f4f6; }
.telemetry-data-state.stale::before { background: var(--telemetry-offline); }

.telemetry-feed-empty { display: grid; min-height: 150px; place-content: center; justify-items: center; padding: 25px; text-align: center; }
.telemetry-feed-empty[hidden] { display: none !important; }
.telemetry-feed-empty > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #718fac; background: #eef4f9; }
.telemetry-feed-empty > span .icon { width: 17px; height: 17px; }
.telemetry-feed-empty strong { margin-top: 9px; color: #536477; font-size: 11px; }
.telemetry-feed-empty p { margin: 4px 0 0; color: #8d99a6; font-size: 8px; }

#view-telemetry:fullscreen {
  overflow: auto;
  padding: 22px;
  background: var(--telemetry-bg);
}

#view-telemetry:fullscreen .telemetry-page-heading { display: none; }
#view-telemetry:fullscreen .telemetry-device-pane { top: 14px; }

@media (max-width: 1320px) {
  .telemetry-toolbar { align-items: stretch; flex-direction: column; }
  .telemetry-toolbar-primary,
  .telemetry-toolbar-secondary { width: 100%; }
  .telemetry-toolbar-secondary { justify-content: flex-start; }
  .telemetry-toolbar-search { flex: 1 1 240px; }
  .telemetry-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-telemetry .industrial-metric-grid,
  #view-telemetry .industrial-loading-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .telemetry-console { grid-template-columns: 1fr; }
  .telemetry-device-pane { position: static; }
  #view-telemetry .live-device-list { max-height: 286px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  #view-telemetry .live-device-group-items { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  #view-telemetry .industrial-metric-grid,
  #view-telemetry .industrial-loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .telemetry-toolbar-primary { align-items: stretch; flex-direction: column; }
  .telemetry-source-switch { align-self: flex-start; }
  .telemetry-status-filters { width: 100%; }
  .telemetry-toolbar-secondary { flex-wrap: wrap; }
  .telemetry-toolbar-search { width: 100%; flex: 1 0 100%; }
  .telemetry-refresh-control { flex: 1 1 auto; justify-content: space-between; }
  #view-telemetry .telemetry-device-summary { align-items: flex-start; flex-direction: column; }
  #view-telemetry .telemetry-device-summary-meta { justify-items: start; text-align: left; }
  .telemetry-section-head { align-items: flex-start; }
}

@media (max-width: 560px) {
  .telemetry-toolbar { padding: 8px; }
  .telemetry-source-switch { width: 100%; }
  .telemetry-source-button { flex: 1; justify-content: center; }
  .telemetry-tool-button:not(.icon-only) span { display: none; }
  .telemetry-tool-button:not(.icon-only) { width: 36px; padding: 0; }
  .telemetry-overview-grid { grid-template-columns: 1fr; }
  #view-telemetry .live-device-list { grid-template-columns: 1fr; }
  #view-telemetry .live-device-group-items { grid-template-columns: 1fr; }
  #view-telemetry .industrial-metric-grid,
  #view-telemetry .industrial-loading-grid { grid-template-columns: 1fr; }
  .telemetry-section-head { flex-direction: column; gap: 8px; }
  .telemetry-feed-head { align-items: flex-start; flex-direction: column; }
  .telemetry-feed-tabs { min-height: 35px; align-self: auto; }
  .telemetry-feed-tab.active::after,
  .telemetry-feed-tab[aria-selected="true"]::after { bottom: -8px; }
}

/* Account management and device ownership -------------------------------- */
[data-admin-only][hidden],
[data-device-write][hidden] { display: none !important; }

.primary-button.compact { min-height: 33px; padding: 6px 11px; font-size: 11px; }

.owner-badge { display: inline-grid; gap: 2px; min-width: 92px; }
.owner-badge strong { overflow: hidden; max-width: 150px; color: #46566a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.owner-badge small { overflow: hidden; max-width: 150px; color: #8a97a7; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.owner-badge.unassigned { min-width: 0; padding: 3px 7px; border-radius: 6px; color: #8a6d48; background: #faf3e8; font-size: 9px; }

.settings-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.settings-card-heading h2 { margin-bottom: 4px; }
.settings-card-heading p { margin: 0; font-size: 10px; }
.settings-card-heading .primary-button { flex: 0 0 auto; }
.nested-table-panel { border: 1px solid #e5ebf1; border-radius: 11px; box-shadow: none !important; }
.nested-table-panel .table-toolbar { padding: 12px; }
.nested-table-panel th,
.nested-table-panel td { padding: 11px 12px; }

.user-account-cell { display: flex; min-width: 180px; align-items: center; gap: 10px; }
.user-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #497eaa; background: #edf5fb; font-size: 11px; font-weight: 800; }
.user-account-cell strong,
.user-account-cell small { display: block; }
.user-account-cell strong { color: #35465a; font-size: 11px; }
.user-account-cell small { margin-top: 2px; color: #8491a2; font-size: 9px; }
.role-badge { display: inline-flex; padding: 4px 8px; border-radius: 99px; font-size: 9px; font-weight: 750; }
.role-badge.administrator { color: #466d9a; background: #edf4fb; }
.role-badge.subaccount { color: #4e7d6c; background: #edf7f3; }
.row-user-action { min-height: 32px; padding: 5px 9px; border: 1px solid #d8e3ed; border-radius: 7px; color: #526f8e; background: #f8fbfd; font-size: 9px; font-weight: 700; }
.row-user-action:hover { border-color: #bed1e1; color: #356890; background: #f0f6fa; }

.drawer-owner-editor { display: grid; gap: 12px; padding: 14px; border: 1px solid #dfe9f1; border-radius: 10px; background: #f8fbfd; }
.drawer-owner-editor strong { display: block; color: #40536a; font-size: 11px; }
.drawer-owner-editor p { margin: 3px 0 0; color: #8492a3; font-size: 9px; line-height: 1.55; }
.drawer-owner-controls { display: flex; align-items: center; gap: 8px; }
.drawer-owner-controls select { min-width: 0; height: 36px; flex: 1; padding: 0 31px 0 10px; border: 1px solid #d5e0e9; border-radius: 8px; color: #4b5d72; background: #fff; }

@media (max-width: 768px) {
  .settings-card-heading { align-items: stretch; flex-direction: column; }
  .settings-card-heading .primary-button { align-self: flex-start; }
  .drawer-owner-controls { align-items: stretch; flex-direction: column; }
  .drawer-owner-controls .secondary-button { width: 100%; }
}
