:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #f9fafc;
  --text: #171821;
  --muted: #74788a;
  --line: #e5e7ef;
  --brand: #6958f5;
  --brand-2: #28b8a8;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 12px 32px rgba(21, 24, 38, 0.06);
  --shadow-soft: 0 6px 18px rgba(21, 24, 38, 0.045);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
  font-size: 14px;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
a { color: inherit; text-decoration: none; }

.app-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}
.sidebar-scrim {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 20px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #111827, var(--brand));
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(105, 88, 245, 0.22);
}
.brand strong { display: block; font-size: 17px; line-height: 1.2; }
.brand span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.nav-group { margin: 12px 0 18px; }
.nav-label {
  padding: 0 10px 8px;
  color: #9aa0af;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.nav-item {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: transparent;
  color: #5f6573;
  font-weight: 700;
  text-align: left;
  position: relative;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.nav-item:hover {
  color: var(--text);
  background: #f7f7fb;
}
.nav-item.active {
  color: var(--brand);
  background: #f3f1ff;
  box-shadow: inset 3px 0 0 var(--brand);
}
.nav-ico {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  flex: 0 0 24px;
  border-radius: 7px;
  background: #f1f3f8;
  box-shadow: inset 0 0 0 1px rgba(99, 106, 125, 0.06);
  transition: background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.nav-ico svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item:hover .nav-ico {
  background: #ebeef8;
  box-shadow: inset 0 0 0 1px rgba(105, 88, 245, 0.12);
}
.nav-item.active .nav-ico {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #8477ff);
  box-shadow: 0 9px 18px rgba(105, 88, 245, 0.22);
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: transparent;
  border-bottom: 0;
}
.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.topbar-spacer { min-width: 1px; flex: 1 1 auto; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.pill-btn, .ghost-btn, .primary-btn, .danger-btn {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}
.primary-btn {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(105, 88, 245, 0.2);
}
.danger-btn { border-color: #fed7d7; color: #b91c1c; background: #fff7f7; }
.ghost-btn:hover, .pill-btn:hover { border-color: #cac4ff; color: var(--brand); }
.top-menu {
  position: relative;
  display: inline-flex;
}
.top-menu > summary {
  list-style: none;
}
.top-menu > summary::-webkit-details-marker {
  display: none;
}
.top-menu-trigger,
.top-icon-btn {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.top-menu-trigger {
  padding: 8px 12px;
}
.top-icon-btn {
  width: 40px;
  padding: 0;
  background: #fafafa;
}
.top-icon-btn span,
.trigger-icon {
  font-size: 15px;
  line-height: 1;
}
.language-trigger {
  width: 85px;
  overflow: hidden;
}
.language-trigger .trigger-label {
  width: 0;
  opacity: 0;
  pointer-events: none;
}
.language-trigger strong {
  min-width: auto;
  height: auto;
  border-radius: 0;
  display: inline;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.trigger-label,
.account-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trigger-chevron {
  color: #9aa0af;
  font-size: 14px;
}
.top-menu[open] .trigger-chevron {
  transform: rotate(180deg);
}
.top-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 176px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12);
}
.top-menu-popover button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}
.top-menu-popover button:hover,
.top-menu-popover button.active {
  background: #f3f1ff;
  color: var(--brand);
}
.top-menu-popover em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}
.account-trigger {
  width: 224px;
  max-width: 224px;
  border-color: transparent;
  background: transparent;
  justify-content: flex-start;
  gap: 10px;
  padding: 4px;
  font-size: 16px;
  line-height: 24px;
}
.account-trigger .trigger-chevron {
  display: none;
}
.account-email {
  max-width: 174px;
}
.logout-option {
  color: #b91c1c !important;
}

.content {
  width: min(1220px, 100%);
  min-width: 0;
  padding: 28px;
}
.view-head {
  display: grid;
  gap: 7px;
  margin-bottom: 20px;
}
.view-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.16;
  letter-spacing: 0;
}
.view-head p { margin: 0; color: var(--muted); line-height: 1.7; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel.flush { padding: 0; overflow: hidden; }
.panel.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfbff;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.panel h2, .panel h3 { margin: 0; letter-spacing: 0; }
.panel h2 { font-size: 20px; }
.panel h3 { font-size: 17px; }
.muted { color: var(--muted); }

.metric {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.metric strong { font-size: 22px; line-height: 1.1; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric small { color: var(--muted); }
.dashboard-view {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 4px;
}
.dashboard-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}
.announcement-card {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  gap: 18px;
  align-items: center;
  border: 0;
  padding: 18px 24px;
  text-align: left;
  background: #eef0ff;
  color: var(--text);
  box-shadow: none;
}
.announcement-card.is-empty {
  cursor: default;
  opacity: 1;
}
.announcement-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.36);
  color: var(--brand);
  font-size: 17px;
}
.announcement-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.announcement-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.announcement-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #332a8f;
  font-size: 18px;
  font-weight: 900;
}
.announcement-copy small {
  color: #4b429f;
  font-size: 13px;
  font-weight: 700;
}
.announcement-arrow {
  color: #a3a6b2;
  font-size: 28px;
  line-height: 1;
}
.subscription-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}
.subscription-top,
.subscription-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.subscription-top h3 {
  margin: 0;
  color: #646879;
  font-size: 16px;
  font-weight: 700;
}
.plan-name {
  margin-top: -10px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.12;
  font-weight: 950;
}
.plan-link {
  width: fit-content;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  overflow-wrap: anywhere;
}
.plan-link:hover { color: var(--brand); }
.subscription-main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}
.usage-meter {
  width: 190px;
  height: 190px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--brand) var(--value, 0%), #ebeaf2 0);
  justify-self: center;
}
.meter-ring {
  width: 140px;
  height: 140px;
  border-radius: inherit;
  display: grid;
  place-items: center;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
}
.meter-ring strong {
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}
.meter-ring strong small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
}
.subscription-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.subscription-facts div {
  display: grid;
  min-height: 82px;
  gap: 6px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.subscription-facts span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.subscription-facts strong {
  min-width: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.subscription-buy {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
}
.subscription-actions.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.subscription-actions.active.has-reset {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.subscription-actions.active > button {
  height: 100%;
  min-width: 0;
}
.subscription-action-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.1;
  text-align: left;
}
.subscription-action-copy strong { font: inherit; font-weight: 800; }
.subscription-action-copy small { font-size: 11px; font-weight: 600; opacity: .78; }
.subscription-import,
.subscription-reset,
.subscription-copy {
  min-height: 46px;
  margin-top: 2px;
  width: 100%;
}
.subscription-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.subscription-links button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}
.subscription-links span {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #f3f1ff;
  color: var(--brand);
}
.subscription-links strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subscription-links em {
  color: #a3a6b2;
  font-style: normal;
  font-size: 18px;
}
.usage-trend-card {
  display: grid;
  gap: 14px;
  padding: 28px 24px 20px;
}
.trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.trend-head h3 {
  margin: 0;
  color: #474b57;
  font-size: 16px;
  font-weight: 800;
}
.trend-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}
.trend-pills span {
  display: inline-flex;
  align-items: center;
  color: #686d7a;
  font-size: 13px;
  font-weight: 800;
}
.trend-pills span::first-letter { color: #858996; }
.trend-pills span {
  white-space: nowrap;
}
.trend-pills strong {
  color: var(--text);
}
.trend-chart-wrap {
  min-height: 206px;
  padding: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.trend-chart {
  width: 100%;
  height: 214px;
  display: block;
  overflow: hidden;
}
.trend-y-label text,
.trend-x-label {
  fill: #626775;
  font-size: 12px;
  font-weight: 700;
}
.trend-y-label line {
  stroke: #eef0f5;
  stroke-width: 1;
}
.trend-area {
  fill: url(#trafficArea);
}
.trend-line {
  fill: none;
  stroke: #6258ea;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-future {
  fill: none;
  stroke: #edeef4;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.trend-dot {
  fill: #6258ea;
  stroke: #fff;
  stroke-width: 2;
}
.trend-tooltip rect {
  fill: #fff;
  stroke: #eceef5;
  filter: drop-shadow(0 6px 14px rgba(31, 35, 52, 0.08));
}
.trend-tooltip text {
  fill: #1f2330;
  font-size: 12px;
  font-weight: 800;
}
.trend-link {
  justify-self: end;
  min-height: 38px;
  padding: 0 12px;
}
.traffic-view {
  display: grid;
  gap: 22px;
}
.traffic-help {
  display: grid;
  gap: 12px;
  padding: 26px 28px;
}
.traffic-help h3,
.daily-traffic-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}
.traffic-help p {
  margin: 0;
  color: #5d6270;
  font-size: 15px;
  line-height: 1.7;
}
.traffic-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.traffic-summary-card {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.traffic-summary-card span {
  color: #777b89;
  font-size: 14px;
  font-weight: 800;
}
.traffic-summary-card strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}
.traffic-summary-card small {
  color: #666b78;
  font-size: 13px;
  font-weight: 700;
}
.daily-traffic-card {
  display: grid;
  gap: 22px;
  padding: 26px;
}
.daily-traffic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.traffic-legend {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #555a67;
  font-size: 13px;
  font-weight: 800;
}
.traffic-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.traffic-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.traffic-up-dot { background: #5146df; }
.traffic-down-dot { background: #b6adf3; }
.traffic-day-list {
  display: grid;
  gap: 18px;
}
.traffic-day-row {
  display: grid;
  grid-template-columns: 104px minmax(160px, 1fr) minmax(180px, auto);
  gap: 14px;
  align-items: center;
}
.traffic-day-date {
  color: #5d6270;
  font-size: 14px;
  font-weight: 800;
}
.traffic-day-bar {
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  display: flex;
  background: #f0f1f5;
}
.traffic-day-bar span {
  display: block;
  height: 100%;
  width: var(--w);
  min-width: 0;
}
.traffic-up {
  background: #5146df;
  border-radius: 999px 0 0 999px;
}
.traffic-down {
  background: #b6adf3;
}
.traffic-rest {
  background: #f0f1f5;
}
.traffic-day-total {
  min-width: 0;
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
}
.traffic-day-total strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}
.traffic-day-total small {
  color: #5d6270;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.node-status-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
  padding: 0 0 2px;
}
.node-status-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.15;
}
.node-status-hero p {
  margin: 0;
  color: #4e5361;
  font-size: 17px;
  line-height: 1.6;
}
.node-status-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}
.node-status-stats span {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #e9eaf0;
  border-radius: 999px;
  background: #fff;
  color: #686d7a;
  font-size: 12px;
  font-weight: 800;
}
.nodes-view {
  display: grid;
  gap: 26px;
}
.node-search-row {
  display: flex;
}
.node-search-box {
  width: min(326px, 100%);
  height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  overflow: hidden;
  border: 1px solid #e2e4ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(20, 24, 38, 0.04);
}
.node-search-box input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.node-search-box input::placeholder {
  color: #b8bcc7;
}
.node-search-box span {
  display: grid;
  place-items: center;
  border-left: 1px solid #e2e4ea;
  color: #9aa0ac;
  font-size: 22px;
  font-weight: 700;
}
.node-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.node-card {
  min-height: 102px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(25, 28, 42, 0.08);
}
.node-card.is-offline {
  opacity: .7;
}
.node-flag {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 5px 12px rgba(19, 35, 72, 0.13);
  overflow: hidden;
  line-height: 1;
}
.flag-badge {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 25, 38, .08);
}
.flag-image { object-fit: cover; background: #fff; }
.flag-global { background: linear-gradient(135deg, #eef6ff, #f8fbff); }
.flag-global::after { content: "◎"; position: absolute; inset: 0; display: grid; place-items: center; color: #4770ff; font-size: 24px; font-weight: 900; }
.node-card-main {
  min-width: 0;
}
.node-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-card-side {
  display: grid;
  justify-items: end;
  gap: 16px;
}
.node-status-pill {
  min-width: 42px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #2cc82f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(44, 200, 47, .22);
}
.node-status-pill.off {
  background: #c4c7cf;
  box-shadow: none;
}
.node-rate {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.node-rate small {
  color: #1f2430;
  font-size: 11px;
  font-weight: 800;
}
.node-rate strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}
.nodes-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 330px;
  align-content: center;
  text-align: center;
}
.nodes-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f3f1ff;
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
}
.nodes-empty h3 {
  margin: 0;
  font-size: 22px;
}
.nodes-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.nodes-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.support-view {
  position: relative;
  display: grid;
  gap: 18px;
}
.support-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.support-center {
  padding: 0;
  overflow: hidden;
}
.support-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 18px;
  align-items: end;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.support-toolbar h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.support-toolbar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.support-search {
  min-height: 44px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #e3e5ee;
  border-radius: 8px;
  background: #f8f9fc;
}
.support-search span {
  color: #8c91a0;
  font-size: 18px;
  font-weight: 900;
}
.support-search input {
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.support-groups {
  display: grid;
  gap: 18px;
  padding: 18px 24px 24px;
}
.support-group {
  display: grid;
  gap: 8px;
}
.support-group > p {
  margin: 0;
  color: #858a98;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.support-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.support-article {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.support-article:last-child { border-bottom: 0; }
.support-article:hover {
  background: #fafaff;
}
.article-doc {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #f1efff;
  font-size: 13px;
  font-weight: 900;
}
.article-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}
.support-article time {
  color: #8c91a0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.support-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2f80ff, var(--brand));
  box-shadow: 0 18px 36px rgba(47, 128, 255, 0.28);
  font-size: 22px;
  font-weight: 900;
}
.support-modal {
  width: min(448px, calc(100vw - 36px));
  padding: 0;
  border-radius: 12px;
}
.support-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 14px;
  align-items: start;
  padding: 22px 22px 10px;
}
.support-modal-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.22;
}
.support-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  color: #6f7482;
  font-size: 12px;
}
.support-meta span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #f5f4ff;
  color: var(--brand);
  font-weight: 900;
}
.support-meta em {
  font-style: normal;
}
.support-article-body {
  display: grid;
  gap: 14px;
  padding: 12px 22px 18px;
}
.support-article-body section {
  display: grid;
  gap: 6px;
}
.support-article-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}
.support-article-body p {
  margin: 0;
  color: #222634;
  line-height: 1.72;
}
.support-modal-foot {
  display: flex;
  justify-content: flex-end;
  padding: 13px 22px 20px;
  border-top: 1px solid var(--line);
}
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #ebf9f1;
  color: #15803d;
  font-size: 12px;
  font-weight: 900;
}
.status.off { background: #f1f1f5; color: #6b7280; }
.status.warn { background: #fff7e6; color: #b45309; }

.progress-card {
  display: grid;
  gap: 14px;
}
.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceaf5;
}
.bar span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #22c55e);
}

