:root {
  color-scheme: light;
  --ink: #242e3b;
  --text: #344153;
  --subtle: #596777;
  --line: #dce4eb;
  --line-soft: #e3e8ee;
  --accent: #285e78;
  --accent-text: #265f8e;
  --accent-hover: #204f68;
  --accent-soft: #eaf2f8;
  --focus: #4a7fa9;
  --surface: #fff;
  --canvas: #f3f5f7;
  --surface-muted: #f6f8fa;
  --row-hover: #f5f8fb;
  --radius: 6px;
  --control-height: 32px;
  --table-size: .875rem;
  --table-pad-block: 9px;
  --shadow-overlay: 0 16px 40px #242e3b24;
}
:root[data-table-density="compact"] {
  --table-size: .8125rem;
  --table-pad-block: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: .875rem/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
::selection { color: var(--ink); background: #d5e8f6; }
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea {
  min-width: 0;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
input, select, textarea { padding: 5px 9px; }
input, textarea { caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--accent);
}
textarea { resize: vertical; }
button {
  padding: 5px 10px;
  color: var(--text);
  cursor: pointer;
  transition: background-color .16s, border-color .16s, color .16s;
}
button:hover:not(:disabled) {
  border-color: #b7cddc;
  background: var(--accent-soft);
  color: var(--accent-hover);
}
button:disabled { opacity: .58; cursor: not-allowed; }
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}
button.primary:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
}
:where(button, input, select, textarea, a, .tablewrap):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a { color: var(--accent-text); text-underline-offset: .15em; }

.content {
  display: flow-root;
  min-width: 0;
  max-width: 1920px;
  margin-inline: auto;
  padding: 12px clamp(12px, 1.25vw, 22px) 28px;
}
.card {
  min-width: 0;
  margin-bottom: 12px;
  padding: clamp(12px, 1.2vw, 18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h2 { margin: 0 0 12px; font-size: 1.125rem; line-height: 1.35; font-weight: 650; }
.card h3 { margin: 0 0 8px; font-size: .9375rem; font-weight: 650; }
.card > :last-child { margin-bottom: 0; }
.card > :where(input, select) { max-width: 100%; margin-bottom: 10px; }
.muted { color: var(--subtle); font-size: .8125rem; }
.banner {
  padding: 10px 14px;
  margin: 0 0 12px;
  border: 1px solid #efd598;
  border-radius: 5px;
  color: #704a09;
  background: #fff8e8;
}
#erp-load-status { margin: 12px clamp(12px, 3vw, 34px); }
.filters, .filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.filters { margin-bottom: 12px; }
.filters > input { flex: 0 1 220px; max-width: 100%; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr));
  gap: 0;
  border-block: 1px solid var(--line-soft);
}
.metric {
  min-width: 0;
  padding: 10px 13px;
  border-inline-end: 1px solid var(--line-soft);
}
.metric:last-child { border-inline-end: 0; }
.metric span { color: var(--subtle); }
.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.tablewrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: var(--table-pad-block) 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: var(--table-size);
  line-height: 1.5;
}
th { padding-block: 8px; color: var(--subtle); background: var(--surface-muted); font-size: .8125rem; font-weight: 650; }
td { color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:not(:has(.table-empty)):hover td, tbody tr:focus-within td { background: var(--row-hover); }
td button {
  min-height: 26px;
  padding: 2px 7px;
  border-color: transparent;
  background: transparent;
  color: var(--accent-text);
  font-size: .8125rem;
  font-weight: 500;
}
.table-empty { padding: 23px 13px; color: var(--subtle); text-align: center; }
.table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  white-space: nowrap;
}
.table-status::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.table-status-good, .table-status-muted { color: var(--subtle); }
.table-status-waiting { color: var(--accent-text); }
.table-status-warning { color: #865018; }
.table-status-error { color: #932f36; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: .75rem;
  white-space: nowrap;
}
.density-control {
  display: inline-flex;
  flex: none;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.density-control button {
  min-height: 26px;
  padding: 3px 7px;
  border-color: transparent;
  color: var(--subtle);
  font-size: .75rem;
  white-space: nowrap;
}
.density-control button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 650;
}

.split {
  display: grid;
  grid-template-columns: minmax(190px, 248px) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.split > * { min-width: 0; }
.room {
  display: block;
  width: 100%;
  margin: 3px 0;
  padding: 5px 9px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  overflow-wrap: anywhere;
}
.room.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 650;
}
.tag-group, .room-group { border-bottom: 1px solid var(--line-soft); }
.room-group > button:not(.room), .tag-group > button:not(.room) {
  min-height: 30px;
  padding: 3px 7px;
  border-color: transparent;
  color: var(--accent);
  font-size: 13px;
}
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }

@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .content { padding: 8px 8px 22px; }
  .filters > input { flex: 1 1 100%; }
  .card { padding: 12px; margin-bottom: 10px; }
  th, td { padding-inline: 10px; }
}
@media (pointer: coarse) {
  button, input, select { min-height: 44px; }
  input:not([type="radio"], [type="checkbox"]), select, textarea { font-size: 1rem; }
  .density-control button, td button { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
