:root {
  color-scheme: light;
  font-family: "Inter", "Microsoft YaHei UI", system-ui, sans-serif;
  background: #f3f5f8;
  color: #1d2737;
  font-size: 14px;
  --blue: #205cd4;
  --muted: #5c697b;
  --border: #dce2ec;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.top { background: #18253c; color: #fff; }
.top-inner { max-width: 1240px; margin: auto; min-height: 66px; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 21px; font-weight: 750; letter-spacing: .02em; }
main { max-width: 1240px; margin: auto; padding: 34px 28px 50px; }
h1, h2, p { margin: 0; }
h1 { font-size: 29px; }
h2 { font-size: 18px; }
.heading, .section-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.heading { margin-bottom: 20px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; }
.login { padding: 28px; max-width: 390px; margin: 40px auto 18px; }
.login form { margin-top: 24px; display: grid; gap: 14px; }
.login button { margin-top: 4px; }
.settings, .invitation { padding: 18px 22px; }
.invitation { display: flex; justify-content: space-between; align-items: center; }
.invitation p { margin: 6px 0; overflow-wrap: anywhere; }
.settings form { display: flex; align-items: end; gap: 10px; }
.settings label { width: min(430px, 100%); }
label { display: block; font-weight: 650; }
label span { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 7px; }
input, select, button { font: inherit; border: 1px solid #cbd4e1; border-radius: 7px; min-height: 36px; }
input { display: block; width: 100%; margin-top: 6px; padding: 7px 10px; }
select { padding: 5px 8px; background: #fff; }
button { padding: 6px 11px; cursor: pointer; background: #fff; color: #233046; white-space: nowrap; }
button:hover { background: #edf2f9; }
button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
button.primary:hover { background: #1748ac; }
button.quiet { background: transparent; color: #fff; border-color: #66758d; }
button.danger { color: #a82530; }
:focus-visible { outline: 2px solid #4e84ef; outline-offset: 2px; }
.section-head { padding: 17px 22px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 14px; white-space: nowrap; border-top: 1px solid #e5eaf1; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
th { color: #526177; background: #f8f9fc; font-size: 12px; }
td { line-height: 1.45; }
td small, small { color: var(--muted); font-size: 12px; }
td .actions { display: flex; gap: 6px; }
td button { min-height: 30px; }
.status { display: inline-block; border-radius: 999px; padding: 2px 8px; background: #edf0f5; color: #46546c; }
.status.online { background: #e4f6ef; color: #11624d; }
.status.pending { background: #fff2cf; color: #795300; }
.empty { text-align: center; padding-block: 30px; color: var(--muted); }
#message { margin: 12px 0; padding: 9px 12px; border-radius: 7px; background: #ecf4ff; color: #1c4b91; }
#message.error { background: #fce9e9; color: #95212b; }
dialog { width: min(810px, calc(100% - 32px)); border: 1px solid var(--border); border-radius: 12px; padding: 23px; color: inherit; }
dialog::backdrop { background: #15223985; }
.chart-settings { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.legend { margin-top: 18px; display: flex; gap: 16px; color: var(--muted); }
.legend span::before { content: ''; border-left: 11px solid #205cd4; margin-right: 6px; }
.legend span+span::before { border-color: #0d896f; }
canvas { width: 100%; height: auto; display: block; margin-top: 10px; }
#chart-point { min-height: 20px; color: var(--muted); }
@media (max-width: 640px) { main, .top-inner { padding-inline: 15px; } .chart-settings { align-items: start; flex-direction: column; } }