.list { display: grid; gap: 10px; }
.row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(21, 24, 38, 0.025);
}
.row-item strong { display: block; overflow-wrap: anywhere; }
.row-item p { margin: 4px 0 0; line-height: 1.5; }

.empty {
  display: grid;
  place-items: center;
  min-height: 178px;
  padding: 34px 18px;
  border: 1px dashed #d6d1e7;
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
  background: #fdfdff;
  line-height: 1.65;
}
.empty.compact { min-height: 112px; }

.plans-page-head h2 { font-size: 30px; }
.plans-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.plan-card-ref {
  min-height: 358px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 23, 34, 0.055);
}
.plan-card-ref.is-air { border-color: #e3e5f2; background: linear-gradient(180deg, #fff, #fbfcff); }
.plan-card-ref.is-pro { border-color: #e6e1ff; }
.plan-card-ref.is-max { border-color: #e6ddff; box-shadow: 0 18px 38px rgba(89, 70, 246, 0.08); }
.plan-card-ref h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 18px;
  line-height: 1.25;
}
.plan-card-ref h3 span {
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #5c52d9;
  background: #f0edff;
  font-size: 12px;
  font-weight: 800;
}
.plan-card-top p {
  margin: 8px 0 0;
  color: #10121a;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}
.plan-card-body {
  display: grid;
  gap: 13px;
}
.plan-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.plan-spec-tags span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #4f5668;
  background: #f2f3f7;
  font-size: 12px;
  font-weight: 800;
}
.plan-feature-copy {
  display: grid;
  gap: 5px;
  color: #4f5668;
  font-size: 13px;
  line-height: 1.52;
}
.plan-feature-copy p { margin: 0; }
.plan-feature-copy a { color: #5c52d9; font-weight: 800; text-decoration: none; }
.plan-card-ref .primary-btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  min-height: 38px;
  border-radius: 8px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f3f4f8;
  color: #4f5668;
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; font-weight: 900; }
td { font-size: 14px; }

.order-page-head h2 {
  font-size: 30px;
}
.order-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(20, 23, 34, 0.08);
}
.order-table-wrap {
  overflow-x: auto;
}
.order-table {
  min-width: 820px;
  background: var(--panel);
}
.order-table th {
  height: 46px;
  padding: 0 16px;
  color: #696f7f;
  font-size: 13px;
  font-weight: 600;
}
.order-table td {
  height: 52px;
  padding: 0 16px;
  color: #252936;
  font-size: 14px;
  vertical-align: middle;
}
.order-table tbody tr:hover {
  background: #fbfbff;
}
.order-no-link {
  color: #5c52d9;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.order-plan-cell,
.plan-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}
.plan-mark {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
}
.plan-mark.infinity {
  color: #fff;
  background: #6d5cf6;
}
.order-status {
  min-height: 24px;
  padding: 0 9px;
  box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.12);
}
.order-status.off {
  background: #fafafa;
  box-shadow: inset 0 0 0 1px #e6e7eb;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.crumb a { color: var(--brand); }
.order-detail-head {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.order-detail-head h2 {
  margin: 14px 0 6px;
  font-size: 29px;
  line-height: 1.15;
}
.order-detail-head p {
  margin: 0;
  color: #4e5362;
  font-size: 12px;
  font-weight: 800;
}
.text-link-btn {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #171821;
  font-weight: 800;
}
.text-link-btn:hover { color: var(--brand); }
.order-detail-layout {
  display: grid;
  gap: 22px;
}
.order-progress-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto minmax(80px, 1fr) auto;
  align-items: center;
  padding: 20px 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.order-step {
  min-width: 86px;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.order-step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-size: 15px;
  font-weight: 900;
}
.order-step.cancelled span {
  background: #fff;
  border: 1px solid #fecdd3;
  color: #fb7185;
}
.order-step.current span {
  background: #f7f5ff;
  border: 1px solid #8b7cf6;
  color: #5c52d9;
}
.order-step.future span {
  background: #f1f2f5;
  color: #8f95a3;
}
.order-step strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}
.order-step small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.order-step-line {
  height: 1px;
  background: #e6e7eb;
}
.order-step-line.done {
  background: var(--brand);
}
.order-step-line.cancelled {
  background: #fb7185;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 16px;
  align-items: start;
}
.order-info-card,
.order-action-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.order-info-card {
  padding: 26px 24px;
}
.order-info-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.order-info-title h3,
.order-action-card h3 {
  margin: 0;
  font-size: 19px;
}
.order-detail-list {
  margin: 0;
  display: grid;
  gap: 14px;
}
.order-detail-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}
.order-detail-list dt {
  color: var(--muted);
  font-weight: 700;
}
.order-detail-list dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  text-align: right;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.order-action-card {
  min-height: 136px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px 24px;
}
.order-action-card .field {
  margin-top: 2px;
}
.order-action-card select {
  min-height: 44px;
}
.order-pay-box {
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 10px;
}
.order-pay-box div {
  min-height: 31px;
  font-size: 14px;
}
.order-pay-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.order-pay-actions .primary-btn {
  justify-content: center;
}
.order-check-link {
  justify-self: center;
}
.order-action-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.order-ok-dot {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 999px;
  color: #fff;
  background: #33b780;
  font-size: 12px;
}
.order-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.order-action-links a {
  color: #575d6d;
  font-size: 13px;
  font-weight: 800;
}
.order-ticket-modal {
  width: min(536px, calc(100vw - 36px));
  display: grid;
  gap: 13px;
  border-radius: 14px;
  padding: 24px;
}
.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.modal-title-row h2 {
  margin: 0;
  font-size: 23px;
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab-btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}
.tab-btn.active { color: #fff; background: var(--brand); border-color: var(--brand); }

.form-grid { display: grid; gap: 12px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: 13px; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #b9b0ff;
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.1);
}
.field textarea { min-height: 122px; resize: vertical; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quick-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.quick-card strong { font-size: 15px; }
.quick-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.quick-card .ghost-btn, .quick-card .primary-btn { justify-self: start; margin-top: 4px; }

.tickets-view {
  display: grid;
  gap: 18px;
}
.ticket-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ticket-new-btn {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}
.ticket-new-btn span {
  font-size: 17px;
  line-height: 1;
}
.ticket-shortcuts,
.ticket-list-panel,
.ticket-detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.ticket-shortcuts {
  display: grid;
  gap: 12px;
  padding: 18px;
}
.ticket-shortcuts-head {
  display: grid;
  gap: 4px;
}
.ticket-shortcuts-head strong {
  color: var(--text);
  font-size: 15px;
}
.ticket-shortcuts-head span {
  color: var(--muted);
  font-size: 13px;
}
.ticket-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ticket-shortcut {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  transition: border-color .18s ease, background .18s ease;
}
.ticket-shortcut:hover {
  border-color: #d8d2ff;
  background: #faf9ff;
}
.ticket-shortcut span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--brand);
  background: #f3f1ff;
  font-weight: 900;
}
.ticket-shortcut strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
}
.ticket-shortcut em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-style: normal;
}
.ticket-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr);
  gap: 16px;
  align-items: start;
}
.ticket-list-panel {
  overflow: hidden;
}
.ticket-filter-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.ticket-filter-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.ticket-filter-row select {
  width: 112px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}
.ticket-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticket-list li + li {
  border-top: 1px solid var(--line);
}
.ticket-list-item {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: grid;
  gap: 6px;
  border: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.ticket-list-item:hover {
  background: #fafbff;
}
.ticket-list-item.active {
  background: #f4f2ff;
}
.ticket-list-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--brand);
}
.ticket-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ticket-row-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.ticket-row-meta {
  color: var(--muted);
  font-size: 12px;
}
.ticket-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #5c6372;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}
.ticket-badge.replied {
  border-color: #bfe8d3;
  color: #14764b;
  background: #eefaf4;
}
.ticket-badge.pending {
  border-color: #f4d49a;
  color: #966316;
  background: #fff8e6;
}
.ticket-badge.closed {
  color: #687084;
  background: #f7f7f9;
}
.ticket-detail-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 18px;
}
.ticket-detail-placeholder {
  min-height: 260px;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
.ticket-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ticket-detail-head h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}
.ticket-close-btn {
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}
.ticket-related-orders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f8fb;
  color: var(--muted);
  font-size: 12px;
}
.ticket-related-orders a {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ticket-message-list {
  max-height: 50dvh;
  min-height: 140px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}
.ticket-message {
  display: grid;
  gap: 5px;
}
.ticket-message.me {
  justify-items: end;
}
.ticket-message.staff {
  justify-items: start;
}
.ticket-message-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f2f3f7;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ticket-message.me .ticket-message-bubble {
  color: #fff;
  background: var(--brand);
}
.ticket-message time {
  color: var(--muted);
  font-size: 12px;
}
.ticket-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: end;
}
.ticket-reply-form textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  color: var(--text);
  background: #fff;
  outline: none;
}
.ticket-reply-form textarea:focus {
  border-color: #b9b0ff;
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.1);
}
.icon-send-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  justify-content: center;
}
.ticket-closed-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.ticket-empty {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}
.ticket-empty.compact {
  min-height: 120px;
}
.ticket-empty strong {
  color: var(--text);
  font-size: 14px;
}
.ticket-empty p {
  max-width: 360px;
  margin: 0;
  line-height: 1.65;
}
.ticket-empty-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: #f5f6f9;
}
.ticket-loading-lines {
  display: grid;
  gap: 10px;
}
.ticket-loading-lines span {
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3f4f7, #fafafa, #f3f4f7);
}
.ticket-modal {
  width: min(520px, calc(100vw - 36px));
  display: grid;
  gap: 13px;
  border-radius: 14px;
  padding: 24px;
}
.ticket-submit-btn {
  width: 100%;
  min-height: 43px;
  justify-content: center;
}

