:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e5eaf2;
  --line-strong: #d5deea;
  --text: #172033;
  --muted: #667085;
  --text-soft: #46546b;
  --text-subtle: #5b6678;
  --primary: #1677ff;
  --primary-soft: #eaf3ff;
  --primary-strong: #0f5fd4;
  --primary-border: #9fc5ff;
  --primary-border-soft: #d8e6f8;
  --pink: #fb7299;
  --green: #18a058;
  --green-soft: #e8f8ef;
  --green-text: #087443;
  --orange: #f59e0b;
  --orange-soft: #fff7e6;
  --orange-border: #ffd58a;
  --orange-text: #9a5b00;
  --red: #dc2626;
  --red-soft: #fff7f7;
  --red-border: #f3c6c6;
  --neutral-soft: #eef2f7;
  --control-bg: #ffffff;
  --surface-raised: #fbfdff;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, .035), 0 10px 28px rgba(25, 34, 55, .045);
  --shadow: 0 18px 42px rgba(25, 34, 55, .10);
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.app-shell { height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); background: var(--bg); }
.sidebar {
  height: 100dvh;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}
.sidebar-brand { height: 72px; padding: 18px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.sidebar-brand strong { font-size: 20px; letter-spacing: 0; }
.sidebar-brand span { color: var(--muted); font-size: 12px; }
.sidebar-nav { padding: 14px 12px 18px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.nav-group { display: grid; gap: 7px; }
.nav-title { padding: 4px 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.nav-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 760;
}
.nav-link:hover, .nav-link.is-active { background: var(--primary-soft); color: var(--primary-strong); }
.nav-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--nav-icon-bg, var(--panel-soft));
  color: var(--nav-icon-color, var(--text-subtle));
  flex: 0 0 auto;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--nav-icon-border, rgba(148, 163, 184, .18));
}
.nav-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon-dashboard svg path,
.nav-icon-video svg path:nth-child(2) {
  fill: currentColor;
  stroke: none;
}
.nav-icon-dashboard { --nav-icon-bg: #eaf4ff; --nav-icon-color: #1677ff; --nav-icon-border: #cfe3ff; }
.nav-icon-account { --nav-icon-bg: #ecfdf5; --nav-icon-color: #059669; --nav-icon-border: #bbf7d0; }
.nav-icon-video { --nav-icon-bg: #fff7ed; --nav-icon-color: #f97316; --nav-icon-border: #fed7aa; }
.nav-icon-comment { --nav-icon-bg: #f5f3ff; --nav-icon-color: #7c3aed; --nav-icon-border: #ddd6fe; }
.nav-icon-guide { --nav-icon-bg: #ecfeff; --nav-icon-color: #0891b2; --nav-icon-border: #a5f3fc; }
.nav-icon-competitor { --nav-icon-bg: #fefce8; --nav-icon-color: #a16207; --nav-icon-border: #fde68a; }
.nav-icon-publish { --nav-icon-bg: #fff1f2; --nav-icon-color: #e11d48; --nav-icon-border: #fecdd3; }
.nav-icon-bit { --nav-icon-bg: #f0fdf4; --nav-icon-color: #15803d; --nav-icon-border: #bbf7d0; }
.nav-icon-settings { --nav-icon-bg: #f1f5f9; --nav-icon-color: #475569; --nav-icon-border: #cbd5e1; }
.nav-link.is-active .nav-icon {
  background: var(--nav-icon-active-bg, var(--nav-icon-bg));
  color: var(--nav-icon-active-color, var(--nav-icon-color));
  box-shadow: inset 0 0 0 1px var(--nav-icon-border), 0 6px 14px rgba(15, 23, 42, .08);
}
.nav-link.is-active .nav-icon-dashboard { --nav-icon-active-bg: #dbeafe; --nav-icon-active-color: #0b63ce; }
.nav-link.is-active .nav-icon-account { --nav-icon-active-bg: #dcfce7; --nav-icon-active-color: #047857; }
.nav-link.is-active .nav-icon-video { --nav-icon-active-bg: #ffedd5; --nav-icon-active-color: #c2410c; }
.nav-link.is-active .nav-icon-comment { --nav-icon-active-bg: #ede9fe; --nav-icon-active-color: #6d28d9; }
.nav-link.is-active .nav-icon-guide { --nav-icon-active-bg: #cffafe; --nav-icon-active-color: #0e7490; }
.nav-link.is-active .nav-icon-competitor { --nav-icon-active-bg: #fef3c7; --nav-icon-active-color: #92400e; }
.nav-link.is-active .nav-icon-publish { --nav-icon-active-bg: #ffe4e6; --nav-icon-active-color: #be123c; }
.nav-link.is-active .nav-icon-bit { --nav-icon-active-bg: #dcfce7; --nav-icon-active-color: #166534; }
.nav-link.is-active .nav-icon-settings { --nav-icon-active-bg: #e2e8f0; --nav-icon-active-color: #334155; }

.workspace { min-width: 0; height: 100dvh; display: grid; grid-template-rows: var(--topbar-h) minmax(0, 1fr); }
.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  z-index: 25;
}
.page-heading { display: grid; gap: 1px; min-width: 160px; }
.page-heading strong { font-size: 18px; }
.page-heading span { color: var(--muted); font-size: 12px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-monitor-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #47637f;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.topbar-monitor-status span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  background: #f7fbff;
}
.topbar-monitor-status b {
  color: #0f2742;
  font-weight: 800;
}
.user-menu { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.main-content { height: calc(100dvh - var(--topbar-h)); overflow: auto; padding: 16px; }

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--control-bg);
  border-radius: 10px;
  display: none;
  place-items: center;
}
.menu-button span { width: 18px; height: 2px; background: var(--text); display: block; margin: 3px 0; border-radius: 999px; }
.drawer-mask { display: none; }

.btn, .link-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--control-bg);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.btn:hover, .link-button:hover { border-color: var(--line-strong); }
.btn-primary, .link-button.primary { background: var(--primary); border-color: var(--primary); color: var(--panel); }
.btn-ghost, .link-button.ghost { background: transparent; }
.danger, .btn.danger, .link-button.danger { color: var(--red); border-color: var(--red-border); background: var(--red-soft); }
.btn-small {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
.status-pill, .badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--neutral-soft);
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.ok, .badge.ok { background: var(--green-soft); color: var(--green-text); }
.badge.warn, .status-pill.warn { background: var(--orange-soft); color: var(--orange-text); }
.badge.bad { background: var(--red-soft); color: var(--red); }
.group-badge {
  --group-bg: #eef2f7;
  --group-fg: #475569;
  --group-border: #d7dee9;
  min-width: 52px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--group-border);
  border-radius: 999px;
  background: var(--group-bg);
  color: var(--group-fg);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-badge-0 { --group-bg: #eff6ff; --group-fg: #1d4ed8; --group-border: #bfdbfe; }
.group-badge-1 { --group-bg: #ecfdf5; --group-fg: #047857; --group-border: #a7f3d0; }
.group-badge-2 { --group-bg: #fff7ed; --group-fg: #c2410c; --group-border: #fed7aa; }
.group-badge-3 { --group-bg: #f5f3ff; --group-fg: #6d28d9; --group-border: #ddd6fe; }
.group-badge-4 { --group-bg: #ecfeff; --group-fg: #0e7490; --group-border: #a5f3fc; }
.group-badge-5 { --group-bg: #fff1f2; --group-fg: #be123c; --group-border: #fecdd3; }
.group-badge-6 { --group-bg: #f0fdf4; --group-fg: #15803d; --group-border: #bbf7d0; }
.group-badge-7 { --group-bg: #fefce8; --group-fg: #a16207; --group-border: #fde68a; }
.group-badge-8 { --group-bg: #fdf2f8; --group-fg: #be185d; --group-border: #fbcfe8; }
.group-badge-9 { --group-bg: #f0f9ff; --group-fg: #0369a1; --group-border: #bae6fd; }
.group-badge-10 { --group-bg: #f7fee7; --group-fg: #4d7c0f; --group-border: #d9f99d; }
.group-badge-11 { --group-bg: #fff7ed; --group-fg: #9a3412; --group-border: #fdba74; }
.group-badge-empty { --group-bg: #f1f5f9; --group-fg: #64748b; --group-border: #dbe3ed; }

.alert-center { position: relative; }
.alert-button { list-style: none; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--control-bg); font-weight: 800; cursor: pointer; }
.alert-button::-webkit-details-marker { display: none; }
.alert-button.has-alert { background: var(--orange-soft); border-color: var(--orange-border); color: var(--orange-text); }
.alert-popover {
  position: absolute;
  right: 0;
  top: 46px;
  width: 440px;
  max-width: calc(100vw - 28px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 80;
}
.popover-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.popover-head div { display: grid; gap: 2px; }
.popover-head span { color: var(--muted); font-size: 12px; }
.alert-list { display: grid; gap: 8px; padding-top: 10px; }
.alert-item { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.alert-item.unread { border-color: var(--orange-border); background: var(--orange-soft); }
.alert-item strong, .alert-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-item span { color: var(--muted); font-size: 12px; margin-top: 3px; }

.page { min-height: 100%; display: grid; gap: 14px; overflow: visible; }
.page-scroll { overflow: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stats-grid.core-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card, .metric {
  min-height: 92px;
  border: 1px solid #dce5f2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.stat-card::before,
.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(22, 119, 255, .52), rgba(34, 211, 238, .18));
  opacity: .62;
}
.stat-card span, .metric-label {
  color: #52637a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}
.stat-card strong, .metric-value {
  color: #0b1220;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.stat-card small, .metric-note {
  color: #7a8798;
  font-size: 12px;
  line-height: 1.35;
}
.trend-stat-card {
  position: relative;
  width: 100%;
  text-align: left;
  border-color: var(--primary-border-soft);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  align-content: center;
  min-height: 76px;
  gap: 9px;
}
.trend-stat-card:hover {
  transform: translateY(-1px);
  border-color: var(--primary-border);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 34px rgba(22, 119, 255, .10), 0 1px 2px rgba(16, 24, 40, .04);
}
.trend-stat-card:focus-visible {
  outline: 2px solid rgba(22, 119, 255, .28);
  outline-offset: 2px;
}
.trend-stat-card em {
  position: absolute;
  right: 12px;
  top: 12px;
  font-style: normal;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.panel {
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid #dce5f2;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  overflow: visible;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
}
.panel-head {
  padding: 0 14px;
  border-bottom: 1px solid #e7edf5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(248, 251, 255, .66);
  border-radius: 10px 10px 0 0;
}
.panel-title { font-weight: 850; font-size: 15px; color: #0b1220; }
.panel-sub { color: var(--muted); font-size: 12px; }
.panel-body { min-height: 0; padding: 14px; overflow: auto; }
.panel-body.is-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: visible;
}
.list-toolbar { min-height: 0; }
.list-area {
  min-height: 0;
  overflow: auto;
  border-radius: 10px;
}
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-filter {
  margin-left: auto;
  display: grid;
  grid-template-columns: 112px minmax(180px, 260px);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.rank-filter select {
  min-height: 34px;
  max-width: 100%;
}
.account-rank-filter {
  grid-template-columns: minmax(180px, 260px);
}
.toolbar, .filter-bar, .actions, .row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
}
.field, .form-field { display: grid; gap: 6px; min-width: 0; }
.field span, .form-field span { color: var(--muted); font-size: 12px; font-weight: 750; }
input, select, textarea, .searchbar {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  color: var(--text);
}
textarea { min-height: 130px; padding: 10px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-wide { grid-column: 1 / -1; }
.form-section-title {
  margin: 2px 0 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}
.form-section-title + .form-grid { margin-bottom: 16px; }

.data-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.data-table th {
  height: 40px;
  text-align: left;
  padding: 0 10px;
  color: var(--text-subtle);
  font-size: 12px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}
.data-table td {
  height: 52px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table td strong, .data-table td small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table td small { color: var(--muted); margin-top: 2px; }
.data-table td .group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.data-table th.num-cell { text-align: right; }
.center-cell,
.data-table th.center-cell { text-align: center; }
.sort-link { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; min-height: 30px; }
.sort-link span { color: var(--muted); font-size: 12px; }
.sort-link:hover, .sort-link.is-active { color: var(--primary); }
.sort-link.is-active span { color: var(--primary); }
.metric-sort-head { display: grid; gap: 6px; justify-items: end; }
.metric-sort-head strong { font-size: 12px; color: var(--text-subtle); line-height: 1; }
.metric-sort-head > div { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.sort-chip { min-height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); display: inline-flex; align-items: center; text-decoration: none; font-size: 11px; line-height: 1; white-space: nowrap; }
.sort-chip:hover, .sort-chip.is-active { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); background: color-mix(in srgb, var(--primary) 7%, #fff); }
.rank-video-table .rank-video-main { width: 42%; }
.rank-video-table .rank-video-date { width: 10%; }
.rank-video-table .rank-video-change { width: 10%; }
.rank-video-table .rank-video-num { width: 10%; }
.rank-video-table .rank-video-action { width: 8%; }
.rank-video-table td { height: 58px; }
.rank-video-table .sort-link { min-height: 24px; gap: 3px; justify-content: flex-end; }
.rank-video-table th:first-child .sort-link,
.rank-video-table th:nth-child(2) .sort-link { justify-content: flex-start; }
.rank-video-table .num-cell { padding-left: 6px; padding-right: 6px; }
.rank-account-table .rank-account-main { width: 24%; }
.rank-account-table .rank-account-group { width: 11%; }
.rank-account-table .rank-account-date { width: 10%; }
.rank-account-table .rank-account-num { width: 7.2%; }
.rank-account-table .rank-account-action { width: 10%; }
.rank-account-table td { height: 58px; }
.rank-account-table .sort-link { min-height: 24px; gap: 3px; justify-content: flex-end; }
.rank-account-table th:first-child .sort-link,
.rank-account-table th:nth-child(2) .sort-link,
.rank-account-table th:nth-child(3) .sort-link { justify-content: flex-start; }
.rank-account-table .num-cell { padding-left: 6px; padding-right: 6px; }
.date-cell { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stale-post {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
  font-weight: 850;
}
.today-cell { color: var(--primary); font-weight: 850; }
.video-trend-btn {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-weight: 750;
  white-space: nowrap;
}
.mobile-card-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.delta-value { font-weight: 850; font-variant-numeric: tabular-nums; }
.delta-value.up { color: var(--ok); }
.delta-value.down { color: var(--danger); }
.delta-value.flat { color: var(--muted); }
.pager {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.pager a,
.pager span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.pager-summary {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #5d4ca4;
  font-weight: 850;
}
.pager-page {
  width: 30px;
  padding: 0;
  border: 1px solid #d8e1f0;
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--primary);
  font-weight: 750;
}
.pager-page:hover,
.pager-page.is-active {
  border-color: #8b5cf6;
  background: color-mix(in srgb, #8b5cf6 12%, #fff);
  color: #6d28d9;
}
.pager-nav {
  min-width: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 850;
}
.pager a.disabled { pointer-events: none; opacity: .45; }
.empty-state { min-height: 56px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); background: var(--surface-raised); text-align: center; padding: 12px; }
.empty-state.compact { min-height: 42px; }
.mt-12 { margin-top: 12px; }
.my-12 { margin: 12px 0; }
.col-actions { width: 250px; }
.col-actions-sm { width: 150px; }
.col-video { width: 280px; }
.group-table .col-group-name { width: 36%; }
.group-table .col-group-num { width: 10%; }
.group-table .col-group-switch { width: 15%; }
.group-table .col-group-actions { width: 14%; }
.group-table {
  border-spacing: 0 8px;
}
.group-table th {
  height: 34px;
  background: transparent;
  border-bottom: 0;
}
.group-table td {
  height: 58px;
  background: #fff;
  border-top: 1px solid #e2eaf5;
  border-bottom: 1px solid #e2eaf5;
}
.group-table tbody tr:hover td {
  border-color: #c5d9f4;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 22px rgba(22, 119, 255, .06);
}
.group-table td:first-child {
  border-left: 1px solid #e2eaf5;
  border-radius: 10px 0 0 10px;
}
.group-table td:last-child {
  border-right: 1px solid #e2eaf5;
  border-radius: 0 10px 10px 0;
}
.group-table .num-cell {
  text-align: center;
}
.group-name-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 850;
}
.group-switch-cell,
.group-actions-cell {
  text-align: center;
}
.group-switch-cell form,
.group-actions-cell form {
  display: inline-flex;
  justify-content: center;
  margin: 0;
}
.group-add-form {
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}
.panel-head .group-add-form {
  width: auto;
  min-height: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  flex-wrap: nowrap;
}
.group-add-form input[name="group_name"] {
  max-width: 360px;
  min-width: 280px;
}
.panel-head .group-add-form input[name="group_name"] {
  width: 180px;
  max-width: 180px;
  min-width: 0;
  flex: 0 0 180px;
}
.account-table .col-account-main { width: 32%; }
.account-table .col-account-num { width: 9%; }
.account-table .col-account-group { width: 17%; }
.account-table .col-account-monitor { width: 12%; }
.account-table .col-account-date { width: 15%; }
.account-table .col-account-actions { width: 14%; }
.account-table .row-actions { flex-wrap: nowrap; }
.account-table td:nth-child(4),
.account-table th:nth-child(4),
.rank-account-table td:nth-child(2),
.rank-account-table th:nth-child(2),
.comments-table td:nth-child(2),
.comments-table th:nth-child(2),
.bit-profile-table td:nth-child(2),
.bit-profile-table th:nth-child(2) {
  text-align: center;
}
.account-table td:nth-child(4) .stealth-select-form,
.competitor-page .account-table td:nth-child(5) .stealth-select-form,
.rank-account-table td:nth-child(2) .group-badge,
.comments-table td:nth-child(2) .group-badge,
.bit-profile-table td:nth-child(2) .group-badge {
  margin-left: auto;
  margin-right: auto;
}
.stealth-select-form { margin: 0; min-width: 0; display: inline-flex; justify-content: center; }
.stealth-select {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  color: var(--text);
  font-weight: 750;
  text-align: center;
  text-align-last: center;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  background-image: none;
}
.stealth-select.group-badge {
  width: auto;
  min-width: 52px;
  min-height: 26px;
  max-width: 100%;
  border: 1px solid var(--group-border);
  border-radius: 999px;
  background-color: var(--group-bg);
  color: var(--group-fg);
  padding: 0 10px;
  line-height: 1;
}
.stealth-select.group-badge option {
  color: var(--text);
  background: #fff;
}
.stealth-select:hover,
.stealth-select:focus {
  background-color: var(--panel-soft);
  outline: none;
}
.stealth-select.group-badge:hover,
.stealth-select.group-badge:focus {
  background-color: var(--group-bg);
}
.stealth-select:focus-visible {
  outline: 2px solid rgba(22, 119, 255, .22);
  outline-offset: 1px;
}
.video-table .col-video { width: 32%; }
.video-table .col-bvid { width: 130px; }
.video-table .col-account { width: 150px; }
.video-table .col-num { width: 96px; }
.video-table .col-status { width: 120px; }
.video-table .col-actions { width: 92px; }
.video-table th.num-cell { text-align: right; }
.competitor-video-table .col-video { width: 28%; }
.competitor-video-table .col-bvid { width: 120px; }
.competitor-video-table .col-account { width: 140px; }
.competitor-video-table .col-group { width: 110px; }
.competitor-video-table .col-num { width: 82px; }
.competitor-video-table .col-status { width: 96px; }
.competitor-video-table .col-actions { width: 78px; }
.competitor-account-table .col-account-main { width: 26%; }
.competitor-account-table .col-uid { width: 120px; }
.competitor-account-table .col-num { width: 80px; }
.competitor-account-table .col-group { width: 140px; }
.competitor-account-table .col-status { width: 96px; }
.competitor-account-table .col-date { width: 150px; }
.competitor-account-table .col-actions { width: 150px; }
.competitor-group-table .col-group-name { width: 26%; }
.competitor-group-table .col-group-num { width: 88px; }
.competitor-group-table .col-group-rename { width: 42%; }
.competitor-group-table .col-group-actions { width: 110px; }
.competitor-page .competitor-tab-action {
  margin-left: auto;
}
.competitor-page .competitor-filter-bar {
  justify-content: flex-start;
}
.competitor-page .competitor-group-filter select {
  min-width: 180px;
}
.competitor-page .competitor-account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.competitor-page .competitor-add-form {
  flex-wrap: nowrap;
}
.competitor-page .competitor-add-form input[name="uid"] {
  width: 180px;
  min-width: 0;
  flex: 0 0 180px;
}
.competitor-page .competitor-rename-form {
  width: 100%;
  flex-wrap: nowrap;
}
.competitor-page .competitor-rename-form input[name="group_name"] {
  min-width: 0;
  flex: 1 1 auto;
}
.competitor-page .panel-head-actions {
  margin-left: auto;
}
.competitor-page .center-cell {
  text-align: center;
}
.switch-form { display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.compact-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.stat-card.is-compact strong { font-size: 16px; }
.stat-card.is-compact { min-height: 72px; }

.comments-status-grid .stat-card {
  min-height: 86px;
}
.comments-status-grid .stat-card small.is-placeholder {
  visibility: hidden;
}
.comment-stat-ok::before {
  background: linear-gradient(90deg, var(--green), rgba(24,160,88,.2));
}
.comment-stat-paused::before,
.comment-stat-risk::before {
  background: linear-gradient(90deg, var(--orange), rgba(245,158,11,.22));
}
.comment-stat-risk strong,
.comment-state-block.is-risk strong {
  color: var(--orange-text);
}
.comments-command-bar {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.comment-signal-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-signal {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}
.comment-signal b {
  color: var(--muted);
  font-size: 11px;
}
.comments-command-actions,
.comments-state-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-cookie-button.is-missing {
  border-color: var(--orange-border);
  background: var(--orange-soft);
  color: var(--orange-text);
}
.comment-cookie-button.is-configured {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-text);
}
.comment-cookie-button.is-missing:hover {
  border-color: var(--orange);
}
.comment-cookie-button.is-configured:hover {
  border-color: var(--green-text);
}
.comments-tabs .tab-nav button {
  gap: 6px;
}
.comments-tabs .tab-nav button span {
  min-width: 22px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.comments-tabs .tab-nav button.is-active span {
  background: var(--panel);
  color: var(--primary-strong);
}
.comments-panel .panel-body.is-list {
  grid-template-rows: minmax(0, 1fr) auto;
}
.comments-table .comment-col-video { width: 22%; }
.comments-table .comment-col-group { width: 13%; }
.comments-table .comment-col-num { width: 9%; }
.comments-table .comment-col-time { width: 16%; }
.comments-table .comment-col-action { width: 82px; }
.comments-table.delete-table .comment-col-video { width: 34%; }
.comments-table.delete-table .comment-col-time { width: 150px; }
.comments-table.scan-table .comment-col-video { width: 34%; }
.comments-table.delete-table .media-cell strong,
.comments-table.delete-table .media-cell small,
.comments-table.scan-table .media-cell strong,
.comments-table.scan-table .media-cell small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comments-table td {
  vertical-align: middle;
}
.comments-table td:not(:first-child) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comments-state-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}
.comments-state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.comment-state-block {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
.comment-state-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.comment-state-block strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.comment-state-block small {
  color: var(--text-subtle);
  font-size: 12px;
}
.comment-state-block.is-ok {
  border-color: color-mix(in srgb, var(--green) 30%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 62%, #fff);
}
.comment-state-block.is-paused {
  border-color: color-mix(in srgb, var(--orange) 34%, var(--line));
  background: color-mix(in srgb, var(--orange-soft) 62%, #fff);
}
.comment-mobile-card .item-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-actions { justify-content: flex-end; }
.settings-save-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--green-text);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease;
}
.settings-save-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.settings-save-status.is-error {
  color: var(--red);
  background: var(--red-soft);
}
.settings-block {
  padding: 14px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}
.settings-block + .settings-block {
  margin-top: 14px;
}
.settings-block-strong {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.settings-block-muted {
  background: #f8fafc;
}
.settings-block .form-section-title {
  margin: 0 0 12px;
  padding-left: 9px;
  border-left: 3px solid var(--primary);
  color: #0b1220;
  font-size: 14px;
}
.settings-rule-list-simple {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  color: var(--text);
  font-size: 13px;
}
.settings-rule-list-simple div {
  min-height: 30px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf2f7;
}
.settings-proxy-block {
  margin-top: 14px;
  border-color: #cbdff7;
  background: #ffffff;
}
.settings-proxy-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.settings-proxy-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: #f8fbff;
}
.settings-proxy-chip strong {
  color: #4c5f78;
  font-size: 12px;
  font-weight: 800;
}
.settings-proxy-chip span {
  color: #0b1220;
  font-size: 16px;
  font-weight: 900;
}
.settings-proxy-chip small {
  justify-self: end;
  color: #64748b;
  font-size: 12px;
}
.settings-proxy-chip-green {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.settings-proxy-layout {
  display: grid;
  gap: 12px;
}
.settings-proxy-editor textarea {
  min-height: 78px;
  resize: vertical;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
}
.settings-proxy-editor small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.settings-proxy-preview {
  overflow: hidden;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #ffffff;
}
.settings-proxy-preview-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #e8eef7;
  background: #f8fafc;
}
.settings-proxy-preview-head strong {
  color: #102033;
  font-size: 13px;
  font-weight: 850;
}
.settings-proxy-preview-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}
.settings-proxy-preview-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.settings-proxy-preview-meta small {
  color: #64748b;
  font-size: 12px;
}
.settings-proxy-preview-empty {
  min-height: 52px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.settings-proxy-preview-table-wrap {
  overflow: hidden;
}
.settings-proxy-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.settings-proxy-preview-table th,
.settings-proxy-preview-table td {
  height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef3f9;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-proxy-preview-table th {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  background: #fbfdff;
}
.settings-proxy-preview-table td {
  color: #102033;
  font-size: 13px;
}
.settings-proxy-preview-table td:nth-child(2),
.settings-proxy-preview-table th:nth-child(2),
.settings-proxy-preview-table td:nth-child(6),
.settings-proxy-preview-table th:nth-child(6) {
  text-align: center;
}
.settings-proxy-preview-table tbody tr:last-child td {
  border-bottom: 0;
}
.proxy-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.proxy-status-ok {
  color: #047857;
  background: #dcfce7;
}
.proxy-status-bad {
  color: #b42318;
  background: #fee4e2;
}
.settings-proxy-pager {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #e8eef7;
  background: #fbfdff;
}
.settings-proxy-pager span {
  min-width: 54px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}
.settings-proxy-pager .btn {
  min-height: 30px;
  padding: 0 10px;
}
.settings-proxy-pager .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.tabs {
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 10px;
  overflow: visible;
}
.tab-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow-x: auto;
  overflow-y: hidden;
}
.tab-nav a,
.tab-nav button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-subtle);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.tab-nav a:hover,
.tab-nav button:hover,
.tab-nav a.is-active,
.tab-nav button.is-active { background: var(--primary-soft); color: var(--primary-strong); }
.tab-panels { min-height: 0; position: relative; overflow: visible; }
.tab-panel { height: 100%; min-height: 0; display: none; }
.tab-panel.is-active { display: block; }
.tab-panel > .panel { height: 100%; }
.section-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }

.home-page { grid-template-rows: auto minmax(0, 1fr); }
.home-main-grid { min-height: 0; display: grid; grid-template-columns: 1.35fr .9fr; gap: 14px; }
.rank-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trend-chart {
  width: 100%;
  height: 292px;
  margin-top: 8px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: crosshair;
  border: 1px solid #d9e4f2;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 78%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}
.chart-grid-line { stroke: #e7eef7; stroke-width: 1; stroke-linecap: square; opacity: .9; }
.chart-area { fill: url(#trend-area-gradient); opacity: .72; pointer-events: none; }
.chart-line {
  fill: none;
  stroke: var(--trend-line-color, #0ea5e9);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  filter: none;
}
.chart-plot {
  transform-box: view-box;
  transform-origin: 50% 230px;
}
.chart-plot.is-rising {
  animation: chart-rise-in .88s cubic-bezier(.25, .46, .45, .94) both;
}
.chart-dot {
  fill: #ffffff;
  stroke: var(--trend-line-color, #0ea5e9);
  stroke-width: 2;
  opacity: .76;
  filter: none;
  transition: r .14s ease, fill .14s ease, stroke-width .14s ease, opacity .14s ease;
}
.chart-dot.is-zero { opacity: .38; }
.chart-dot.is-active {
  fill: var(--trend-line-color, #0ea5e9);
  stroke: #ffffff;
  stroke-width: 3;
  opacity: 1;
  filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--trend-line-color, #0ea5e9) 36%, transparent));
}
.chart-dot.is-entering {
  opacity: 0;
  animation: chart-dot-in .36s ease-out forwards;
  animation-delay: .36s;
}
.chart-area.is-entering {
  opacity: 0;
  animation: chart-area-in .6s ease-out forwards;
  animation-delay: .12s;
}
.chart-y-axis text { fill: #66768d; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-hover-line { stroke: #8aa1ba; stroke-width: 1; stroke-dasharray: 3 5; opacity: .75; pointer-events: none; }
.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 148px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #c9d8ea;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  color: var(--text);
  font-size: 12px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
}
.chart-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, .97);
  border-right: 1px solid #c9d8ea;
  border-bottom: 1px solid #c9d8ea;
  transform: translateX(-50%) rotate(45deg);
}
.chart-tooltip span { color: #64748b; font-weight: 700; }
.chart-tooltip strong { display: block; margin-top: 4px; font-size: 18px; line-height: 1.15; font-weight: 900; font-variant-numeric: tabular-nums; }
.chart-tooltip small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.chart-tooltip[hidden] { display: none; }
.trend-axis { display: grid; grid-auto-flow: column; justify-content: space-between; gap: 8px; color: #64748b; font-size: 12px; margin-top: 8px; padding: 0 10px; font-weight: 650; }
.trend-dialog { width: min(920px, calc(100vw - 28px)); max-width: min(920px, calc(100vw - 28px)); }
.trend-dialog .modal-panel { width: 100%; }
.trend-dialog .modal-body {
  position: relative;
  overflow: hidden;
  min-height: 430px;
}
.trend-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}
.trend-toolbar[hidden] { display: none; }
.trend-toolbar select { min-width: 180px; min-height: 34px; border: 0; background: #fff; box-shadow: inset 0 0 0 1px #d8e2ef; }
.trend-range-tabs { margin-bottom: 12px; align-items: center; }
.trend-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.trend-stats span,
.trend-detail-rows div {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}
.trend-stats strong,
.trend-detail-rows strong { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.trend-detail-rows {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

@keyframes chart-dot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes chart-area-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes chart-rise-in {
  from { opacity: .01; transform: scaleY(0); }
  to { opacity: 1; transform: scaleY(1); }
}

.account-page { grid-template-rows: auto minmax(0, 1fr); }
.account-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, .8fr); gap: 14px; }
.account-tabs { grid-template-rows: auto minmax(0, 1fr); }
.account-tabs .tab-nav {
  overflow: visible;
}
.account-add-inline {
  margin-left: auto;
  width: min(460px, 100%);
  flex-wrap: nowrap;
}
.account-add-inline input {
  min-width: 220px;
  flex: 1 1 auto;
}
.video-page { grid-template-rows: auto auto minmax(0, 1fr); }
.comments-page { grid-template-rows: auto auto minmax(0, 1fr); }
.guide-page {
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
}
.publish-page {
  grid-template-rows: auto auto minmax(0, 1fr);
  --bili-pink: #fb7299;
  --bili-pink-strong: #f25d8e;
  --bili-pink-soft: #fff0f5;
  --bili-blue: #00aeec;
  --bili-blue-soft: #e8f7ff;
  --bili-line: #eef0f4;
  --bili-text: #18191c;
  --bili-muted: #9499a0;
  background:
    linear-gradient(180deg, rgba(255, 240, 245, .78) 0, rgba(245, 247, 251, 0) 188px),
    var(--bg);
  border-radius: 8px;
}
.publish-page .panel,
.publish-page .filter-bar {
  border-color: var(--bili-line);
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(24, 25, 28, .045);
}
.publish-page .panel-head {
  height: 56px;
  border-bottom-color: var(--bili-line);
  background: #fff;
  border-radius: 8px 8px 0 0;
}
.publish-page .panel-title {
  color: var(--bili-text);
  font-weight: 850;
}
.publish-page .panel-sub,
.publish-page .form-field span,
.publish-page .form-field small,
.publish-submit-row span,
.publish-task-main small,
.publish-account-cell small {
  color: var(--bili-muted);
}
.publish-page input,
.publish-page select,
.publish-page textarea {
  border-color: #e3e5e7;
  border-radius: 6px;
  background: #fff;
}
.publish-page input:focus,
.publish-page select:focus,
.publish-page textarea:focus {
  outline: none;
  border-color: var(--bili-pink);
  box-shadow: 0 0 0 3px rgba(251, 114, 153, .13);
}
.publish-page .btn-primary {
  border-color: var(--bili-pink);
  background: var(--bili-pink);
  color: #fff;
}
.publish-page .btn-primary:hover {
  border-color: var(--bili-pink-strong);
  background: var(--bili-pink-strong);
}
.publish-page .badge.ok {
  background: var(--bili-blue-soft);
  color: #008ac5;
}
.publish-page .badge.warn {
  background: var(--bili-pink-soft);
  color: #d44d7d;
}
.publish-stats .stat-card strong {
  font-variant-numeric: tabular-nums;
}
.publish-stats .stat-card {
  border-color: var(--bili-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
}
.publish-stats .stat-card span {
  color: var(--bili-muted);
}
.publish-stats .stat-card strong {
  color: var(--bili-text);
}
.publish-stats .stat-card:nth-child(3) strong {
  color: var(--bili-pink-strong);
}
.publish-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.publish-composer {
  min-height: 0;
}
.publish-form {
  display: grid;
  gap: 16px;
}
.publish-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bili-text);
  font-size: 13px;
  font-weight: 900;
}
.publish-section-title::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: var(--bili-pink);
}
.publish-form-grid {
  padding-bottom: 2px;
}
.publish-composer .panel-body {
  padding: 16px;
}
.publish-form .form-field small {
  color: #7b8798;
  font-size: 12px;
}
.publish-partition-field {
  max-width: 100%;
}
.publish-partition-picker {
  display: grid;
  grid-template-columns: minmax(180px, .44fr) minmax(240px, 1fr);
  gap: 8px;
}
.publish-partition-picker input[type="search"] {
  padding-left: 34px;
  background:
    radial-gradient(circle at 13px 13px, transparent 5px, #9499a0 5px 6px, transparent 6px) 0 0 / 30px 30px no-repeat,
    linear-gradient(45deg, transparent 46%, #9499a0 46% 54%, transparent 54%) 20px 22px / 10px 10px no-repeat,
    #fff;
}
.publish-partition-picker select {
  font-weight: 750;
}
.publish-file-field {
  position: relative;
  min-height: 126px;
  padding: 14px;
  border: 1px dashed #ccd0d7;
  border-radius: 8px;
  background: #fafbfc;
  align-content: start;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.publish-file-field:hover,
.publish-file-field.is-dragging,
.publish-file-field:focus-within {
  border-color: var(--bili-pink);
  background: #fff7fa;
  box-shadow: 0 8px 20px rgba(251, 114, 153, .08);
}
.publish-file-title {
  display: block;
  color: var(--bili-text);
  font-size: 14px;
  font-weight: 850;
}
.publish-file-drop {
  position: relative;
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 12px 12px 48px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}
.publish-file-drop::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center 8px / 2px 10px no-repeat,
    linear-gradient(135deg, transparent 42%, #fff 42% 58%, transparent 58%) center 8px / 12px 12px no-repeat,
    var(--bili-pink);
  box-shadow: 0 5px 12px rgba(251, 114, 153, .22);
}
.publish-file-drop strong {
  color: var(--bili-text);
  font-size: 13px;
  font-weight: 850;
}
.publish-file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.publish-file-field small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-file-field.has-file {
  border-color: #8fdcff;
  background: #f3fbff;
}
.publish-file-field.has-file .publish-file-drop::before {
  background:
    linear-gradient(#fff, #fff) center 8px / 2px 10px no-repeat,
    linear-gradient(135deg, transparent 42%, #fff 42% 58%, transparent 58%) center 8px / 12px 12px no-repeat,
    var(--bili-blue);
  box-shadow: 0 5px 12px rgba(0, 174, 236, .2);
}
.publish-cover-field .publish-file-drop {
  min-height: 150px;
}
.publish-cover-field.has-file .publish-file-drop {
  padding: 10px;
  align-content: stretch;
}
.publish-cover-field.has-file .publish-file-drop::before,
.publish-cover-field.has-file .publish-file-drop > strong {
  display: none;
}
.publish-cover-preview {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}
.publish-cover-preview[hidden] {
  display: none;
}
.publish-cover-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #dbe9f2;
  border-radius: 6px;
  background: #fff;
}
.publish-cover-preview span {
  min-width: 0;
  color: #3f454f;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #ffd6e3;
  border-radius: 8px;
  background: var(--bili-pink-soft);
}
.publish-submit-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.publish-submit-row strong {
  font-size: 13px;
}
.publish-submit-row span {
  color: var(--muted);
  font-size: 12px;
}
.publish-task-main,
.publish-account-cell {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.publish-task-main strong,
.publish-account-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-task-main small,
.publish-account-cell small {
  color: var(--muted);
  font-size: 12px;
}
.publish-page #publish-tasks .data-table th {
  background: #fafbfc;
  color: #61666d;
}
.publish-page #publish-tasks .data-table td {
  border-bottom-color: var(--bili-line);
}
.publish-page #publish-tasks .data-table tbody tr:hover td {
  background: #fff7fa;
}
.publish-page #publish-tasks .row-actions {
  flex-wrap: nowrap;
}
.publish-page #publish-tasks .row-actions form {
  min-width: 0;
}
.publish-page #publish-tasks .btn-small {
  white-space: nowrap;
}
.bit-page { grid-template-rows: auto auto minmax(360px, 1fr); }
.bit-toolbar {
  justify-content: flex-start;
}
.bit-toolbar .flash {
  margin: 0;
}
.bit-task-summary {
  text-decoration: none;
}
.bit-task-summary:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.bit-task-panel {
  min-height: 0;
}
.bit-task-dialog {
  width: min(1080px, calc(100vw - 28px));
  max-width: min(1080px, calc(100vw - 28px));
  height: min(820px, calc(100dvh - 28px));
  max-height: min(820px, calc(100dvh - 28px));
}
.bit-task-dialog .modal-panel {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.bit-task-modal-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  max-height: none;
  min-height: 0;
}
.bit-task-list-wrap {
  display: none;
  min-height: 0;
  overflow: auto;
}
.bit-task-list-wrap.is-active {
  display: block;
}
.bit-task-command-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bit-task-panel .panel-head {
  gap: 12px;
}
.bit-task-tabs {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}
.bit-task-tabs button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  color: #334155;
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}
.bit-task-tabs button.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
.bit-task-tabs span {
  min-width: 22px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}
.bit-task-clear-form {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.bit-task-clear-form .btn {
  white-space: nowrap;
}
.bit-task-notice {
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  align-self: start;
}
.bit-task-table th:nth-child(1),
.bit-task-table td:nth-child(1) { width: 18%; }
.bit-task-table th:nth-child(2),
.bit-task-table td:nth-child(2) { width: 22%; }
.bit-task-table th:nth-child(3),
.bit-task-table td:nth-child(3) { width: 10%; }
.bit-task-table th:nth-child(4),
.bit-task-table td:nth-child(4) { width: 8%; }
.bit-task-table th:nth-child(5),
.bit-task-table td:nth-child(5) { width: 18%; }
.bit-task-table th:nth-child(6),
.bit-task-table td:nth-child(6) { width: 24%; }
.bit-group-filter {
  margin-left: auto;
}
.bit-group-filter select {
  min-width: 180px;
}
.bit-profiles-panel {
  min-height: 0;
}
.bit-profile-table th:nth-child(1),
.bit-profile-table td:nth-child(1) { width: 28%; }
.bit-profile-table th:nth-child(2),
.bit-profile-table td:nth-child(2) { width: 14%; }
.bit-profile-table th:nth-child(3),
.bit-profile-table td:nth-child(3) { width: 10%; }
.bit-profile-table th:nth-child(4),
.bit-profile-table td:nth-child(4) { width: 10%; }
.bit-profile-table th:nth-child(5),
.bit-profile-table td:nth-child(5) { width: 16%; }
.bit-profile-table th:nth-child(6),
.bit-profile-table td:nth-child(6) { width: 22%; }
.bit-error {
  color: var(--red);
  white-space: normal;
}
.comments-grid { min-height: 0; display: grid; grid-template-columns: .9fr 1.1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-page { grid-template-rows: minmax(0, 1fr) 60px; }
.settings-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.settings-page .panel-body { overflow: auto; }
.guide-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.guide-summary-card {
  min-height: 86px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
}
.guide-summary-card span {
  color: #52637a;
  font-size: 12px;
  font-weight: 850;
}
.guide-summary-card strong {
  color: #06172f;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}
.guide-summary-card small {
  color: #6b7c92;
  font-size: 12px;
}
.guide-summary-card.is-blue { border-color: #bfdbfe; background: linear-gradient(180deg, #f8fbff 0%, #fff 100%); }
.guide-summary-card.is-green,
.guide-summary-card.is-online { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%); }
.guide-summary-card.is-red,
.guide-summary-card.is-danger { border-color: #fecdd3; background: linear-gradient(180deg, #fff5f5 0%, #fff 100%); }
.guide-summary-card.is-orange,
.guide-summary-card.is-warn { border-color: #fed7aa; background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); }
.guide-add-bar {
  justify-content: flex-start;
  align-items: stretch;
}
.guide-add-bar .flash {
  margin: 0;
}
.guide-add-inline {
  width: min(520px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.guide-add-inline input[name="uid"] {
  flex: 1 1 auto;
  min-width: 220px;
}
.guide-add-inline .btn {
  flex: 0 0 auto;
}
.guide-tabs {
  min-height: 0;
  display: grid;
  gap: 12px;
}
.guide-tabs .tab-nav {
  width: 100%;
  min-height: 0;
  padding: 4px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.guide-download-action {
  margin-left: auto;
}
.guide-tabs .tab-nav .guide-plugin-sync {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--primary-strong);
}
.guide-tabs .tab-nav .guide-plugin-sync:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}
.guide-tab-action {
  margin-left: 0;
}
.guide-tabs .tab-nav button {
  min-height: 36px;
  gap: 8px;
  border-radius: 9px;
}
.guide-tabs .tab-nav button span {
  min-width: 24px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf3fb;
  color: #52637a;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.guide-tabs .tab-nav button.is-active span {
  background: #ffffff;
  color: var(--primary-strong);
}
.guide-tabs .tab-panel {
  height: auto;
}
.guide-tabs .tab-panel.is-active {
  display: grid;
}
.guide-panel {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.guide-panel .panel-head {
  min-height: 58px;
}
.guide-panel .panel-body.is-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-panel .panel-body.is-list .guide-list-area {
  flex: 1 1 auto;
}
.guide-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.guide-panel-head .guide-add-inline {
  margin-left: auto;
  width: auto;
}
.guide-panel-head .guide-add-inline input[name="uid"] {
  width: 180px;
  min-width: 0;
  flex: 0 0 180px;
}
.guide-filter-bar {
  min-height: 0;
  justify-content: flex-start;
}
.guide-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f6f9fd;
}
.guide-filter-tabs a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  color: #52637a;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}
.guide-filter-tabs a.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
.guide-list-area {
  border: 1px solid #e7edf5;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}
.guide-table {
  table-layout: fixed;
}
.guide-table .guide-col-account { width: 25%; }
.guide-table .guide-col-fans { width: 8%; }
.guide-table .guide-col-status { width: 10%; }
.guide-table .guide-col-online { width: 10%; }
.guide-table .guide-col-reply { width: 10%; }
.guide-table .guide-col-token { width: 16%; }
.guide-table .guide-col-monitor { width: 7%; }
.guide-table .guide-col-actions { width: 14%; }
.guide-table td {
  height: 74px;
}
.guide-table th:nth-child(2),
.guide-table td:nth-child(2) {
  padding-right: 26px;
}
.guide-table th:nth-child(3),
.guide-table td:nth-child(3) {
  padding-left: 26px;
}
.guide-table th,
.guide-log-table th {
  background: #f8fbff;
}
.guide-table tbody tr,
.guide-log-table tbody tr {
  transition: background .16s ease;
}
.guide-table tbody tr:hover td,
.guide-log-table tbody tr:hover td {
  background: #fbfdff;
}
.guide-account-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.guide-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 10px;
}
.guide-account-main {
  min-width: 0;
}
.guide-account-cell strong,
.guide-time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-profile-error {
  color: #dc2626;
}
.guide-status-reason {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  color: #b45309;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-online {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.guide-online.is-online {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}
.guide-online.is-offline {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}
.guide-uid {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: #f6f9fd;
  color: #31506f;
  font-size: 12px;
  font-weight: 850;
}
.guide-num {
  font-size: 14px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.guide-account-cell small,
.guide-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-state-line {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}
.guide-state-line span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
}
.guide-reply-text,
.guide-detail-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.token-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #0f766e;
}
.token-copy {
  max-width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #d9f3ef;
  border-radius: 8px;
  background: #f6fffd;
  color: #0f766e;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.token-copy:hover {
  border-color: #99e6d8;
  background: #ecfdf8;
  color: var(--primary);
}
.token-copy code {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 12px;
}
.reply-state {
  min-width: 76px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e4f2;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.reply-state:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.reply-state:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 161, 214, .16);
}
.reply-state.is-set {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}
.reply-state.is-empty {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.guide-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}
.guide-row-actions form {
  margin: 0;
}
.guide-row-actions .btn {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}
.guide-row-actions .danger {
  border-color: #fecdd3;
  background: #fff5f5;
  color: #be123c;
}
.guide-row-actions .danger:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}
.guide-mobile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.guide-reply-dialog {
  width: min(620px, calc(100vw - 28px));
}
.guide-reply-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.guide-reply-modal-meta span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}
.guide-reply-modal-text {
  min-height: 140px;
  max-height: 46vh;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #fbfdff;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  font: inherit;
  line-height: 1.65;
}
.guide-reply-form {
  display: grid;
  gap: 12px;
}
.guide-reply-editor {
  min-height: 180px;
  line-height: 1.6;
}
.guide-log-table {
  table-layout: fixed;
}
.guide-log-table th:nth-child(1),
.guide-log-table td:nth-child(1) { width: 18%; }
.guide-log-table th:nth-child(2),
.guide-log-table td:nth-child(2) { width: 12%; }
.guide-log-table th:nth-child(3),
.guide-log-table td:nth-child(3),
.guide-log-table th:nth-child(4),
.guide-log-table td:nth-child(4) { width: 20%; }
.guide-log-table th:nth-child(5),
.guide-log-table td:nth-child(5) { width: 18%; }
.guide-log-table th:nth-child(6),
.guide-log-table td:nth-child(6) { width: 12%; }
.guide-log-table td {
  height: 58px;
}
.guide-log-panel .panel-body {
  padding-top: 0;
}
.form-field textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fbfcff;
}
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 161, 214, .12);
  background: #fff;
}
.check-field {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.media-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.media-cell > div { min-width: 0; flex: 1 1 auto; }
.cover-thumb { width: 76px; height: 44px; border-radius: 8px; background: var(--neutral-soft); overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.cover-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--neutral-soft); }
.avatar-thumb {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--neutral-soft);
  overflow: hidden;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}
.avatar-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-cell { gap: 9px; }
.mobile-list, .mobile-list.card-list { display: none; }
.card-list { display: grid; gap: 10px; }
.mobile-card-item {
  border: 1px solid #dce5f2;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow-soft);
}
.group-card { gap: 12px; }
.group-card-switches {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding-top: 2px;
}
.group-card-switches span {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 850;
}
.group-card-switches form { margin: 0; }
.item-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.item-title { min-width: 0; font-weight: 850; color: #0b1220; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { color: var(--muted); font-size: 12px; display: grid; gap: 3px; }
.mobile-rank-labels,
.mobile-rank-line { display: grid; grid-template-columns: 42px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.mobile-rank-labels { color: var(--muted); font-size: 11px; }
.mobile-rank-line span { color: var(--muted); font-size: 12px; }
.mobile-rank-line b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.mobile-rank-line.is-today b { color: var(--primary); }
.mobile-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mobile-metric-grid > div { border: 1px solid #dce5f2; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); border-radius: 10px; padding: 10px; display: grid; justify-items: center; gap: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .035); text-align: center; }
.mobile-metric-grid strong { font-size: 12px; color: var(--text); }
.mobile-metric-grid span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mobile-metric-grid .rank-metrics { min-width: 0; gap: 5px; }
.mobile-metric-grid .rank-metrics span { padding: 6px 5px; justify-items: start; }
.conversion-panel-body {
  grid-template-rows: auto auto auto;
  align-content: start;
}
.conversion-panel-body .list-area {
  overflow: visible;
  border-radius: 0;
}
.conversion-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.conversion-card {
  min-height: 68px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  text-align: center;
}
.conversion-card span {
  color: #52637a;
  font-size: 12px;
  font-weight: 850;
}
.conversion-card strong {
  color: #0b1220;
  font-size: 23px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.conversion-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  table-layout: fixed;
}
.conversion-table th:first-child,
.conversion-table td:first-child { width: 25%; }
.conversion-table th:not(:first-child),
.conversion-table td:not(:first-child) { width: 12.5%; }
.conversion-table th,
.conversion-table td {
  text-align: center;
  vertical-align: middle;
}
.conversion-table th {
  height: 34px;
  padding: 0 12px;
  border-bottom: 0;
  color: #607086;
  background: #f6f9fd;
  font-weight: 850;
}
.conversion-table th:first-child {
  border-radius: 9px 0 0 9px;
}
.conversion-table th:last-child {
  border-radius: 0 9px 9px 0;
}
.conversion-table tbody tr {
  transition: transform .16s ease, box-shadow .16s ease;
}
.conversion-table tbody tr:hover {
  transform: translateY(-1px);
}
.conversion-table td {
  height: 62px;
  padding: 10px 12px;
  border-top: 1px solid #e1e9f4;
  border-bottom: 1px solid #e1e9f4;
  background: #ffffff;
  color: #102033;
  font-size: 13px;
}
.conversion-table td:first-child {
  border-left: 1px solid #e1e9f4;
  border-radius: 10px 0 0 10px;
}
.conversion-table td:last-child {
  border-right: 1px solid #e1e9f4;
  border-radius: 0 10px 10px 0;
}
.conversion-table tbody tr:hover td {
  border-color: #bfd8ff;
  box-shadow: 0 10px 24px rgba(22, 119, 255, .07);
}
.conversion-table th:first-child,
.conversion-table td:first-child {
  text-align: left;
  padding-left: 16px;
}
.conversion-table th:not(:first-child),
.conversion-table td:not(:first-child),
.conversion-table th.num-cell,
.conversion-table td.num-cell {
  text-align: center;
}
.conversion-table .num-cell {
  text-align: center;
  font-size: 14px;
  color: #0b1220;
  font-weight: 750;
  letter-spacing: 0;
}
.conversion-account-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.conversion-table .conversion-account-cell {
  justify-content: flex-start;
}
.conversion-account-cell > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.conversion-table .conversion-account-cell > div {
  text-align: left;
}
.conversion-account-cell strong {
  color: #102033;
  font-size: 13px;
  line-height: 1.15;
}
.conversion-account-cell small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.1;
}
.conversion-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 2px solid #ffffff;
  background: #f1f5f9;
  box-shadow: 0 0 0 1px #dce5f2, 0 5px 12px rgba(15, 23, 42, .08);
}
.conversion-avatar--empty {
  display: inline-block;
  background:
    linear-gradient(135deg, rgba(22, 119, 255, .12), rgba(14, 165, 233, .04)),
    #eef4fb;
}
.conversion-rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  background: #f3f8ff;
  color: var(--primary);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.conversion-rate.rate-tier-1 {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff1f2;
}
.conversion-rate.rate-tier-2 {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}
.conversion-rate.rate-tier-3 {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.conversion-rate.rate-tier-4 {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.switch-button, .monitor-switch {
  min-width: 74px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.switch-button span, .monitor-switch span { width: 26px; height: 26px; border-radius: 999px; background: var(--panel); box-shadow: 0 1px 4px rgba(15,23,42,.16); }
.switch-button.on, .monitor-switch.on { background: var(--green-soft); border-color: var(--green); color: var(--green-text); }
.switch-button.on span, .monitor-switch.on span { order: 2; }
.switch-button em, .monitor-switch em { font-style: normal; font-size: 12px; font-weight: 850; }
.monitor-switch.video-monitor-switch {
  min-width: 48px;
  width: 48px;
  height: 28px;
  padding: 2px;
  border-radius: 999px;
  border-color: var(--line-strong);
  background: var(--neutral-soft);
  justify-content: flex-start;
}
.monitor-switch.video-monitor-switch span { width: 22px; height: 22px; }
.monitor-switch.video-monitor-switch.on { background: #20c667; border-color: #20c667; }
.monitor-switch.video-monitor-switch.on span { order: 0; transform: translateX(20px); }

dialog { border: 0; border-radius: 14px; padding: 0; box-shadow: 0 28px 90px rgba(15, 23, 42, .28); max-width: min(760px, calc(100vw - 28px)); width: 720px; }
dialog::backdrop { background: rgba(15, 23, 42, .38); }
.modal-panel { background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%); border-radius: 12px; overflow: hidden; }
.modal-head { height: 56px; border-bottom: 1px solid #e7edf5; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(248, 251, 255, .72); }
.modal-body { padding: 16px; max-height: 70dvh; overflow: auto; }
.modal-actions { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.flash {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--green);
  color: var(--green-text);
  background: #f0fdf4;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  font-weight: 800;
}
.flash.error { border-color: var(--red-border); color: var(--red); background: var(--red-soft); }

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-grid.core-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-grid, .settings-grid { grid-template-columns: 1fr; }
  .account-layout, .home-main-grid, .comments-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  html, body { overflow: hidden; }
  .app-shell { grid-template-columns: 1fr; }
  .settings-proxy-summary { grid-template-columns: 1fr; }
  .settings-proxy-chip { grid-template-columns: auto 1fr; }
  .settings-proxy-chip small { grid-column: 1 / -1; justify-self: start; }
  .guide-summary-grid { grid-template-columns: 1fr; }
  .guide-add-inline {
    width: 100%;
    flex-wrap: wrap;
  }
  .guide-add-inline input[name="uid"] {
    min-width: 0;
  }
  .guide-tabs .tab-nav {
    width: 100%;
    overflow-x: auto;
  }
  .guide-tabs .tab-nav button {
    flex: 1 0 auto;
  }
  .guide-panel-head {
    align-items: stretch;
  }
  .guide-filter-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .guide-filter-tabs a {
    flex: 0 0 auto;
  }
  .guide-row-actions {
    width: 100%;
  }
  .guide-row-actions form {
    flex: 1 1 0;
  }
  .guide-row-actions .btn {
    width: 100%;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(82vw, 300px);
    transform: translateX(-105%);
    transition: transform .18s ease;
  }
  .drawer-open .sidebar { transform: translateX(0); }
  .drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .38);
    z-index: 35;
    display: none;
  }
  .drawer-open .drawer-mask { display: block; }
  .icon-button { display: grid; }
  .topbar { padding: 0 10px; gap: 8px; }
  .page-heading span, .status-pill, .topbar-monitor-status, .run-check-form, .user-menu span { display: none; }
  .topbar-actions { gap: 6px; }
  .user-menu { display: block; }
  .alert-popover { position: fixed; inset: auto 10px 10px 10px; width: auto; max-height: 78dvh; overflow: auto; }
  .main-content { padding: 10px; overflow: auto; }
  .page { gap: 10px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card, .metric { min-height: 82px; padding: 12px; border-radius: 10px; }
  .trend-stat-card { min-height: 68px; }
  .stat-card strong, .metric-value { font-size: 22px; }
  .trend-stat-card strong { font-size: 24px; }
  .trend-stat-card em { position: static; margin-top: 4px; }
  .home-page { grid-template-rows: auto minmax(0, 1fr); }
  .account-page, .video-page, .comments-page, .publish-page, .bit-page { grid-template-rows: auto auto auto auto; }
  .account-page { grid-template-rows: auto auto; }
  .guide-page { grid-template-rows: auto auto auto auto auto; }
  .settings-page { grid-template-rows: minmax(0, 1fr) auto; }
  .home-main-grid, .rank-grid, .account-layout, .comments-grid, .settings-grid, .publish-layout { grid-template-columns: 1fr; gap: 10px; }
  .publish-partition-picker { grid-template-columns: 1fr; }
  .publish-submit-row { align-items: stretch; flex-direction: column; }
  .publish-submit-row .btn { width: 100%; }
  .comments-command-bar { grid-template-columns: 1fr; align-items: stretch; }
  .comments-command-actions, .comments-state-actions { justify-content: stretch; }
  .comments-command-actions form, .comments-command-actions .btn,
  .comments-state-actions form, .comments-state-actions .btn { width: 100%; }
  .comments-state-grid { grid-template-columns: 1fr; gap: 10px; }
  .comment-state-block { min-height: 82px; }
  .comment-signal-list { display: grid; grid-template-columns: 1fr 1fr; }
  .comment-signal { min-width: 0; justify-content: space-between; }
  .panel { grid-template-rows: 48px minmax(0, 1fr); }
  .panel-body { padding: 10px; }
  .settings-page .panel-body { overflow: auto; }
  .filter-bar { display: grid; grid-template-columns: 1fr; }
  .filter-bar.mobile-collapsible { display: none; }
  details.mobile-filter > summary { display: inline-flex; list-style: none; }
  details.mobile-filter:not([open]) .filter-bar { display: none; }
  details.mobile-filter .filter-bar { display: grid; margin-top: 8px; }
  details.mobile-filter summary::-webkit-details-marker { display: none; }
  .tabs { grid-template-rows: 46px minmax(0, 1fr); }
  .account-tabs { grid-template-rows: auto minmax(0, 1fr); }
  .account-tabs .tab-nav { flex-wrap: wrap; }
  .account-add-inline { width: 100%; margin-left: 0; }
  .account-add-inline input { min-width: 0; }
  .tab-nav { padding: 5px; }
  .panel-head { align-items: flex-start; flex-direction: column; height: auto; min-height: 58px; padding: 10px 14px; }
  .panel-head .group-add-form { width: 100%; margin-left: 0; }
  .competitor-page .panel-head-actions,
  .competitor-page .competitor-account-actions,
  .competitor-page .competitor-group-filter,
  .competitor-page .competitor-add-form,
  .competitor-page .competitor-rename-form {
    width: 100%;
  }
  .competitor-page .competitor-account-actions {
    justify-content: stretch;
  }
  .competitor-page .competitor-add-form {
    flex-wrap: wrap;
  }
  .competitor-page .competitor-group-filter select,
  .competitor-page .competitor-add-form input[name="uid"] {
    min-width: 0;
    width: 100%;
  }
  .rank-filter { width: 100%; grid-template-columns: 1fr; margin-left: 0; }
  .trend-toolbar { width: 100%; margin-left: 0; justify-content: space-between; }
  .trend-toolbar select { min-width: 0; width: 100%; }
  .desktop-table { display: none; }
  .mobile-list, .mobile-list.card-list { display: grid; min-height: 0; overflow: visible; }
  .trend-chart { height: 238px; border-radius: 12px; }
  .trend-stats, .trend-detail-rows { grid-template-columns: 1fr; }
  .trend-axis { overflow-x: auto; justify-content: start; }
  .trend-axis span { min-width: max-content; }
  .conversion-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conversion-card { min-height: 62px; }
  .conversion-card strong { font-size: 20px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .btn, .link-button { min-height: 40px; }
.row-actions, .actions { gap: 6px; }
  .alert-item { grid-template-columns: 1fr; }
  dialog { width: calc(100vw - 18px); }
}

.detail-list { display: grid; gap: 12px; }
.detail-item {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.detail-key {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.detail-value {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.async-action-status {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 120;
  min-width: 180px;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: #f0fdf4;
  color: var(--green-text);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}
.async-action-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.async-action-status.is-error {
  border-color: var(--red-border);
  background: var(--red-soft);
  color: var(--red);
}
@media (max-width: 640px) {
  .flash,
  .async-action-status {
    top: 68px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .async-action-status {
    transition: none;
  }
}
.is-loading {
  opacity: .72;
  cursor: progress;
}
@media (min-width: 768px) {
  details.mobile-filter > summary { display: none; }
  details.mobile-filter .filter-bar { display: flex; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .trend-dialog[open] .modal-panel,
  .trend-dialog[open]::backdrop,
  .chart-area.is-entering,
  .chart-dot.is-entering {
    animation: none;
  }
  .chart-plot.is-rising {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .chart-dot.is-entering,
  .chart-area.is-entering {
    opacity: 1;
    transform: none;
  }
}
