.shared-panel { margin-block: 16px; }
.shared-heading, .shared-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; }
.shared-heading { justify-content: space-between; }
.shared-heading h2, .shared-heading h3, .shared-row h3 { margin: 0; }
.shared-heading > span, .shared-help, .shared-quiet { color: var(--muted, #555d56); }
.shared-row { border-top: 1px solid var(--line, #d8ddd7); margin-top: 14px; padding-top: 14px; }
.shared-summary, .shared-quiet { margin-block: 8px; }
.shared-panel summary { width: fit-content; cursor: pointer; color: var(--accent, #23584a); }
.shared-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.shared-form label, .shared-message label { display: grid; gap: 5px; min-width: 0; }
.shared-form input:not([type="checkbox"]):not([type="radio"]), .shared-form select, .shared-message input { width: 100%; box-sizing: border-box; }
.shared-form label.shared-check { display: flex; gap: 8px; align-items: center; }
.shared-form textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; padding: 9px; }
.shared-form small { color: var(--muted); }
.node-table { max-height: 290px; margin-top: 14px; }
.node-table th small { display: inline; }
.node-table input.node-cooldown { width: 6em; }
.subscription-summary .subscription-caption { display: inline-grid; gap: 2px; max-width: calc(100% - 1em); margin-left: 0; vertical-align: middle; overflow-wrap: anywhere; }
.subscription-caption strong { color: var(--ink, #1f2721); }
.node-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.node-toolbar h3 { margin: 0 0 3px; font-size: 1rem; }
.node-name { width: 220px; min-width: 96px; white-space: normal; overflow-wrap: anywhere; }
.node-name strong, .node-table td small { display: block; }
.node-toggle input { flex: none; }
.node-toggle span { min-width: 0; }
.node-name code { display: inline-block; max-width: 100%; margin-top: 3px; font-size: .74rem; }
.node-table td small { max-width: 11rem; white-space: normal; }
.node-latency { font-variant-numeric: tabular-nums; }
.node-latency strong small { display: inline; }
.node-state[data-status="可用"] { color: var(--green, #16653c); }
.node-state[data-status="故障"] { color: var(--red, #a32929); }
.connection-command { max-width: 100%; overflow-x: auto; padding: 10px; background: var(--paper, #f4f6f3); }
.shared-check input { width: auto; }
.shared-wide, .shared-access { grid-column: 1 / -1; }
.shared-access { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; }
.pool-providers { min-width: 0; margin: 0; }
.pool-provider { border-top: 1px solid var(--line); padding-block: 9px; }
.pool-provider > .shared-check { font-weight: 600; }
.pool-node-scope { margin-block-start: 5px; }
.pool-node-scope > summary { cursor: pointer; color: var(--muted); }
.pool-node-scope > .shared-check { margin-block-start: 6px; }
.pool-node-choices { display: grid; gap: 6px; min-width: 0; margin: 8px 0 0; max-height: 224px; overflow: auto; }
.pool-node-choices span { overflow-wrap: anywhere; }
.pool-node-scope:has(input[value="inherit"]:checked) .pool-node-choices { display: none; }
.shared-message { margin-block: 12px; padding: 12px; border: 1px solid var(--line, #d8ddd7); border-radius: 8px; }
.shared-message input { max-width: 380px; }
.rule-summary span { color: var(--muted); margin-left: 12px; }
.table-scroll { overflow-x: auto; margin-top: 9px; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; text-align: left; font-size: 0.93rem; }
th, td { padding: 7px 9px; border-bottom: 1px solid var(--line); }
@media (max-width: 620px) {
  .frame { width: min(100% - 22px, 1040px); }
  .panel { padding: 13px; }
  .topbar-inner { gap: 8px 12px; }
  nav { order: 3; flex-basis: 100%; }
  .shared-form { grid-template-columns: 1fr; }
}
:root { --paper: #f5f6f2; --panel: #fff; --ink: #202927; --muted: #566662; --accent: #1d6556; --line: #dce3de; }
* { box-sizing: border-box; }
html { font-family: system-ui, "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--paper); }
body { margin: 0; line-height: 1.5; }
a { color: var(--accent); }
.frame { width: min(100% - 36px, 1040px); margin-inline: auto; }
.topbar { background: #142423; color: #f3faf7; }
.topbar-inner { min-height: 64px; display: flex; align-items: center; gap: 18px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { color: inherit; font-size: 1.16rem; font-weight: 700; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 8px 16px; flex: 1; }
nav a { color: #d6e6df; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 26px 16px; }
.hero h1, .login-panel h1 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2.1rem); }
.hero p { margin: 5px 0 0; color: var(--muted); }
.hero > .button { flex: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 18px 21px; }
.panel:last-child { margin-bottom: 30px; }
input, select, button, .button { font: inherit; }
input:not([type="checkbox"]), select { min-height: 37px; padding: 6px 9px; border: 1px solid #b8c8bf; border-radius: 5px; background: #fff; color: var(--ink); }
button, .button { display: inline-block; cursor: pointer; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; color: #fff; background: var(--accent); text-decoration: none; min-height: 36px; }
.secondary { color: var(--ink); background: #f3f6f2; border-color: var(--line); }
button:hover, .button:hover { filter: brightness(0.94); }
:focus-visible { outline: 2px solid #287d68; outline-offset: 2px; }
code { overflow-wrap: anywhere; padding: 2px 4px; border-radius: 3px; background: #eef2ef; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.login-panel { max-width: 420px; margin: clamp(40px, 11vh, 115px) auto; }
.login-form { display: grid; gap: 14px; margin-top: 18px; }
.login-form label { display: grid; gap: 5px; }
.login-form button { justify-self: start; min-width: 85px; }
.error { color: #a42b2a; }

.overview { margin-block: 20px 16px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 14px; }
.section-title h2 { margin: 0; font-size: 1.13rem; }
.sample-time { color: var(--muted); font-size: .83rem; }
.subscription-grid { margin-top: 11px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.subscription-card, .subscription-card:last-child { min-width: 0; margin: 0; padding: 15px; }
.subscription-card h3 { font-size: 1rem; }
.quota { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.quota strong { font-size: 2rem; line-height: 1; }
.quota-label, .card-line small { color: var(--muted); font-size: .82rem; }
.card-line { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; min-width: 0; }
.card-line p { margin: 3px 0 0; font-size: .92rem; }
.card-label { font-size: .87rem; font-weight: 600; }
.node-list { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.fault { color: #925024; }
.task-panel { padding-bottom: 11px; }
.task-controls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.task-controls input { width: min(100%, 250px); }
.task-controls > span { font-size: .87rem; color: var(--muted); margin-left: auto; }
.table-live { max-height: 365px; }
.table-live table { min-width: 670px; }
.table-live thead th { position: sticky; top: 0; background: #f4f7f4; box-shadow: inset 0 -1px var(--line); }
.table-live th, .table-live td { vertical-align: top; }
.table-live tbody th { font-weight: 600; }
.table-live small { display: block; font-size: .73rem; color: var(--muted); font-weight: 400; }
.table-live tr:hover { background: #f8faf8; }
.empty-result { padding: 6px 9px; }

@media (max-width: 820px) {
  .subscription-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .frame { width: min(100% - 22px, 1040px); }
  .panel { padding: 13px; }
  .hero { align-items: flex-start; flex-wrap: wrap; }
  .subscription-grid { grid-template-columns: 1fr; gap: 9px; }
  .task-controls > span { margin-left: 0; }
}