.profile-view {
  display: grid;
  gap: 14px;
}
.profile-compact-view .view-head {
  margin-bottom: 4px;
}
.profile-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 14px;
  align-items: start;
}
.profile-left-stack {
  min-width: 0;
  display: grid;
  gap: 12px;
}
.profile-section {
  display: grid;
  gap: 10px;
}
.profile-section > h3 {
  margin: 0;
  color: #2f3340;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}
.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-card-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.profile-account-card {
  grid-row: span 2;
}
.profile-account-reference {
  width: 100%;
  gap: 12px;
}
.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.profile-card-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 900;
}
.profile-card-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}
.profile-card-head em {
  flex: 0 0 auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #edfdf8;
  color: #0f8f6d;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.profile-account-id {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f8f8fc;
}
.avatar-chip {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1f2937, #6958f5);
  color: #fff;
  font-weight: 950;
}
.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--avatar-bg, #6958f5);
  color: #fff;
  font-weight: 950;
}
.profile-avatar.large {
  width: 48px;
  height: 48px;
}
.profile-avatar.shell-avatar {
  width: 32px;
  height: 32px;
  box-shadow: inset 0 0 0 1px rgba(105, 88, 245, 0.12);
}
.profile-avatar.shell-avatar b {
  font-size: 14px;
}
.profile-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
.profile-avatar b {
  font-size: 22px;
}
.account-reference-id {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.account-reference-id b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}
.account-reference-id small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.account-reference-list {
  display: grid;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.account-reference-list div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto);
  gap: 12px;
  align-items: baseline;
}
.account-reference-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}
.account-reference-list b {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-align: right;
}
.link-btn {
  border: 0;
  padding: 0 0 1px;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.profile-account-id b,
.profile-kv-grid b,
.telegram-panel b {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-account-id small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.profile-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.profile-kv-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.profile-kv-grid span,
.appearance-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.profile-kv-grid b {
  font-size: 14px;
  font-weight: 900;
}
.profile-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.profile-form {
  display: grid;
  gap: 8px;
}
.profile-form .field {
  gap: 5px;
}
.profile-form .field input {
  height: 38px;
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
}
.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.input-action .ghost-btn,
.profile-form .primary-btn,
.telegram-panel .ghost-btn {
  min-height: 38px;
}
.input-action .ghost-btn {
  height: 38px;
  align-self: end;
  white-space: nowrap;
}
.telegram-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}
.telegram-panel > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.telegram-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #2ca5e0;
  color: #fff;
  font-weight: 950;
}
.password-form {
  gap: 8px;
}
.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.avatar-inline-panel {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.avatar-inline-panel.open {
  display: flex;
}
.avatar-choice {
  width: 42px;
  height: 42px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: var(--panel-soft);
  color: #fff;
  cursor: pointer;
}
.avatar-choice svg {
  width: 100%;
  height: 100%;
  display: block;
}
.avatar-choice span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1f2937, #6958f5);
  font-size: 16px;
  font-weight: 950;
}
.avatar-choice.active {
  box-shadow: 0 0 0 3px rgba(105, 88, 245, 0.22);
  border-color: var(--brand);
}
.profile-security-combined {
  width: 100%;
}
.security-combined-grid,
.security-stack {
  display: grid;
  gap: 10px;
  align-items: start;
}
.security-mini {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.security-mini > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f0edff;
  color: var(--brand);
  font-weight: 950;
}
.security-mini strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
}
.security-mini p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.security-mini em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 0 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.security-actions,
.security-mini > button {
  grid-column: 2;
}
.security-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.security-form {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.security-form > strong,
.security-title-row strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}
.security-title-row {
  display: grid;
  gap: 3px;
}
.security-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.compact-btn {
  min-height: 30px;
  padding-inline: 10px;
  font-size: 12px;
}
.toggle-list,
.appearance-list {
  display: grid;
  gap: 10px;
}
.toggle-list label {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.toggle-list label:last-child {
  border-bottom: 0;
}
.toggle-list b {
  display: block;
  font-size: 14px;
}
.toggle-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.toggle-list input {
  width: 38px;
  height: 22px;
  accent-color: var(--brand);
}
.appearance-list > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.segmented {
  width: fit-content;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8fc;
}
.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}
.segmented button.active {
  background: var(--brand);
  color: #fff;
}
.danger-card {
  border-color: #fed7d7;
  background: #fffafa;
}
.account-cancel-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 28px;
  align-items: center;
}
.account-cancel-head,
.account-cancel-copy,
.cancel-blocked,
.cancel-checks {
  grid-column: 1;
}
.account-cancel-copy {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.cancel-blocked {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #dc2626;
}
.cancel-blocked strong {
  font-weight: 900;
}
.cancel-blocked ul {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}
.cancel-checks {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.cancel-checks > strong {
  font-size: 14px;
  font-weight: 900;
}
.cancel-checks label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.cancel-checks input {
  margin-top: 4px;
  accent-color: var(--danger);
}
.account-cancel-card .danger-btn {
  grid-column: 2;
  grid-row: 3 / span 2;
  justify-self: end;
  align-self: center;
  min-height: 42px;
  min-width: 118px;
}
.account-cancel-card .danger-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.devices-view {
  display: grid;
  gap: 14px;
}
.devices-page-title {
  margin-bottom: 2px;
}
.devices-reference-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 14px;
  align-items: start;
}
.devices-card {
  min-width: 0;
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.devices-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.devices-card-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}
.devices-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.devices-card-head .ghost-btn {
  min-height: 32px;
  padding-inline: 10px;
  white-space: nowrap;
}
.devices-soft-alert {
  margin: 0;
  padding: 11px 16px;
  border-bottom: 1px solid #eceef6;
  background: #f8f9fc;
  color: #5f6573;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.device-kv-table {
  display: grid;
}
.device-kv-table div {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(88px, .42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #eceef6;
}
.device-kv-table span,
.device-table-head {
  color: #7d8392;
  font-size: 12px;
  font-weight: 850;
}
.device-kv-table b {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}
.devices-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 16px 14px;
}
.devices-action-row .ghost-btn,
.devices-action-row .danger-btn {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 12px;
}
.device-session-table {
  min-width: 0;
  display: grid;
}
.device-table-head,
.device-table-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) minmax(96px, .75fr) minmax(122px, .85fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}
.device-table-head {
  min-height: 36px;
  border-bottom: 1px solid #eceef6;
  background: #f8f9fc;
}
.device-table-row {
  min-height: 58px;
  border-bottom: 1px solid #eceef6;
}
.device-table-row:last-child {
  border-bottom: 0;
}
.device-table-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}
.device-table-main strong,
.device-table-row b {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}
.device-table-main p {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.device-table-row .ghost-btn {
  min-height: 30px;
  padding-inline: 10px;
  font-size: 12px;
}
.identified-device-list,
.session-list {
  display: grid;
  gap: 8px;
}
.identified-device-list.compact {
  padding: 12px 16px;
}
.identified-device-list.compact .identified-device-row {
  margin: 0;
}
.identified-device-row,
.session-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.identified-device-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin: 12px 16px;
}
.session-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.session-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}
.device-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0efff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 950;
}
.device-avatar.small {
  width: 34px;
  height: 34px;
}
.identified-device-row strong,
.session-row strong,
.session-meta b {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}
.identified-device-row p,
.session-row p,
.session-meta span {
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.session-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.session-meta span {
  margin: 0;
  font-weight: 850;
}
.session-row .ghost-btn {
  min-height: 34px;
  padding-inline: 11px;
}
.devices-empty {
  min-height: 154px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed #d9dce8;
  border-radius: 8px;
  background: #fafbff;
  text-align: center;
}
.devices-empty.compact {
  min-height: 126px;
}
.devices-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0efff;
  color: var(--brand);
  font-weight: 950;
}
.devices-empty strong {
  font-size: 15px;
}
.devices-empty p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.source-note-card {
  gap: 10px;
}
.ip-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ip-chip-row span {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.devices-ref-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 10px;
}
.devices-ref-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 950;
}
.devices-ref-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.devices-disconnect {
  min-height: 38px;
  border-color: #f0c6c6;
  background: #fff;
  color: #d03b3b;
  box-shadow: 0 6px 18px rgba(208, 59, 59, 0.08);
}
.devices-disconnect span {
  margin-right: 6px;
  font-weight: 950;
}
.device-ref-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.device-ref-stat {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 24px 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(22, 24, 36, 0.055);
}
.device-ref-stat span {
  display: block;
  color: #6f7482;
  font-size: 13px;
  line-height: 1.2;
}
.device-ref-stat strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 10px;
  color: #080b12;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.device-ref-stat small {
  color: #545b6b;
  font-size: 17px;
  font-weight: 750;
}
.device-ref-stat i {
  color: #676d78;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}
.device-list-card {
  min-width: 0;
  min-height: 460px;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  margin-top: 10px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(22, 24, 36, 0.055);
}
.device-list-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}
.device-list-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.device-ref-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 11px;
  text-align: center;
}
.device-ref-empty-icon {
  color: #535a66;
  font-size: 34px;
  line-height: 1;
}
.device-ref-empty strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}
.device-ref-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.device-ref-empty .primary-btn {
  min-height: 38px;
  margin-top: 2px;
  padding-inline: 18px;
}
.device-ref-list {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 22px;
}
.device-ref-row {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}
.device-ref-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0efff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 950;
}
.device-ref-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}
.device-ref-row p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  color: var(--muted);
  font-size: 12px;
}
.device-ref-row p b {
  color: #545b6b;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.device-ref-row p span {
  color: #777d8b;
  font-weight: 800;
}
.device-source-strip {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 13px 17px;
  border-radius: 8px;
  background: #f4f4f6;
  color: #737987;
}
.device-source-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.device-source-strip span {
  color: #737987;
}
.device-source-strip strong {
  color: #5d6370;
  font-size: 13px;
  font-weight: 900;
}
.device-source-strip em {
  color: #7e8490;
  font-size: 12px;
  font-style: normal;
}
.device-source-strip p {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
}
.device-source-strip b {
  color: #777d8b;
  font-size: 12px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.split-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.code-box {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f5f4ff;
  color: var(--brand);
  font-weight: 900;
}

.invite-view {
  display: grid;
  gap: 16px;
}
.invite-tabs {
  display: inline-flex;
  gap: 4px;
  justify-self: start;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.invite-tab {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: #5d6270;
  font-size: 13px;
  font-weight: 800;
}
.invite-tab.active {
  color: var(--text);
  background: #f3f1ff;
}
.invite-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.invite-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.invite-stat-card,
.invite-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.invite-stat-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}
.invite-stat-card span,
.invite-section-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.invite-stat-card strong {
  font-size: 26px;
  line-height: 1.05;
}
.invite-stat-card small,
.invite-panel-head p,
.invite-code-row p,
.invite-code-row small,
.owned-domain-row p,
.owned-domain-row small,
.domain-tier-card p,
.domain-tier-card small,
.domain-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.invite-panel {
  padding: 24px;
}
.invite-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.invite-panel-head h3 {
  margin: 0 0 7px;
  font-size: 20px;
}
.invite-code-list,
.owned-domain-list {
  display: grid;
  gap: 10px;
}
.invite-code-row {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #eef0f4 55%, #f8f9fb 100%);
}
.invite-code-row.silver-base,
.invite-code-row.has-branded-link.silver {
  border-color: #d9dde5;
  background: linear-gradient(135deg, #ffffff 0%, #e8ebf1 56%, #f9fafc 100%);
}
.invite-code-row.has-branded-link.gold {
  border-color: #dac7ff;
  background: linear-gradient(135deg, #fffaf0 0%, #f7f1ff 56%, #ffffff 100%);
}
.invite-code-row.has-branded-link.platinum {
  border-color: #a8eef4;
  background: linear-gradient(135deg, #effcff 0%, #f3f5ff 56%, #ffffff 100%);
}
.invite-code-top,
.invite-link-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.invite-code-top > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.invite-code-top span {
  color: #6f7280;
  font-weight: 700;
}
.invite-link-line input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #ebecef;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #171821;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}
.invite-copy-btn {
  min-width: 112px;
  min-height: 36px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(21, 24, 38, 0.05);
}
.invite-generate-btn {
  border-radius: 12px;
  min-width: 132px;
}
.owned-domain-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.owned-domain-row.has-branded-link.gold {
  border-color: #dac7ff;
  background: linear-gradient(135deg, #fffaf0 0%, #f7f1ff 60%, #ffffff 100%);
}
.owned-domain-row.has-branded-link.silver {
  border-color: #d9dde5;
  background: linear-gradient(135deg, #ffffff 0%, #e8ebf1 60%, #f9fafc 100%);
}
.owned-domain-row.has-branded-link.platinum {
  border-color: #a8eef4;
  background: linear-gradient(135deg, #effcff 0%, #f3f5ff 60%, #ffffff 100%);
}
.invite-code-row strong,
.owned-domain-row strong {
  display: inline-block;
  margin-right: 8px;
  font-size: 17px;
}
.owned-domain-row span,
.domain-tier-card span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.empty-owned {
  background: #fbfbfd;
}
.invite-section-label {
  margin: 18px 0 10px;
}
.domain-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.domain-tier-card {
  position: relative;
  min-height: 132px;
  display: grid;
  gap: 10px;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.domain-tier-card.tier-silver {
  background: linear-gradient(135deg, #ffffff 0%, #f0f2f6 48%, #ffffff 100%);
}
.domain-tier-card.tier-gold {
  background: linear-gradient(135deg, #fff8dc 0%, #fff 46%, #f7f0ff 100%);
}
.domain-tier-card.tier-platinum {
  background: linear-gradient(135deg, #eaffff 0%, #fff 48%, #edf1ff 100%);
}
.domain-tier-card.locked {
  opacity: 0.78;
}
.domain-tier-card.redeemed {
  border-color: #d8dcef;
  box-shadow: inset 0 0 0 1px rgba(103, 88, 245, 0.08);
}
.domain-tier-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.domain-tier-card b {
  font-size: 24px;
}
.domain-tier-card .primary-btn {
  position: absolute;
  top: 16px;
  right: 14px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
}
.domain-redeem-btn:not(:disabled) {
  border-color: #6758f5;
  background: #6758f5;
  color: #fff;
  box-shadow: 0 14px 28px rgba(103, 88, 245, 0.28);
}
.domain-redeem-btn:disabled {
  border-color: #e4e6ec;
  background: #eef0f4;
  color: #8b91a0;
  box-shadow: none;
  opacity: 1;
}
.domain-note {
  margin-top: 12px;
}
.tier-head {
  align-items: flex-start;
}
.tier-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  background: #46dff0;
  color: #183447;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.tier-progress-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.tier-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #555b68;
  font-size: 16px;
}
.tier-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ded9ff;
}
.tier-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #5b4cf0;
}
.tier-progress-wrap p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.commission-tier-list {
  display: grid;
  gap: 8px;
}
.commission-tier {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.commission-tier.current {
  border-color: #8f84ff;
  background: #f1f4ff;
}
.tier-name,
.tier-rule {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tier-name strong,
.tier-rule strong {
  font-size: 16px;
}
.tier-name em {
  color: #6f6a85;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.tier-rule span {
  color: #555b68;
  font-weight: 700;
}
.tier-mark {
  min-width: 34px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #d1d5db;
  color: #394150;
  font-size: 12px;
  font-weight: 900;
}
.tier-mark.bronze { background: #d89438; color: #2c1b08; }
.tier-mark.silver { background: #d8dce2; color: #303846; }
.tier-mark.gold { background: #f5ce3c; color: #2d2604; }
.tier-mark.platinum { background: #46dff0; color: #183447; }
.tier-mark.diamond { background: #a885ff; color: #fff; }
.commission-transfer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.withdraw-form {
  display: grid;
  gap: 12px;
}
.withdraw-balance-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfd;
}
.withdraw-balance-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.withdraw-balance-box strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}
.withdraw-balance-box small {
  grid-column: 1 / -1;
  color: #d95555;
  font-weight: 700;
}
.invite-table {
  min-width: 720px;
}
.invite-table .income {
  color: #179560;
  font-weight: 900;
}
.invite-domain-modal {
  display: grid;
  gap: 14px;
}
.invite-domain-modal .modal-title-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(22, 18, 38, 0.42);
}
.modal-mask-blur {
  background: rgba(22, 18, 38, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-mask.show { display: flex; }
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(22, 18, 38, 0.28);
  padding: 22px;
}
.buy-modal {
  width: min(504px, calc(100vw - 42px));
  padding: 18px 20px 20px;
  border-radius: 14px;
}
.buy-modal-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.buy-modal-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}
.cancel-order-modal {
  width: min(428px, calc(100vw - 36px));
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 14px;
}
.cancel-order-modal .modal-title-row h2 {
  font-size: 22px;
}
.cancel-order-modal p {
  margin: 0;
  color: #5b6270;
  font-size: 15px;
  line-height: 1.65;
}
.knowledge-modal {
  width: min(860px, calc(100vw - 36px));
  padding: 0;
  overflow: hidden;
}
.knowledge-modal-full {
  width: min(1180px, calc(100vw - 28px));
  height: min(860px, calc(100dvh - 36px));
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
}
.knowledge-modal .support-modal-head {
  flex: 0 0 auto;
  padding: 20px 22px 14px;
}
.knowledge-modal .support-article-body {
  padding: 0 22px 22px;
}
.knowledge-reader {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  border-top: 1px solid #edf0f5;
  overflow: hidden;
}
.knowledge-quick-list {
  flex: 0 0 auto;
  max-height: 28%;
  overscroll-behavior: contain;
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  overflow-x: auto;
  border-bottom: 1px solid #edf0f5;
  background: #fbfcff;
}
.knowledge-quick-list button {
  min-width: 220px;
  border: 1px solid #e7e9f0;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #fff;
  text-align: left;
}
.knowledge-quick-list button.active {
  border-color: #745cff;
  background: #f5f2ff;
}
.knowledge-quick-list strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}
.knowledge-quick-list em,
.knowledge-quick-list span {
  color: #7a8190;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.knowledge-browser {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr);
  gap: 0;
  min-height: 340px;
  max-height: min(620px, calc(100vh - 138px));
  border-top: 1px solid #edf0f5;
}
.knowledge-group {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-right: 1px solid #edf0f5;
  overflow-y: auto;
}
.knowledge-group h3 {
  margin: 0;
  color: #5f6472;
  font-size: 13px;
  font-weight: 900;
}
.knowledge-list {
  display: grid;
  gap: 8px;
}
.knowledge-list button {
  border: 1px solid #e7e9f0;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #fff;
  text-align: left;
}
.knowledge-list strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}
.knowledge-list span {
  color: #7a8190;
  font-size: 12px;
  font-weight: 700;
}
.knowledge-detail {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #8794aa #edf0f5;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  padding: 20px 22px;
  overflow-y: scroll;
  color: #273041;
  font-size: 15px;
  line-height: 1.75;
}
.knowledge-detail-full {
  max-height: none;
  padding: 26px 32px 34px;
}
.knowledge-detail-full > * {
  max-width: 980px;
}
.knowledge-detail-full img,
.knowledge-detail-full video {
  max-width: min(100%, 980px);
}
.knowledge-detail h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 20px;
  line-height: 1.25;
}
.knowledge-detail p {
  margin: 0 0 12px;
}
.knowledge-detail img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.knowledge-detail a {
  color: #5b37d4;
  font-weight: 800;
}
.knowledge-empty {
  margin: 18px;
}
.cancel-order-no {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #f0f0f3;
  border-radius: 10px;
  background: #f7f7fa;
  color: #4f5668;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.cancel-order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.cancel-order-actions .ghost-btn,
.cancel-order-actions .danger-solid-btn {
  min-width: 92px;
  justify-content: center;
}
.cancel-order-actions .danger-solid-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.buy-section {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}
.buy-section-title {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}
.period-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.period-choice {
  min-width: 74px;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 11px;
  border: 1px solid #e4e5ea;
  border-radius: 12px;
  background: #f4f4f5;
  color: #656b76;
  text-align: left;
  cursor: pointer;
}
.period-choice span {
  font-size: 15px;
  font-weight: 800;
}
.period-choice strong {
  font-size: 13px;
  font-weight: 700;
}
.period-choice.active {
  color: #3d348e;
  border-color: #6c5cff;
  background: #f4f5ff;
  box-shadow: 0 8px 18px rgba(92, 82, 217, 0.12);
}
.period-choice.is-reset { min-width: 132px; }
.reset-traffic-note {
  margin: 2px 0 0;
  padding: 9px 11px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  line-height: 1.55;
}
.coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
}
.coupon-row input {
  width: 100%;
  height: 42px;
  border: 1px solid #e7e7ec;
  border-radius: 12px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(20, 23, 34, 0.04);
}
.coupon-row .ghost-btn {
  height: 42px;
  border-radius: 12px;
  justify-content: center;
  font-size: 14px;
}
.coupon-note {
  margin: 0;
  color: #15803d;
  font-weight: 800;
}
.amount-box {
  display: grid;
  gap: 0;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #e7e7ec;
  border-radius: 10px;
  background: #fff;
}
.amount-box div {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  color: #4f5668;
  font-size: 14px;
}
.amount-box div + div { border-top: 1px solid #f0f0f3; }
.amount-box strong {
  color: #111827;
  font-size: 15px;
}
.pending-order-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #f2d79b;
  border-radius: 10px;
  background: #fffbe8;
}
.pending-order-box h3 {
  margin: 0;
  font-size: 15px;
}
.pending-order-box p {
  margin: 0;
  color: #5f6472;
  line-height: 1.5;
  font-size: 14px;
}
.pending-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.danger-solid-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.buy-submit {
  width: 100%;
  min-height: 43px;
  margin-top: 14px;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
}
.buy-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.import-modal {
  width: min(740px, calc(100vw - 44px));
  padding: 0;
  background: #fff;
  border-radius: 12px;
}
.import-modal-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 6px;
}
.import-modal-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}
.icon-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #343846;
  font-size: 26px;
  line-height: 1;
}
.icon-close:hover { background: #f5f5f8; }
.import-card {
  margin: 0 22px 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  background: #fff;
}
.import-title-block {
  display: grid;
  gap: 5px;
}
.import-title-block h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.16;
}
.import-title-block p {
  margin: 0;
  color: #565b6b;
  font-size: 14px;
}
.subscribe-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8e8ee;
  border-radius: 10px;
  background: #f4f4f6;
}
.subscribe-box p {
  margin: 0;
  color: #616575;
  font-size: 13px;
  font-weight: 700;
}
.subscribe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.subscribe-row code {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.subscribe-row .ghost-btn {
  min-height: 42px;
  min-width: 92px;
  font-size: 14px;
}
.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 360px;
  padding: 18px 14px 16px;
  border-radius: 8px;
  background: #fff;
  color: #515767;
  text-align: center;
}
.qr-preview[hidden] { display: none; }
.qr-preview canvas {
  width: 280px !important;
  height: 280px !important;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: inset 0 0 0 1px #d8dae4;
}
.qr-preview span {
  max-width: 520px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}
.client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.client-option {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  background: #fff;
}
.client-option.recommended {
  border-color: #c8c2ff;
  background: #f3f3ff;
}
.client-main {
  min-width: 0;
  border: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.client-letter {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f4f4f5;
  color: #4b5563;
  font-size: 16px;
  font-weight: 900;
}
.client-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.client-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
}
.client-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5d6270;
  font-size: 13px;
}
.client-action {
  color: #414653;
  font-size: 16px;
}
.client-inline {
  min-height: 40px;
  border: 1px solid #e4e4ea;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #161821;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}
.import-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: #555b6b;
  background: #fbfbfd;
}
.import-help summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
}
.import-help ol {
  margin: 9px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  line-height: 1.55;
  font-size: 13px;
}
.import-help li {
  padding-left: 2px;
}
.client-download-view {
  display: grid;
  gap: 16px;
}
.client-page-head p {
  max-width: 760px;
}
.client-system-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.client-system-tabs::-webkit-scrollbar { display: none; }
.client-system-tab {
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  background: #fff;
  color: #18181b;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}
.client-system-tab span {
  font-size: 18px;
  line-height: 1;
}
.client-system-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
}
.client-system-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.client-system-tab em {
  color: #4b5563;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}
.client-system-tab.active {
  border-color: #5847f5;
  background: linear-gradient(135deg, #5b4cf2, #6f43e8);
  color: #fff;
}
.client-system-tab.active em { color: rgba(255,255,255,.86); }
.client-guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .88fr);
  gap: 16px;
  align-items: start;
}
.client-side-guide {
  display: grid;
  gap: 14px;
}
.client-install-card,
.client-help-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}
.client-install-card {
  display: grid;
  gap: 16px;
  padding: 24px 30px;
}
.client-guide-title {
  display: grid;
  gap: 12px;
}
.client-guide-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.15;
}
.client-guide-title p {
  max-width: 740px;
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}
.client-guide-list {
  display: grid;
  gap: 10px;
}
.client-guide-item {
  min-height: 58px;
  border: 1px solid #e3e5eb;
  border-radius: 12px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px 14px;
  background: #fff;
}
.client-guide-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.client-guide-line strong {
  margin-right: 4px;
  color: #111827;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}
.client-guide-line span {
  min-height: 24px;
  border: 1px solid #e7e7ee;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: #fff;
  color: #111827;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
}
.client-guide-line span.is-rec {
  border-color: #eee9ff;
  background: #f2edff;
  color: #5b37d4;
}
.client-guide-item p {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}
.client-download-btn {
  width: fit-content;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  background: linear-gradient(135deg, #5b4cf2, #733fe4);
  color: #fff;
  box-shadow: 0 14px 28px rgba(91, 76, 242, .28);
  font-size: 16px;
  font-weight: 900;
}
.client-primary-actions {
  display: grid;
  gap: 12px;
}
.client-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
}
.client-action-row > .client-knowledge-btn {
  grid-column: 2;
  grid-row: 1;
  min-height: 48px;
  padding: 12px;
  white-space: nowrap;
}
.client-action-row .client-download-status { grid-column: 1 / -1; margin: 0; }
.client-knowledge-btn {
  width: fit-content;
  min-height: 52px;
  border: 1px solid #dedafc;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  background: #fff;
  color: #4b37c8;
  box-shadow: 0 12px 24px rgba(42, 36, 84, .08);
  font-size: 15px;
  font-weight: 900;
}
.client-knowledge-btn span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #f1edff;
  color: #5b37d4;
  font-size: 14px;
  line-height: 1;
}
.client-download-btn span {
  font-size: 19px;
  line-height: 1;
}
.client-help-card {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
}
.client-help-block {
  display: grid;
  gap: 12px;
}
.client-help-block strong {
  display: block;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
}
.client-help-block p {
  margin: 4px 0 0;
  color: #626879;
  font-size: 12px;
  line-height: 1.55;
}
.client-help-block ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}
.client-help-block li {
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
}
.client-sub-note {
  margin: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f6f6fb;
  color: #4b5563 !important;
}
.client-help-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.client-help-actions .primary-btn,
.client-help-actions .ghost-btn {
  min-height: 38px;
}

