:root {
  --blue: #3370ff;
  --blue-soft: #edf3ff;
  --ink: #1f2329;
  --muted: #657184;
  --line: #e8eaed;
  --canvas: #f7f8fa;
  --paper: #fff;
  --hover: #f4f6f9;
  --green: #16866b;
  --green-soft: #edf8f4;
  --red: #cf4255;
  --red-soft: #fff1f2;
  --shadow: 0 16px 64px #20314b24;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --blue: #729cff;
  --blue-soft: #243750;
  --ink: #e5eaf1;
  --muted: #a0adbe;
  --line: #303b4b;
  --canvas: #151c26;
  --paper: #1d2633;
  --hover: #263243;
  --green: #72d1b7;
  --green-soft: #203d36;
  --red: #ff8898;
  --red-soft: #492a35;
  --shadow: 0 16px 64px #0007;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
  flex-shrink: 0;
}
button svg {
  pointer-events: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
input:focus,
select:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  letter-spacing: -0.5px;
  line-height: 1.4;
  font-weight: 600;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.muted {
  color: var(--muted);
}
.strong {
  font-weight: 600;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}
.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
  padding: 6px 13px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.button:hover {
  background: var(--hover);
  border-color: #bec7d6;
}
.button.primary {
  background: #3370ff;
  border-color: #3370ff;
  color: #fff;
}
.button.primary:hover {
  background: #245fea;
  border-color: #245fea;
}
.button.quiet {
  border-color: transparent;
  background: transparent;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 5px;
  color: var(--muted);
  vertical-align: middle;
}
.icon-button:hover {
  color: var(--ink);
  background: var(--hover);
}
.icon-button.small {
  width: 28px;
  height: 28px;
  padding: 6px;
}
.icon-button.small svg {
  width: 15px;
  height: 15px;
}
.icon-button.destructive:hover {
  color: var(--red);
  background: var(--red-soft);
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 4px 5px;
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
}
.text-button:hover {
  text-decoration: underline;
}
.text-button svg {
  width: 14px;
  height: 14px;
}
.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #3370ff;
  color: white;
  border-radius: 8px;
}
.brand-mark svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}
.brand-caption {
  margin-left: 8px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-divider {
  height: 18px;
  border-left: 1px solid var(--line);
  margin: 0 4px;
}
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.status-dot.warning {
  background: #de983b;
}
.workspace {
  display: flex;
  min-height: calc(100vh - 60px);
}
.sidebar {
  width: 188px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  align-self: flex-start;
  height: calc(100vh - 60px);
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
}
.sidebar-label {
  font-size: 12px;
  letter-spacing: 0.7px;
  color: var(--muted);
  padding: 0 12px;
  margin: 5px 0 9px;
}
.sidebar nav .sidebar-label {
  margin-top: 25px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  color: var(--muted);
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: 13px;
}
.sidebar nav a:hover {
  background: var(--hover);
  color: var(--ink);
}
.sidebar nav a.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}
.sidebar nav a svg {
  width: 17px;
  height: 17px;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-foot .status-dot {
  width: 5px;
  height: 5px;
  margin-right: 5px;
}
.sidebar-foot small {
  display: block;
  margin: 5px 0 0 10px;
  font-size: 12px;
}
.content {
  min-width: 0;
  flex: 1;
  padding: 27px 28px 32px;
  max-width: 1800px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 7px;
}
.page-heading > .button {
  align-self: center;
}
.loading-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 20px 0;
  margin-bottom: 20px;
}
.metric {
  padding: 0 23px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.metric:last-child {
  border-right: 0;
}
.metric > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.metric > span svg {
  width: 15px;
  height: 15px;
  color: #a3adbb;
}
.metric > strong {
  display: block;
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.4;
  margin: 8px 0 7px;
  font-variant-numeric: tabular-nums;
}
.metric small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.metric small em {
  font-style: normal;
  padding: 0 6px;
}
.metric-denominator {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.filter-panel {
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
}
.filter-primary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.compact-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.compact-label select {
  height: 32px;
  min-width: 110px;
  padding: 4px 28px 4px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-size: 13px;
  max-width: 250px;
}
.compact-label select[name="clientId"] {
  min-width: 154px;
}
.period-group {
  display: flex;
  align-items: center;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}
.period-group button {
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.period-group button:hover {
  color: var(--ink);
}
.period-group button.selected {
  color: var(--blue);
  background: var(--paper);
  box-shadow: 0 1px 4px #0000000d;
  font-weight: 600;
}
.filter-primary > .button {
  margin-left: auto;
}
.custom-range {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.custom-range label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.custom-range input {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 4px 8px;
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 20px 15px;
}
.panel-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.panel-heading > svg {
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(260px, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
}
.single-chart {
  margin-bottom: 20px;
}
.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.upload {
  background: #3370ff;
}
.legend-dot.download {
  background: #18a58a;
}
.chart-wrap {
  position: relative;
}
#traffic-chart {
  width: 100%;
  height: 294px;
}
.chart-empty {
  position: absolute;
  top: 85px;
  left: 68px;
  right: 22px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  background: var(--paper);
  width: max-content;
  max-width: 80%;
  margin: 0 auto;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.chart-empty svg {
  color: var(--muted);
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}
.chart-empty strong {
  font-size: 12px;
  font-weight: 500;
}
.chart-empty span {
  font-size: 12px;
  color: var(--muted);
}
.chart-foot {
  display: flex;
  gap: 13px;
  padding: 9px 20px 14px;
  font-size: 12px;
  color: var(--muted);
}
.chart-zoom-hint {
  margin-left: auto;
}
.ranking-panel {
  display: flex;
  flex-direction: column;
}
.ranking-panel .empty-state {
  flex: 1;
  padding: 42px 16px;
}
.rank-list {
  flex: 1;
  padding: 8px 20px 18px;
}
.rank-item {
  display: block;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.rank-item > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.rank-number {
  font-size: 12px;
  color: var(--muted);
  width: 12px;
}
.rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-item strong {
  font-size: 12px;
  margin-left: auto;
  white-space: nowrap;
  font-weight: 500;
}
.rank-track {
  display: block;
  height: 4px;
  background: var(--canvas);
  margin: 8px 0 0 20px;
  border-radius: 3px;
}
.rank-track > span {
  display: block;
  height: 4px;
  background: var(--blue);
  border-radius: 3px;
}
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}
.panel-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.panel-footer svg {
  width: 12px;
  height: 12px;
}
.ranking-panel .panel-footer {
  margin-top: auto;
}
.count-label {
  display: inline-block;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--muted);
  background: var(--canvas);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
th {
  background: var(--canvas);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
th,
td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--hover);
}
tfoot td {
  font-weight: 600;
  background: var(--canvas);
  font-size: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.actions {
  text-align: right;
}
.cell-note {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}
.data-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.data-note svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.empty-state {
  padding: 58px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
}
.empty-state > svg {
  width: 30px;
  height: 30px;
  color: #a3adbb;
  margin-bottom: 3px;
  stroke-width: 1.35;
}
.empty-state strong {
  font-size: 13px;
  font-weight: 500;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
}
.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--canvas);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.notice.danger {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
  margin-bottom: 20px;
}
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.table-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.table-tabs strong {
  font-weight: 600;
  font-size: 13px;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
}
.search-input:focus-within {
  border-color: var(--blue);
}
.search-input svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.search-input input {
  width: 180px;
  border: 0;
  outline: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  box-shadow: none;
}
.client-table {
  min-width: 980px;
}
.client-table th,
.client-table td {
  padding: 13px 14px;
}
.client-table th:first-child,
.client-table td:first-child {
  padding-left: 20px;
}
.client-table th:last-child,
.client-table td:last-child {
  padding-right: 20px;
}
.name-link {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
}
.name-link:hover {
  color: var(--blue);
}
.client-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 6px;
}
.client-avatar svg {
  width: 15px;
  height: 15px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 12px;
}
.badge.online {
  color: var(--green);
  background: var(--green-soft);
}
.badge.offline {
  color: var(--muted);
  background: var(--canvas);
}
.badge.offline .status-dot {
  background: var(--muted);
}
.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #14223666;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 510px;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 23px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.modal > header h2 {
  font-size: 17px;
}
.modal > header p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  max-width: 380px;
}
.modal-body {
  padding: 22px 24px;
}
.modal-body label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 17px;
}
.modal-body input,
.modal-body select {
  display: block;
  width: 100%;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper);
  padding: 7px 10px;
  margin-top: 7px;
  font-size: 13px;
}
.field-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.form-columns {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 14px;
}
.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 12px;
  min-height: 0;
}
.form-error:empty {
  display: none;
}
.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
}
.danger-button {
  background: var(--red) !important;
  color: white;
  border-color: var(--red);
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  box-shadow: var(--shadow);
  font-size: 13px;
  border-radius: 7px;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.error {
  background: var(--red);
  color: white;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #f7f8fa;
  color: #1f2329;
}
.login-shell {
  width: 1000px;
  max-width: calc(100vw - 64px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 620px;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 55px #264a7710;
}
.login-intro {
  background: #f1f5fb;
  padding: 36px 42px;
  display: flex;
  flex-direction: column;
}
.login-story {
  margin: auto 0;
}
.login-story .eyebrow {
  color: #64799c;
  font-size: 13px;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}
.login-story h1 {
  font-size: 36px;
  line-height: 1.5;
  letter-spacing: -1px;
  font-weight: 600;
}
.login-story p {
  color: #788498;
  font-size: 13px;
  line-height: 1.9;
  margin-top: 18px;
}
.login-features {
  display: flex;
  gap: 18px;
  margin-top: 36px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #526885;
}
.login-features span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-features svg {
  width: 15px;
  height: 15px;
}
.login-intro > small {
  font-size: 12px;
  color: #94a0b1;
  letter-spacing: 1.4px;
}
.login-form-panel {
  display: grid;
  place-items: center;
  padding: 56px;
}
.login-form-panel form {
  width: 100%;
  max-width: 320px;
}
.login-form-panel h2 {
  font-size: 23px;
  margin-bottom: 10px;
}
.login-form-panel .eyebrow {
  color: #3370ff;
  margin-bottom: 10px;
  font-size: 12px;
}
.login-form-panel .muted {
  font-size: 13px;
  margin-bottom: 36px;
}
.login-form-panel label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.login-form-panel input {
  display: block;
  width: 100%;
  height: 42px;
  border: 1px solid #e1e5eb;
  border-radius: 6px;
  margin-top: 9px;
  padding: 10px 12px;
  color: #1f2329;
  background: white;
  font-size: 13px;
}
.login-form-panel .button {
  width: 100%;
  margin-top: 10px;
  height: 42px;
  font-size: 13px;
  justify-content: space-between;
  padding: 0 14px;
}
.login-footnote {
  font-size: 12px;
  color: #929baa;
  line-height: 1.8;
  margin-top: 22px;
}
@media (min-width: 1500px) {
  .content {
    padding: 32px 36px;
  }
  .chart-grid {
    grid-template-columns: minmax(0, 2.6fr) minmax(300px, 1fr);
  }
  #traffic-chart {
    height: 330px;
  }
}
@media (max-width: 1100px) {
  .content {
    padding: 22px 20px;
  }
  .sidebar {
    width: 168px;
  }
  .metric {
    padding: 0 16px;
  }
  .metric small {
    font-size: 12px;
  }
  .metric > strong {
    font-size: 25px;
  }
  .chart-grid {
    grid-template-columns: minmax(0, 1.9fr) minmax(235px, 1fr);
    gap: 16px;
  }
  .chart-foot {
    flex-wrap: wrap;
    gap: 5px 12px;
  }
  .chart-zoom-hint {
    display: none;
  }
  .filter-primary {
    gap: 12px;
  }
  .period-group button {
    padding: 5px 9px;
  }
  .custom-range {
    flex-wrap: wrap;
  }
  .login-shell {
    min-height: 560px;
  }
  .login-form-panel {
    padding: 40px;
  }
  .login-intro {
    padding: 32px;
  }
  .login-story h1 {
    font-size: 32px;
  }
}
@media (max-width: 900px) {
  .brand-caption {
    display: none;
  }
  .sidebar {
    width: 148px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .sidebar nav a {
    padding: 0 10px;
    gap: 8px;
  }
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
  .metric {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(3),
  .metric:nth-child(4) {
    border-bottom: 0;
  }
  .metric > strong {
    font-size: 27px;
  }
  .metric small {
    font-size: 12px;
  }
  .chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ranking-panel .empty-state {
    padding: 28px 16px;
  }
  .rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 22px;
  }
  .panel-heading {
    padding: 17px 18px 13px;
  }
  .table-toolbar {
    padding: 15px 18px;
  }
  .table-tabs .muted {
    display: none;
  }
  .login-shell {
    grid-template-columns: 1fr 1fr;
    max-width: calc(100vw - 36px);
  }
  .login-intro {
    padding: 28px;
  }
  .login-story h1 {
    font-size: 28px;
  }
  .login-features {
    flex-direction: column;
    gap: 12px;
  }
  .login-form-panel {
    padding: 30px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 54px;
    padding: 0 14px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .brand-mark svg {
    width: 18px;
    height: 18px;
  }
  .topbar-actions {
    gap: 3px;
  }
  .connection-status {
    font-size: 12px;
  }
  .topbar-divider {
    display: none;
  }
  .topbar .quiet span {
    display: none;
  }
  .topbar .quiet {
    padding: 6px;
  }
  .workspace {
    display: block;
    min-height: calc(100vh - 54px);
  }
  .sidebar {
    position: sticky;
    top: 54px;
    width: 100%;
    height: auto;
    padding: 7px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    z-index: 15;
  }
  .sidebar > .sidebar-label,
  .sidebar nav .sidebar-label,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 3px;
    overflow-x: auto;
  }
  .sidebar nav a {
    flex: 1;
    justify-content: center;
    gap: 5px;
    padding: 0 9px;
    margin: 0;
    height: 34px;
    white-space: nowrap;
    font-size: 12px;
  }
  .sidebar nav a svg {
    width: 15px;
    height: 15px;
  }
  .content {
    padding: 20px 12px 26px;
  }
  .page-heading {
    margin-bottom: 18px;
    gap: 10px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 240px;
  }
  .page-heading .eyebrow {
    font-size: 12px;
    letter-spacing: 0.7px;
  }
  .page-heading > .button {
    padding: 6px 9px;
    font-size: 12px;
  }
  .page-heading > .button svg {
    width: 14px;
    height: 14px;
  }
  .metric {
    padding: 15px;
  }
  .metric > strong {
    font-size: 25px;
  }
  .metric small {
    font-size: 12px;
  }
  .metric-strip {
    margin-bottom: 14px;
  }
  .filter-panel {
    padding: 12px;
    margin-bottom: 14px;
  }
  .filter-primary {
    gap: 10px;
  }
  .compact-label {
    font-size: 12px;
    gap: 6px;
  }
  .compact-label select[name="clientId"] {
    min-width: 150px;
    max-width: 200px;
  }
  .period-group {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .period-group button {
    flex: 1;
    padding: 6px 5px;
  }
  .filter-primary > .compact-label:nth-of-type(2) {
    margin-left: auto;
  }
  .filter-primary > .button {
    order: 4;
    width: 100%;
    margin: 2px 0 0;
  }
  .custom-range {
    gap: 8px;
  }
  .custom-range label {
    width: 100%;
    justify-content: space-between;
  }
  .custom-range input {
    max-width: calc(100% - 64px);
    width: 240px;
  }
  .custom-range > span:first-of-type {
    display: none;
  }
  .chart-grid {
    gap: 14px;
    margin-bottom: 14px;
  }
  .single-chart {
    margin-bottom: 14px;
  }
  #traffic-chart {
    height: 260px;
  }
  .panel-heading {
    padding: 16px 14px 12px;
    gap: 8px;
  }
  .panel-heading h2 {
    font-size: 13px;
  }
  .panel-heading p {
    font-size: 12px;
  }
  .chart-legend {
    gap: 8px;
    font-size: 12px;
  }
  .chart-empty {
    left: 55px;
    right: 10px;
    max-width: calc(100% - 65px);
    top: 66px;
    padding: 10px;
  }
  .chart-empty span {
    font-size: 12px;
  }
  .chart-empty strong {
    font-size: 12px;
  }
  .chart-foot {
    padding: 7px 14px 12px;
    font-size: 12px;
  }
  .panel-footer {
    padding: 11px 14px;
    font-size: 12px;
  }
  th,
  td {
    padding: 12px 14px;
  }
  .table-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px;
  }
  .search-input {
    width: 100%;
  }
  .search-input input {
    width: 100%;
  }
  .rank-list {
    grid-template-columns: 1fr;
  }
  .data-note {
    font-size: 12px;
    margin-top: 14px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal {
    max-height: calc(100dvh - 24px);
  }
  .modal > header,
  .modal-body {
    padding: 20px;
  }
  .modal footer {
    padding: 14px 20px;
  }
  .form-columns {
    grid-template-columns: 1fr;
  }
  .modal-body label {
    margin-bottom: 14px;
  }
  .login-shell {
    display: block;
    max-width: calc(100vw - 24px);
    min-height: 0;
    margin: 18px 0;
  }
  .login-intro {
    padding: 22px;
  }
  .login-story {
    margin: 27px 0 12px;
  }
  .login-story .eyebrow {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .login-story h1 {
    font-size: 24px;
    line-height: 1.4;
  }
  .login-story p {
    font-size: 12px;
    margin-top: 12px;
  }
  .login-features,
  .login-intro > small {
    display: none;
  }
  .login-form-panel {
    padding: 30px 25px;
  }
  .login-form-panel h2 {
    font-size: 21px;
  }
  .login-form-panel .muted {
    margin-bottom: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* 全站账户与运维页沿用工作台设计变量。 */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  flex: none;
}
.theme-toggle:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-soft);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
}
.account-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  padding: 4px 7px;
  border-radius: 6px;
}
.account-link:hover,
.account-link.active {
  background: var(--blue-soft);
  color: var(--blue);
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}
.account-avatar svg {
  width: 15px;
  height: 15px;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(400px, 1.7fr);
  gap: 22px;
  align-items: start;
}
.settings-panel {
  padding: 24px;
}
.settings-panel h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.settings-panel > p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}
.settings-form label {
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}
.settings-form input {
  display: block;
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 12px;
  margin: 7px 0;
}
.settings-form small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.7;
}
.settings-form .button {
  margin-top: 10px;
  min-height: 38px;
}
.settings-form .form-columns {
  grid-template-columns: 1fr 1fr;
}
.profile-summary {
  padding: 28px 24px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 18px;
}
.profile-avatar svg {
  width: 25px;
  height: 25px;
}
.profile-summary h2 {
  font-size: 22px;
  margin: 0 0 4px;
}
.detail-list {
  margin: 20px 0 0;
}
.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list > div:last-child {
  border: 0;
}
.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 13px;
}
.config-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px !important;
}
.system-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 22px;
}
.system-summary > div {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.system-summary > div:last-child {
  border: 0;
}
.system-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.system-summary strong {
  font-size: 19px;
  font-weight: 600;
}
.config-note {
  margin-top: 18px;
}
.logs-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.logs-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.logs-toolbar select,
.logs-toolbar input[type="search"] {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 7px 9px;
}
.logs-toolbar select {
  max-width: 300px;
}
.logs-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.logs-controls .button {
  font-size: 12px;
  padding: 5px 10px;
}
.logs-controls .muted {
  margin-left: auto;
  font-size: 12px;
}
.log-output {
  margin: 0;
  padding: 18px 20px;
  min-height: 360px;
  height: calc(100dvh - 360px);
  max-height: 720px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    13px/1.8 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  color: var(--ink);
  background: var(--paper);
  tab-size: 4;
}
.log-status {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.log-status.error {
  color: var(--red);
}
/* 登录参考其他项目的全屏分栏，品牌介绍与表单层级保持清晰。 */
.login-page {
  display: block;
  background: var(--paper);
  color: var(--ink);
}
.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--paper);
}
.login-intro {
  background: #10243f;
  color: #fff;
  padding: 44px clamp(32px, 5.5vw, 96px);
  min-height: 100dvh;
}
.login-intro .brand {
  color: #fff;
  font-size: 25px;
}
.login-intro .brand-mark {
  background: #3570ee;
}
.login-brand-caption {
  font-size: 13px;
  font-weight: 400;
  color: #a4b5cb;
  border-left: 1px solid #425269;
  padding-left: 15px;
  margin-left: 7px;
}
.login-story {
  margin: auto 0;
  padding: 65px 0;
}
.login-story .eyebrow {
  color: #94aaca;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 26px;
}
.login-story h1 {
  font-size: clamp(34px, 3.8vw, 60px);
  line-height: 1.38;
  font-weight: 600;
  letter-spacing: -1.4px;
}
.login-story h1 span {
  color: #8db4ff;
}
.login-story p {
  color: #b0bdd0;
  font-size: 15px;
  line-height: 1.95;
  margin-top: 24px;
}
.login-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
}
.login-features > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.login-features > div > svg {
  width: 22px;
  height: 22px;
  color: #91b2e7;
}
.login-features strong {
  display: block;
  color: #e7eef9;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.login-features small {
  font-size: 12px;
  color: #8ea1ba;
}
.login-intro > small {
  font-size: 12px;
  color: #8194ae;
  letter-spacing: 1.4px;
}
.login-form-panel {
  position: relative;
  padding: 110px 48px 100px;
  background: var(--paper);
}
.login-form-panel form {
  width: 100%;
  max-width: 360px;
}
.login-form-panel h2 {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.7px;
  margin: 0 0 12px;
}
.login-form-panel .eyebrow {
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 12px;
}
.login-form-panel .muted {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 36px;
}
.login-form-panel label {
  font-size: 13px;
  margin: 0 0 8px;
}
.auth-input {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 22px;
  padding: 0 13px;
  background: var(--paper);
  gap: 10px;
}
.auth-input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.auth-input > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.login-form-panel .auth-input input {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
  height: 42px;
  min-width: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.auth-input button {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  padding: 4px;
  color: var(--muted);
}
.auth-input button svg {
  width: 17px;
  height: 17px;
}
.login-form-panel #login-button {
  margin-top: 8px;
  height: 46px;
  padding: 0 16px;
  font-size: 13px;
}
.login-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 20px;
  line-height: 1.9;
}
.login-footnote svg {
  width: 14px;
  height: 14px;
  margin-top: 3px;
}
.login-theme {
  position: absolute;
  top: 36px;
  right: 42px;
}
.login-panel-footer {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .login-intro {
    padding: 32px;
    min-height: 100dvh;
  }
  .login-story h1 {
    font-size: 37px;
  }
  .login-form-panel {
    padding-left: 30px;
    padding-right: 30px;
  }
  .login-brand-caption {
    display: none;
  }
  .topbar-actions {
    gap: 5px;
  }
  .connection-status {
    display: none;
  }
  .settings-form .form-columns {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .login-shell {
    display: block;
    min-height: 100dvh;
    margin: 0;
    max-width: none;
  }
  .login-intro {
    min-height: 0;
    padding: 25px 26px;
  }
  .login-intro .brand {
    font-size: 22px;
  }
  .login-story {
    padding: 26px 0 3px;
    margin: 0;
  }
  .login-story .eyebrow {
    font-size: 12px;
    margin: 0 0 12px;
  }
  .login-story h1 {
    font-size: 29px;
    line-height: 1.35;
    letter-spacing: -0.7px;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story p {
    font-size: 12px;
    margin-top: 12px;
  }
  .login-story p br {
    display: none;
  }
  .login-features,
  .login-intro-footer {
    display: none;
  }
  .login-form-panel {
    padding: 72px 26px 72px;
    min-height: 470px;
  }
  .login-theme {
    top: 19px;
    right: 26px;
  }
  .login-form-panel h2 {
    font-size: 25px;
  }
  .login-form-panel .muted {
    margin-bottom: 27px;
  }
  .login-panel-footer {
    bottom: 22px;
  }
  .account-link {
    padding: 3px;
  }
  .account-link > span:last-child {
    display: none;
  }
  .sidebar nav a {
    flex: 0 0 auto;
    padding: 0 12px;
  }
  .settings-panel,
  .profile-summary {
    padding: 20px;
  }
  .settings-form .form-columns {
    grid-template-columns: 1fr;
  }
  .detail-list > div {
    gap: 14px;
  }
  .detail-list dd {
    max-width: 65%;
    font-size: 12px;
  }
  .system-summary {
    grid-template-columns: 1fr;
  }
  .system-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
  }
  .logs-toolbar {
    padding: 14px;
    gap: 10px;
  }
  .logs-toolbar label:first-child {
    width: 100%;
  }
  .logs-toolbar select {
    flex: 1;
    min-width: 0;
  }
  .logs-toolbar input[type="search"] {
    width: 100%;
  }
  .logs-controls {
    padding: 12px 14px;
  }
  .logs-controls .muted {
    margin-left: 0;
    width: 100%;
  }
  .log-output {
    height: 400px;
    min-height: 300px;
    padding: 14px;
    font-size: 12px;
  }
  .log-status {
    padding: 12px 14px;
  }
}
