:root {
  --nav: #122b50;
  --nav-light: #1d3d69;
  --primary: #1764c0;
  --primary-hover: #1252a0;
  --primary-light: #eaf2ff;
  --primary-border: #bfd3ee;
  /* Compatibility tokens for shared prototype components. */
  --teal: var(--primary);
  --teal-light: var(--primary-light);
  --ink: #1d3554;
  --muted: #5f728a;
  --line: #e1e8f0;
  --bg: #f4f7fb;
  --red: #c74943;
  --amber: #a56514;
  --blue: #1764c0;
  --radius: 12px;
  --control-radius: 8px;
  --control-height: 40px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--teal);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #5799eb;
  outline-offset: 3px;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
svg {
  vertical-align: middle;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 0;
  max-width: calc(100vw - 32px);
  transform: translateY(calc(-100% - 10px));
  background: #fff;
  padding: 15px;
  z-index: 200;
}
.skip-link:focus {
  top: 10px;
  transform: none;
}
.sidebar {
  width: 224px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--nav);
  color: #b0bfd3;
  display: flex;
  flex-direction: column;
  z-index: 30;
  line-height: normal;
}
.brand {
  height: 83px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 24px;
  color: #fff;
}
.brand-mark {
  flex-shrink: 0;
  width: 35px;
  height: 39px;
  border-radius: 10px;
  background: #1764c0;
  display: grid;
  place-items: center;
}
.brand-mark .icon {
  width: 24px;
  height: 24px;
}
.brand-copy {
  min-width: 0;
}
.brand-name {
  font-size: 20px;
  letter-spacing: 0.5px;
  font-weight: 750;
  line-height: 1.1;
}
.brand-caption {
  font-size: 12px;
  letter-spacing: 0;
  margin-top: 6px;
  color: #a5b5cc;
}
.workspace-label {
  margin: 5px 16px 20px;
  padding: 11px 12px;
  border: 1px solid #34455c;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e3e8f0;
  font-size: 12px;
}
.workspace-label .icon {
  color: #7895bd;
}
.nav-scroll {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #415674 transparent;
}
.nav-group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  padding: 12px 25px 8px;
  color: #7891b3;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin: 3px 12px;
  padding: 9px 12px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: #b6c3d6;
  width: calc(100% - 24px);
  text-align: left;
  font-size: 12px;
}
.nav-item:hover {
  background: #1d3d69;
  color: #fff;
}
.nav-item.active {
  color: #fff;
  background: #1764c0;
  box-shadow: 0 3px 10px #06152b20;
}
.nav-item .icon {
  width: 17px;
  height: 17px;
}
.nav-item span {
  flex: 1;
}
.nav-item small {
  border: 1px solid #465c7c;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 8px;
  color: #c3cedd;
}
.nav-item.active small {
  border-color: #7490b8;
}
.sidebar-foot {
  margin: 16px;
  padding: 15px 10px 0;
  border-top: 1px solid #2a394f;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8399b9;
}
.sidebar-foot button {
  background: none;
  border: 0;
  padding: 3px;
  color: #abbad0;
}
.shell {
  margin-left: 224px;
}
.topbar {
  height: 72px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
}
.crumb {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.crumb strong {
  color: #26354b;
  font-weight: 550;
}
.scope-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475e7f;
}
.scope-wrap select {
  border: 0;
  background: transparent;
  font-size: 14px;
  max-width: 180px;
  color: #26354b;
  cursor: pointer;
  min-width: 0;
}
.top-utilities {
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.icon-btn {
  background: transparent;
  border: 0;
  display: inline-grid;
  place-items: center;
  width: var(--control-height);
  height: var(--control-height);
  padding: 9px;
  border-radius: var(--control-radius);
  flex-shrink: 0;
  position: relative;
}
.icon-btn:hover {
  background: #edf0f3;
}
.notification-dot {
  position: absolute;
  right: 6px;
  top: 4px;
  width: 5px;
  height: 5px;
  background: #cf534d;
  border-radius: 50%;
  border: 1px solid #fff;
}
.lang-btn {
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  min-height: var(--control-height);
  padding: 8px 10px;
  border-radius: var(--control-radius);
}
.avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: #e5eaf0;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #385175;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-block strong {
  font-size: 13px;
  font-weight: 650;
}
.user-block small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.menu-btn {
  display: none;
}
.main {
  padding: 26px 30px 20px;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 22px;
}
.kicker {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--teal);
  margin-bottom: 8px;
}
.page-heading h1 {
  font-size: 26px;
  letter-spacing: -0.7px;
  line-height: 1.25;
  margin: 0 0 8px;
  font-weight: 680;
}
.page-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.heading-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: white;
  border: 1px solid #d9e0ea;
  border-radius: var(--control-radius);
  padding: 8px 12px;
  min-height: var(--control-height);
  font-size: 14px;
  font-weight: 550;
  white-space: normal;
  line-height: 1.5;
  max-width: 100%;
  text-align: center;
}
.btn .icon {
  width: 17px;
  height: 17px;
}
.btn:hover {
  background: #f1f3f6;
  border-color: #a0b1c9;
}
.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn.primary:hover {
  background: var(--primary-hover);
}
.btn.danger {
  color: var(--red);
  background: #fff4f2;
  border-color: #eed3d0;
}
.btn.ghost {
  border-color: transparent;
  background: none;
  color: var(--teal);
  padding: 6px 0;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 23px;
  border-bottom: 1px solid #d9e0ea;
  margin-bottom: 23px;
  overflow: auto;
  scrollbar-width: thin;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 1px 13px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
.tab.active {
  color: var(--teal);
  border-color: var(--teal);
  font-weight: 650;
}
.tab small {
  font-size: 12px;
  background: #e7ebf1;
  border-radius: 4px;
  padding: 1px 5px;
}
.tab.active small {
  background: #eaf2ff;
  color: #1252a0;
}
.demo-label {
  margin-left: auto;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
  padding-bottom: 12px;
}
.demo-label .dot {
  background: #a4b5cc;
  width: 5px;
  height: 5px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 21px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px 19px 15px;
  min-height: 146px;
  min-width: 0;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.metric:hover {
  box-shadow: 0 4px 14px #21304610;
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  gap: 8px;
}
.metric-top .icon {
  color: var(--muted);
  width: 17px;
}
.metric-number {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 12px;
  font-size: 29px;
  letter-spacing: -0.7px;
  font-weight: 670;
  line-height: 1.1;
}
.metric-number small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.metric-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.metric-foot b {
  font-weight: 500;
  color: var(--teal);
}
.metric-foot b.red {
  color: var(--red);
}
.spark {
  width: 64px;
  height: 29px;
  position: absolute;
  right: 16px;
  bottom: 48px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 1fr);
  gap: 19px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 19px 20px 15px;
  flex-wrap: wrap;
}
.panel-head h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 7px 0 0;
}
.panel-head .btn {
  font-size: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  background: #edf0f4;
  color: var(--muted);
}
.badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.red {
  background: #fff0ee;
  color: #b3433e;
}
.badge.amber {
  background: #fff5e7;
  color: #935b14;
}
.badge.green {
  background: #eaf6f0;
  color: #2d7961;
}
.badge.teal {
  background: #eaf2ff;
  color: #1764c0;
}
.badge.blue {
  background: #edf3fc;
  color: #476b9d;
}
.badge.gray {
  background: #f0f2f4;
  color: var(--muted);
}
.dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  flex-shrink: 0;
  border-radius: 50%;
  background: #2d7961;
}
.alert-strip {
  display: flex;
  gap: 10px;
  margin: 0 20px 11px;
  background: #fff7f0;
  border: 1px solid #f2e5d5;
  padding: 10px 12px;
  border-radius: 7px;
  align-items: center;
  color: #976129;
  font-size: 13px;
}
.alert-strip .icon {
  width: 16px;
}
.alert-strip strong {
  font-weight: 600;
}
.alert-strip span {
  flex: 1;
}
.alarm-list {
  padding: 0 20px;
}
.alarm-row {
  padding: 15px 0;
  border-bottom: 1px solid #edf0f3;
  display: flex;
  align-items: center;
  gap: 11px;
}
.alarm-row:last-child {
  border: 0;
}
.event-icon {
  width: 34px;
  height: 36px;
  border: 1px solid #f7dedb;
  background: #fff3f1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ca5f56;
  flex-shrink: 0;
}
.event-icon.amber {
  color: #b18432;
  background: #fff8ed;
  border-color: #f0e7d3;
}
.event-icon.blue {
  background: #f0f5fc;
  border-color: #dfe8f4;
  color: #5885b6;
}
.event-main {
  min-width: 0;
  flex: 1;
}
.event-main strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 7px;
}
.event-main small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.event-meta {
  text-align: right;
  margin-right: 6px;
}
.event-meta small {
  display: block;
  font-size: 12px;
  margin-top: 7px;
  color: var(--muted);
}
.row-chevron {
  border: 0;
  background: none;
  width: var(--control-height);
  height: var(--control-height);
  flex-shrink: 0;
  padding: 9px;
  color: var(--muted);
}
.row-chevron .icon {
  width: 14px;
}
.panel-footer {
  border-top: 1px solid #eef0f2;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.panel-footer .btn {
  font-size: 14px;
}
.campus {
  position: relative;
  background: #f6f7f9;
  margin: 0 17px;
  border: 1px solid #e6ebf1;
  border-radius: 8px;
  overflow: hidden;
}
.campus svg {
  width: 100%;
  height: 217px;
  display: block;
}
.map-label {
  font-size: 12px;
  fill: #4b6385;
  font-family: inherit;
}
.map-building {
  cursor: pointer;
  transition: opacity 0.2s;
}
.map-building:hover {
  opacity: 0.7;
}
.map-compass {
  position: absolute;
  top: 12px;
  right: 15px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.map-caption {
  position: absolute;
  bottom: 9px;
  left: 11px;
  color: var(--muted);
  font-size: 12px;
}
.map-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 13px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.map-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.substats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 20px 15px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.substats div {
  text-align: center;
  border-right: 1px solid var(--line);
}
.substats div:last-child {
  border: 0;
}
.substats strong {
  font-size: 17px;
  font-weight: 600;
  display: block;
}
.substats small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.category-list {
  padding: 0 20px 12px;
}
.category-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f2f4;
}
.category-row:last-child {
  border: 0;
}
.category-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: #eff2f6;
  border-radius: 6px;
  color: #477bb8;
}
.category-icon .icon {
  width: 17px;
}
.category-title {
  width: 100px;
  font-size: 14px;
}
.bar {
  height: 5px;
  background: #e7ebf1;
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
  min-width: 30px;
}
.bar i {
  height: 100%;
  display: block;
  background: #5a91d4;
  border-radius: 4px;
}
.category-count {
  font-size: 13px;
  text-align: right;
  width: 64px;
  color: var(--muted);
}
.task-list {
  padding: 0 20px 10px;
}
.task-row {
  display: flex;
  gap: 11px;
  align-items: center;
  border-bottom: 1px solid #edf0f3;
  padding: 14px 0;
}
.task-row:last-child {
  border: 0;
}
.task-date {
  width: 44px;
  border: 1px solid #e0e6ee;
  border-radius: 6px;
  text-align: center;
  padding: 5px;
  flex-shrink: 0;
}
.task-date strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.task-date small {
  font-size: 12px;
  color: var(--muted);
}
.task-info {
  flex: 1;
  min-width: 0;
}
.task-info strong {
  font-size: 14px;
  font-weight: 550;
  display: block;
}
.task-info small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.task-row .avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.lower-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 19px;
  margin-top: 19px;
}
.compact-row {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f0f2f4;
  font-size: 12px;
  line-height: 1.6;
}
.compact-row > div {
  flex: 1;
}
.compact-row strong {
  font-size: 14px;
  font-weight: 550;
}
.compact-row small {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.compact-row button {
  font-size: 14px;
}
.mini-tabs {
  display: flex;
  gap: 6px 18px;
  margin: 0 20px 12px;
  flex-wrap: wrap;
}
.mini-tabs button {
  font-size: 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  padding: 8px 0;
  min-height: var(--control-height);
}
.mini-tabs button.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--primary);
}
.activity-dot {
  width: 7px;
  height: 7px;
  border: 2px solid #8caedb;
  border-radius: 50%;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  padding: 21px 0 2px;
  line-height: 1.7;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.table-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  background: #fff;
  border: 1px solid #d9e0ea;
  border-radius: var(--control-radius);
  padding: 8px 12px;
  min-height: var(--control-height);
  flex: 1;
  max-width: 350px;
}
.search-field .icon {
  width: 16px;
  color: var(--muted);
}
.search-field input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 14px;
  min-width: 0;
  background: none;
  color: var(--ink);
}
input,
select,
textarea {
  color: var(--ink);
}
.filter-select {
  background: #fff;
  border: 1px solid #d9e0ea;
  border-radius: var(--control-radius);
  padding: 8px 12px;
  font-size: 14px;
  min-height: var(--control-height);
  line-height: 1.5;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}