.toast-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 100;
  width: min(360px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(22, 18, 38, 0.12);
  opacity: 0;
  transform: translateY(-8px);
  transition: 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #148248;
}
.toast-dot {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--success);
  flex: 0 0 18px;
}
.toast-dot:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.toast.error .toast-dot { background: var(--danger); }
.toast.warn .toast-dot { background: var(--warn); }
.toast-text {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 900;
}

.diagnostics-view {
  display: grid;
  gap: 14px;
}

.diagnostics-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.diagnostics-run-btn {
  gap: 8px;
  min-width: 112px;
}

.diagnostics-run-btn:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.spin {
  display: inline-grid;
  place-items: center;
  animation: spin 900ms linear infinite;
}

.diagnostic-error {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
}

.diagnostic-error strong {
  font-size: 14px;
}

.diagnostic-error span {
  grid-column: 1;
  color: #b91c1c;
  font-size: 12px;
}

.diagnostic-error .ghost-btn {
  grid-row: 1 / span 2;
  grid-column: 2;
  height: 34px;
}

.diagnostic-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 116px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.diagnostic-summary.ok {
  border-color: rgba(34, 197, 94, .28);
  background: #f0fdf4;
}

.diagnostic-summary.warn {
  border-color: rgba(245, 158, 11, .32);
  background: #fffbeb;
}

.diagnostic-summary.fail {
  border-color: rgba(239, 68, 68, .3);
  background: #fff1f2;
}

.diagnostic-summary-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.diagnostic-summary-title > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-weight: 800;
  color: white;
  background: #16a34a;
}

