:root {
  color-scheme: light;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #142034;
  background: #f4f6fa;
  font-synthesis: none;
  --muted: #536379;
  --line: #e0e6ee;
  --blue: #204ec9;
  --positive: #087e5b;
  --negative: #b8344a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
a { color: var(--blue); }
p { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid #2d63e2; outline-offset: 3px; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner, main { max-width: 1280px; margin: auto; padding-inline: 44px; }
.topbar-inner { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 740; letter-spacing: -.02em; text-decoration: none; color: #192644; white-space: nowrap; }
.brand-icon { display: flex; align-items: end; justify-content: center; gap: 3px; padding-bottom: 8px; width: 33px; height: 33px; border-radius: 10px; background: #1d3dad; }
.brand-icon i { width: 4px; border-radius: 2px; background: #e7edff; height: 7px; }
.brand-icon i:nth-child(2) { height: 12px; }
.brand-icon i:nth-child(3) { height: 17px; }
nav { display: flex; gap: 4px; padding: 4px; background: #f1f4f9; border-radius: 9px; }
.mode { color: var(--muted); font-size: 13px; font-weight: 650; background: transparent; border: 0; padding: 7px 12px; border-radius: 6px; white-space: nowrap; }
.mode[aria-pressed="true"] { color: var(--blue); background: white; box-shadow: 0 1px 3px #182a4d20; }
main { padding-top: 37px; padding-bottom: 32px; }
.page-header, .reports-header, .report-footer, .picker-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.page-header { margin-bottom: 24px; }
h1 { margin: 0 0 7px; font-size: clamp(27px, 3.3vw, 36px); line-height: 1.3; letter-spacing: -.04em; }
h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; }
.page-description, .reports-header p, .report-footer { color: var(--muted); font-size: 13px; }
.actions, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { border: 1px solid #d6dfea; background: #fff; color: #253651; padding: 9px 13px; min-height: 38px; border-radius: 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.button:hover:not(:disabled) { background: #edf2fa; }
.primary { color: white; background: #224ec6; border-color: #224ec6; }
.primary:hover:not(:disabled) { background: #193caa; }
#sync > span:first-child { font-size: 15px; margin-right: 2px; }
#selected-count { color: #3151a3; margin-left: 3px; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; border: 1px solid #d9e3fa; color: #254782; border-radius: 9px; background: #edf2ff; padding: 11px 14px; font-size: 13px; }
.notice.error { border-color: #f0c7c9; color: #8d2835; background: #fff1f2; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.connection { padding: 44px 28px; text-align: center; }
.connection-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; margin: 0 auto 16px; background: #edf2ff; font-size: 23px; font-weight: 760; color: var(--blue); }
.connection p { color: var(--muted); margin: 8px auto 18px; font-size: 14px; line-height: 1.65; max-width: 520px; }
.report-header { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-bottom: 14px; }
.period { display: grid; gap: 5px; padding: 15px 19px; }
.period + .period { border-left: 1px solid var(--line); }
.period-label, dt { color: var(--muted); font-size: 12px; }
.period strong { font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.summary > div { padding: 13px 17px; }
dt { display: flex; align-items: center; gap: 6px; }
dd { margin: 3px 0 0; font-size: 30px; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.04em; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8191a8; }
.dot.up { background: #108468; }
.dot.down { background: #bf4055; }
.dot.attention { background: #af6e14; }
.reports-header { padding: 17px 19px; }
input[type="search"], select { border: 1px solid #d9e1ec; border-radius: 7px; min-height: 36px; color: #253651; background: white; padding: 6px 10px; font-size: 13px; }
#asset-search { width: 150px; }
.scroll-hint { display: none; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { background: #f5f7fb; color: #4c5c74; font-weight: 650; padding: 10px 14px; font-size: 12px; white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid #ecf0f4; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
tbody tr:hover { background: #f8faff; }
.site-name { display: block; color: #162846; font-weight: 670; overflow-wrap: anywhere; }
a.site-name { text-decoration: none; }
a.site-name:hover { text-decoration: underline; color: var(--blue); }
.sub { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.numeric strong { font-weight: 670; }
.delta-positive { color: var(--positive); }
.delta-negative { color: var(--negative); }
.status { display: inline-flex; border-radius: 6px; padding: 4px 7px; white-space: nowrap; color: #475b76; background: #edf1f7; font-size: 11px; font-weight: 650; }
.status.ok { color: #18674c; background: #e8f7ef; }
.status.partial, .status.pending { color: #80520b; background: #fff2d8; }
.status.error, .status.unavailable { color: #9a2e40; background: #fcecef; }
td:last-child .sub { max-width: 190px; }
.table-empty { text-align: center; color: var(--muted); padding: 28px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.report-footer { align-items: baseline; padding: 12px 2px 0; }
.text-button { padding: 0; border: 0; background: none; color: var(--blue); font-size: 12px; text-align: left; }
.text-button:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 64px #15254f32; }
dialog::backdrop { background: #15254f66; }
.picker-header, .picker-footer { padding: 17px; }
.picker-header p { margin: 6px 0 12px; color: var(--muted); font-size: 13px; }
#picker-search { width: 100%; }
.asset-options { overflow-y: auto; max-height: min(370px, 45vh); border-block: 1px solid var(--line); padding-inline: 17px; }
.asset-option { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 7px 2px; font-size: 13px; overflow-wrap: anywhere; }
.asset-option + .asset-option { border-top: 1px solid #ecf0f4; }
.asset-option input { accent-color: var(--blue); flex-shrink: 0; }
.picker-footer > span { color: var(--muted); font-size: 13px; }

@media (max-width: 810px) {
  .topbar-inner, main { padding-inline: 20px; }
  table { min-width: 630px; }
  .scroll-hint { display: block; padding: 0 13px 9px; color: var(--muted); font-size: 11px; }
}
@media (max-width: 560px) {
  .topbar-inner, main { padding-inline: 14px; }
  main { padding-top: 22px; }
  .page-header, .reports-header, .report-footer { flex-direction: column; align-items: flex-start; }
  .page-header { margin-bottom: 15px; }
  .period { padding: 11px 8px; }
  .period strong { font-size: 11px; overflow-wrap: anywhere; }
  .period strong span { white-space: nowrap; }
  .period-label { font-size: 10px; }
  .summary { gap: 7px; }
  .summary > div { padding: 10px 7px; }
  .summary dt { font-size: 10px; gap: 3px; }
  dd { font-size: 23px; }
  .reports-header { padding: 13px; gap: 10px; }
  #asset-search { width: 116px; }
}