.data-table th {
  background: #f8f9fb;
  color: var(--muted);
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.data-table td {
  padding: 16px;
  border-bottom: 1px solid #eef0f3;
  line-height: 1.5;
}
.data-table tr:last-child td {
  border: 0;
}
.data-table td small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.data-table tbody tr:hover {
  background: #fbfcfd;
}
.text-link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--teal);
  font-size: 14px;
  text-align: left;
}
/* Record names and their supporting lines use neutral ink; actions retain the blue theme. */
.text-link.record-title,
.text-link.record-title + small {
  color: #171717;
}
.text-link.record-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-summary {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.table-summary button {
  background: #f1f3f7;
  border: 1px solid #dfe5ed;
  color: var(--teal);
  border-radius: var(--control-radius);
  padding: 8px 12px;
  min-height: var(--control-height);
}
.notice {
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid #cddff5;
  background: #f0f5ff;
  color: #41658e;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.notice.amber {
  background: #fff8ec;
  border-color: #f1e3ca;
  color: #916927;
}
.empty {
  text-align: center;
  padding: 55px 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.empty .icon {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  color: var(--muted);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.info-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 23px;
}
.info-card h3 {
  font-size: 16px;
  margin: 14px 0 10px;
  font-weight: 600;
}
.info-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.info-card .icon {
  width: 26px;
  height: 26px;
  color: var(--teal);
}
.info-card .badge {
  margin: 6px 0 9px;
}
.flow-steps {
  display: flex;
  gap: 10px;
  margin: 17px 0;
  align-items: center;
  flex-wrap: wrap;
}
.flow-step {
  flex: 1;
  min-width: 110px;
  border: 1px solid var(--line);
  background: #f8f9fb;
  padding: 12px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.8;
}
.flow-step.active {
  border-color: #8da6ca;
  background: #eaeff6;
  color: #08397e;
}
.flow-step small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.red-text {
  color: var(--red);
}
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: min(570px, 100%);
  max-width: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: -15px 0 65px #14253d18;
}
dialog::backdrop {
  background: #132b3a55;
  backdrop-filter: blur(2px);
}
.dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dialog-head-title {
  flex: 1;
  min-width: 0;
}
.dialog-head-title .kicker {
  font-size: 12px;
  letter-spacing: 0.8px;
}
.dialog-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.dialog-back {
  border: 1px solid var(--line);
  color: var(--primary);
}
.dialog-title-row h2 {
  flex: 1;
  min-width: 0;
}
.dialog-head h2 {
  font-size: 19px;
  margin: 0;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.dialog-body {
  padding: 24px 25px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.detail-hero {
  padding: 20px;
  background: #f4f6f8;
  border: 1px solid #e2e7ee;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.detail-hero > .icon {
  width: 35px;
  height: 35px;
  color: var(--teal);
}
.detail-hero h3 {
  font-size: 16px;
  margin: 0 0 7px;
}
.detail-hero p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
  margin: 23px 0;
}
.detail-grid dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail-grid dd {
  font-size: 14px;
  margin: 0;
  line-height: 1.8;
}
.dialog-section-title {
  font-size: 16px;
  font-weight: 650;
  margin: 25px 0 13px;
}
.timeline {
  margin: 15px 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  border-left: 1px solid #d2dae5;
  padding: 0 0 20px 20px;
  position: relative;
  font-size: 14px;
  line-height: 1.7;
}
.timeline li:before {
  content: '';
  width: 7px;
  height: 7px;
  border: 3px solid #fff;
  position: absolute;
  left: -7px;
  top: 0;
  background: #6c87ac;
  border-radius: 50%;
}
.timeline small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}
.field input,
.field select,
.field textarea {
  padding: 10px 11px;
  border: 1px solid #dae1ea;
  border-radius: var(--control-radius);
  background: #fff;
  font-size: 14px;
  min-width: 0;
  width: 100%;
}
.field input:not([type='checkbox']),
.field select {
  min-height: var(--control-height);
  padding: 8px 12px;
  line-height: 1.5;
  border-radius: var(--control-radius);
}
.field textarea {
  min-height: 95px;
  resize: vertical;
}
.field input[type='checkbox'] {
  width: auto;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.reading {
  font-size: 35px;
  font-weight: 650;
  letter-spacing: -1px;
}
.reading small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.telemetry-chart {
  width: 100%;
  height: 170px;
  display: block;
  margin: 15px 0;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.field-kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.kanban-column {
  border: 1px solid #e2e7ee;
  border-radius: var(--radius);
  background: #eef0f4;
  padding: 15px;
}
.kanban-column h3 {
  font-size: 16px;
  margin: 0 0 17px;
  display: flex;
  justify-content: space-between;
}
.job-card {
  padding: 17px;
  background: #fff;
  border: 1px solid #dee4ed;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.job-card h4 {
  font-size: 16px;
  margin: 12px 0;
  line-height: 1.6;
}
.job-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.job-card .job-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}
.job-card .job-footer .btn {
  font-size: 14px;
  padding: 8px 12px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: #163761;
  color: #fff;
  padding: 13px 22px;
  border-radius: 8px;
  z-index: 100;
  font-size: 14px;
  box-shadow: 0 4px 24px #17273d25;
  max-width: 90vw;
  text-align: center;
  transition: transform 0.2s;
  pointer-events: none;
}
#toast.visible {
  transform: translateX(-50%) translateY(0);
}
.overlay {
  display: none;
}
.page-body {
  min-height: calc(100vh - 260px);
}
.scope-note {
  font-size: 12px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1650px) {
  .main {
    padding: 30px 40px;
  }
  .topbar {
    padding: 0 40px;
  }
  .metrics {
    gap: 20px;
  }
  .dashboard-grid {
    grid-template-columns: 1.4fr 1fr;
  }
  .campus svg {
    height: 238px;
  }
  .alarm-row {
    padding: 19px 0;
  }
  .task-row {
    padding: 18px 0;
  }
  .category-row {
    padding: 14px 0;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 205px;
  }
  .shell {
    margin-left: 205px;
  }
  .main {
    padding: 23px 22px;
  }
  .topbar {
    padding: 0 22px;
    gap: 12px;
  }
  .user-block > div:last-child {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
  }
  .metric {
    padding: 16px 15px;
  }
  .spark {
    width: 56px;
    right: 12px;
    bottom: 40px;
  }
  .event-meta .badge {
    font-size: 12px;
  }
  .lower-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lower-grid .panel:last-child {
    grid-column: 1/-1;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .tabs {
    gap: 20px;
  }
  .category-title {
    width: 90px;
  }
}
@media (max-width: 1050px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-panel {
    order: 2;
  }
  .devices-panel {
    order: 1;
  }
  .tasks-panel {
    order: 3;
  }
  .campus svg {
    height: 260px;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field-kanban {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .demo-label {
    display: none;
  }
  .top-utilities {
    gap: 9px;
    padding-left: 10px;
  }
  .crumb {
    font-size: 14px;
  }
  .scope-wrap select {
    max-width: 130px;
  }
  .heading-actions {
    align-self: flex-start;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 232px;
  }
  .sidebar.open {
    transform: none;
  }
  .shell {
    margin-left: 0;
  }
  .overlay.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: #0b273966;
    z-index: 25;
  }
  .topbar {
    height: 61px;
    padding: 0 16px;
    gap: 10px;
  }
  .menu-btn {
    display: grid;
  }
  .crumb {
    display: none;
  }
  .scope-wrap {
    margin: 0;
    flex: 1;
  }
  .scope-wrap select {
    max-width: 140px;
    width: 100%;
  }
  .top-utilities {
    margin-left: auto;
    gap: 9px;
  }
  .user-block {
    display: none;
  }
  .main {
    padding: 22px 16px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 14px;
  }
  .metrics {
    gap: 10px;
    margin-bottom: 17px;
  }
  .metric {
    padding: 15px 13px;
    min-height: 125px;
  }
  .metric-number {
    font-size: 27px;
  }
  .metric-top {
    font-size: 14px;
  }
  .spark {
    display: none;
  }
  .metric-foot {
    font-size: 12px;
  }
  .dashboard-grid {
    gap: 16px;
  }
  .lower-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
  }
  .lower-grid .panel:last-child {
    grid-column: auto;
  }
  .panel-head {
    padding: 17px 16px 14px;
  }
  .alarm-list {
    padding: 0 16px;
  }
  .alert-strip {
    margin: 0 16px 8px;
    font-size: 13px;
  }
  .event-main strong {
    font-size: 14px;
  }
  .event-meta {
    margin-right: 0;
  }
  .event-meta .badge {
    font-size: 12px;
  }
  .event-icon {
    width: 29px;
    height: 31px;
  }
  .alarm-row {
    gap: 9px;
  }
  .alarm-row .row-chevron {
    display: none;
  }
  .campus svg {
    height: 220px;
  }
  .tabs {
    gap: 22px;
    margin-bottom: 18px;
  }
  .tab {
    font-size: 14px;
  }
  .footer {
    align-items: flex-start;
    gap: 15px;
    font-size: 12px;
  }
  .footer > span:last-child {
    display: none;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .table-toolbar {
    padding: 13px;
    gap: 8px;
  }
  .search-field {
    min-width: 130px;
    max-width: none;
  }
  .filter-select {
    max-width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .detail-grid {
    gap: 16px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-head {
    padding: 18px 20px;
    align-items: flex-start;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .btn {
    font-size: 14px;
  }
  .data-table td {
    padding: 14px;
  }
  .data-table th {
    padding: 12px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Review pass: improve legibility and touch targets without changing the workflow. */
.nav-item {
  font-size: 13px;
  min-height: 44px;
}
.brand-caption {
  font-size: 12px;
}
.workspace-label {
  font-size: 12px;
}
.metric-top {
  font-size: 14px;
}
.metric-foot {
  font-size: 12px;
}
.metric-number {
  font-size: 31px;
}
.panel-head h2 {
  font-size: 16px;
}
.panel-head p {
  font-size: 13px;
}
.panel-footer {
  font-size: 12px;
}
.event-main .alarm-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
}
.event-main small {
  font-size: 12px;
}
.event-meta small {
  font-size: 12px;
}
.category-title {
  font-size: 14px;
  width: 112px;
}
.category-count {
  font-size: 13px;
}
.badge {
  font-size: 12px;
}
.btn {
  font-size: 14px;
}
.tab {
  font-size: 14px;
}
.data-table {
  font-size: 14px;
}
.data-table th {
  font-size: 13px;
}
.data-table td small {
  font-size: 12px;
}
.task-info .text-link {
  font-size: 14px;
}
.task-info small {
  font-size: 12px;
}
.mini-tabs button {
  font-size: 14px;
}
.compact-row strong,
.compact-row .text-link {
  font-size: 14px;
}
.compact-row small {
  font-size: 12px;
}
.notice {
  font-size: 14px;
}
.info-card p {
  font-size: 14px;
}
.field {
  font-size: 14px;
}
.detail-grid dt {
  font-size: 13px;
}
.detail-grid dd {
  font-size: 14px;
}
.search-field input,
.filter-select {
  font-size: 14px;
}
.job-card h4 {
  font-size: 16px;
}
.job-card p {
  font-size: 14px;
}
#toast:not(.visible) {
  visibility: hidden;
}
.badge.success {
  background: #eaf6f0;
  color: #2d7961;
}
.badge.warning {
  background: #fff5e7;
  color: #935b14;
}
.badge.danger {
  background: #fff0ee;
  color: #b3433e;
}
.badge.info {
  background: #edf3fc;
  color: #476b9d;
}
@media (max-width: 760px) {
  .metric-foot {
    font-size: 12px;
  }
  .metric-top {
    font-size: 14px;
  }
  .metric-number {
    font-size: 29px;
  }
  .event-meta .badge {
    font-size: 12px;
  }
  .event-main .alarm-title {
    font-size: 14px;
  }
  .event-main small {
    font-size: 12px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-footer {
    font-size: 12px;
  }
  .tab {
    font-size: 14px;
  }
  .alarm-row .row-chevron {
    display: none;
  }
  .event-meta small {
    font-size: 12px;
  }
  .btn {
    font-size: 14px;
  }
  .category-title {
    width: 110px;
  }
}
.hazard-summary {
  margin-bottom: 20px;
}
.hazard-summary .panel-head {
  padding-bottom: 13px;
}
.hazard-stats {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 15px 18px;
}
.hazard-stats button {
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 5px 10px;
  text-align: center;
}
.hazard-stats button:last-child {
  border: 0;
}
.hazard-stats span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.hazard-stats strong {
  font-size: 19px;
  font-weight: 600;
}
.hazard-stats button:hover {
  background: #f2f4f8;
}
.page-body > .panel {
  margin-bottom: 18px;
}
@media (max-width: 1050px) {
  .hazard-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 0;
  }
  .hazard-stats button:nth-child(4) {
    border: 0;
  }
}
@media (max-width: 760px) {
  .hazard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 0;
  }
  .hazard-stats button:nth-child(even) {
    border: 0;
  }
  .hazard-stats button:last-child {
    grid-column: 1/-1;
  }
  .hazard-summary .panel-head {
    flex-wrap: wrap;
  }
  .hazard-stats span {
    font-size: 14px;
  }
}
.lang-btn {
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 55px;
}
.event-main .alarm-title,
.event-main small {
  display: block;
}
.alarm-title {
  max-width: 100%;
}
.topbar .scope-wrap {
  min-width: 0;
}
@media (max-width: 760px) {
  .top-utilities {
    gap: 5px;
    padding-left: 8px;
  }
  .scope-wrap select {
    max-width: 132px;
  }
  .metric-foot {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px;
  }
  .event-meta {
    max-width: 105px;
  }
  .event-meta .badge {
    white-space: normal;
    text-align: left;
  }
  .alarm-row {
    align-items: flex-start;
    padding: 17px 0;
  }
  .event-icon {
    margin-top: 3px;
  }
}