.diagnostic-summary.warn .diagnostic-summary-title > span { background: #d97706; }
.diagnostic-summary.fail .diagnostic-summary-title > span { background: #dc2626; }

.diagnostic-summary-title strong {
  display: block;
  color: #166534;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.diagnostic-summary.warn .diagnostic-summary-title strong { color: #92400e; }
.diagnostic-summary.fail .diagnostic-summary-title strong { color: #991b1b; }

.diagnostic-summary-title p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.diagnostic-summary-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.diagnostic-summary-counts div {
  min-width: 46px;
  text-align: center;
}

.diagnostic-summary-counts strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.diagnostic-summary-counts div:nth-child(1) strong { color: #15803d; }
.diagnostic-summary-counts div:nth-child(2) strong { color: #b45309; }
.diagnostic-summary-counts div:nth-child(3) strong { color: #dc2626; }

.diagnostic-summary-counts span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.diagnostic-check-list {
  display: grid;
  gap: 10px;
}

.diagnostic-group,
.diagnostic-group-toggle,
.diagnostic-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.diagnostic-group {
  overflow: hidden;
}

.diagnostic-group-toggle {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease;
}

.diagnostic-group-toggle:hover {
  background: var(--panel-soft);
}

.diagnostic-group-toggle span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
}

.diagnostic-group.warn .diagnostic-group-toggle span {
  background: #fef3c7;
  color: #b45309;
}

.diagnostic-group.fail .diagnostic-group-toggle span {
  background: #fee2e2;
  color: #dc2626;
}

.diagnostic-group-toggle strong {
  color: var(--text);
  font-size: 14px;
}

.diagnostic-group-toggle em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
  font-size: 12px;
}

.diagnostic-group-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.diagnostic-check {
  overflow: hidden;
  border-left-width: 4px;
}

.diagnostic-check.ok { border-left-color: #22c55e; }
.diagnostic-check.warn { border-left-color: #f59e0b; }
.diagnostic-check.fail { border-left-color: #ef4444; }

.diagnostic-check-head {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px 14px 8px;
}

.diagnostic-check-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
  background: #dcfce7;
}

.diagnostic-check.warn .diagnostic-check-icon {
  color: #b45309;
  background: #fef3c7;
}

.diagnostic-check.fail .diagnostic-check-icon {
  color: #dc2626;
  background: #fee2e2;
}

.diagnostic-check-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.diagnostic-check-head em {
  border-radius: 999px;
  padding: 2px 8px;
  color: #15803d;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  background: #dcfce7;
}

.diagnostic-check.warn .diagnostic-check-head em {
  color: #b45309;
  background: #fef3c7;
}

.diagnostic-check.fail .diagnostic-check-head em {
  color: #dc2626;
  background: #fee2e2;
}

.diagnostic-check-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px 40px;
}

.diagnostic-check-body p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.diagnostic-check-body small {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body.dark {
  --bg: #10111a;
  --panel: #181925;
  --panel-soft: #141520;
  --text: #f7f6ff;
  --muted: #aaa5ba;
  --line: #2b2c3c;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}
body.dark .sidebar, body.dark .topbar, body.dark .pill-btn, body.dark .ghost-btn, body.dark .top-menu-trigger, body.dark .top-icon-btn, body.dark .top-menu-popover, body.dark .row-item, body.dark .tab-btn, body.dark .field input, body.dark .field textarea, body.dark .field select, body.dark .modal, body.dark .toast, body.dark .quick-card, body.dark .profile-card, body.dark .devices-card, body.dark .devices-card-head, body.dark .device-stat-card, body.dark .import-card, body.dark .client-option, body.dark .client-system-tab, body.dark .client-install-card, body.dark .client-help-card, body.dark .client-guide-item, body.dark .client-knowledge-btn, body.dark .knowledge-list button, body.dark .ticket-shortcuts, body.dark .ticket-list-panel, body.dark .ticket-detail-panel, body.dark .ticket-shortcut, body.dark .ticket-filter-row select, body.dark .ticket-reply-form textarea, body.dark .diagnostic-check, body.dark .diagnostic-group, body.dark .diagnostic-group-toggle { background: var(--panel); }
body.dark .empty, body.dark .panel.notice { background: var(--panel-soft); }
body.dark .nav-label { color: #85899a; }
body.dark .nav-item {
  color: #b7bac9;
}
body.dark .nav-item:hover {
  color: #f2f1fb;
  background: #222433;
}
body.dark .nav-item.active {
  color: #ffffff;
  background: #26223f;
}
body.dark .nav-ico {
  background: #222433;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}
body.dark .nav-item:hover .nav-ico {
  background: #2a2d40;
  box-shadow: inset 0 0 0 1px rgba(199, 191, 255, 0.16);
}
body.dark .diagnostic-summary.ok { background: #082f1b; border-color: rgba(74, 222, 128, .25); }
body.dark .diagnostic-summary.warn { background: #332606; border-color: rgba(251, 191, 36, .25); }
body.dark .diagnostic-summary.fail,
body.dark .diagnostic-error { background: #3a1012; border-color: rgba(248, 113, 113, .28); }
body.dark .diagnostic-error,
body.dark .diagnostic-error span { color: #fecaca; }
body.dark .diagnostic-summary-title p,
body.dark .diagnostic-summary-counts span,
body.dark .diagnostic-group-toggle,
body.dark .diagnostic-group-toggle em,
body.dark .diagnostic-check-body small { color: var(--muted); }
body.dark .diagnostic-summary.ok .diagnostic-summary-title strong,
body.dark .diagnostic-summary-counts div:nth-child(1) strong,
body.dark .diagnostic-group.ok .diagnostic-group-toggle span { background: #052e16; color: #86efac; }
body.dark .diagnostic-summary.warn .diagnostic-summary-title strong,
body.dark .diagnostic-summary-counts div:nth-child(2) strong { color: #fcd34d; }
body.dark .diagnostic-summary.fail .diagnostic-summary-title strong,
body.dark .diagnostic-summary-counts div:nth-child(3) strong { color: #fca5a5; }
body.dark .diagnostic-group.warn .diagnostic-group-toggle span { background: #422006; color: #fcd34d; }
body.dark .diagnostic-group.fail .diagnostic-group-toggle span { background: #450a0a; color: #fca5a5; }
body.dark .diagnostic-check-icon,
body.dark .diagnostic-check-head em { background: #052e16; color: #86efac; }
body.dark .diagnostic-check.warn .diagnostic-check-icon,
body.dark .diagnostic-check.warn .diagnostic-check-head em { background: #422006; color: #fcd34d; }
body.dark .diagnostic-check.fail .diagnostic-check-icon,
body.dark .diagnostic-check.fail .diagnostic-check-head em { background: #450a0a; color: #fca5a5; }
body.dark .announcement-card,
body.dark .meter-ring { background: var(--panel); }
body.dark .announcement-icon { background: #26223c; }
body.dark .announcement-copy strong { color: #ecebff; }
body.dark .announcement-copy small { color: #c9c6ff; }
body.dark .subscription-facts div { background: #151823; }
body.dark .subscription-links button,
body.dark .trend-chart-wrap { background: #151823; }
body.dark .trend-pills span { color: var(--muted); }
body.dark .trend-pills strong { color: var(--text); }
body.dark .trend-y-label line { stroke: #282b3a; }
body.dark .trend-y-label text,
body.dark .trend-x-label { fill: var(--muted); }
body.dark .trend-tooltip rect { fill: #202232; stroke: #303244; }
body.dark .trend-tooltip text { fill: var(--text); }
body.dark .trend-future { stroke: #303244; }
body.dark .usage-meter { background: conic-gradient(var(--brand) var(--value, 0%), #303142 0); }
body.dark .code-box { background: #22213a; }
body.dark .icon-close { color: var(--text); }
body.dark .icon-close:hover,
body.dark .profile-account-id,
body.dark .avatar-inline-panel,
body.dark .security-mini,
body.dark .security-form,
body.dark .profile-kv-grid div,
body.dark .segmented,
body.dark .subscribe-box,
body.dark .client-letter,
body.dark .import-help { background: var(--panel-soft); }
body.dark .profile-section > h3,
body.dark .profile-card-head strong,
body.dark .profile-kv-grid b,
body.dark .account-reference-id b,
body.dark .account-reference-list b,
body.dark .security-mini strong,
body.dark .security-form > strong,
body.dark .security-title-row strong,
body.dark .toggle-list b,
body.dark .telegram-panel b,
body.dark .devices-card-head h3,
body.dark .device-stat-card strong,
body.dark .session-row strong,
body.dark .session-meta b,
body.dark .device-kv-table b,
body.dark .device-table-main strong,
body.dark .device-table-row b,
body.dark .identified-device-row strong { color: var(--text); }
body.dark .profile-card-head span,
body.dark .profile-account-id small,
body.dark .account-reference-id small,
body.dark .account-reference-list span,
body.dark .security-title-row p,
body.dark .profile-note,
body.dark .profile-kv-grid span,
body.dark .appearance-list span,
body.dark .toggle-list small,
body.dark .devices-card-head p,
body.dark .devices-soft-alert,
body.dark .device-kv-table span,
body.dark .device-table-head,
body.dark .device-table-main p,
body.dark .device-stat-card span,
body.dark .device-stat-card small,
body.dark .device-stat-card p,
body.dark .devices-empty p,
body.dark .identified-device-row p,
body.dark .session-row p,
body.dark .session-meta span,
body.dark .ip-chip-row span { color: var(--muted); }
body.dark .telegram-panel { background: #142030; }
body.dark .danger-card { background: #24191d; border-color: #5d2a31; }
body.dark .cancel-blocked { background: #2a171c; border-color: #5d2a31; }
body.dark .cancel-checks { background: var(--panel-soft); }
body.dark .security-mini > span { background: #22213a; }
body.dark .security-mini em { background: #151823; color: var(--text); }
body.dark .identified-device-row,
body.dark .session-row,
body.dark .device-table-head,
body.dark .device-table-row,
body.dark .device-ref-stat,
body.dark .device-list-card,
body.dark .device-ref-row,
body.dark .devices-empty,
body.dark .ip-chip-row span { background: #151823; }
body.dark .devices-soft-alert { background: #171925; }
body.dark .device-source-strip { background: #202231; }
body.dark .device-ref-stat strong,
body.dark .device-list-head h3,
body.dark .device-ref-empty strong,
body.dark .device-ref-row strong { color: var(--text); }
body.dark .device-ref-stat span,
body.dark .device-ref-stat small,
body.dark .device-ref-stat i,
body.dark .device-list-head p,
body.dark .device-ref-empty p,
body.dark .device-source-strip,
body.dark .device-source-strip strong,
body.dark .device-source-strip em,
body.dark .device-source-strip b,
body.dark .device-ref-row p { color: var(--muted); }
body.dark .devices-disconnect { background: #24191d; border-color: #5d2a31; color: #ff8c8c; }
body.dark .device-avatar,
body.dark .devices-empty-icon { background: #22213a; }
body.dark .subscribe-row code,
body.dark .qr-preview,
body.dark .client-inline { background: #151823; color: var(--text); }
body.dark .plan-card-ref {
  border-color: #2c2e3f;
  background: linear-gradient(180deg, #181a26 0%, #141620 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}
body.dark .plan-card-ref.is-air,
body.dark .plan-card-ref.is-pro,
body.dark .plan-card-ref.is-max {
  border-color: #34364a;
  background: linear-gradient(180deg, #1a1c28 0%, #151720 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}
body.dark .plan-card-ref h3 {
  color: #f2f1fb;
}
body.dark .plan-card-ref h3 span,
body.dark .plan-spec-tags span {
  background: #242637;
  color: #d1cee9;
}
body.dark .plan-card-top p {
  color: #ffffff;
}
body.dark .plan-feature-copy {
  color: #d4d0de;
}
body.dark .plan-feature-copy a {
  color: #b7adff;
}
body.dark .client-system-tabs {
  border-color: transparent;
}
body.dark .client-system-tab {
  border-color: #3a3c4d;
  background: #191b27;
  color: #d7d4e2;
  box-shadow: none;
}
body.dark .client-system-tab:hover {
  border-color: #6d63d9;
  color: #f6f4ff;
  background: #202235;
}
body.dark .client-system-tab.active {
  border-color: #7568ff;
  background: linear-gradient(135deg, #5b4cf2, #6f43e8);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(91, 76, 242, .24);
}
body.dark .client-system-tab.active .client-system-icon,
body.dark .client-system-tab.active em {
  color: rgba(255,255,255,.88);
}
body.dark .client-system-tab:not(.active) .client-system-icon,
body.dark .client-system-tab:not(.active) em {
  color: #a9a5b7;
}
body.dark .client-install-card,
body.dark .client-help-card {
  border-color: #56586b;
  background: linear-gradient(180deg, #181925 0%, #151720 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}
body.dark .client-guide-item {
  border-color: #4b4e61;
  background: #191b27;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
body.dark .client-guide-item:hover {
  border-color: #6b63d7;
}
body.dark .client-knowledge-btn {
  border-color: #4f4a78;
  background: #191b27;
  color: #c9c2ff;
  box-shadow: none;
}
body.dark .client-help-actions .ghost-btn {
  border-color: #333648;
}
body.dark .client-text small,
body.dark .client-guide-title p,
body.dark .client-guide-item p,
body.dark .client-help-block p,
body.dark .client-help-block li,
body.dark .import-title-block p,
body.dark .subscribe-box p { color: var(--muted); }
body.dark .client-guide-title h3,
body.dark .client-guide-line strong,
body.dark .client-help-block strong,
body.dark .knowledge-detail h3,
body.dark .knowledge-list strong { color: var(--text); }
body.dark .client-guide-line span,
body.dark .client-sub-note { background: #151823; color: var(--text) !important; border-color: var(--line); }
body.dark .client-guide-line span.is-rec { background: #26223c; color: #c8c2ff !important; }
body.dark .knowledge-browser,
body.dark .knowledge-group,
body.dark .knowledge-list button { border-color: var(--line); }
body.dark .knowledge-detail { color: var(--text); }
body.dark .knowledge-group h3,
body.dark .knowledge-list span { color: var(--muted); }
body.dark .client-knowledge-btn span { background: #26223c; color: #c8c2ff; }
body.dark .ticket-shortcut:hover,
body.dark .ticket-list-item:hover,
body.dark .ticket-list-item.active,
body.dark .ticket-message-bubble,
body.dark .ticket-related-orders,
body.dark .ticket-empty-icon,
body.dark .ticket-loading-lines span {
  background: var(--panel-soft);
}
body.dark .ticket-message.me .ticket-message-bubble {
  background: var(--brand);
}
body.dark .ticket-shortcuts-head strong,
body.dark .ticket-shortcut strong,
body.dark .ticket-row-main strong,
body.dark .ticket-detail-head h2,
body.dark .ticket-empty strong {
  color: var(--text);
}
body.dark .ticket-shortcuts-head span,
body.dark .ticket-shortcut em,
body.dark .ticket-filter-row span,
body.dark .ticket-row-meta,
body.dark .ticket-message time,
body.dark .ticket-empty p,
body.dark .ticket-closed-note,
body.dark .ticket-detail-placeholder {
  color: var(--muted);
}
body.dark .traffic-help p,
body.dark .traffic-summary-card span,
body.dark .traffic-summary-card small,
body.dark .traffic-legend,
body.dark .traffic-day-date,
body.dark .traffic-day-total small { color: var(--muted); }
body.dark .traffic-summary-card,
body.dark .traffic-day-bar,
body.dark .traffic-rest { background: #151823; }
body.dark .node-overview-card,
body.dark .node-card,
body.dark .node-meta-grid div,
body.dark .support-search,
body.dark .support-list,
body.dark .support-article,
body.dark .invite-tabs,
body.dark .invite-stat-card,
body.dark .invite-panel,
body.dark .invite-code-row,
body.dark .invite-link-line input,
body.dark .owned-domain-row,
body.dark .domain-tier-card,
body.dark .commission-tier,
body.dark .withdraw-balance-box,
body.dark .order-table-card,
body.dark .order-table,
body.dark .order-progress-card,
body.dark .order-info-card,
body.dark .order-action-card { background: #151823; }
body.dark .node-overview-card span,
body.dark .node-overview-card small,
body.dark .node-import-card p,
body.dark .node-meta-grid span,
body.dark .support-toolbar p,
body.dark .support-group > p,
body.dark .support-article time,
body.dark .support-meta,
body.dark .support-article-body p,
body.dark .invite-stat-card span,
body.dark .invite-stat-card small,
body.dark .invite-panel-head p,
body.dark .invite-code-row p,
body.dark .invite-code-row small,
body.dark .owned-domain-row p,
body.dark .owned-domain-row small,
body.dark .domain-tier-card p,
body.dark .domain-tier-card small,
body.dark .domain-note,
body.dark .withdraw-balance-box span,
body.dark .order-detail-head p,
body.dark .order-detail-list dt,
body.dark .order-action-card p,
body.dark .order-action-links a { color: var(--muted); }
body.dark .node-status-hero p { color: var(--muted); }
body.dark .node-search-box,
body.dark .node-status-stats span {
  border-color: #2a2d3c;
  background: #171925;
  color: var(--muted);
}
body.dark .node-search-box span {
  border-left-color: #2a2d3c;
  color: var(--muted);
}
body.dark .node-flag,
body.dark .nodes-empty-icon,
body.dark .article-doc,
body.dark .support-meta span { background: #22213a; }
body.dark .node-card {
  background: #171925;
  box-shadow: none;
}
body.dark .node-rate small { color: var(--muted); }
body.dark .support-article:hover { background: #1b1d2b; }
body.dark .order-table tbody tr:hover { background: #1b1d2b; }
body.dark .invite-code-row,
body.dark .invite-code-row.silver-base,
body.dark .invite-code-row.has-branded-link.silver,
body.dark .owned-domain-row.has-branded-link.silver,
body.dark .domain-tier-card.tier-silver {
  border-color: #3f4252;
  background: linear-gradient(135deg, #1b1d27 0%, #30333d 58%, #191b25 100%);
}
body.dark .invite-link-line input {
  border-color: #5f6171;
  background: #f3efe4;
  color: #171821;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}
body.dark .invite-code-row.has-branded-link.gold,
body.dark .owned-domain-row.has-branded-link.gold,
body.dark .domain-tier-card.tier-gold {
  background: linear-gradient(135deg, #272111 0%, #2a2336 58%, #181925 100%);
}
body.dark .invite-code-row.has-branded-link.platinum,
body.dark .owned-domain-row.has-branded-link.platinum,
body.dark .domain-tier-card.tier-platinum {
  background: linear-gradient(135deg, #0f2b31 0%, #20233a 58%, #181925 100%);
}
body.dark .commission-tier.current { background: #1b1f35; }
body.dark .tier-progress { background: #2d2854; }
body.dark .tier-progress-meta,
body.dark .tier-rule span,
body.dark .invite-code-top span { color: var(--muted); }
body.dark .toast.success { background: #103321; border-color: #216d47; color: #83f1b6; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 40;
    width: min(260px, calc(100vw - 92px));
    padding: 14px 10px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 0 22px 70px rgba(22, 18, 38, 0.24);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.18);
  }
  .sidebar .brand {
    gap: 10px;
    padding: 4px 8px 14px;
  }
  .sidebar .brand-mark {
    width: 34px;
    height: 34px;
  }
  .sidebar .nav-group {
    margin: 8px 0 12px;
  }
  .sidebar .nav-label {
    padding: 0 8px 6px;
  }
  .sidebar .nav-item {
    min-height: 38px;
    gap: 8px;
    padding: 0 8px;
  }
  .sidebar .nav-ico {
    width: 22px;
    height: 22px;
  }
  .mobile-menu { display: inline-grid; place-items: center; }
  .content { padding: 22px 14px 28px; }
  .topbar { padding: 12px 14px; align-items: center; }
  .top-actions { flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .quick-grid, .form-grid.cols-2, .subscription-main, .subscription-facts, .subscription-links, .split-card, .subscribe-row, .client-grid, .profile-main-grid, .profile-card-grid, .profile-card-grid.compact, .security-combined-grid, .devices-reference-grid, .ticket-workspace, .ticket-shortcut-grid { grid-template-columns: 1fr; }
  .traffic-summary-grid,
  .device-ref-stats,
  .device-stat-grid,
  .node-overview-grid,
  .node-card-grid,
  .node-import-card,
  .invite-stat-grid,
  .domain-tier-grid,
  .commission-tier-list,
  .order-detail-grid,
  .support-head,
  .support-toolbar,
  .client-guide-grid { grid-template-columns: 1fr; }
  .order-progress-card {
    padding-inline: 24px;
  }
  .node-import-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .traffic-day-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px 12px;
  }
  .traffic-day-total {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
  .row-item { grid-template-columns: 1fr; }
  .devices-card-head,
  .session-row,
  .device-table-head,
  .device-table-row {
    grid-template-columns: 1fr;
  }
  .devices-card-head {
    display: grid;
  }
  .devices-card-head .ghost-btn,
  .session-row .ghost-btn,
  .device-table-row .ghost-btn {
    width: 100%;
  }
  .device-table-head {
    display: none;
  }
  .device-table-row {
    min-height: auto;
    padding: 12px 16px;
    align-items: stretch;
  }
  .device-table-row b {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .devices-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .devices-action-row .ghost-btn,
  .devices-action-row .danger-btn {
    width: 100%;
  }
  .devices-ref-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ticket-page-head {
    display: grid;
  }
  .ticket-new-btn {
    justify-self: stretch;
    justify-content: center;
  }
  .ticket-detail-panel {
    padding: 16px;
  }
  .ticket-message-list {
    max-height: none;
  }
  .ticket-detail-head {
    align-items: flex-start;
  }
  .devices-ref-head h2 {
    font-size: 25px;
  }
  .devices-disconnect {
    justify-self: stretch;
  }
  .device-ref-stat {
    min-height: 96px;
    padding: 20px;
  }
  .device-list-card {
    min-height: 420px;
    padding: 20px 16px 16px;
  }
  .session-main {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .session-row p,
  .session-row strong,
  .session-meta b {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .profile-account-card { grid-row: auto; }
  .profile-account-reference,
  .profile-security-combined,
  .account-cancel-card { width: 100%; }
  .view-head h2 { font-size: 24px; }
  .plans-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-card-ref {
    min-height: 340px;
  }
  .plan-card-ref .primary-btn { width: 100%; justify-content: center; }
  .buy-modal { width: min(504px, calc(100vw - 24px)); padding: 18px; }
  .import-modal { width: min(620px, calc(100vw - 24px)); }
  .import-modal-head { min-height: 54px; padding: 12px 14px 6px; }
  .import-card { margin: 0 14px 14px; padding: 14px; }
  .subscribe-row .ghost-btn { width: 100%; }
  .client-option { min-height: auto; }
  .client-install-card { padding: 28px; }
  .qr-preview { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .trend-head { align-items: flex-start; }
  .trend-chart-wrap { min-height: 190px; }
  .trend-chart { height: 196px; }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 62px;
    gap: 10px;
  }
  .topbar-spacer { display: none; }
  .top-actions {
    flex: 1 1 auto;
    gap: 6px;
  }
  .language-trigger {
    width: 68px;
    padding: 0 7px;
  }
  .language-trigger .trigger-icon,
  .language-trigger .trigger-label {
    display: none;
  }
  .language-trigger strong {
    min-width: 30px;
  }
  .account-menu {
    display: none;
  }
  .danger-btn {
    width: 38px;
    padding: 0;
    font-size: 0;
  }
  .danger-btn:after {
    content: "⎋";
    font-size: 15px;
  }
  .devices-disconnect {
    width: 100%;
    padding: 0 13px;
    font-size: 13px;
  }
  .devices-disconnect:after {
    content: "";
    display: none;
  }
  .dashboard-view { gap: 14px; padding-top: 0; }
  .announcement-card,
  .subscription-card { padding: 18px; }
  .announcement-card { grid-template-columns: 42px minmax(0, 1fr) 20px; min-height: 78px; gap: 12px; }
  .announcement-icon { width: 40px; height: 40px; }
  .announcement-copy strong { font-size: 16px; }
  .dashboard-title { font-size: 28px; }
  .profile-view { gap: 14px; }
  .profile-section { gap: 9px; }
  .profile-card {
    gap: 11px;
    padding: 14px;
  }
  .profile-kv-grid,
  .account-reference-list div,
  .appearance-list > div,
  .input-action,
  .security-actions {
    grid-template-columns: 1fr;
  }
  .account-cancel-card {
    grid-template-columns: 1fr;
  }
  .account-cancel-head,
  .account-cancel-copy,
  .cancel-blocked,
  .cancel-checks,
  .account-cancel-card .danger-btn {
    grid-column: 1;
  }
  .account-cancel-card .danger-btn {
    grid-row: auto;
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    font-size: 13px;
  }
  .account-cancel-card .danger-btn:after {
    content: none;
  }
  .input-action .ghost-btn {
    width: 100%;
  }
  .account-reference-list b {
    text-align: left;
  }
  .profile-card-head {
    align-items: flex-start;
  }
  .telegram-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .plan-name { font-size: 24px; }
  .plans-list {
    grid-template-columns: 1fr;
  }
  .plan-card-ref {
    min-height: auto;
    gap: 14px;
    padding: 18px;
  }
  .plan-card-ref h3 { font-size: 18px; }
  .plan-spec-tags span { min-height: 28px; font-size: 12px; }
  .buy-modal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    padding: 16px 13px;
    border-radius: 12px;
  }
  .buy-modal-head h2 { font-size: 19px; }
  .cancel-order-modal {
    padding: 18px 16px;
  }
  .cancel-order-modal .modal-title-row h2 { font-size: 20px; }
  .cancel-order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cancel-order-actions .ghost-btn,
  .cancel-order-actions .danger-solid-btn { width: 100%; }
  .period-choice-group { gap: 8px; }
  .period-choice {
    min-width: calc(33.333% - 6px);
    min-height: 58px;
    padding: 8px 9px;
  }
  .period-choice span { font-size: 15px; }
  .coupon-row { grid-template-columns: 1fr 68px; gap: 7px; }
  .coupon-row input,
  .coupon-row .ghost-btn { height: 42px; border-radius: 11px; }
  .client-download-view { gap: 14px; }
  .client-system-tabs {
    gap: 8px;
    margin-inline: -4px;
    padding-inline: 4px;
  }
  .client-system-tab {
    min-height: 46px;
    gap: 7px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 15px;
  }
  .client-system-tab span { font-size: 17px; }
  .client-system-tab em { display: none; }
  .client-install-card,
  .client-help-card {
    border-radius: 12px;
  }
  .client-install-card {
    gap: 16px;
    padding: 20px 14px;
  }
  .client-guide-title h3 { font-size: 18px; }
  .client-guide-title p {
    font-size: 15px;
    line-height: 1.55;
  }
  .client-guide-item {
    min-height: 64px;
    gap: 7px;
    padding: 12px 12px;
  }
  .client-guide-line {
    gap: 7px;
  }
  .client-guide-line strong {
    width: 100%;
    margin-right: 0;
    font-size: 16px;
  }
  .client-guide-line span {
    min-height: 25px;
    padding: 0 9px;
    font-size: 13px;
  }
  .client-guide-item p { font-size: 14px; }
  .client-download-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 12px;
    font-size: 17px;
  }
  .client-action-row { gap: 8px; }
  .client-action-row .client-download-btn,
  .client-action-row > .client-knowledge-btn { font-size: 14px; padding: 12px 8px; }
  .client-knowledge-btn {
    width: 100%;
    min-height: 50px;
  }
  .knowledge-modal {
    width: min(100%, calc(100vw - 24px));
  }
  .knowledge-modal-full {
    width: min(100%, calc(100vw - 12px));
    height: calc(100dvh - 36px);
    max-height: calc(100dvh - 36px);
  }
  .knowledge-reader {
    min-height: 0;
  }
  .knowledge-quick-list {
    padding: 12px;
  }
  .knowledge-quick-list button {
    min-width: 188px;
  }
  .knowledge-browser {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 132px);
  }
  .knowledge-group {
    max-height: 210px;
    border-right: 0;
    border-bottom: 1px solid #edf0f5;
  }
  .knowledge-detail {
    padding: 18px;
  }
  .knowledge-detail-full {
    padding: 18px;
  }
  .client-help-card {
    gap: 14px;
    padding: 18px 14px;
  }
  .client-help-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .client-help-actions .primary-btn,
  .client-help-actions .ghost-btn {
    width: 100%;
    justify-content: center;
  }
  .pending-order-actions .primary-btn,
  .pending-order-actions .danger-solid-btn {
    width: 100%;
    justify-content: center;
  }
  .subscription-top h3 { font-size: 16px; }
  .subscription-top,
  .subscription-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .subscription-actions.active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .subscription-actions.active.has-reset {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .subscription-action-copy small { font-size: 10px; }
  .subscription-actions.active .primary-btn,
  .subscription-actions.active .ghost-btn {
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
    white-space: normal;
  }
  .usage-trend-card { padding: 18px 14px 16px; }
  .trend-head {
    display: grid;
    gap: 10px;
  }
  .trend-pills {
    justify-content: flex-start;
    gap: 8px 12px;
  }
  .trend-pills span { font-size: 12px; }
  .trend-chart-wrap {
    margin-inline: -2px;
    min-height: 176px;
  }
  .trend-chart { height: 184px; }
  .traffic-help,
  .daily-traffic-card,
  .traffic-summary-card,
  .node-overview-card,
  .node-import-card,
  .node-card,
  .invite-panel,
  .support-toolbar,
  .support-groups {
    padding: 18px;
  }
  .invite-stat-card { min-height: 92px; }
  .invite-panel-head,
  .invite-code-row,
  .invite-code-top,
  .invite-link-line,
  .owned-domain-row,
  .commission-transfer-form,
  .withdraw-balance-box {
    grid-template-columns: 1fr;
  }
  .invite-panel-head,
  .invite-code-row,
  .invite-code-top,
  .invite-link-line,
  .owned-domain-row {
    display: grid;
  }
  .invite-copy-btn,
  .invite-generate-btn {
    width: 100%;
  }
  .commission-tier {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    padding: 10px 12px;
  }
  .tier-rule {
    justify-content: space-between;
  }
  .tier-progress-meta {
    font-size: 14px;
  }
  .invite-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .invite-tab { padding: 0 8px; }
  .order-page-head h2,
  .order-detail-head h2 { font-size: 24px; }
  .order-detail-head {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
  }
  .text-link-btn {
    justify-self: start;
    min-height: 30px;
    padding: 0;
  }
  .order-progress-card {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 14px;
    padding: 18px;
  }
  .order-step {
    grid-template-columns: 28px minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }
  .order-step-line {
    width: 1px;
    height: 22px;
    margin-left: 13px;
  }
  .order-info-card,
  .order-action-card { padding: 18px; }
  .order-pay-actions { grid-template-columns: 1fr; }
  .order-pay-actions .ghost-btn { width: 100%; justify-content: center; }
  .order-detail-list div {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
  }
  .node-import-actions { grid-template-columns: 1fr; width: 100%; }
  .node-card { min-height: 0; }
  .traffic-help p { font-size: 14px; }
  .daily-traffic-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .traffic-day-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .traffic-day-total {
    grid-column: auto;
    justify-items: start;
    text-align: left;
  }
  .diagnostics-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
  .diagnostics-run-btn {
    width: 100%;
    justify-content: center;
  }
  .diagnostic-summary {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }
  .diagnostic-summary-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    justify-items: stretch;
  }
  .diagnostic-summary-counts .ghost-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
  .diagnostic-error {
    grid-template-columns: 1fr;
  }
  .diagnostic-error span,
  .diagnostic-error .ghost-btn {
    grid-column: auto;
    grid-row: auto;
  }
  .diagnostic-check-head {
    grid-template-columns: 18px minmax(0, 1fr);
  }
  .diagnostic-check-head em {
    grid-column: 2;
    justify-self: start;
  }
  .diagnostic-check-body {
    padding-left: 14px;
  }
  .traffic-day-total small { white-space: normal; }
  .support-article {
    min-height: 64px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px 10px;
    padding: 10px 12px;
  }
  .support-article time {
    grid-column: 2;
    font-size: 12px;
  }
  .article-title { white-space: normal; line-height: 1.35; }
  .support-float {
    right: 16px;
    bottom: 16px;
    width: 50px;
    height: 50px;
  }
  .support-modal-head,
  .support-article-body,
  .support-modal-foot { padding-inline: 18px; }
  .support-modal-foot .primary-btn {
    width: 100%;
  }
  .import-title-block h3 { font-size: 19px; }
  .import-title-block p { font-size: 13px; }
  .client-main {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    gap: 9px;
  }
  .client-letter {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .client-text strong { font-size: 16px; }
  .client-text small { font-size: 12px; }
  .client-inline {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 40px;
    font-size: 14px;
  }
  .qr-preview {
    min-height: 292px;
    padding: 14px 10px 12px;
  }
  .qr-preview canvas {
    width: 220px !important;
    height: 220px !important;
  }
  .qr-preview span {
    font-size: 13px;
    line-height: 1.55;
  }
  .usage-meter {
    width: 170px;
    height: 170px;
  }
  .meter-ring {
    width: 122px;
    height: 122px;
  }
  .metric strong { font-size: 20px; }
  table { min-width: 640px; }
}

.knowledge-detail::-webkit-scrollbar { width: 10px; }
.knowledge-detail::-webkit-scrollbar-track { background: #edf0f5; }
.knowledge-detail::-webkit-scrollbar-thumb { background: #8794aa; border: 2px solid #edf0f5; border-radius: 8px; }

.dedicated-sub-link { width:100%; min-width:0; padding:12px; border:1px solid #dbe0ea; border-radius:8px; background:var(--panel,#fff); color:var(--text,#273041); }
.dedicated-sub-actions { display:flex; gap:12px; margin-top:12px; flex-wrap:wrap; }

/* Proportional time axis: only the plot scrolls; never stretch SVG geometry. */
.usage-trend-card, .daily-traffic-card, .traffic-view { min-width: 0; }
.trend-chart-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; margin-inline: 0; min-height: 220px; }
.trend-chart-wrap .trend-chart { max-width: none; flex: none; }
.trend-chart-wrap:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cancel-account-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; }
.cancel-account-form .field, .cancel-account-form .account-cancel-copy { grid-column: 1; }
.cancel-account-form .danger-btn { grid-column: 2; grid-row: 1 / span 3; }
.subscription-qr-overlay { position: fixed; inset: 0; z-index: 1200; background: #101323aa; display: flex; align-items: center; justify-content: center; padding: 12px; }
.subscription-qr-dialog { width: min(100%, 420px); max-height: calc(100dvh - 24px); min-height: 0; display: flex; flex-direction: column; border-radius: 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 24px 80px #0005; overflow: hidden; }
.subscription-qr-dialog header { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.subscription-qr-dialog h2 { margin: 0; font-size: 18px; }
.subscription-qr-dialog .icon-close { flex-shrink: 0; }
.subscription-qr-body { padding: 16px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; text-align: center; }
.subscription-qr-body p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.subscription-qr-code canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; }
@media (max-width: 600px) {
  .cancel-account-form { grid-template-columns: minmax(0, 1fr); }
  .cancel-account-form .danger-btn { grid-column: 1; grid-row: auto; width: 100%; }
}

/* Every existing plan description line gets one aligned, decorative green check. */
.plan-feature-copy .plan-feature-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; column-gap: 6px; }
.plan-feature-check { color: #15803d; font-weight: 800; line-height: inherit; }
.plan-feature-item > span:last-child { min-width: 0; overflow-wrap: anywhere; }
body.dark .plan-feature-check { color: #4ade80; }

/* Desktop fills the plot container; mobile alone keeps a scrollable 56px date axis. */
.trend-chart-wrap[data-chart-layout="desktop"] { overflow-x: hidden; }

.tier-override-note { padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel-soft); line-height: 1.7; }
.domain-rule-blockers { padding-left: 18px; margin: 6px 0; font-size: 12px; line-height: 1.6; }
.commission-tier-panel .tier-head > div { min-width: 0; }
.commission-tier-panel .tier-head p, .invite-domain-panel .domain-note { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .commission-tier-panel .tier-head { flex-wrap: wrap; }
  .commission-tier-panel .tier-progress-meta { flex-wrap: wrap; font-size: 13px; }
  .commission-tier-panel .commission-tier { padding: 10px; gap: 8px; }
  .commission-tier-panel .tier-name, .commission-tier-panel .tier-rule { flex-wrap: wrap; gap: 5px; }
  .commission-tier-panel .tier-name strong, .commission-tier-panel .tier-rule strong { font-size: 14px; }
}

.tier-level-1 { background: #d89438; color: #2c1b08; }
.tier-level-2 { background: #d8dce2; color: #303846; }
.tier-level-3 { background: #f5ce3c; color: #2d2604; }
.tier-level-4 { background: #46dff0; color: #183447; }
.tier-level-5 { background: #a885ff; color: #fff; }

/* Native progressive route modules: no animated delay, unknown values remain placeholders. */
.ux-module-placeholder{padding:24px;min-height:145px;margin-bottom:16px}.ux-module-placeholder h3{margin:0 0 12px}.ux-skeleton-line{height:14px;background:var(--border,#e8ecf2);border-radius:6px;margin:14px 0;width:85%}.ux-skeleton-line.short{width:50%}.ux-progressive-stack>[data-ux-module]{margin-bottom:18px}[data-ux-module="security"]>.profile-card{height:100%}#routeFreshness{font-size:13px;color:var(--text-secondary,#657084);margin:12px 0}[data-ux-module="transaction"]:empty{display:none}

/* Native client guide/download controls (docs19); other modules unchanged. */
.main:has(.client-download-view) .topbar { background: var(--bg); }
.client-action-row > #clientDownloadArea { display: contents; }
a.client-download-btn, a.client-knowledge-btn { text-decoration: none; text-align: center; box-sizing: border-box; }
.client-primary-actions .client-download-btn { width: 100%; height: auto; min-height: 48px; padding: 12px 8px; box-sizing: border-box; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.client-download-btn:disabled, .client-help-actions button:disabled { opacity: .55; cursor: not-allowed; }
.client-download-status, .client-action-status, .client-source-note { font-size: 13px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; margin: 12px 0; }
.client-mac-arch { border: 0; margin: 0; padding: 0; min-width: 0; }
.client-mac-arch legend { font-weight: 700; margin-bottom: 10px; }
.client-mac-arch label { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line, #d9dfe8); border-radius: 10px; cursor: pointer; }
.client-mac-arch label:has(input:checked) { border-color: #7065cf; background: rgba(112,101,207,.08); }
.client-mac-arch input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: #7065cf; }
.client-mac-arch small { display: block; color: var(--muted); margin-top: 4px; }
.client-mac-arch p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
.client-help-actions { flex-wrap: wrap; }
.client-help-actions button { white-space: normal; height: auto; min-height: 42px; }
.client-manual-copy { display: block; font-size: 13px; }
.client-manual-copy[hidden] { display: none; }
.client-manual-copy input { box-sizing: border-box; display: block; width: 100%; max-width: 100%; padding: 10px; }
.client-download-view :focus-visible, .knowledge-modal :focus-visible { outline: 3px solid #8c7fe8; outline-offset: 3px; }
.knowledge-detail h4 { margin: 26px 0 12px; font-size: 17px; }
.knowledge-detail a, .knowledge-detail code { overflow-wrap: anywhere; }
.knowledge-quick-list button.active { border-color: #8c7fe8; }
@media (max-width: 600px) {
  .client-system-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .client-system-tab { min-width: 0; width: 100%; justify-content: center; }
  .client-download-view { padding-bottom: 76px; }
}

/* docs20 scoped tutorial controls: no inline publisher styles or global overrides. */
.article-link{color:var(--brand);overflow-wrap:anywhere}.article-download,.client-import-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 16px;border:1px solid var(--brand);border-radius:12px;background:var(--brand);color:#fff!important;text-decoration:none;font:inherit;font-weight:600;max-width:100%;white-space:normal;overflow-wrap:anywhere;cursor:pointer}.article-download.is-backup{background:transparent;color:var(--text,#334155)!important;border-color:#94a3b8}.client-import-btn:disabled{opacity:.5;cursor:not-allowed}.article-link:focus-visible,.client-import-btn:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}.article-figure{margin:20px 0}.article-figure img{display:block;max-width:100%;height:auto;margin:auto;border-radius:12px}.article-figure figcaption{font-size:12px;color:var(--muted,#64748b);padding:8px}.knowledge-detail{overflow-wrap:anywhere}.knowledge-detail table{max-width:100%;display:block;overflow:auto}.knowledge-detail pre{white-space:pre-wrap}.recommended-clients{margin-top:24px}.recommended-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.recommended-card{padding:20px;border:1px solid var(--border,#dbe3ee);border-radius:16px;background:var(--panel,#fff)}.recommended-card h4{margin:0 0 12px}.client-compatibility{display:inline-block;font-size:12px;padding:5px 9px;border-radius:7px;background:#e0edff;color:#1e40af}.knowledge-detail .client-help-actions{display:flex;flex-wrap:wrap;gap:10px}@media(max-width:600px){.recommended-grid{grid-template-columns:1fr}.knowledge-detail .client-help-actions>*{width:100%}}

.ios-flow{margin:20px 0;padding:18px;border:1px solid #bfdbfe;border-radius:16px;background:var(--panel,#f8fbff)}.ios-flow figcaption{font-size:13px;color:#64748b;margin-bottom:14px}.ios-flow ol{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ios-flow li{display:flex;flex-direction:column;gap:8px;padding:15px;border-radius:12px;border:1px solid #dbeafe}.ios-flow-icon{width:36px;height:36px;background:#dbeafe;color:#1d4ed8;border-radius:10px;display:grid;place-items:center;font-size:24px}.ios-flow small{font-size:13px;line-height:1.6}@media(max-width:600px){.ios-flow ol{grid-template-columns:1fr}}

/* paymentqr21: isolated, responsive in-page checkout QR. */
.payment-qr-overlay{position:fixed;inset:0;z-index:12000;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.payment-qr-dialog{box-sizing:border-box;width:min(440px,100%);max-height:calc(100dvh - 32px);overflow:auto;border-radius:18px;background:var(--card-bg,#fff);color:var(--text-primary,#172033);padding:22px;box-shadow:0 24px 80px #0004;overflow-wrap:anywhere}
.payment-qr-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.payment-qr-dialog h2{font-size:20px;margin:0}.payment-qr-dialog button{min-height:44px}.payment-qr-dialog .icon-close{flex-shrink:0;min-width:44px}.payment-qr-code{text-align:center}.payment-qr-code canvas{display:block;width:min(288px,100%);height:auto;margin:12px auto;background:#fff}.payment-qr-dialog p{line-height:1.6;font-size:14px}.payment-qr-status{min-height:44px}.payment-qr-dialog .primary-btn{width:100%}.payment-qr-footnote{font-size:12px!important;opacity:.8}.payment-qr-dialog button:focus-visible{outline:3px solid #8b5cf6;outline-offset:3px}

/* recommendations25: single list owner inside the install card */
.client-install-card .recommended-clients{margin:0}.client-install-card .recommended-grid{grid-template-columns:minmax(0,1fr);gap:10px}.client-install-card .recommended-card{padding:13px 14px;border-radius:12px;min-width:0}.client-install-card .recommended-heading{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px}.client-install-card .recommended-card h4{margin:0;font-size:15px;line-height:1.5;white-space:nowrap}.client-install-card .client-compatibility,.client-install-card .client-recommended{padding:3px 7px;font-size:11px;line-height:1.5;white-space:nowrap;border-radius:6px}.client-install-card .client-recommended{background:#dcfce7;color:#166534}.client-install-card .recommended-card p{margin:6px 0 0;font-size:12px;line-height:1.6;color:var(--muted,#64748b)}.client-install-card .recommended-card .article-link{font-size:12px;white-space:nowrap;text-decoration:none}.client-install-card .client-guide-title h3{white-space:nowrap}

.client-id-button { justify-self:start; min-height:44px; font-size:14px; }
.tutorial-photo { margin:18px 0; }
.tutorial-photo > button { display:block; padding:0; max-width:100%; border:1px solid #d9dee9; border-radius:12px; overflow:hidden; background:#f5f6f8; cursor:zoom-in; }
.tutorial-photo img { display:block; width:auto; max-width:100%; max-height:430px; object-fit:contain; }
.tutorial-photo figcaption { margin-top:8px; font-size:14px; line-height:1.65; color:#526077; }
.tutorial-dialog { box-sizing:border-box; width:min(1080px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; border:1px solid #dce1ed; border-radius:20px; color:#172238; background:#fff; box-shadow:0 24px 90px #11182740; overflow:hidden; }
.tutorial-dialog[open] { display:flex; flex-direction:column; }
.tutorial-dialog::backdrop { background:#101b36a6; }
.tutorial-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 22px; border-bottom:1px solid #e5e9f1; flex-shrink:0; }
.tutorial-dialog h2 { font-size:20px; margin:0; }
.tutorial-dialog h3 { font-size:18px; margin:0; }
.tutorial-dialog h4 { font-size:17px; margin:0 0 12px; }
.tutorial-dialog .ghost-btn { min-height:44px; font-size:14px; flex-shrink:0; }
.tutorial-dialog-body { padding:20px 22px; overflow:auto; overscroll-behavior:contain; font-size:15px; line-height:1.75; }
.tutorial-dialog-body > :first-child { margin-top:0; }
.appstore-guide ol { padding-left:22px; font-size:15px; line-height:1.8; }
.appstore-guide .tutorial-photo img { width:100%; max-height:none; }
.appstore-guide .tutorial-photo > button { max-width:760px; }
.id-boundary { color:#526077; font-size:14px; }
.id-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:20px; }
.id-panel { min-width:0; border:1px solid #dce1ed; border-radius:14px; padding:14px; }
.id-panel-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.id-panel [role=status] { min-height:3.5em; font-size:14px; color:#526077; }
.id-frame-slot { border:1px solid #e5e9f1; border-radius:8px; overflow:hidden; background:#f8f9fc; margin-bottom:12px; }
.id-frame-slot iframe { display:block; width:100%; height:520px; border:0; background:white; }
.tutorial-image-dialog { width:min(1050px,calc(100vw - 32px)); }
.tutorial-zoom-scroll { overflow:auto; max-height:65dvh; margin:12px 0; }
.tutorial-zoom-scroll img { display:block; max-width:100%; margin:auto; }
.image-original .tutorial-zoom-scroll img { max-width:none; }
.tutorial-dialog button:focus-visible,.tutorial-photo button:focus-visible,.tutorial-zoom-scroll:focus-visible { outline:3px solid #6855e8; outline-offset:3px; }
@media(max-width:640px) { .tutorial-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:14px; } .tutorial-dialog > header { padding:12px 14px; } .tutorial-dialog-body { padding:16px 14px; } .id-panels { grid-template-columns:minmax(0,1fr); gap:16px; } .id-panel { padding:12px; } .id-frame-slot iframe { height:500px; } }

/* FlClash recommendation action: scoped to its existing card owner. */
.client-install-card .recommended-flclash{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap}.client-install-card .recommended-flclash p{margin:0 0 0 auto}.client-install-card .client-flclash-download{display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:0 12px;box-sizing:border-box;border:1px solid var(--brand);border-radius:8px;background:var(--brand);color:#fff;text-decoration:none;font-size:12px;font-weight:600;white-space:nowrap}.client-install-card .client-flclash-download:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}

/* Awei adapter: source layout retained; only target-owned controls differ. */
.client-download-sources{display:grid;grid-template-columns:1fr 1fr;gap:8px}.client-download-btn.is-backup{background:transparent;color:var(--brand);border-color:var(--brand)}
.client-install-card .recommended-grid{grid-auto-rows:1fr}.client-install-card .recommended-card{height:100%;box-sizing:border-box}.client-install-card .recommended-flclash{position:relative;display:block}.client-install-card .recommended-flclash .flclash-card-actions{display:block;min-height:19px;margin:6px 0 0;padding-right:128px}.client-install-card .flclash-official-link{font-weight:500;white-space:nowrap}.client-install-card .client-flclash-download{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;min-width:112px;min-height:44px;padding:0 20px;box-sizing:border-box;border:1px solid var(--brand);border-radius:10px;background:var(--brand);color:#fff;text-decoration:none;font-size:14px;font-weight:700;white-space:nowrap}.client-install-card .client-flclash-download:hover{filter:brightness(1.04);transform:translateY(calc(-50% - 1px))}.client-install-card .client-flclash-download:focus-visible,.client-install-card .flclash-official-link:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}
.invite-domain-panel .domain-note{overflow-wrap:anywhere}.capability-disabled{border:1px dashed var(--line);background:var(--panel-soft)}.devices-card .session-list{padding:12px}
@media(max-width:600px){.client-download-sources{grid-template-columns:1fr}.client-install-card .recommended-flclash .flclash-card-actions{padding-right:122px}.client-install-card .client-flclash-download{right:14px;min-width:108px;min-height:44px;padding:0 17px}}

/* r8 unique-IP adapter; live source cards and stats remain owners. */
.devices-over-limit{border:1px solid #f3bf71;background:#fff7e8;color:#8a4b07;padding:12px 16px;border-radius:12px;margin:0 0 16px}
.device-location-chip,.device-ip-chips span{display:inline-block;background:var(--panel-soft);border-radius:6px;padding:3px 7px;overflow-wrap:anywhere}
.device-row-meta{display:block;color:var(--muted);font-size:12px;margin-top:4px;overflow-wrap:anywhere}
.device-ip-chips{display:flex;gap:8px;flex-wrap:wrap;padding:0 20px 16px}.device-ip-chips:empty{display:none}
.panel-sessions-card{margin-top:20px}.panel-session-count{font-size:13px;color:var(--muted)}
.panel-sessions-card .session-row{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto}.panel-sessions-card .session-meta b{overflow-wrap:anywhere}
@media(max-width:600px){.panel-sessions-card .session-row{grid-template-columns:1fr 1fr}.panel-sessions-card .remove-session{grid-column:1/-1;justify-self:end}.device-ref-row>div:nth-child(2){min-width:0}.device-ref-row p{flex-wrap:wrap}.device-ref-row p b{overflow-wrap:anywhere}}

/* r7: the native content shape reserves space, never a full-screen white loading card. */
.r7-skeleton{position:relative;min-height:360px}.r7-skeleton-layout,.r7-skeleton-layout *{visibility:hidden!important;pointer-events:none!important}.r7-skeleton-ink{position:absolute;inset:0;pointer-events:none}.r7-skeleton-ink h2{font-size:24px;margin:0 0 28px}.r7-skeleton-ink i{display:block;height:76px;margin:16px 0;border-radius:14px;background:linear-gradient(100deg,var(--panel-soft,#edf0f7),var(--panel,#fff),var(--panel-soft,#edf0f7));border:1px solid var(--line,#e6eaf2);opacity:.8}.r7-skeleton-ink i:nth-last-child(1){width:66%}.r7-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

.r7-snapshot{position:relative}.r7-freshness{position:absolute;right:0;top:-18px;margin:0;max-width:100%;font-size:11px;color:var(--muted,#74788a);line-height:16px;z-index:1}.r7-readonly{opacity:.86}.r7-snapshot .r7-readonly button:disabled{cursor:wait}

/* Plan data is text, not trusted markup; preserve mobile wrapping. */
.plan-feature-item>span:last-child{min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}.plan-feature-item.is-unsupported .plan-feature-check{color:var(--muted,#737b8a)}.plan-support-label{font-weight:600}.plan-description-empty{color:var(--muted,#737b8a)}

/* Keep the continuous-reply composer outside the persistent support launcher hit area. */
.tickets-view{padding-bottom:80px}.ticket-reply-form{padding-inline-end:76px}

/* 20261017 导入卡片紧凑 */
.import-card{gap:4px}
.import-card h3{margin:0;line-height:1.3}
.import-card p{margin:0;line-height:1.5}
.import-card .dedicated-sub-actions{margin-top:8px}

/* 一键导入前的提示弹窗（2026-10-20） */
.import-warn{position:relative;width:min(560px,calc(100vw - 24px));padding:30px 30px 24px;text-align:center;border-radius:20px}
.import-warn-close{position:absolute;right:14px;top:12px}
.import-warn-icon{width:60px;height:60px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#fff4e5;color:#f08c00;font-size:34px;font-weight:800;line-height:1}
.import-warn h2{margin:0 0 10px;font-size:26px;line-height:1.25;font-weight:800;color:#c2410c;letter-spacing:.5px}
.import-warn-lead{margin:0 0 18px;color:#4b5263;font-size:15px;line-height:1.75}
.import-warn-lead strong{color:#111827}
.import-warn-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px;text-align:left}
.import-warn-compare>div{display:grid;gap:3px;padding:13px 14px;border-radius:14px;font-size:13.5px;line-height:1.6}
.import-warn-compare strong{font-size:15px;margin-bottom:3px}
.import-warn-good{background:#f1efff;border:1.5px solid var(--brand);color:#3b2fb5}
.import-warn-bad{background:#f7f7f9;border:1.5px solid #e2e4ea;color:#6b7280}
.import-warn-main{display:block;width:100%;min-height:56px;padding:12px 16px;border-radius:14px;font-size:16.5px;font-weight:800}
.import-warn-main small{display:block;margin-top:3px;font-size:12.5px;font-weight:400;opacity:.9}
.import-warn-continue{display:block;width:100%;margin-top:10px;padding:11px 16px;border-radius:14px;color:#6b7280;font-size:14.5px}
.import-warn-note{margin:14px 0 0;color:#9aa0ae;font-size:12px}
@media (max-width:560px){.import-warn{padding:26px 16px 18px}.import-warn h2{font-size:22px}.import-warn-compare{grid-template-columns:1fr}}
body.dark .import-warn-icon{background:rgba(240,140,0,.16)}
body.dark .import-warn h2{color:#fb923c}
body.dark .import-warn-lead{color:#c3c8d4}
body.dark .import-warn-lead strong{color:#f3f4f6}
body.dark .import-warn-good{background:rgba(105,88,245,.16);color:#c4bcff}
body.dark .import-warn-bad{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.12);color:#9aa0ae}
body.dark .import-warn-continue{color:#b4b9c6}
.client-download-hint{display:block;margin-top:2px;font-size:12px;font-weight:500;opacity:.85;line-height:1.2}
.client-trouble-strong li{font-weight:700;font-size:15px;line-height:1.65;color:var(--text,#111827)} body.dark .client-trouble-strong li{color:#f3f4f6}
.client-key-op{color:#dc2626;font-weight:800} body.dark .client-key-op{color:#f87171}

/* 主下载 / 备用下载 / 蓝奏云三个按钮（2026-10-21） */
.client-download-sources.has-lanzou{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){.client-download-sources.has-lanzou{grid-template-columns:1fr}}
.client-download-sources.has-lanzou .client-download-btn{flex-direction:column;gap:2px;white-space:nowrap;padding-left:8px;padding-right:8px}
.client-download-sources.has-lanzou .client-download-hint{margin:0}

/* 2026-10-21 iOS：Nextin 按钮一排 */
.client-action-row.client-action-row-ios { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; }
.client-action-row.client-action-row-ios > * { grid-row: 1; min-height: 48px; font-size: 14px; padding: 12px 10px; white-space: nowrap; }
.client-action-row.client-action-row-ios > .client-download-btn { grid-column: 1; }
.client-action-row.client-action-row-ios > .client-knowledge-btn:nth-child(2) { grid-column: 2; }
.client-action-row.client-action-row-ios > .client-knowledge-btn:nth-child(3) { grid-column: 3; }
.client-action-row.client-action-row-ios > .client-knowledge-btn:nth-child(4) { grid-column: 4; }
@media (max-width: 720px) {
  .client-action-row.client-action-row-ios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .client-action-row.client-action-row-ios > .client-download-btn { grid-column: 1 / -1; }
  .client-action-row.client-action-row-ios > .client-knowledge-btn { grid-row: 2; grid-column: auto !important; white-space: normal; padding: 10px 6px; }
}
.nextin-shots { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-start; }
.nextin-shots .tutorial-photo { margin:12px 0; flex:0 1 auto; }
/* 2026-10-21 公告弹窗：内容过长时正文可滚动（.knowledge-modal 的 overflow:hidden 会截断） */
.knowledge-modal[data-notice-mode] { display: flex; flex-direction: column; max-height: calc(100dvh - 36px); }
.knowledge-modal[data-notice-mode] .support-modal-head { flex: 0 0 auto; }
.knowledge-modal[data-notice-mode] .support-article-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* 主下载1/主下载2 + 蓝奏云 + 备用：两列两行（2026-10-22） */
.client-download-sources.has-two,.client-download-sources.has-two.has-lanzou{grid-template-columns:repeat(2,minmax(0,1fr))}
.client-download-sources.has-two .client-download-btn{white-space:nowrap}

/* 10-24 一键导入弹窗改为正面推荐：品牌色图标、标题不用警告色 */
.import-warn-icon{border-radius:18px;background:var(--brand);color:#fff;font-size:26px}
.import-warn h2{color:#111827}
body.dark .import-warn-icon{background:var(--brand);color:#fff}
body.dark .import-warn h2{color:#f3f4f6}

/* 2026-11-12 邀请码数据（访问/注册/付费/佣金） */
.code-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.code-metric{background:rgba(255,255,255,.65);border:1px solid #e5e7ef;border-radius:12px;padding:8px 12px;min-width:0}
.code-metric span{display:block;font-size:12px;color:#74788a;font-weight:500}
.code-metric b{display:block;font-size:17px;margin-top:2px;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.code-metric small{color:#74788a;font-size:11px}
.code-share{height:5px;border-radius:5px;background:#eceef5;overflow:hidden;margin-top:6px}
.code-share i{display:block;height:100%;background:#6c63ff;border-radius:5px}
.code-summary{border:1px dashed #e5e7ef;border-radius:16px;padding:6px 16px;margin-top:10px}
.code-summary .row{display:grid;grid-template-columns:1.4fr repeat(4,1fr);align-items:center;padding:8px 0;font-variant-numeric:tabular-nums;gap:6px}
.code-summary .row+.row{border-top:1px solid #e5e7ef}
.code-summary .row div{text-align:right;min-width:0}
.code-summary .row div:first-child{text-align:left}
.code-summary .row.head div{color:#74788a;font-size:12px}
.code-summary .row.total div{font-weight:700}
.code-summary .row small{display:block;color:#74788a;font-size:11px;font-weight:400}
.metric-note{color:#74788a;font-size:12px;margin:8px 2px 0}
@media (max-width:640px){.code-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.code-summary .row{grid-template-columns:1.2fr repeat(4,1fr);font-size:12px}.code-summary .row small{display:none}}
body.dark .code-metric{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08)}
body.dark .code-metric span,body.dark .code-metric small,body.dark .code-summary .row.head div,body.dark .code-summary .row small,body.dark .metric-note{color:#9aa0b4}
body.dark .code-share{background:rgba(255,255,255,.08)}
body.dark .code-summary{border-color:rgba(255,255,255,.12)}
body.dark .code-summary .row+.row{border-top-color:rgba(255,255,255,.08)}
@media (max-width:640px){.code-metric b{font-size:15px;white-space:normal;word-break:break-all}.code-summary{padding:4px 10px}.code-summary .row{grid-template-columns:1.1fr .6fr 1fr .9fr 1.3fr;font-size:11px;gap:4px}}

/* 佣金明细 v2（2026-11-12）：统计卡 + 状态筛选 + 状态徽章 */
.comm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 12px; }
.comm-stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-soft); display: grid; gap: 4px; }
.comm-stat span { color: var(--muted); font-size: 12px; font-weight: 700; }
.comm-stat strong { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--text); }
.comm-stat em { font-style: normal; color: var(--muted); font-size: 12px; }
.comm-stat.pending strong { color: #d97706; }
.comm-stat.settled strong { color: #179560; }
.comm-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.comm-tab { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.comm-tab b { font-size: 11px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--panel-soft); color: var(--muted); text-align: center; }
.comm-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.comm-tab.active b { background: rgba(255, 255, 255, .22); color: #fff; }
.comm-tip { margin-left: auto; color: var(--muted); font-size: 12px; }
.commission-table { min-width: 520px; }
.commission-table th.num, .commission-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.commission-table .comm-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.commission-table .comm-amount { font-weight: 800; }
.commission-table .comm-amount:not(.income) { color: #d97706; }
.commission-table .comm-empty { text-align: center; color: var(--muted); padding: 22px 0; }
.comm-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.comm-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.comm-badge.pending { color: #c26a00; background: rgba(240, 179, 84, .18); }
.comm-badge.settled { color: #13834f; background: rgba(62, 207, 142, .16); }
.comm-badge.processing { color: #2563eb; background: rgba(96, 165, 250, .16); }
.commission-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--muted); }
.comm-sum-wait { color: var(--muted); }
body.dark .comm-stat.pending strong, body.dark .commission-table .comm-amount:not(.income) { color: #f0b354; }
body.dark .comm-stat.settled strong, body.dark .invite-table .income { color: #3ecf8e; }
body.dark .comm-badge.pending { color: #f0b354; background: rgba(240, 179, 84, .14); }
body.dark .comm-badge.settled { color: #3ecf8e; background: rgba(62, 207, 142, .14); }
body.dark .comm-badge.processing { color: #60a5fa; background: rgba(96, 165, 250, .14); }
@media (max-width: 640px) {
  .comm-stats { grid-template-columns: 1fr; gap: 8px; }
  .comm-stat { grid-template-columns: 1fr auto; align-items: baseline; }
  .comm-stat em { grid-column: 1 / -1; }
  .comm-tip { width: 100%; margin-left: 0; }
  .table-wrap .commission-table { min-width: 0; }
  .commission-table th, .commission-table td { padding: 10px 6px; font-size: 13px; }
  .commission-table th:first-child, .commission-table td:first-child { padding-left: 2px; }
  .commission-table .comm-time { line-height: 1.35; }
  .commission-table .comm-time .t { display: block; color: var(--muted); font-size: 12px; }
  .comm-badge { padding: 3px 8px; }
}

/* 2026-11-18 App 内置浏览器提示 + 复制下载链接 */
.inapp-banner { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #fff4e5; border: 1px solid #f5b25b; color: #7a4300; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.6; }
.inapp-banner strong { font-weight: 700; }
body.dark .inapp-banner { background: #3a2a12; border-color: #a8671c; color: #ffd9a6; }
.client-copy-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.client-copy-link { appearance: none; -webkit-appearance: none; border: 1px dashed var(--line); background: transparent; color: var(--brand); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.client-copy-link:hover { border-style: solid; }
