:root {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #dfe5ec;
  --line-strong: #c8d2dc;
  --text: #172033;
  --muted: #667085;
  --muted-strong: #475467;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e7f5f2;
  --danger: #c2410c;
  --success: #087443;
  --warning: #a15c07;
  --focus: #2563eb;
  --sidebar: #ffffff;
  --shadow: 0 10px 30px rgb(23 32 51 / 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f7fafc 0, var(--bg) 240px);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.app-shell.sidebar-open {
  padding-left: 244px;
}

.sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 30;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 24px rgb(17 24 39 / 0.08);
}

.sidebar-toggle:hover {
  background: var(--accent-soft);
}

.app-shell.sidebar-open .sidebar-toggle {
  left: 258px;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
  width: 244px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  overflow-y: auto;
  box-shadow: 8px 0 30px rgb(23 32 51 / 0.04);
}

.app-shell.sidebar-closed .sidebar {
  display: none;
}

.app-shell.sidebar-closed .content {
  padding-left: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  font-weight: 750;
  font-size: 16px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  min-height: 40px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav button.active,
.nav button:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 650;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-toggle {
  justify-content: space-between;
}

.nav-group-toggle .chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.nav-group-items {
  display: grid;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.nav-group-items button {
  min-height: 36px;
  padding-left: 10px;
}

.content {
  padding: 30px;
  min-width: 0;
  width: 100%;
  max-width: 1720px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 2px 2px 0;
}

.title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 720;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 820px;
}

.grid {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel-pad {
  padding: 18px;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 116px;
  align-content: center;
  border-left: 3px solid var(--accent);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 30px;
  font-weight: 760;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  font-weight: 750;
  font-size: 16px;
}

.form {
  display: grid;
  gap: 12px;
}

.admin-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: center;
}

.admin-form-grid .button,
.admin-form-grid .actions {
  align-self: stretch;
}

.form-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-note.inline {
  display: inline;
  margin-left: 4px;
  white-space: normal;
}

.code-line {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
  padding: 10px 12px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.raw-term {
  font-weight: 650;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toggle-line {
  min-height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--muted-strong);
  white-space: nowrap;
}

.toggle-line input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.compatibility-toggle {
  gap: 8px;
}

.info-dot {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--muted);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  flex: 0 0 auto;
}

.stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.input {
  height: 42px;
  padding: 0 12px;
}

select.input[multiple] {
  height: 96px;
  padding: 8px 11px;
}

.multi-select {
  position: relative;
  min-width: 0;
}

.multi-select summary {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select summary span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select .chevron {
  color: var(--muted);
  flex: 0 0 auto;
}

.multi-options {
  position: absolute;
  z-index: 25;
  inset: calc(100% + 4px) 0 auto 0;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.multi-option {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.multi-option:hover {
  background: #f1f5f9;
}

.multi-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
}

.multi-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.multi-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.kv-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.kv-list > div {
  display: grid;
  grid-template-columns: minmax(86px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.kv-list span {
  color: var(--muted-strong);
  font-size: 12px;
}

.kv-list strong {
  min-width: 0;
  color: var(--text);
  font-weight: 620;
  overflow-wrap: anywhere;
}

.kv-list.compact {
  gap: 4px;
}

.textarea {
  min-height: 110px;
  padding: 11px;
  resize: vertical;
  line-height: 1.45;
}

.input:focus,
.textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.button {
  min-height: 38px;
  border-radius: 7px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.button.secondary {
  background: #fff;
  color: var(--accent-strong);
  border: 1px solid var(--line-strong);
}

.button.secondary.attention {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.button.ghost {
  background: transparent;
  color: var(--muted-strong);
}

.button.danger {
  color: #fff;
  background: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 0 0 8px 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted-strong);
  font-weight: 560;
  font-size: 12px;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover td {
  background: #fbfefd;
}

.panel-table {
  table-layout: fixed;
  min-width: 1280px;
}

.panel-table th:nth-child(1),
.panel-table td:nth-child(1) {
  width: 100px;
}

.panel-table th:nth-child(2),
.panel-table td:nth-child(2) {
  width: 210px;
}

.panel-table th:nth-child(8),
.panel-table td:nth-child(8) {
  width: 260px;
}

.panel-table th:nth-child(9),
.panel-table td:nth-child(9) {
  width: 130px;
}

.panel-table th:nth-child(11),
.panel-table td:nth-child(11) {
  width: 390px;
}

.date-cell {
  color: var(--muted-strong);
  font-size: 12px;
  white-space: nowrap;
}

.panel-url span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-api {
  white-space: normal;
}

.api-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.api-summary div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.api-summary span {
  color: var(--muted);
  font-size: 12px;
}

.api-summary strong {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xui-table-panel {
  background: #23272e;
  border-color: #353b45;
  overflow: hidden;
}

.xui-table {
  background: #23272e;
  color: #eef2f7;
  min-width: 1120px;
}

.xui-table th,
.xui-table td {
  border-top: 1px solid #3a414d;
  padding: 10px 12px;
  vertical-align: middle;
}

.xui-table th {
  background: #2b3037;
  color: #f3f7fb;
  font-weight: 650;
}

.xui-table tbody tr:hover td {
  background: #272d35;
}

.xui-table strong {
  color: #f8fafc;
  font-weight: 700;
}

.xui-table .hint {
  color: #a8b2c2;
  font-size: 12px;
}

.xui-check span {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 1px solid #566174;
  border-radius: 4px;
  background: #20242b;
}

.xui-actions {
  display: inline-flex;
  gap: 8px;
  color: #d7dde8;
  font-size: 12px;
}

.xui-actions span,
.xui-actions button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}

.xui-actions span:hover,
.xui-actions button:hover {
  border-bottom-color: #7aa2ff;
  color: #9bbcff;
}

.xui-switch {
  width: 44px;
  height: 22px;
  display: inline-block;
  border-radius: 999px;
  position: relative;
  background: #4b5563;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.xui-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
}

.xui-switch.on {
  background: #2684ff;
}

.xui-switch.on::after {
  transform: translateX(22px);
}

.xui-switch-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
}

.xui-online,
.xui-offline,
.xui-identity-duplicate {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 650;
}

.xui-online {
  background: #0f3f16;
  color: #5cf05f;
}

.xui-offline {
  background: #343943;
  color: #f1f5f9;
}

.xui-identity-duplicate {
  background: #4a1115;
  color: #ff6b6b;
}

.xui-tags {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
}

.xui-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 7px;
  background: #111d34;
  color: #52a2ff;
  font-size: 12px;
}

.xui-tag:first-child {
  background: #25153b;
  color: #bd7cff;
}

.xui-client-count,
.xui-inbound-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 7px;
  background: #0d2342;
  color: #69a8ff;
  font-size: 12px;
  font-weight: 650;
}

.xui-traffic {
  min-width: 260px;
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 9px;
  color: #f8fafc;
  font-size: 12px;
}

.xui-meter {
  height: 8px;
  border-radius: 999px;
  background: #38404a;
  overflow: hidden;
}

.xui-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #7b8794;
}

.xui-remain,
.xui-duration {
  display: inline-flex;
  border-radius: 4px;
  padding: 4px 8px;
  background: #0d350b;
  color: #6df36b;
  font-size: 12px;
  font-weight: 650;
}

.xui-duration {
  background: #173b13;
}

.xui-duration.danger {
  background: #4b1b1b;
  color: #ff8b8b;
}

.xui-duration.pending {
  color: #60a5fa;
}

.xui-more {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 4px;
  padding: 3px 7px;
  background: #343943;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 650;
}

.xui-client-subscription-entry {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.panel-subscription-domain-backdrop {
  overscroll-behavior: contain;
  touch-action: none;
}

.panel-subscription-domain-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal.xui-client-modal {
  width: min(700px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: #2b3038;
  border-color: #444b57;
  color: #edf2f7;
  padding: 0;
}

.xui-client-form {
  display: grid;
  gap: 0;
}

.xui-client-modal-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.xui-client-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
}

.xui-client-stable-identity {
  margin-left: auto;
  max-width: min(360px, 46vw);
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.xui-client-stable-identity.warning {
  color: #93c5fd;
}

.xui-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: transparent;
  color: #b8c0cc;
  font-size: 26px;
  line-height: 1;
}

.xui-close:hover {
  background: #363c46;
  color: #fff;
}

.xui-tabs {
  display: flex;
  gap: 26px;
  padding: 0 18px;
  border-bottom: 1px solid #444b57;
}

.xui-tabs button {
  height: 36px;
  padding: 0;
  background: transparent;
  color: #d6dce6;
  border-bottom: 2px solid transparent;
}

.xui-tabs button.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.xui-client-pane {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 16px;
  padding: 18px;
}

.xui-client-pane.active {
  display: grid;
}

.xui-field {
  display: grid;
  gap: 7px;
  color: #d8dee8;
  font-size: 13px;
  min-width: 0;
}

.xui-field.required > span::before {
  content: "* ";
  color: #ff6b6b;
}

.xui-field.required > .xui-field-row > span::before {
  content: "* ";
  color: #ff6b6b;
}

.xui-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xui-field-row button {
  border: 1px solid #4b5566;
  border-radius: 6px;
  background: #20252d;
  color: #dbe3ee;
  padding: 4px 10px;
  cursor: pointer;
}

.xui-field-row button:hover {
  border-color: #2684ff;
  color: #f8fafc;
}

.xui-field-wide {
  grid-column: 1 / -1;
}

.modal.xui-client-modal .input {
  background: #242933;
  border-color: #4b5566;
  color: #f8fafc;
}

.modal.xui-client-modal .input::placeholder {
  color: #7f8795;
}

.xui-input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
}

.xui-input-with-action .input {
  border-radius: 7px 0 0 7px;
}

.xui-input-with-action button {
  border: 1px solid #4b5566;
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: #20252d;
  color: #dbe3ee;
}

.xui-inline-switch {
  width: 44px;
  height: 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.xui-inline-switch input {
  position: absolute;
  opacity: 0;
}

.xui-inline-switch i {
  width: 44px;
  height: 22px;
  border-radius: 999px;
  background: #5b6470;
  position: relative;
}

.xui-inline-switch i::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.xui-inline-switch input:checked + i {
  background: #2684ff;
}

.xui-inline-switch input:checked + i::after {
  transform: translateX(22px);
}

.xui-client-inbounds {
  min-height: 42px;
  max-height: 116px;
  overflow: auto;
  border: 1px solid #4b5566;
  border-radius: 7px;
  background: #242933;
  padding: 7px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.xui-client-inbound {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #4b5566;
  border-radius: 5px;
  background: #343a44;
}

.xui-client-inbound input {
  margin: 0;
  cursor: pointer;
}

.xui-client-inbound span {
  display: grid;
  gap: 1px;
}

.xui-client-inbound small,
.xui-client-empty,
.xui-link-note span {
  color: #aab4c3;
  font-size: 12px;
}

.xui-inbound-share-list {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
}

.xui-inbound-share-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px minmax(240px, 1fr);
  gap: 7px;
  align-items: start;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.xui-inbound-share-modal {
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}

.xui-inbound-share-modal form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.xui-inbound-share-modal .section-head {
  padding: 14px 18px 10px;
}

.xui-inbound-share-modal .xui-inbound-share-list {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.xui-inbound-share-modal .modal-footer {
  padding: 10px 18px;
}

.xui-inbound-share-modal .input {
  height: 34px;
  padding: 0 10px;
}

.xui-inbound-share-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  line-height: 1.2;
}

.xui-inbound-share-row strong {
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.xui-inbound-share-title span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xui-inbound-share-row .hint {
  line-height: 1.2;
}

.xui-link-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #4b5566;
  border-radius: 7px;
  background: #242933;
}

.xui-client-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.sub-link-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.subscription-preview-backdrop,
.xui-client-backdrop,
.xui-inbound-share-backdrop {
  overscroll-behavior: contain;
  touch-action: none;
}

.subscription-preview-modal {
  width: min(1100px, calc(100vw - 40px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  touch-action: pan-y;
}

.subscription-preview-modal .sub-link-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-right: 4px;
}

.subscription-preview-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.subscription-export-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.subscription-domain-select-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.subscription-domain-select-row .field-note {
  grid-column: 2;
}

.subscription-link-settings-form {
  gap: 14px;
}

.subscription-domain-pool-input {
  min-height: 112px;
}

.sub-link-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) max-content;
  grid-template-areas: "label url actions";
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.sub-link-row code {
  grid-area: url;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.sub-link-row > span {
  grid-area: label;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.sub-link-actions {
  grid-area: actions;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.qr-backdrop {
  z-index: 70;
}

.qr-modal {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
}

.qr-code-box {
  width: min(260px, 80vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
}

.qr-code-box svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-url {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.45;
}

td.wrap {
  white-space: normal;
  word-break: break-all;
}

.badge {
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  background: #eef2f6;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.badge.ok {
  background: #e8f7ee;
  color: var(--success);
}

.badge.off {
  background: #f3f4f6;
  color: var(--muted);
}

.badge.warn {
  background: #fff4df;
  color: var(--warning);
}

.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.link-actions {
  display: grid;
  gap: 8px;
  min-width: 460px;
}

.import-panel {
  padding: 14px;
}

.compact-import-form {
  gap: 8px;
}

.import-grid-main,
.import-grid-filters {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.import-grid-main {
  grid-template-columns: minmax(170px, 0.7fr) minmax(150px, 0.55fr) minmax(280px, 1.5fr) auto;
}

.import-grid-filters {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto minmax(180px, 0.7fr);
}

.import-panel .textarea {
  min-height: 72px;
  width: 100%;
  min-width: 220px;
  resize: both;
}

.import-panel .input,
.import-panel .textarea {
  min-height: 40px;
}

.group-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 10px;
  align-items: center;
}

.group-card {
  display: grid;
  gap: 12px;
}

.group-card-main {
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.group-source-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.source-mini-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--panel-soft);
}

.source-mini-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.source-mini-main input {
  flex: 0 0 auto;
}

.group-move-controls,
.group-add-source,
.group-bulk-move {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.group-add-source {
  margin-top: 12px;
}

.group-bulk-move {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.group-move-select,
.source-group-filter {
  width: 180px;
}

.import-panel .toggle-line,
.import-panel .row {
  min-height: 40px;
}

.source-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-bottom: 0;
}

.source-toolbar > .source-search {
  flex: 1 1 360px;
}

.source-toolbar-bottom {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.source-search {
  width: min(420px, 42vw);
}

.source-sort-button {
  flex: 0 0 auto;
}

.source-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.source-page-size {
  width: 120px;
}

.source-card-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.source-card {
  border: 1.5px solid #111827;
  border-radius: 7px;
  padding: 9px 10px;
  display: grid;
  gap: 8px;
  background: #fff;
}

.source-card:first-child {
  border-top: 1.5px solid #111827;
}

.source-card-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.source-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.source-index {
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.source-check {
  height: 24px;
  display: grid;
  place-items: center;
}

.source-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.source-url {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  line-height: 1.35;
}

.source-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 8px;
  align-items: center;
}

.source-url-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-info-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.source-info-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: var(--panel-soft);
}

.source-info-grid p {
  margin: 4px 0 0;
  line-height: 1.35;
  word-break: break-word;
  max-height: 38px;
  overflow: auto;
  font-size: 13px;
}

.source-info-grid .field-line {
  align-items: flex-start;
}

.source-info-grid .field-line span:not(.badge) {
  max-height: 38px;
  overflow: auto;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  font-size: 13px;
}

.info-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.source-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.op-times {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.field-line span,
.field-line strong {
  min-width: 0;
}

.icon-button {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted-strong);
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.icon-button:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.op-time {
  color: var(--text);
  font-size: 13px;
  line-height: 26px;
  white-space: nowrap;
}

.danger-text {
  color: var(--danger);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 24px 70px rgb(23 32 51 / 0.12);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.captcha-code {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef6f4;
  color: var(--accent-strong);
  padding: 10px 12px;
  text-align: center;
  font: 700 22px/1 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.not-found-card {
  text-align: center;
}

@media (max-width: 520px) {
  .captcha-row {
    grid-template-columns: 1fr;
  }
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  background: var(--accent-strong);
  color: #fff;
  padding: 16px 18px;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgb(17 24 39 / 0.18);
  font-size: 15px;
  line-height: 1.45;
  z-index: 60;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(17 24 39 / 0.38);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
  overflow: hidden;
}

.subscription-loading-backdrop {
  z-index: 65;
  background: rgb(17 24 39 / 0.32);
}

.subscription-loading-box {
  width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgb(17 24 39 / 0.22);
}

.subscription-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbe7ef;
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: subscription-loading-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes subscription-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.modal {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: 0 28px 90px rgb(23 32 51 / 0.2);
}

.modal-wide {
  width: min(920px, 100%);
}

.modal-full {
  width: min(1560px, calc(100vw - 40px));
  height: min(900px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  padding: 12px;
}

.fixed-modal {
  align-items: center;
}

.modal-create-panel {
  padding: 10px;
}

.modal-create-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(210px, 0.9fr) minmax(210px, 0.9fr) minmax(170px, 0.75fr) auto auto;
  gap: 8px;
  align-items: center;
}

.modal-links-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.modal-table-wrap {
  min-height: 0;
  overflow: auto;
  max-width: 100%;
}

.modal-table-wrap table {
  min-width: 1280px;
  table-layout: fixed;
}

.modal-table-wrap th,
.modal-table-wrap td {
  padding: 10px 9px;
  vertical-align: top;
}

.modal-table-wrap th:nth-child(1),
.modal-table-wrap td:nth-child(1) {
  width: 42px;
}

.modal-table-wrap th:nth-child(2),
.modal-table-wrap td:nth-child(2) {
  width: 190px;
}

.modal-table-wrap th:nth-child(3),
.modal-table-wrap td:nth-child(3) {
  width: 125px;
}

.modal-table-wrap th:nth-child(4),
.modal-table-wrap td:nth-child(4) {
  width: 180px;
}

.modal-table-wrap th:nth-child(5),
.modal-table-wrap td:nth-child(5) {
  width: 80px;
}

.modal-table-wrap th:nth-child(6),
.modal-table-wrap td:nth-child(6) {
  width: 155px;
}

.modal-table-wrap th:nth-child(7),
.modal-table-wrap td:nth-child(7) {
  width: 260px;
}

.modal-table-wrap th:nth-child(8),
.modal-table-wrap td:nth-child(8) {
  width: 110px;
}

.modal-table-wrap th:nth-child(9),
.modal-table-wrap td:nth-child(9) {
  width: 380px;
}

.modal-table-wrap td.wrap {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.45;
}

.modal-table-wrap .link-actions {
  min-width: 0;
}

.modal-table-wrap .link-actions > .actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  justify-content: start;
  gap: 7px;
}

.modal-table-wrap .link-actions .button {
  min-width: 82px;
}

.modal-table-wrap .op-times {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.modal-table-wrap .op-time {
  white-space: normal;
  line-height: 1.35;
  font-size: 12px;
}

.modal-table-wrap .field-line {
  align-items: flex-start;
}

.modal-filter-input {
  width: min(320px, 36vw);
}

.modal-filter-select {
  width: 150px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.link-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.link-label {
  color: var(--muted-strong);
  font-weight: 650;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-open {
    padding-left: 0;
  }

  .sidebar-toggle {
    top: 14px;
    left: 12px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 25;
    width: min(280px, calc(100vw - 72px));
    min-height: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 0 20px 60px rgb(17 24 39 / 0.16);
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav button {
    justify-content: flex-start;
    text-align: left;
  }

  .content {
    padding: 76px 12px 16px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-shell.sidebar-closed .content {
    padding-left: 12px;
  }

  .app-shell.sidebar-open .sidebar-toggle {
    left: min(292px, calc(100vw - 54px));
  }

  .title {
    font-size: 22px;
  }

  .subtitle {
    font-size: 13px;
  }

  .topbar,
  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 14px;
  }

  .topbar .actions {
    width: 100%;
  }

  .topbar .button,
  .row > .button,
  .row > .input {
    width: 100%;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head > .actions {
    width: 100%;
  }

  .link-row {
    grid-template-columns: 1fr;
  }

  .sub-link-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "url"
      "actions";
  }

  .sub-link-row code {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sub-link-actions {
    justify-content: stretch;
  }

  .sub-link-actions .button {
    flex: 1;
  }

  .source-title,
  .source-toolbar,
  .source-pager,
  .source-card-actions,
  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .source-badges {
    justify-content: flex-start;
  }

  .source-info-grid,
  .import-grid-main,
  .import-grid-filters,
  .modal-create-grid,
  .group-create-form,
  .source-mini-card {
    grid-template-columns: 1fr;
  }

  .source-search,
  .source-sort-button,
  .source-page-size {
    width: 100%;
  }

  .source-group-filter,
  .group-move-select {
    width: 100%;
  }

  .modal-filter-input,
  .modal-filter-select {
    width: 100%;
  }

  .modal-full {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .subscription-preview-backdrop {
    touch-action: pan-y;
  }

  .subscription-preview-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    min-height: 0;
  }

  .subscription-preview-modal .section-head {
    flex: 0 0 auto;
  }

  .subscription-preview-top-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .subscription-domain-select-row {
    grid-template-columns: 1fr;
  }

  .subscription-domain-select-row .field-note {
    grid-column: auto;
  }

  .subscription-preview-modal .sub-link-list {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .subscription-preview-close {
    background: var(--accent);
    color: #fff;
  }

  .panel-table {
    min-width: 0;
    table-layout: auto;
    display: block;
    background: transparent;
  }

  .panel-table thead {
    display: none;
  }

  .panel-table tbody {
    display: grid;
    gap: 10px;
  }

  .panel-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgb(17 24 39 / 0.08);
  }

  .panel-table td {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .panel-table th:nth-child(1),
  .panel-table td:nth-child(1),
  .panel-table th:nth-child(2),
  .panel-table td:nth-child(2),
  .panel-table th:nth-child(8),
  .panel-table td:nth-child(8),
  .panel-table th:nth-child(9),
  .panel-table td:nth-child(9),
  .panel-table th:nth-child(11),
  .panel-table td:nth-child(11) {
    width: auto;
  }

  .panel-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
  }

  .panel-table td:nth-child(1),
  .panel-table td:nth-child(2),
  .panel-table td:nth-child(8),
  .panel-table td:nth-child(11) {
    grid-column: 1 / -1;
  }

  .panel-table td:nth-child(1)::before {
    content: "名称";
  }

  .panel-table td:nth-child(2)::before {
    content: "地址";
  }

  .panel-table td:nth-child(3)::before {
    content: "状态";
  }

  .panel-table td:nth-child(4)::before {
    content: "入站";
  }

  .panel-table td:nth-child(5)::before {
    content: "客户端";
  }

  .panel-table td:nth-child(6)::before {
    content: "间隔";
  }

  .panel-table td:nth-child(7)::before {
    content: "TLS";
  }

  .panel-table td:nth-child(8)::before {
    content: "API";
  }

  .panel-table td:nth-child(9)::before {
    content: "最近同步";
  }

  .panel-table td:nth-child(10)::before {
    content: "错误";
  }

  .panel-table td:nth-child(11)::before {
    content: "操作";
  }

  .panel-table .panel-url span,
  .panel-table .panel-api,
  .panel-table .wrap {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .panel-table .actions {
    width: 100%;
  }

  .panel-table .button {
    min-width: 0;
  }

  .xui-table-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .xui-table-panel .table-wrap {
    overflow: visible;
    border-radius: 0;
  }

  .xui-client-table {
    min-width: 0;
    display: block;
    background: transparent;
  }

  .xui-client-table thead {
    display: none;
  }

  .xui-client-table tbody {
    display: grid;
    gap: 10px;
  }

  .xui-client-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
    padding: 12px;
    border: 1px solid #3a414d;
    border-radius: 8px;
    background: #23272e;
    box-shadow: 0 10px 26px rgb(17 24 39 / 0.12);
  }

  .xui-client-table td {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .xui-client-table td::before {
    flex: 0 0 auto;
    color: #8f9bae;
    font-size: 12px;
    font-weight: 650;
  }

  .xui-client-table td:nth-child(1) {
    display: none;
  }

  .xui-client-table td:nth-child(2),
  .xui-client-table td:nth-child(5),
  .xui-client-table td:nth-child(7),
  .xui-client-table td:nth-child(11) {
    grid-column: 1 / -1;
  }

  .xui-client-table td:nth-child(5) {
    order: 1;
    display: block;
    padding-bottom: 2px;
  }

  .xui-client-table td:nth-child(2) {
    order: 2;
  }

  .xui-client-table td:nth-child(3) {
    order: 3;
  }

  .xui-client-table td:nth-child(4) {
    order: 4;
  }

  .xui-client-table td:nth-child(6) {
    order: 5;
  }

  .xui-client-table td:nth-child(7) {
    order: 6;
    display: grid;
    gap: 6px;
  }

  .xui-client-table td:nth-child(8) {
    order: 7;
  }

  .xui-client-table td:nth-child(9) {
    order: 8;
  }

  .xui-client-table td:nth-child(10) {
    order: 9;
  }

  .xui-client-table td:nth-child(11) {
    order: 10;
    display: grid;
    gap: 5px;
  }

  .xui-client-table td:nth-child(2)::before {
    content: "操作";
  }

  .xui-client-table td:nth-child(3)::before {
    content: "启用";
  }

  .xui-client-table td:nth-child(4)::before {
    content: "在线";
  }

  .xui-client-table td:nth-child(6)::before {
    content: "关联入站";
  }

  .xui-client-table td:nth-child(7)::before {
    content: "流量";
  }

  .xui-client-table td:nth-child(8)::before {
    content: "剩余";
  }

  .xui-client-table td:nth-child(9)::before {
    content: "时长";
  }

  .xui-client-table td:nth-child(10)::before {
    content: "IP";
  }

  .xui-client-table td:nth-child(11)::before {
    content: "同步/拉取";
  }

  .xui-client-table .xui-actions {
    width: 100%;
  }

  .xui-client-table .xui-actions button {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #4b5566;
    border-radius: 6px;
    background: #2f3540;
  }

  .xui-client-table .xui-traffic {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .xui-client-table .xui-meter {
    width: 100%;
  }

  .xui-client-table .op-times {
    min-width: 0;
  }

  .xui-inbound-table {
    min-width: 0;
    display: block;
    background: transparent;
  }

  .xui-inbound-table thead {
    display: none;
  }

  .xui-inbound-table tbody {
    display: grid;
    gap: 10px;
  }

  .xui-inbound-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
    padding: 12px;
    border: 1px solid #3a414d;
    border-radius: 8px;
    background: #23272e;
    box-shadow: 0 10px 26px rgb(17 24 39 / 0.12);
  }

  .xui-inbound-table td {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .xui-inbound-table td::before {
    flex: 0 0 auto;
    color: #8f9bae;
    font-size: 12px;
    font-weight: 650;
  }

  .xui-inbound-table td:nth-child(1) {
    display: none;
  }

  .xui-inbound-table td:nth-child(2),
  .xui-inbound-table td:nth-child(5),
  .xui-inbound-table td:nth-child(10),
  .xui-inbound-table td:nth-child(11) {
    grid-column: 1 / -1;
  }

  .xui-inbound-table td:nth-child(5) {
    order: 1;
    display: block;
    padding-bottom: 2px;
  }

  .xui-inbound-table td:nth-child(2) {
    order: 2;
  }

  .xui-inbound-table td:nth-child(3) {
    order: 3;
  }

  .xui-inbound-table td:nth-child(4) {
    order: 4;
  }

  .xui-inbound-table td:nth-child(6) {
    order: 5;
  }

  .xui-inbound-table td:nth-child(7) {
    order: 6;
  }

  .xui-inbound-table td:nth-child(8) {
    order: 7;
  }

  .xui-inbound-table td:nth-child(9) {
    order: 8;
  }

  .xui-inbound-table td:nth-child(10) {
    order: 9;
    display: grid;
    gap: 5px;
  }

  .xui-inbound-table td:nth-child(11) {
    order: 10;
  }

  .xui-inbound-table td:nth-child(2)::before {
    content: "ID";
  }

  .xui-inbound-table td:nth-child(3)::before {
    content: "菜单";
  }

  .xui-inbound-table td:nth-child(4)::before {
    content: "启用";
  }

  .xui-inbound-table td:nth-child(6)::before {
    content: "订阅排序";
  }

  .xui-inbound-table td:nth-child(7)::before {
    content: "端口";
  }

  .xui-inbound-table td:nth-child(8)::before {
    content: "协议";
  }

  .xui-inbound-table td:nth-child(9)::before {
    content: "客户端";
  }

  .xui-inbound-table td:nth-child(10)::before {
    content: "分享地址";
  }

  .xui-inbound-table td:nth-child(11)::before {
    content: "同步时间";
  }

  .xui-inbound-table .xui-actions {
    width: 100%;
  }

  .xui-inbound-table .xui-actions button {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #4b5566;
    border-radius: 6px;
    background: #2f3540;
  }

  .xui-inbound-table .xui-tags {
    justify-content: flex-end;
  }

  .xui-inbound-table .hint {
    overflow-wrap: anywhere;
  }

  .modal.xui-client-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .xui-client-modal-head {
    min-height: auto;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
    flex-wrap: wrap;
  }

  .xui-client-stable-identity {
    order: 3;
    width: 100%;
    max-width: none;
    margin-left: 0;
    text-align: left;
  }

  .xui-tabs {
    gap: 18px;
    overflow-x: auto;
    padding: 0 14px;
  }

  .xui-client-pane {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .xui-client-footer {
    padding: 12px 14px 14px;
    flex-direction: column-reverse;
  }

  .xui-client-footer .button {
    width: 100%;
  }

  .xui-inbound-share-list {
    padding: 10px;
  }

  .xui-inbound-share-row {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
