:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg2: #eef2f8;
  --card: rgba(255, 255, 255, .94);
  --card-border: rgba(15, 23, 42, .08);
  --text: #111827;
  --subtext: #6b7280;
  --subtext-soft: #9aa4b2;
  --green: #16a34a;
  --red: #ef4444;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --teal: #06b6d4;
  --purple: #8b5cf6;
  --gray: #cbd5e1;
  --shadow: 0 12px 35px rgba(15, 23, 42, .08);
  --btn-bg: rgba(255, 255, 255, .8);
  --btn-active: #111827;
  --btn-active-text: #ffffff;
  --modal-bg: #ffffff;
  --tooltip-bg: rgba(17, 24, 39, .96);
  --tooltip-text: #f9fafb;
  --footer-text: #9aa4b2;
  --chart-grid: rgba(15, 23, 42, .06);
  --chart-surface: rgba(255, 255, 255, .26);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg2: #11151d;
  --card: rgba(255, 255, 255, .06);
  --card-border: rgba(255, 255, 255, .08);
  --text: #f5f7fa;
  --subtext: #98a2b3;
  --subtext-soft: #738091;
  --green: #32d583;
  --red: #f97066;
  --yellow: #fdb022;
  --blue: #60a5fa;
  --teal: #22d3ee;
  --purple: #a78bfa;
  --gray: rgba(255, 255, 255, .14);
  --shadow: 0 12px 40px rgba(0, 0, 0, .28);
  --btn-bg: rgba(255, 255, 255, .06);
  --btn-active: #ffffff;
  --btn-active-text: #111827;
  --modal-bg: #121723;
  --tooltip-bg: rgba(10, 13, 18, .96);
  --tooltip-text: #f5f7fa;
  --footer-text: #7d8796;
  --chart-grid: rgba(255, 255, 255, .07);
  --chart-surface: rgba(255, 255, 255, .03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-width: 320px; min-height: 100vh; padding: 28px 22px 40px; background: var(--bg); color: var(--text); transition: background .2s ease, color .2s ease; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.container { width: min(1320px, 100%); margin: 0 auto; }
.header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; animation: page-slide-in .55s ease; }
@keyframes page-slide-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.title { margin-bottom: 8px; font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: 0; }
.meta { display: flex; align-items: center; gap: 14px; color: var(--subtext); font-size: 12px; line-height: 1.5; flex-wrap: wrap; }
.global-playing { color: var(--text); font-size: 13px; font-weight: 700; }
.toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.panel-link, .action-btn, .refresh-btn, .theme-btn, .segmented { border: 1px solid var(--card-border); background: var(--btn-bg); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.panel-link { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; border-radius: 999px; color: var(--footer-text); font-size: 13px; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.panel-link:hover { color: var(--blue); transform: translateY(-1px); }
.panel-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; }
.seg-btn { border: 0; border-radius: 999px; background: transparent; color: var(--subtext-soft); padding: 8px 14px; font-size: 13px; font-weight: 700; transition: background .2s ease, color .2s ease; }
.seg-btn.active { background: var(--btn-active); color: var(--btn-active-text); }
.theme-btn, .refresh-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 999px; color: var(--text); font-size: 20px; line-height: 1; transition: color .2s ease, transform .2s ease; }
.theme-btn:hover, .refresh-btn:hover, .action-btn:hover { color: var(--blue); transform: translateY(-1px); }
.refresh-btn.is-spinning { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-moon { display: none; }
body.dark .icon-sun { display: none; }
body.dark .icon-moon { display: inline; }
.action-btn { min-height: 34px; padding: 6px 12px; border-radius: 999px; color: var(--text); font-size: 12px; font-weight: 700; transition: color .2s ease, transform .2s ease; }

.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 10px 0 12px; }
.section-kicker { margin-bottom: 6px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.section-title { color: var(--text); font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: 0; }
.section-hint { padding-bottom: 2px; color: var(--subtext-soft); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.card { overflow: hidden; padding: 20px; border: 1px solid var(--card-border); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(16px); transition: transform .24s ease, opacity .28s ease, border-color .35s ease, box-shadow .35s ease; animation: card-in .45s ease both; }
.card:hover { transform: translateY(-3px); }
.card.scanning-card { animation: card-in .45s ease both, scanning-pulse 2.4s ease-in-out infinite; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes scanning-pulse { 0%, 100% { border-color: var(--card-border); } 50% { border-color: color-mix(in srgb, var(--blue) 48%, transparent); box-shadow: 0 16px 40px color-mix(in srgb, var(--blue) 16%, transparent); } }
.card-content { min-width: 0; animation: fade-switch .32s ease; }
@keyframes fade-switch { from { opacity: .42; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.server-link { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
.server-link:hover { color: var(--blue); opacity: .95; }
.server-title-wrap { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 999px; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.status-dot.online { background: var(--green); color: var(--green); }
.status-dot.offline { background: var(--red); color: var(--red); }
.status-dot.unknown { background: var(--gray); color: var(--gray); }
.status-dot.scanning { background: var(--blue); color: var(--blue); animation: dot-pulse 1.6s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.18); opacity: .78; } }
.server-name { max-width: 100%; overflow-wrap: anywhere; font-size: 22px; font-weight: 800; line-height: 1.2; }
.link-icon { width: 14px; height: 14px; flex: 0 0 auto; opacity: .72; }
.status-badge { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 220px; padding: 8px 12px 10px; overflow: hidden; border: 1px solid transparent; border-radius: 14px; font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; flex-shrink: 0; }
.status-badge.online { background: color-mix(in srgb, var(--green) 14%, transparent); border-color: color-mix(in srgb, var(--green) 28%, transparent); color: var(--green); }
.status-badge.offline { background: color-mix(in srgb, var(--red) 14%, transparent); border-color: color-mix(in srgb, var(--red) 28%, transparent); color: var(--red); }
.status-badge.unknown { background: color-mix(in srgb, var(--gray) 18%, transparent); border-color: color-mix(in srgb, var(--gray) 28%, transparent); color: var(--subtext); }
.status-badge.scanning { background: color-mix(in srgb, var(--blue) 14%, transparent); border-color: color-mix(in srgb, var(--blue) 28%, transparent); color: var(--blue); }
.status-text { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scan-percent { font-size: 11px; font-weight: 700; opacity: .9; }
.scan-progress-track { position: relative; z-index: 2; width: 100%; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.scan-progress-fill { height: 100%; border-radius: inherit; background: currentColor; opacity: .92; transition: width .35s ease; }
.status-badge.scanning::before { position: absolute; inset: -40% auto -40% -35%; width: 38%; content: ""; transform: skewX(-24deg); background: rgba(255, 255, 255, .18); animation: scan-shine 2.2s linear infinite; z-index: 1; pointer-events: none; }
@keyframes scan-shine { 0% { left: -38%; } 100% { left: 120%; } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-box { padding: 16px; border: 1px solid var(--card-border); border-radius: 16px; background: color-mix(in srgb, var(--card) 92%, transparent); cursor: pointer; transition: transform .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s cubic-bezier(.4, 0, .2, 1), border-color .3s ease; }
.stat-box:hover { transform: translateY(-4px) scale(1.04); border-color: color-mix(in srgb, var(--blue) 45%, var(--card-border)); box-shadow: 0 10px 25px -4px color-mix(in srgb, var(--blue) 18%, transparent); }
.stat-box-playing { position: relative; border-color: color-mix(in srgb, var(--purple) 48%, transparent); background: color-mix(in srgb, var(--purple) 12%, var(--card)); box-shadow: 0 4px 18px -3px color-mix(in srgb, var(--purple) 28%, transparent); }
.stat-box-playing:hover { border-color: color-mix(in srgb, var(--purple) 55%, transparent); box-shadow: 0 12px 28px -4px color-mix(in srgb, var(--purple) 38%, transparent); }
.stat-label { margin-bottom: 8px; color: var(--subtext); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; transition: transform .35s ease, color .35s ease; }
.history-section { margin-bottom: 16px; }
.history-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--subtext-soft); font-size: 13px; }
.history-title-left, .status-indicators, .status-indicator { display: inline-flex; align-items: center; }
.history-title-left { gap: 12px; }
.status-indicators { gap: 12px; color: var(--subtext-soft); font-size: 12px; flex-wrap: wrap; }
.status-indicator { gap: 6px; }
.status-indicator-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 999px; }
.status-indicator-dot.online { background: var(--green); }
.status-indicator-dot.offline { background: var(--red); }
.availability-mini { color: var(--subtext-soft); font-size: 12px; white-space: nowrap; }
.availability-mini b { font-weight: 800; }
.uptime-good { color: var(--green); }
.uptime-mid { color: var(--yellow); }
.uptime-bad { color: var(--red); }
.history-wrap-inner { width: 100%; max-width: 100%; }
.history-grid { display: grid; width: 100%; gap: 4px; align-items: center; }
.history-grid.range-24h { grid-template-columns: repeat(24, minmax(0, 1fr)); }
.history-grid.range-7d { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.history-grid.range-30d { grid-template-columns: repeat(30, minmax(0, 1fr)); }
.history-block { width: 100%; height: 14px; border-radius: 4px; background: var(--gray); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.history-block:hover { transform: scale(1.08); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); }
.history-block.online { background: var(--green); opacity: .92; }
.history-block.offline { background: var(--red); opacity: .92; }
.history-block.nodata { background: var(--gray); opacity: .5; }
.history-axis-line, .chart-axis { position: relative; color: var(--subtext-soft); font-size: 10px; }
.history-axis-line { height: 20px; margin-top: 8px; padding: 0 6px; }
.axis-point, .chart-axis-point { position: absolute; white-space: nowrap; }
.axis-point.start, .chart-axis-point.start { left: 6px !important; transform: none !important; text-align: left; }
.axis-point.end, .chart-axis-point.end { right: 6px; left: auto !important; transform: none !important; text-align: right; }
.axis-point.middle, .chart-axis-point.middle { transform: translateX(-50%); }

.chart-section { margin-bottom: 16px; padding: 14px 14px 10px; border: 1px solid var(--card-border); border-radius: 16px; background: var(--chart-surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.chart-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.chart-title { color: var(--subtext-soft); font-size: 13px; font-weight: 700; }
.chart-mode-switch { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chart-mode-btn { padding: 5px 10px; border: 1px solid var(--card-border); border-radius: 999px; background: transparent; color: var(--subtext-soft); font-size: 11px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.chart-mode-btn.active { border-color: color-mix(in srgb, var(--text) 18%, transparent); background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.chart-body { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: stretch; }
.chart-y-axis { position: relative; height: 36px; color: var(--subtext-soft); font-size: 10px; }
.chart-y-label { position: absolute; left: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-y-label.top { top: 0; transform: translateY(-10%); }
.chart-y-label.mid { top: 50%; transform: translateY(-50%); }
.chart-y-label.bottom { bottom: 0; transform: translateY(20%); }
.chart-main { min-width: 0; }
.chart-wrap { position: relative; height: 36px; overflow: hidden; border-radius: 10px; background: linear-gradient(to top, transparent 24%, var(--chart-grid) 25%, transparent 26%), linear-gradient(to top, transparent 49%, var(--chart-grid) 50%, transparent 51%), linear-gradient(to top, transparent 74%, var(--chart-grid) 75%, transparent 76%); background-size: 100% 100%; }
.chart-svg { display: block; width: 100%; height: 100%; }
.chart-line { stroke-width: 1.8; }
.chart-hit-area { position: absolute; inset: 0; display: grid; pointer-events: auto; }
.chart-hit { position: relative; height: 100%; cursor: crosshair; }
.chart-hover-bg { position: absolute; top: 0; bottom: 0; width: 0; border-radius: 8px; background: color-mix(in srgb, var(--text) 7%, transparent); opacity: 0; pointer-events: none; transition: opacity .18s ease, left .18s ease, width .18s ease; }
.chart-hover-bg.show { opacity: 1; }
.chart-hover-line { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--text) 24%, transparent); opacity: 0; pointer-events: none; transition: opacity .18s ease, left .18s ease; }
.chart-hover-line.show { opacity: 1; }
.chart-highlight-point { position: absolute; width: 8px; height: 8px; border-radius: 999px; transform: translate(-50%, -50%) scale(.85); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 2px 8px rgba(0, 0, 0, .12); }
.chart-highlight-point.playingCount { background: var(--purple); }
.chart-highlight-point.onlineUsers { background: var(--teal); }
.chart-highlight-point.totalUsers { background: #60a5fa; }
.chart-highlight-point.totalMediaItems { background: #4ade80; }
.chart-highlight-point.show { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
.chart-axis { height: 14px; margin-top: 6px; padding: 0 6px; }

.private-section { margin-top: 38px; padding-top: 2px; border-top: 1px solid var(--card-border); }
.private-notice { display: inline-flex; min-height: 28px; align-items: center; margin-bottom: 12px; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--blue) 20%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--blue) 8%, transparent); color: var(--subtext); font-size: 12px; line-height: 1.3; }
.table-scroll { overflow-x: auto; border: 1px solid var(--card-border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.monitor-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; }
.monitor-table th { padding: 12px 16px; border-bottom: 1px solid var(--card-border); background: color-mix(in srgb, var(--card) 92%, transparent); color: var(--subtext); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.monitor-table td { padding: 16px; border-bottom: 1px solid color-mix(in srgb, var(--card-border) 70%, transparent); vertical-align: middle; font-size: 13px; }
.monitor-table tbody tr:last-child td { border-bottom: 0; }
.monitor-table tbody tr { transition: background .15s ease, transform .15s ease; }
.monitor-table tbody tr:hover { background: color-mix(in srgb, var(--card) 94%, var(--blue)); transform: translateY(-1px); }
.account-table th:nth-child(1) { width: 22%; }
.account-table th:nth-child(2) { width: 14%; }
.account-table th:nth-child(n + 3) { width: 21.33%; }
.row-primary { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-weight: 750; line-height: 1.35; }
.row-secondary { margin-top: 4px; color: var(--subtext); font-size: 12px; line-height: 1.3; }
.status-pill { display: inline-flex; max-width: 100%; min-height: 26px; align-items: center; gap: 6px; padding: 0 9px; border-radius: 99px; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); font-size: 12px; font-weight: 750; white-space: nowrap; }
.status-pill.warning { background: color-mix(in srgb, var(--yellow) 15%, transparent); color: var(--yellow); }
.status-pill.error { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.status-pill .status-dot { width: 7px; height: 7px; box-shadow: none; }
.cell-error, .error-text { color: var(--red); }
.cell-error { max-width: 220px; margin-top: 7px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.usage-cell { min-width: 140px; }
.usage-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--subtext); font-size: 12px; line-height: 1.3; }
.usage-label strong { color: var(--text); font-size: 13px; font-weight: 800; white-space: nowrap; }
.usage-cell.warning .usage-label strong { color: var(--yellow); }
.usage-cell.critical .usage-label strong { color: var(--red); }
.progress-track { display: block; width: 100%; height: 6px; padding: 0; overflow: hidden; border: 0; border-radius: 99px; background: var(--gray); appearance: none; }
.progress-track::-webkit-progress-bar { border-radius: inherit; background: var(--gray); }
.progress-track::-webkit-progress-value { border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.progress-track::-moz-progress-bar { border-radius: inherit; background: var(--blue); }
.progress-track.warning::-webkit-progress-value, .progress-track.warning::-moz-progress-bar { background: var(--yellow); }
.progress-track.critical::-webkit-progress-value, .progress-track.critical::-moz-progress-bar { background: var(--red); }
.progress-track.empty { opacity: .55; }
.usage-reset { margin-top: 6px; color: var(--subtext); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.empty-row td { padding: 28px 16px; color: var(--subtext); text-align: center; }
.empty-state { padding: 34px 16px; color: var(--subtext); font-size: 14px; }

.login-panel { width: min(460px, 100%); margin: 34px auto 0; padding: 22px; border: 1px solid var(--card-border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.login-panel-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.login-panel-head { margin-bottom: 18px; }
.login-panel h2 { font-size: 19px; line-height: 1.3; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 7px; color: var(--subtext); font-size: 13px; font-weight: 650; }
.login-form input { width: 100%; padding: 11px 12px; border: 1px solid var(--card-border); border-radius: 8px; outline: none; background: var(--btn-bg); color: var(--text); }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.primary-btn { min-height: 40px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-weight: 750; }
.primary-btn:hover { background: color-mix(in srgb, var(--blue) 82%, #000); }
.close-btn { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); font-size: 20px; line-height: 1; }
.form-error { color: var(--red); font-size: 13px; }

.page-footer { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--card-border); text-align: center; color: var(--footer-text); font-size: 13px; line-height: 1.7; user-select: none; }
.copyright-link { color: var(--footer-text); text-decoration: none; opacity: .75; transition: color .2s ease, opacity .2s ease; }
.copyright-link:hover { color: var(--blue); opacity: 1; text-decoration: underline; }
.modal-mask { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); z-index: 9999; }
.modal-mask.show { display: flex; }
.modal { width: min(460px, 100%); padding: 22px; border: 1px solid var(--card-border); border-radius: 20px; background: var(--modal-bg); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: modal-in .2s ease; }
@keyframes modal-in { from { opacity: .6; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { align-items: center; margin-bottom: 18px; }
.modal-title { font-size: 18px; font-weight: 800; }
.detail-list { display: grid; gap: 12px; }
.detail-item { padding: 14px; border: 1px solid var(--card-border); border-radius: 12px; background: color-mix(in srgb, var(--card) 96%, transparent); }
.detail-label { margin-bottom: 6px; color: var(--subtext); font-size: 12px; }
.detail-value { color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.tooltip { position: fixed; min-width: 220px; max-width: 280px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: var(--tooltip-bg); color: var(--tooltip-text); box-shadow: 0 12px 30px rgba(0, 0, 0, .28); font-size: 12px; line-height: 1.6; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .12s ease, transform .12s ease; z-index: 10000; }
.tooltip.show { opacity: 1; transform: translateY(0); }
.tooltip-row + .tooltip-row { margin-top: 4px; }
.tooltip-label { margin-right: 6px; color: rgba(255, 255, 255, .68); }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: calc(100% - 44px); padding: 12px 15px; border: 1px solid var(--card-border); border-radius: 10px; background: var(--modal-bg); color: var(--text); box-shadow: var(--shadow); font-size: 13px; z-index: 10001; }

@media (max-width: 900px) {
  body { padding: 18px 14px 28px; }
  .title { font-size: 24px; }
  .toolbar { width: 100%; justify-content: space-between; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 16px; border-radius: 18px; }
  .server-name { font-size: 18px; }
  .status-badge { max-width: 190px; padding: 7px 10px 9px; font-size: 11px; }
  .stat-value { font-size: 24px; }
}

@media (max-width: 560px) {
  body { padding: 14px 10px 24px; }
  .title { font-size: 22px; }
  .toolbar { align-items: center; gap: 8px; }
  .panel-link { order: 4; }
  .segmented { flex: 1; max-width: calc(100% - 42px); }
  .seg-btn { flex: 1; min-width: 0; padding: 7px 10px; font-size: 12px; }
  .action-btn { flex: 1; }
  .card { padding: 14px; margin: 0 2px; }
  .server-name { font-size: 17px; }
  .status-badge { max-width: 180px; padding: 7px 8px 9px; font-size: 10px; }
  .stats { gap: 8px; }
  .stat-box { padding: 12px; border-radius: 14px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 22px; }
  .history-title { align-items: flex-start; flex-direction: column; font-size: 11px; }
  .availability-mini, .status-indicators { font-size: 10px; }
  .history-block { height: 11px; border-radius: 3px; }
  .history-axis-line { height: 16px; padding: 0 3px; font-size: 9px; }
  .chart-body { grid-template-columns: 28px 1fr; gap: 6px; }
  .chart-wrap, .chart-y-axis { height: 30px; }
  .chart-axis { padding: 0 3px; font-size: 9px; }
  .chart-mode-btn { padding: 4px 8px; font-size: 10px; }
  .monitor-table { min-width: 0; }
  .monitor-table, .monitor-table tbody { display: block; }
  .monitor-table thead { display: none; }
  .monitor-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; padding: 16px 14px; }
  .monitor-table td { display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; padding: 0; border: 0; }
  .monitor-table td::before { content: attr(data-label); color: var(--subtext); font-size: 12px; line-height: 1.4; }
  .monitor-table td > * { min-width: 0; }
  .account-table td { grid-column: 1 / -1; }
  .usage-cell { width: 100%; }
  .empty-row td { display: block; padding: 28px 14px; }
  .empty-row td::before { display: none; }
}
