:root {
  color-scheme: light;
  --ink: #182733;
  --muted: #576b7b;
  --line: #dbe4ea;
  --canvas: #f2f6f8;
  --surface: #ffffff;
  --sidebar: #122632;
  --brand: #136c59;
  --brand-hover: #0d5949;
  --focus: #2d9b82;
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--ink); font-size: 1rem; line-height: 1.45; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .47; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: var(--brand); }
[hidden] { display: none !important; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 218px; display: flex; flex-direction: column;
  padding: 28px 17px 20px; background: var(--sidebar); color: #edf7f5;
}
.identity { display: flex; align-items: center; gap: 11px; margin: 0 0 34px 7px; font-size: 1.02rem; font-weight: 750; white-space: nowrap; }
.brand-mark { position: relative; display: inline-block; width: 32px; height: 32px; border: 1px solid #61b9a5; border-radius: 9px; background: #18453f; flex-shrink: 0; }
.brand-mark::before { content: ""; position: absolute; inset: 7px; border: 1px solid #8cecd4; border-radius: 50%; }
.brand-mark::after { content: ""; position: absolute; width: 5px; height: 5px; top: 10px; left: 17px; border-radius: 50%; background: #96f1da; box-shadow: -5px 6px 0 -1px #96f1da; }
.nav { display: grid; gap: 7px; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; color: #afc6d0; padding: 11px 12px; font-size: .92rem; font-weight: 650; white-space: nowrap; }
.nav-button:hover { color: white; background: #1b3542; }
.nav-button.active { color: #e7faf5; border-color: #346255; background: #22483e; }
.nav-icon { width: 15px; height: 15px; position: relative; flex-shrink: 0; color: currentColor; }
.grid-icon { border: 1.4px solid; border-radius: 3px; background: linear-gradient(90deg,transparent 45%,currentColor 46%,currentColor 53%,transparent 54%), linear-gradient(transparent 45%,currentColor 46%,currentColor 53%,transparent 54%); }
.target-icon { border: 1.4px solid; border-radius: 50%; }
.target-icon::after { content: ""; position: absolute; inset: 3.5px; border: 1px solid; border-radius: 50%; }
.sidebar-bottom { margin-top: auto; padding: 15px 10px; border-top: 1px solid #324954; display: grid; gap: 7px; }
.side-label { font-size: .82rem; color: #b5c8d1; }
.side-value { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8da0ab; display: inline-block; flex: 0 0 8px; }
.dot.online { background: #69d7a6; box-shadow: 0 0 0 3px #315b52; }
.main { margin-left: 218px; padding: 33px 35px 45px; max-width: 1660px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.055em; line-height: 1.12; margin-bottom: 9px; }
h2 { font-size: 1.2rem; letter-spacing: -.025em; }
.subtle { color: var(--muted); font-size: .875rem; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 13px; min-height: 40px; border-radius: 8px; border: 1px solid transparent; font-size: .875rem; font-weight: 680; white-space: nowrap; line-height: 1.3; }
.button.secondary { background: #fff; color: #243944; border-color: var(--line); }
.button.secondary:hover:not(:disabled) { background: #f5f9fa; border-color: #abc1c4; }
.button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.button.primary:hover { background: var(--brand-hover); }
.plus { font-size: 1.125rem; line-height: .9; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 23px; }
.stat { position: relative; background: var(--surface); min-height: 112px; padding: 15px 16px 13px; border: 1px solid var(--line); border-radius: 12px; display: grid; align-content: start; gap: 5px; }
.stat-label { font-size: .88rem; color: #405b68; font-weight: 690; }
.stat strong { font-size: 2rem; line-height: 1.18; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--muted); font-size: .78rem; }
.stat.emphasis { background: #edf8f4; border-color: #acd8cb; }
.stat.emphasis strong { color: #12654e; }
.panel { background: white; border: 1px solid var(--line); border-radius: 13px; overflow: clip; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px 14px; gap: 12px; }
.panel-head h2 { margin-bottom: 3px; }
.filters { display: grid; grid-template-columns: minmax(185px, 1.9fr) repeat(3, minmax(105px, .78fr)); gap: 9px; padding: 0 19px 16px; }
.search, .select-wrap { position: relative; display: block; }
.search input, select, form input:not([type=checkbox]) { background: #fff; border: 1px solid var(--line); min-width: 0; border-radius: 7px; width: 100%; color: var(--ink); padding: 9px 10px; min-height: 40px; font-size: .9rem; }
.search input { padding-left: 34px; }
.search-icon { position: absolute; width: 12px; height: 12px; top: 13px; left: 12px; border: 1.6px solid #5c7787; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; width: 5px; height: 1.5px; background: #5c7787; right: -4px; bottom: -2px; transform: rotate(48deg); }
select { appearance: none; padding-right: 24px; }
.select-wrap::after { content: ""; position: absolute; width: 6px; height: 6px; border: solid #657d8a; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); right: 11px; top: 15px; pointer-events: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: .9rem; }
th { color: #45606d; font-weight: 720; text-align: left; white-space: nowrap; background: #f5f8fa; border-top: 1px solid #e4ecef; border-bottom: 1px solid #e4ecef; padding: 10px 11px; font-size: .83rem; }
td { padding: 11px; border-bottom: 1px solid #e9eff2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fcfdfe; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
.plan-name { display: block; font-weight: 720; line-height: 1.35; overflow-wrap: anywhere; }
.plan-sub { display: block; color: var(--muted); font-size: .76rem; margin-top: 3px; max-width: 36ch; overflow-wrap: anywhere; }
.region-code { font-variant-numeric: tabular-nums; font-weight: 610; color: #314e5b; }
.right { text-align: right; white-space: nowrap; }
.source-link { font-size: .84rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.source-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; min-width: max-content; padding: 3px 8px; background: #ecf1f4; color: #385161; font-size: .81rem; font-weight: 700; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.available { background: #e1f4e9; color: #176249; }
.badge.unavailable { background: #f7eee8; color: #83502c; }
.badge.pending { background: #eaf1fc; color: #365a90; }
.badge.paused { background: #eef1f3; color: #526874; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 19px; border-top: 1px solid #e9eff2; }
.pagination > div { display: flex; gap: 7px; }
.pagination .button { min-height: 34px; padding: 6px 9px; }
.empty { color: var(--muted); text-align: center; padding: 44px 16px; }
.empty p { margin-bottom: 13px; }
.monitor-list { display: grid; gap: 0; }
.monitor { padding: 15px 19px; border-top: 1px solid #e9eff2; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.monitor-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.monitor-text { min-width: 0; }
.monitor-url { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.monitor-meta { margin-top: 3px; font-size: .81rem; color: var(--muted); overflow-wrap: anywhere; }
.monitor-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.monitor-actions .button { min-height: 34px; padding: 5px 9px; font-size: .83rem; }
.monitor-actions .delete { color: #a23c34; }
dialog { padding: 0; border: 1px solid var(--line); border-radius: 14px; width: min(94vw, 560px); color: var(--ink); box-shadow: 0 30px 110px #10272d40; }
dialog::backdrop { background: #10242b85; }
#login-dialog { width: min(94vw, 388px); }
dialog form { padding: 20px 22px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.close { padding: 0 5px; line-height: 1; font-size: 1.5rem; background: transparent; border: 0; color: #42606c; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.full { grid-column: 1 / -1; }
dialog label { display: grid; gap: 4px; font-size: .88rem; font-weight: 660; }
.form-note { margin: 0; }
dialog label.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.form-error { color: #a12b21; font-size: .87rem; margin-top: 9px; }
.toast { position: fixed; inset: auto 24px 23px auto; z-index: 3; border-radius: 8px; padding: 11px 15px; background: #183e32; color: white; font-size: .91rem; box-shadow: 0 8px 30px #15392c30; max-width: min(420px,92vw); }
@media (min-width: 1520px) { .main { padding-left: 44px; padding-right: 44px; } }
@media (max-width: 1120px) { .main { padding-left: 22px; padding-right: 22px; } .sidebar { width: 185px; } .main { margin-left: 185px; } }
@media (max-width: 900px) {
  .sidebar { position: static; flex-direction: row; align-items: center; width: auto; gap: 12px; padding: 9px 14px; }
  .identity { margin: 0; }
  .nav { margin-left: auto; display: flex; gap: 4px; }
  .nav-button { padding: 8px; font-size: .81rem; gap: 5px; }
  .nav-icon, .sidebar-bottom { display: none; }
  .main { margin-left: 0; padding: 20px 15px 32px; }
}
@media (max-width: 560px) {
  .sidebar { gap: 7px; padding: 8px 10px; }
  .identity { gap: 5px; font-size: .8rem; }
  .brand-mark { width: 24px; height: 24px; border-radius: 6px; }
  .brand-mark::before { inset: 5px; } .brand-mark::after { top: 7px; left: 12px; width: 4px; height: 4px; }
  .nav-button { padding: 6px 7px; }
  .main { padding: 17px 11px 28px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 15px; }
  .top-actions { width: 100%; justify-content: space-between; }
  .stats { grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 14px; }
  .stat { min-height: 89px; padding: 9px 11px; gap: 3px; }
  .stat strong { font-size: 1.62rem; }
  .panel-head, .pagination { padding-left: 11px; padding-right: 11px; }
  .filters { grid-template-columns: 1fr 1fr; padding: 0 10px 11px; }
  .search { grid-column: 1 / -1; }
  table { min-width: 570px; }
  td, th { padding-left: 7px; padding-right: 7px; }
  th:first-child, td:first-child { padding-left: 10px; }
  th:last-child, td:last-child { padding-right: 10px; }
  .monitor { grid-template-columns: 1fr; padding: 12px; }
  .monitor-actions { justify-content: flex-start; }
  dialog form { padding: 15px; }
}
