/* ============================================================
   XUI Admin - 骞磋交鎷熸€佸寲椋庢牸 (Neumorphism)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* ---- 涓昏壊绯?---- */
  --primary:       #6C63FF;
  --primary-light: #8B85FF;
  --primary-dark:  #5A52D5;
  --accent:        #00D9FF;
  --accent-soft:   rgba(0, 217, 255, 0.15);

  /* ---- 鐘舵€佽壊 ---- */
  --success:    #2ECC71;
  --success-bg: rgba(46, 204, 113, 0.12);
  --danger:     #FF6B6B;
  --danger-bg:  rgba(255, 107, 107, 0.12);
  --warning:    #FFD93D;
  --warning-bg: rgba(255, 217, 61, 0.12);

  /* ---- 鎷熸€佸簳鑹?---- */
  --bg:          #FFFFFF;  /* 绾櫧 */
  --bg-deep:     #FFFFFF;
  --surface:     #FFFFFF;
  --surface-alt: #FFFFFF;

  /* ---- 鎶曞奖 ---- */
  --shadow-light: #ffffff;
  --shadow-dark:  rgba(200, 200, 200, 0.7);

  /* ---- 鏂囧瓧 ---- */
  --text:       #4A4458;
  --text-muted: #8E87A8;
  --text-soft:  #B3AECF;

  /* ---- 鍦嗚 & 闂磋窛 ---- */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-pill: 999px;

  /* ---- 渚ц竟鏍?---- */
  --sidebar-w: 272px;
}


/* ---- 鍩虹閲嶇疆 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: auto; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---- 婊氬姩鏉＄編鍖?---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--shadow-dark); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   鏁翠綋甯冨眬
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- 渚ц竟鏍?---- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  box-shadow:
    6px 0 20px var(--shadow-dark),
    inset -1px 0 0 rgba(255,255,255,0.6);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  overflow: hidden;
}

body.user-shell:not(.has-cloud-view) .sidebar {
  display: none;
}

/* Cloud standalone login: keep the brand text readable on the light card. */
body.login-page .login-card .auth-brand h1 {
  color: #172033 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.login-page .login-card .auth-brand p {
  color: #667085 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.login-page .login-card .auth-brand {
  color: #172033 !important;
}

body.user-shell:not(.has-cloud-view) .content {
  margin-left: 0;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(163, 152, 200, 0.18);
}

.brand-badge {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(108, 99, 255, 0.4);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
  position: relative;
  overflow: hidden;
}

.nav a::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--primary);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transition: height 0.2s ease;
}

.nav a:hover {
  background: rgba(108, 99, 255, 0.07);
  color: var(--primary);
}

.nav a.active {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.14), rgba(0, 217, 255, 0.08));
  color: var(--primary);
  font-weight: 600;
  box-shadow:
    4px 4px 10px var(--shadow-dark),
    -2px -2px 8px var(--shadow-light);
}

.nav a.active::before {
  height: 60%;
}

.nav-cloud-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: var(--radius-md);
}

.nav-cloud-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.nav-cloud-toggle:hover,
.nav-cloud-toggle.active {
  background: rgba(108, 99, 255, 0.07);
  color: var(--primary);
}

.nav-cloud-toggle.active {
  font-weight: 600;
  box-shadow:
    3px 3px 9px rgba(214, 214, 224, 0.55),
    -2px -2px 7px rgba(255,255,255,0.72);
}

.nav-cloud-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.08);
  color: var(--primary);
  font-size: 13px;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.nav-cloud-group.is-open .nav-cloud-chevron {
  transform: rotate(0deg);
  background: rgba(108, 99, 255, 0.14);
}

.nav-cloud-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-cloud-panel > a {
  min-height: 0;
  overflow: hidden;
  margin-left: 10px;
  padding: 9px 12px 9px 18px;
  font-size: 13px;
  border-radius: 12px;
}

.nav-cloud-panel > a::before {
  width: 2px;
}

.nav-cloud-group.is-open .nav-cloud-panel {
  max-height: 220px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dashboard 42-style cards and external probe panel. */
body .dashboard-stats.admin-dashboard-stats,
body .dashboard-stats.user-dashboard-stats {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}

body .dashboard-stats .stat-card {
  min-height: 96px !important;
  padding: 18px 22px !important;
  border-radius: 16px !important;
  background: #fff !important;
  border: 1px solid #e7ecf5 !important;
  box-shadow: 0 14px 32px rgba(32, 38, 60, .10) !important;
  text-align: left !important;
  transition: transform .16s ease, box-shadow .16s ease !important;
}

body .dashboard-stats .stat-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 22px 40px rgba(35, 41, 55, .14) !important;
}

body .dashboard-stats .stat-card::before {
  width: 5px !important;
  border-radius: 16px 0 0 16px !important;
}

body .dashboard-stats .stat-card span {
  display: block !important;
  margin-bottom: 10px !important;
  color: #7d8398 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

body .dashboard-stats .stat-card strong {
  font-size: 30px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

body .dashboard-stats .stat-server::before { background: #2f6bff !important; }
body .dashboard-stats .stat-node::before { background: #6f5dff !important; }
body .dashboard-stats .stat-inbound::before { background: #18bfff !important; }
body .dashboard-stats .stat-user::before { background: #20ba69 !important; }
body .dashboard-stats .stat-online::before { background: #20ba69 !important; }
body .dashboard-stats .stat-expiring::before,
body .dashboard-stats .stat-expired::before { background: #ff5b6b !important; }

body .probe-panel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

body .probe-panel-header h3 {
  margin-bottom: 4px !important;
}

body .probe-source-status {
  margin: 0 !important;
  color: #8b8fa3 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body .probe-source-status.ok { color: #20ba69 !important; }
body .probe-source-status.warn { color: #f34f63 !important; }

body .probe-config-panel {
  margin: 0 0 14px !important;
  padding: 14px !important;
  border-radius: 14px !important;
  background: #f8faff !important;
  border: 1px solid #e7ecf5 !important;
}

body .probe-config-form {
  display: grid !important;
  grid-template-columns: 160px 150px minmax(280px, 1fr) 220px 90px auto !important;
  gap: 10px !important;
  align-items: end !important;
}

body .probe-config-form label {
  display: grid !important;
  gap: 6px !important;
  margin: 0 !important;
  color: #7d8398 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body .probe-enabled-field {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 38px !important;
}

body .probe-source-list {
  display: grid !important;
  gap: 8px !important;
  margin-top: 12px !important;
}

body .probe-source-item {
  display: grid !important;
  grid-template-columns: 1fr 120px 160px auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 10px !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1px solid #eef1f7 !important;
}

body .probe-source-item em.ok { color: #20ba69 !important; }
body .probe-source-item em.warn { color: #f34f63 !important; }

body .qingshe-meter.warn i {
  background: linear-gradient(90deg, #ffb020, #ffd166) !important;
}

body .qingshe-meter.danger i {
  background: linear-gradient(90deg, #ff5b6b, #ff8c98) !important;
}

@media (max-width: 900px) {
  body .probe-config-form,
  body .probe-source-item {
    grid-template-columns: 1fr !important;
  }
}

.nav a > .bi,
.nav-cloud-toggle > .bi,
.nav-cloud-panel > a > .bi {
  width: 20px;
  min-width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9fb0ce;
  font-size: 18px;
  line-height: 1;
  transition: color 0.14s ease, transform 0.14s ease;
}

.nav-cloud-toggle > span:not(.nav-cloud-chevron) {
  flex: 1;
  text-align: left;
}

.nav a:hover > .bi,
.nav a.active > .bi,
.nav-cloud-toggle:hover > .bi,
.nav-cloud-toggle.active > .bi,
.nav-cloud-panel > a:hover > .bi,
.nav-cloud-panel > a.active > .bi {
  color: #6c8cff;
  transform: translateY(-1px);
}

/* ---- 涓诲唴瀹瑰尯 ---- */
.content {
  margin-left: var(--sidebar-w);
  flex: 0 0 auto;
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
  padding: 32px 36px;
  min-height: 100vh;
}

/* ---- 椤舵爮 ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.topbar h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.topbar p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   鍗＄墖 / 闈㈡澘
   ============================================================ */
.panel,
.stat-card,
.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow:
    6px 6px 16px var(--shadow-dark),
    -4px -4px 12px var(--shadow-light);
  border: 1px solid rgba(163, 152, 200, 0.1);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* ---- 缁熻鍗＄墖 ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px 22px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    8px 8px 20px var(--shadow-dark),
    -4px -4px 12px var(--shadow-light);
}

.stat-card span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.stat-card strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-card.warn strong { color: var(--danger); }
.stat-card.compact strong { font-size: 26px; }

.dashboard-stats .stat-card {
  text-align: left;
  border-left: 5px solid var(--primary);
}

.dashboard-stats .stat-card span {
  margin-bottom: 10px;
}

.stat-server { border-left-color: #2563eb; }
.stat-server strong { color: #2563eb; }
.stat-node { border-left-color: #7c3aed; }
.stat-node strong { color: #7c3aed; }
.stat-inbound { border-left-color: #0891b2; }
.stat-inbound strong { color: #0891b2; }
.stat-user { border-left-color: #16a34a; }
.stat-user strong { color: #16a34a; }
.stat-online { border-left-color: #059669; }
.stat-online strong { color: #059669; }
.stat-expiring { border-left-color: #dc2626; }
.stat-expiring strong { color: #dc2626; }
.stat-expired { border-left-color: #991b1b; }
.stat-expired strong { color: #991b1b; }

.dashboard-stats .stat-card a {
  display: block;
  color: inherit;
}

.admin-dashboard-stats {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.admin-dashboard-stats .stat-card {
  min-width: 0;
  padding: 16px 14px;
  border-left-width: 4px;
}

.admin-dashboard-stats .stat-card span {
  font-size: 11px;
  margin-bottom: 8px;
  white-space: nowrap;
}

.admin-dashboard-stats .stat-card strong {
  font-size: 28px;
}

.admin-dashboard-stats .stat-expiring-action {
  min-height: 90px;
}

.admin-dashboard-stats .stat-copy-btn {
  right: 10px;
  bottom: 8px;
  min-width: 46px;
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

@media (max-width: 1280px) {
  .admin-dashboard-stats {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
  }
}

.stat-expiring-action {
  position: relative;
  min-height: 98px;
}

.stat-expiring-action a {
  display: block;
  color: inherit;
}

.stat-copy-btn {
  position: absolute;
  right: 12px;
  bottom: 10px;
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stat-copy-btn:hover {
  background: rgba(220, 38, 38, 0.16);
}

.copy-source-textarea {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stats-grid.user-dashboard-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.user-dashboard-stats .stat-card {
  min-height: 112px;
  padding: 24px 28px;
  border-left: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  color: #fff;
  box-shadow: 0 12px 26px rgba(74, 68, 88, 0.14);
}

.user-dashboard-stats .stat-card span {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.user-dashboard-stats .stat-card strong {
  margin-left: 16px;
  color: #fff;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
}

.user-dashboard-stats .stat-card a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
}

.user-dashboard-stats .stat-node {
  background: linear-gradient(135deg, #3762e8, #6f8cff);
}

.user-dashboard-stats .stat-online {
  background: linear-gradient(135deg, #0f9f6e, #35c98f);
}

.user-dashboard-stats .stat-expiring {
  background: linear-gradient(135deg, #e06b19, #ffad42);
}

.user-dashboard-stats .stat-expired {
  background: linear-gradient(135deg, #c5305f, #f15b7f);
}

.user-dashboard-stats .stat-expiring-action {
  min-height: 112px;
}

.user-dashboard-stats .stat-expiring-action a {
  padding-bottom: 26px;
}

.user-dashboard-stats .stat-expiring-action .stat-copy-btn {
  position: absolute;
  z-index: 50;
  left: auto;
  right: 18px;
  bottom: 16px;
  height: 30px;
  min-width: 64px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  color: #fff;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 8px 18px rgba(36, 28, 60, 0.18);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.user-dashboard-stats .stat-expiring-action .stat-copy-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.18));
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .stats-grid.user-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-dashboard-stats .stat-card {
    min-height: 96px;
    padding: 20px;
  }

  .user-dashboard-stats .stat-card span {
    font-size: 16px;
  }

  .user-dashboard-stats .stat-card strong {
    font-size: 36px;
  }
}

.inline-notice {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
}

.inbound-table tr.expiring-row {
  background: rgba(220, 38, 38, 0.045);
}

.server-probe-panel {
  padding: 18px;
}

.probe-panel-header {
  align-items: center;
  gap: 12px;
}

.probe-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  margin-left: auto;
  min-width: 0;
}

.probe-pagination-bar .toolbar-field.small {
  flex: 0 0 92px;
  min-width: 92px;
}

.probe-pagination-bar select {
  height: 30px;
  min-height: 30px;
  padding: 4px 28px 4px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.probe-pagination-bar .toolbar-pagination {
  margin-left: 0;
  flex: 0 0 auto;
}

.qingshe-probe-wrap {
  overflow-x: auto;
}

.qingshe-probe-table {
  min-width: 1240px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.qingshe-probe-table th,
.qingshe-probe-table td {
  padding: 14px 16px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(163, 152, 200, 0.1);
  color: #3f3d49;
}

.qingshe-probe-table th {
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #4a4458;
}

.qingshe-probe-table th:nth-child(1)::before { content: "馃弳 "; }
.qingshe-probe-table th:nth-child(2)::before { content: "馃搶 "; }
.qingshe-probe-table th:nth-child(3)::before { content: "馃洶锔?"; }
.qingshe-probe-table th:nth-child(4)::before { content: "馃捇 "; }
.qingshe-probe-table th:nth-child(5)::before { content: "馃寪 "; }
.qingshe-probe-table th:nth-child(6)::before { content: "鈴憋笍 "; }
.qingshe-probe-table th:nth-child(7)::before { content: "鈴?"; }
.qingshe-probe-table th:nth-child(8)::before { content: "馃殾 "; }
.qingshe-probe-table th:nth-child(9)::before { content: "鈻?"; }
.qingshe-probe-table th:nth-child(10)::before { content: "馃幆 "; }
.qingshe-probe-table th:nth-child(11)::before { content: "鈿?"; }
.qingshe-probe-table th:nth-child(12)::before { content: "鈻?"; }

.qingshe-probe-table th:nth-child(1),
.qingshe-probe-table td:nth-child(1) { width: 104px; }
.qingshe-probe-table th:nth-child(2),
.qingshe-probe-table td:nth-child(2) { width: 148px; }
.qingshe-probe-table th:nth-child(3),
.qingshe-probe-table td:nth-child(3) { width: 76px; }
.qingshe-probe-table th:nth-child(4),
.qingshe-probe-table td:nth-child(4) {
  width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qingshe-probe-table th:nth-child(5),
.qingshe-probe-table td:nth-child(5) { width: 96px; }
.qingshe-probe-table th:nth-child(6),
.qingshe-probe-table td:nth-child(6) { width: 72px; }
.qingshe-probe-table th:nth-child(7),
.qingshe-probe-table td:nth-child(7) { width: 76px; }
.qingshe-probe-table th:nth-child(8),
.qingshe-probe-table td:nth-child(8) { width: 120px; }
.qingshe-probe-table th:nth-child(9),
.qingshe-probe-table td:nth-child(9) { width: 132px; }
.qingshe-probe-table th:nth-child(10),
.qingshe-probe-table td:nth-child(10),
.qingshe-probe-table th:nth-child(11),
.qingshe-probe-table td:nth-child(11),
.qingshe-probe-table th:nth-child(12),
.qingshe-probe-table td:nth-child(12) {
  width: 94px;
}

.qingshe-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 32px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.qingshe-status.online {
  background: #19c85f;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12);
}

.qingshe-status.offline {
  background: #ff6b6b;
}

.qingshe-meter {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 72px;
  height: 30px;
  overflow: hidden;
  border-radius: 7px;
  background: #e6e6e6;
}

.qingshe-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #16c765, #1fce68);
}

.qingshe-meter b {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.28);
}

/* ---- 闈㈡澘缃戞牸 ---- */
.panel-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}
.panel-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.users-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.user-action-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.user-action-tabs .secondary-btn {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
}

.user-action-tabs .secondary-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow:
    4px 4px 10px rgba(108, 99, 255, 0.35),
    -2px -2px 6px var(--shadow-light);
}

.user-action-panel {
  display: none;
}

.user-action-panel.is-open {
  display: block;
}

.users-page .panel-grid {
  gap: 32px;
  margin-bottom: 0;
}

.users-page .panel {
  padding: 28px;
}

.users-page .panel-header {
  margin-bottom: 22px;
}

.users-page .form-grid {
  gap: 22px;
}

.user-edit-row {
  display: none;
}

.user-edit-row.is-open {
  display: table-row;
}

.user-edit-row td {
  background: rgba(108, 99, 255, 0.04);
  text-align: left;
}

.user-edit-form {
  align-items: end;
  margin: 4px 0;
}

.user-edit-form .form-submit-row {
  justify-content: flex-start;
  margin: 0;
}

/* ============================================================
   鎸夐挳
   ============================================================ */
button, .btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow:
    4px 4px 10px rgba(108, 99, 255, 0.35),
    -2px -2px 6px var(--shadow-light);
}
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    6px 6px 14px rgba(108, 99, 255, 0.45),
    -2px -2px 6px var(--shadow-light);
}
.primary-btn:active {
  transform: translateY(0);
  box-shadow:
    2px 2px 6px rgba(108, 99, 255, 0.3),
    -1px -1px 3px var(--shadow-light);
}

.secondary-btn, .action-link.secondary-btn {
  background: var(--surface);
  color: var(--primary);
  box-shadow:
    4px 4px 10px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
}
.secondary-btn:hover, .action-link.secondary-btn:hover {
  background: rgba(108, 99, 255, 0.1);
  transform: translateY(-1px);
  box-shadow:
    6px 6px 14px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
}

.danger-btn {
  background: var(--surface);
  color: var(--danger);
  box-shadow:
    4px 4px 10px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
}
.danger-btn:hover {
  background: var(--danger-bg);
  transform: translateY(-1px);
}

.ghost-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(163, 152, 200, 0.25);
}
.ghost-btn:hover {
  background: rgba(108, 99, 255, 0.07);
  color: var(--primary);
  border-color: rgba(108, 99, 255, 0.3);
}

.action-link {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  box-shadow:
    4px 4px 10px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
  transition: all 0.2s ease;
}
.action-link:hover {
  transform: translateY(-1px);
  background: rgba(108, 99, 255, 0.08);
}

/* ============================================================
   琛ㄥ崟
   ============================================================ */
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid rgba(163, 152, 200, 0.25);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow:
    3px 3px 8px var(--shadow-dark),
    -2px -2px 6px var(--shadow-light),
    0 0 0 3px rgba(108, 99, 255, 0.1);
}

input::placeholder, textarea::placeholder {
  color: var(--text-soft);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(163, 152, 200, 0.4);
  background: transparent;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--primary);
  transform: scale(1.08);
}

input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

input[type="checkbox"]:active {
  transform: scale(0.92);
}

textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid rgba(163, 152, 200, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid.single { max-width: 600px; }
.action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

/* ============================================================
   琛ㄦ牸
   ============================================================ */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow:
    6px 6px 16px var(--shadow-dark),
    -4px -4px 12px var(--shadow-light);
  overflow: hidden;
  border: 1px solid rgba(163, 152, 200, 0.08);
}

.table-control-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}

.table-control-bar .toolbar-field {
  min-width: 180px;
}

.table-control-bar .toolbar-field.grow {
  min-width: 260px;
}

.table-control-bar textarea {
  min-height: 44px;
  resize: vertical;
}

.table-export-btn {
  align-self: flex-end;
  white-space: nowrap;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.pagination-current {
  min-width: 48px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(214, 221, 240, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.pagination-actions .ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(163, 152, 200, 0.1);
  font-size: 13.5px;
  vertical-align: middle;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(244, 250, 253, 0.72);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.15s ease;
}
tbody tr:hover {
  background: rgba(0,0,0,0.02);
}

/* ---- 鐘舵€佹爣绛?---- */
.status {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.status.online {
  background: var(--success-bg);
  color: var(--success);
}
.status.offline {
  background: var(--danger-bg);
  color: var(--danger);
}
.status.unknown, .status.warning {
  background: var(--warning-bg);
  color: #C9A000;
}

/* ---- 琛ㄦ牸鎿嶄綔鎸夐挳 ---- */
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.table-actions form { margin: 0; }
.table-actions .primary-btn,
.table-actions .secondary-btn,
.table-actions .danger-btn,
.table-actions .ghost-btn,
.table-actions .action-link {
  padding: 6px 10px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
  flex: 1 1 calc(50% - 3px);
  text-align: center;
  justify-content: center;
}
.table-actions .ghost-btn {
  box-shadow: none;
  border: 1px solid rgba(163, 152, 200, 0.2);
}
.table-actions .ghost-btn:hover {
  border-color: var(--primary);
}

/* ============================================================
   宸ュ叿鏍?   ============================================================ */
.node-name-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0;
  text-align: left;
}
.node-name-btn:hover,
.node-name-btn.is-active {
  color: var(--primary);
}
.node-name-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.node-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  background: #f9f9f9;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.node-actions-first {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 0 0 auto;
}

.node-controls-last {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 260px;
}

.node-inbounds-panel {
  margin-top: 22px;
}
.node-inbounds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.node-inbounds-head h3 {
  font-size: 16px;
  color: var(--text);
}
.node-inbounds-head p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}
.node-inbounds-table-wrap {
  overflow-x: auto;
}
.nodes-table-wrap {
  overflow-x: auto;
}
.nodes-table {
  table-layout: fixed;
  min-width: 1100px;
}
.nodes-table th:nth-child(1), .nodes-table td:nth-child(1) { width: 42px; }
.nodes-table th:nth-child(2), .nodes-table td:nth-child(2) { width: 52px; }
.nodes-table th:nth-child(3), .nodes-table td:nth-child(3) { width: 150px; }
.nodes-table th:nth-child(4), .nodes-table td:nth-child(4) { width: 110px; }
.nodes-table th:nth-child(5), .nodes-table td:nth-child(5) { width: 190px; }
.nodes-table th:nth-child(6), .nodes-table td:nth-child(6) { width: 116px; }
.nodes-table th:nth-child(7), .nodes-table td:nth-child(7) { width: 82px; }
.nodes-table th:nth-child(8), .nodes-table td:nth-child(8) { width: 76px; }
.nodes-table th:nth-child(9), .nodes-table td:nth-child(9) { width: 136px; }
.nodes-table th:nth-child(10), .nodes-table td:nth-child(10) { width: 82px; }
.nodes-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nodes-table td a,
.nodes-table .node-name-btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.node-inbounds-table {
  min-width: 920px;
}
.inbound-table-wrap {
  overflow-x: auto;
}
.inbound-table {
  table-layout: fixed;
  min-width: 1040px;
}
.inbound-table th:nth-child(1), .inbound-table td:nth-child(1) { width: 42px; }
.inbound-table th:nth-child(2), .inbound-table td:nth-child(2) { width: 150px; }
.inbound-table th:nth-child(3), .inbound-table td:nth-child(3) { width: 60px; }
.inbound-table th:nth-child(4), .inbound-table td:nth-child(4) { width: 90px; }
.inbound-table th:nth-child(5), .inbound-table td:nth-child(5) { width: 150px; }
.inbound-table th:nth-child(6), .inbound-table td:nth-child(6) { width: 118px; }
.inbound-table th:nth-child(7), .inbound-table td:nth-child(7) { width: 76px; }
.inbound-table th:nth-child(8), .inbound-table td:nth-child(8) { width: 130px; }
.inbound-table th:nth-child(9), .inbound-table td:nth-child(9) { width: 120px; }
.inbound-table th:nth-child(10), .inbound-table td:nth-child(10) { width: 112px; }
.inbound-table th:nth-child(11), .inbound-table td:nth-child(11) { width: 78px; }
.inbound-table th,
.inbound-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  vertical-align: middle;
}
.inbound-table .cell-title,
.inbound-table .cell-sub {
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbound-ip-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  text-align: left;
}
.inbound-ip-text {
  min-width: 0;
}

.readonly-inbound-table {
  min-width: 1120px;
  table-layout: fixed;
}

.readonly-inbound-table th:nth-child(1),
.readonly-inbound-table td:nth-child(1) {
  width: 240px;
  text-align: left;
  overflow: visible;
  text-overflow: clip;
}

.readonly-inbound-table th:nth-child(2),
.readonly-inbound-table td:nth-child(2) {
  width: 170px;
  text-align: center;
}

.readonly-inbound-table th:nth-child(3),
.readonly-inbound-table td:nth-child(3) {
  width: 110px;
  text-align: center;
}

.readonly-inbound-table th:nth-child(4),
.readonly-inbound-table td:nth-child(4) {
  width: 170px;
  text-align: center;
}

.readonly-inbound-table th:nth-child(5),
.readonly-inbound-table td:nth-child(5) {
  width: 170px;
  text-align: center;
}

.readonly-inbound-table th:nth-child(6),
.readonly-inbound-table td:nth-child(6) {
  width: 130px;
  text-align: center;
}

.readonly-inbound-table th:nth-child(7),
.readonly-inbound-table td:nth-child(7) {
  width: 90px;
  text-align: center;
}

.readonly-inbound-table .inbound-ip-cell {
  justify-content: flex-start;
  width: 100%;
  min-width: 220px;
}

.readonly-inbound-table .inbound-ip-text {
  display: inline-block;
  min-width: max-content;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.readonly-inbound-table .protocol-badge {
  display: inline-flex;
  min-width: 86px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.inbound-enable-btn {
  flex: 0 0 auto;
  min-width: 44px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}
.inbound-enable-btn.enabled {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.32);
  color: #159947;
}
.inbound-enable-btn.disabled {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #cc3333;
}
.inbound-enable-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}
.batch-result-table {
  table-layout: fixed;
  min-width: 100%;
  width: 100%;
}
.batch-result-table th,
.batch-result-table td {
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-result-table th:nth-child(1), .batch-result-table td:nth-child(1) { width: 48px; }
.batch-result-table th:nth-child(2), .batch-result-table td:nth-child(2) { width: 210px; }
.batch-result-table th:nth-child(3), .batch-result-table td:nth-child(3) { width: 110px; }
.batch-result-table th:nth-child(4), .batch-result-table td:nth-child(4) { width: 130px; }
.batch-result-table th:nth-child(5), .batch-result-table td:nth-child(5) { width: 130px; }
.batch-result-table th:nth-child(6), .batch-result-table td:nth-child(6) { width: 140px; }
.batch-result-table th:nth-child(7), .batch-result-table td:nth-child(7) { width: 80px; }
.batch-result-table th:nth-child(8), .batch-result-table td:nth-child(8) { width: 160px; }
.batch-result-table th:nth-child(9), .batch-result-table td:nth-child(9) { width: 90px; }
.node-group-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  color: #1565c0;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node-group-form,
.node-group-list {
  display: grid;
  gap: 12px;
}
.node-group-list {
  margin-top: 16px;
}
.node-group-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.5fr) auto auto auto;
  gap: 10px;
  align-items: center;
}
.node-special-check {
  justify-content: flex-start;
  white-space: nowrap;
}
.node-group-badge.is-special {
  background: #fff4d8;
  color: #9a6700;
}
.node-selection-summary {
  color: var(--text);
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}
.nodes-table th,
.nodes-table td,
.node-inbounds-table th,
.node-inbounds-table td {
  white-space: nowrap;
}

.nodes-table th:first-child,
.nodes-table td:first-child,
.node-inbounds-table th:first-child,
.node-inbounds-table td:first-child,
.node-xui-table th:first-child,
.node-xui-table td:first-child,
.server-table th:first-child,
.server-table td:first-child,
.inbound-table th:first-child,
.inbound-table td:first-child {
  text-align: left;
}

.node-group-row > :first-child {
  text-align: left;
}

.node-group-row > :not(:first-child) {
  text-align: center;
}
.node-inbound-params {
  max-width: 360px;
  white-space: normal;
  word-break: break-all;
  color: var(--text-muted);
  font-size: 12px;
}

.node-detail-row > td {
  padding: 0;
  background: #f2fbff;
  white-space: normal;
}

.node-detail-card {
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(0, 217, 255, 0.16);
}

.node-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.node-detail-head strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.node-detail-head span {
  color: var(--text-muted);
  font-size: 12px;
}

.node-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cache-hint {
  color: var(--text-muted);
  font-size: 11px;
  background: #e8f4ff;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
}

.refresh-detail-btn {
  font-size: 12px;
  padding: 4px 10px;
}

.loading-hint {
  color: #f0ad4e;
  font-size: 12px;
  margin-left: 6px;
}

.loading-text {
  color: #666;
  font-size: 13px;
}

.node-detail-empty {
  padding: 22px;
  text-align: center;
  color: var(--text-muted);
  background: #fff;
  border-radius: var(--radius-md);
}

.node-detail-empty.error-text {
  color: var(--danger);
  background: var(--danger-bg);
}

.node-xui-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(163, 152, 200, 0.1);
}

.node-xui-table {
  table-layout: fixed;
  min-width: 1180px;
  width: 100%;
  border-collapse: collapse;
}

.node-xui-table th,
.node-xui-table td {
  padding: 12px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  vertical-align: middle;
}

.node-xui-table th:nth-child(1), .node-xui-table td:nth-child(1) { width: 88px; }
.node-xui-table th:nth-child(2), .node-xui-table td:nth-child(2) { width: 72px; }
.node-xui-table th:nth-child(3), .node-xui-table td:nth-child(3) { width: 64px; }
.node-xui-table th:nth-child(4), .node-xui-table td:nth-child(4) { width: 170px; }
.node-xui-table th:nth-child(5), .node-xui-table td:nth-child(5) { width: 100px; }
.node-xui-table th:nth-child(6), .node-xui-table td:nth-child(6) { width: 90px; }
.node-xui-table th:nth-child(7), .node-xui-table td:nth-child(7) { width: 250px; }
.node-xui-table th:nth-child(8), .node-xui-table td:nth-child(8) { width: 82px; }
.node-xui-table th:nth-child(9), .node-xui-table td:nth-child(9) { width: 128px; }
.node-xui-table th:nth-child(10), .node-xui-table td:nth-child(10) { width: 136px; }

.node-xui-table th:first-child,
.node-xui-table td:first-child {
  text-align: left;
}

.node-xui-table .table-actions {
  justify-content: flex-start;
}

.node-xui-table .table-actions .ghost-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 54px;
  padding: 7px 10px;
}

.node-xui-table .node-toggle-btn,
.node-xui-table .node-view-btn {
  min-width: 54px;
  padding: 7px 10px;
}

.node-xui-table .ghost-btn,
.node-xui-table .node-protocol-badge,
.node-xui-table .node-traffic,
.node-xui-table .node-limit {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-xui-table .node-protocol-badge,
.node-xui-table .node-traffic,
.node-xui-table .node-limit {
  display: inline-flex;
  justify-content: center;
  vertical-align: middle;
}

.node-xui-table .node-traffic-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.node-xui-table .node-traffic-cell .node-limit {
  margin-left: 0;
}

.node-xui-table th {
  background: #fafafa;
  color: #30323a;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.node-xui-table tbody tr:nth-child(n+3) {
  background: #f1fbff;
}

.node-action-link,
.node-view-link {
  color: #1e90ff;
  font-weight: 500;
}

.node-switch {
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 18px;
  padding: 2px;
  border-radius: 999px;
  background: #d8dce4;
  vertical-align: middle;
}

.node-switch i {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.node-switch.is-on {
  background: #1890ff;
}

.node-switch.is-on i {
  transform: translateX(18px);
}

.node-protocol-badge,
.node-traffic,
.node-limit {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 18px;
}

.node-protocol-badge,
.node-traffic {
  color: #1890ff;
  background: #e6f7ff;
  border: 1px solid #91d5ff;
}

.node-limit {
  color: #52c41a;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  margin-left: 6px;
}

.node-import-form {
  display: grid;
  gap: 16px;
}

.node-import-form textarea {
  width: 100%;
  resize: vertical;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.server-filter-row,
.inbound-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: 12px;
  overflow-x: auto;
}

.filter-actions-left {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.filter-controls-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  flex: 1 1 360px;
  min-width: 0;
}

.toolbar-field {
  min-width: 180px;
}
.toolbar-field.grow { flex: 1 1 520px; }
.toolbar-field.small { min-width: 120px; }

.clearable-field {
  position: relative;
}

.clearable-field input,
.clearable-field textarea {
  padding-right: 38px;
}

.field-clear-btn {
  position: absolute;
  right: 14px;
  top: calc(50% + 12px);
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(80, 74, 118, 0.52);
  font-size: 18px;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, color 0.16s ease;
}

.clearable-field:hover .field-clear-btn,
.clearable-field:focus-within .field-clear-btn {
  opacity: 1;
  pointer-events: auto;
}

.field-clear-btn:hover {
  background: transparent;
  color: var(--primary);
}

.clearable-field textarea + .field-clear-btn {
  top: 40px;
  right: 18px;
  transform: none;
}

.toolbar-pagination {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  gap: 5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.toolbar-pagination .pagination-summary {
  display: none;
}

.toolbar-pagination .pagination-actions {
  gap: 4px;
}

.toolbar-pagination .ghost-btn {
  height: 30px;
  min-width: 56px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 10px;
}

.toolbar-pagination .pagination-current {
  min-width: 38px;
  font-size: 12px;
}

.page-bottom-right {
  justify-content: flex-end;
  margin-top: 12px;
  width: 100%;
}

.page-bottom-right .pagination-actions {
  justify-content: flex-end;
}

.server-filter-row .toolbar-field {
  gap: 0;
}

.server-filter-row .toolbar-field.grow {
  min-width: 280px;
}

.server-filter-row .toolbar-field.small {
  flex: 0 0 120px;
}

.server-filter-row input,
.server-filter-row select,
.server-filter-row textarea {
  height: 44px;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    inset 2px 2px 6px rgba(200, 200, 200, 0.35),
    inset -2px -2px 6px #fff;
}

.server-filter-row .server-search-field {
  flex: 1 1 640px;
  min-width: 360px;
}

.server-filter-row textarea#server-keyword-filter {
  min-height: 44px;
  max-height: 82px;
  line-height: 20px;
  padding-top: 10px;
  padding-bottom: 8px;
  resize: vertical;
  overflow-y: auto;
  white-space: pre-wrap;
}

.bulk-tip, .server-toolbar-tip {
  color: var(--text-muted);
  font-size: 12px;
  padding-bottom: 2px;
}

/* ============================================================
   鏈嶅姟鍣ㄩ〉闈笓鐢?   ============================================================ */
.server-shell,
.inbound-shell {
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
}

.server-stats-grid,
.inbound-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.management-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.management-stats-grid .stat-card {
  min-height: 112px;
  text-align: left;
}

.server-toolbar,
.inbound-toolbar {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 16px 18px 22px;
  box-shadow:
    6px 6px 16px var(--shadow-dark),
    -4px -4px 12px var(--shadow-light);
  border: 1px solid rgba(163, 152, 200, 0.08);
  display: flex;
  gap: 16px;
}

.server-toolbar {
  flex-direction: column;
}

.inbound-toolbar {
  flex-direction: row;
}

.toolbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-left h3 {
  margin: 0;
}

.inline-form {
  display: inline;
}

.server-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.server-install-panel {
  display: none;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid rgba(163, 152, 200, 0.15);
}
.server-install-panel.is-open {
  display: grid;
  gap: 16px;
}

.server-install-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.server-bulk-shell {
  display: grid;
  gap: 14px;
}

.bulk-server-config {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.bulk-server-config label {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 0;
}

.bulk-server-config label span {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(163, 152, 200, 0.28);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: rgba(247, 247, 252, 0.95);
  color: var(--text-muted);
  font-weight: 600;
}

.bulk-server-config input {
  height: 38px;
  border-radius: 0 8px 8px 0;
}

.server-editor,
.inbound-editor {
  scroll-margin-top: 24px;
}

.server-panels { align-items: start; }

.inbound-form-grid,
.server-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inbound-form-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(163, 152, 200, 0.15);
}

.proto-hint {
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid rgba(163, 152, 200, 0.12);
}

.form-submit-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label > span {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}

/* ============================================================
   鏈嶅姟鍣ㄨ〃鏍兼搷浣滃垪 - 鍨傜洿甯冨眬
   ============================================================ */
.server-table-wrap .server-table th,
.server-table-wrap .server-table td {
  white-space: normal;
  word-break: break-word;
  padding: 10px 8px;
  vertical-align: middle;
}

.server-table-wrap .server-table {
  table-layout: fixed;
  width: 100%;
}

.server-table-wrap .server-table th:nth-child(1),
.server-table-wrap .server-table td:nth-child(1) { width: 40px; text-align: center; }
.server-table-wrap .server-table th:nth-child(2),
.server-table-wrap .server-table td:nth-child(2) {
  width: 136px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-table-wrap .server-table th:nth-child(3),
.server-table-wrap .server-table td:nth-child(3) { width: 120px; text-align: center; }
.server-table-wrap .server-table th:nth-child(4),
.server-table-wrap .server-table td:nth-child(4) { width: 126px; text-align: center; }
.server-table-wrap .server-table th:nth-child(5),
.server-table-wrap .server-table td:nth-child(5) { width: 92px; text-align: center; }
.server-table-wrap .server-table th:nth-child(6),
.server-table-wrap .server-table td:nth-child(6) { width: 92px; text-align: center; }
.server-table-wrap .server-table th:nth-child(7),
.server-table-wrap .server-table td:nth-child(7) { width: 92px; text-align: center; }
.server-table-wrap .server-table th:nth-child(8),
.server-table-wrap .server-table td:nth-child(8) { width: 200px; text-align: center; }
.server-table-wrap .server-table th:nth-child(9),
.server-table-wrap .server-table td:nth-child(9) { width: 80px; text-align: center; }

.server-table .server-actions-vertical {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 80px;
}

.server-table .server-actions-vertical > * {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
  font-size: 11.5px;
}

/* ---- 鎸傝浇鑺傜偣鏍囩 ---- */
.mount-cell,
.install-status-cell {
  text-align: center;
}

.mount-cell .node-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 190px;
  color: #00d9ff;
  background: rgba(0, 217, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-weight: 700;
  white-space: nowrap;
  word-break: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mount-cell .node-link:hover {
  color: #00b8dd;
  background: rgba(0, 217, 255, 0.2);
}

.mini-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  vertical-align: middle;
}

/* ============================================================
   闃块噷浜戞湇鍔″櫒绠＄悊
   ============================================================ */
.aliyun-stats-grid {
  margin-bottom: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.huawei-stats-grid {
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.huawei-stats-grid .stat-card {
  min-width: 0;
  padding: 12px 12px;
  border-left-width: 4px;
}

.huawei-stats-grid .stat-card span {
  margin-bottom: 7px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.huawei-stats-grid .stat-card strong {
  font-size: 24px;
  line-height: 1;
}

.stat-card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.stat-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(45, 55, 88, 0.14);
}

.aliyun-filter-panel,
.aliyun-action-panel {
  margin-bottom: 18px;
}

.aliyun-region-filter-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin: 0 0 16px;
  padding: 9px 12px;
  overflow-x: auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(119, 151, 205, 0.18);
  box-shadow: 0 8px 22px rgba(45, 55, 88, 0.1);
}

.aliyun-region-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(119, 151, 205, 0.24);
  border-radius: 7px;
  background: #f8fbff;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.aliyun-region-filter-pill em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(65, 128, 255, 0.12);
  color: #2f76f6;
  font-style: normal;
  font-weight: 950;
}

.aliyun-region-filter-pill.active {
  border-color: #2f76f6;
  background: #2f76f6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 118, 246, 0.22);
}

.aliyun-region-filter-pill.active em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.aliyun-filter-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr) max-content;
  gap: 14px;
  align-items: end;
}

.aliyun-filter-grid .toolbar-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.aliyun-filter-grid .toolbar-field span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.aliyun-filter-grid textarea {
  width: 100%;
  min-height: 44px;
  max-height: 78px;
  resize: vertical;
}

.filter-clear-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.filter-clear-wrap textarea {
  padding-right: 34px;
}

.filter-clear-x {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(119, 151, 205, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #64748b;
  font-size: 14px;
  font-weight: 950;
  line-height: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 5px 14px rgba(45, 55, 88, 0.12);
  transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.filter-clear-wrap:hover .filter-clear-x,
.filter-clear-wrap:focus-within .filter-clear-x {
  opacity: 1;
  pointer-events: auto;
}

.filter-clear-x:hover {
  background: #f1f5f9;
  color: #1f2937;
}

.aliyun-search-btn {
  min-height: 44px;
}

.aliyun-purchase-panel {
  margin-bottom: 18px;
}

.aliyun-purchase-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.aliyun-plan-sync-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.aliyun-plan-sync-form select {
  height: 38px;
  min-width: 180px;
}

.aliyun-purchase-form {
  display: grid;
  gap: 10px;
}

.required-label::before {
  content: "*";
  color: #ef4444;
  margin-right: 5px;
  font-weight: 950;
}

.aliyun-choice-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.aliyun-choice-label {
  padding-top: 12px;
  color: var(--text);
  font-weight: 900;
}

.aliyun-choice-label::before {
  content: "*";
  margin-right: 8px;
  color: #ef4444;
}

.aliyun-image-options,
.aliyun-plan-options,
.aliyun-region-options {
  display: grid;
  gap: 10px;
}

.aliyun-image-options {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.aliyun-region-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.aliyun-plan-options {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.aliyun-image-option,
.aliyun-region-option,
.aliyun-plan-option {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(154, 160, 178, 0.36);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.aliyun-image-option:hover,
.aliyun-region-option:hover,
.aliyun-plan-option:hover {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 10px 22px rgba(74, 68, 88, 0.1);
}

.aliyun-image-option input,
.aliyun-region-option input,
.aliyun-plan-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aliyun-image-option:has(input:checked),
.aliyun-region-option:has(input:checked),
.aliyun-plan-option:has(input:checked) {
  border-color: #4f8cff;
  box-shadow: inset 0 0 0 1px #4f8cff, 0 10px 24px rgba(79, 140, 255, 0.16);
}

.aliyun-image-option span,
.aliyun-region-option span,
.aliyun-plan-name {
  color: var(--text);
  font-weight: 900;
}

.aliyun-image-option select {
  height: 42px;
  width: 100%;
  border-radius: 7px;
  font-size: 15px;
  line-height: 1.25;
}

.aliyun-region-option {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.aliyun-region-option span {
  font-size: 12px;
  font-weight: 850;
}

.aliyun-region-option em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.12);
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.aliyun-region-all {
  background: rgba(79, 140, 255, 0.08);
}

.aliyun-plan-option {
  min-height: 118px;
  align-content: start;
}

.aliyun-plan-price {
  justify-self: center;
  color: #ef4444;
  font-size: 18px;
  font-weight: 950;
}

.aliyun-plan-spec {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.aliyun-purchase-bottom {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) max-content minmax(320px, 1.4fr) minmax(180px, 1fr) max-content;
  align-items: end;
  gap: 10px;
  position: sticky;
  bottom: -22px;
  z-index: 3;
  margin: 0 -26px -22px;
  padding: 10px 26px 12px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(10px);
}

.aliyun-account-select {
  display: grid;
  gap: 6px;
}

.aliyun-order-price {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 850;
  white-space: nowrap;
}

.aliyun-order-price strong {
  color: var(--text);
}

.aliyun-count-control {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 850;
}

.aliyun-count-control > div {
  display: grid;
  grid-template-columns: 38px 72px 38px;
  height: 40px;
}

.aliyun-count-control button,
.aliyun-count-control input {
  border: 1px solid rgba(154, 160, 178, 0.45);
  background: #fff;
  text-align: center;
  font-weight: 900;
}

.aliyun-count-control button:first-child {
  border-radius: 8px 0 0 8px;
}

.aliyun-count-control button:last-child {
  border-radius: 0 8px 8px 0;
}

.aliyun-duration-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  color: var(--text);
  font-weight: 850;
}

.aliyun-duration-options > span {
  color: var(--text-muted);
}

.aliyun-duration-plain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.aliyun-buy-btn {
  min-height: 40px;
}

.aliyun-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.aliyun-actions .aliyun-toolbar-account {
  margin-left: auto;
}

.aliyun-actions .aliyun-sync-server-btn {
  margin-left: 0;
}

.huawei-actions {
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 14px !important;
}

.huawei-actions > button {
  flex: 0 0 auto !important;
}

.huawei-actions .cloud-toolbar-search {
  flex: 0 1 360px !important;
  min-width: 260px !important;
  margin-left: auto !important;
}

.huawei-actions .cloud-search-field {
  min-width: 180px !important;
}

.aliyun-toolbar-account {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.aliyun-toolbar-account span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
}

.aliyun-toolbar-account select {
  min-height: 38px;
  border-radius: 8px;
}

.aliyun-toolbar-balance,
.aliyun-sync-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  font-weight: 900;
  white-space: nowrap;
}

.aliyun-toolbar-balance strong,
.aliyun-sync-time strong {
  color: var(--text);
}

.green-btn {
  background: #eafff3;
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.24);
}

.green-btn:hover {
  background: #dcfce7;
}

.aliyun-table-wrap {
  overflow: auto;
}

.aliyun-table {
  width: 100%;
  min-width: 1540px;
  table-layout: fixed;
}

.aliyun-table th:first-child,
.aliyun-table td:first-child {
  width: 42px;
  text-align: center;
}

.aliyun-table th:nth-child(2),
.aliyun-table td:nth-child(2) { width: 170px; text-align: left; }
.aliyun-table th:nth-child(3),
.aliyun-table td:nth-child(3) { width: 130px; }
.aliyun-table th:nth-child(4),
.aliyun-table td:nth-child(4) { width: 180px; }
.aliyun-table th:nth-child(5),
.aliyun-table td:nth-child(5) { width: 110px; }
.aliyun-table th:nth-child(6),
.aliyun-table td:nth-child(6) { width: 300px; text-align: left; }
.aliyun-table th:nth-child(7),
.aliyun-table td:nth-child(7) { width: 95px; }
.aliyun-table th:nth-child(8),
.aliyun-table td:nth-child(8) { width: 120px; }
.aliyun-table th:nth-child(9),
.aliyun-table td:nth-child(9) { width: 130px; }
.aliyun-table th:nth-child(10),
.aliyun-table td:nth-child(10) { width: 180px; }
.aliyun-table th:nth-child(11),
.aliyun-table td:nth-child(11) { width: 110px; text-align: center; }

.aliyun-table .cell-title {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.huawei-table-wrap {
  overflow: auto;
}

.huawei-cloud-table {
  min-width: 1380px;
}

.huawei-cloud-table th:first-child,
.huawei-cloud-table td:first-child { width: 42px; text-align: center; }
.huawei-cloud-table th:nth-child(2),
.huawei-cloud-table td:nth-child(2) { width: 230px; text-align: left; }
.huawei-cloud-table th:nth-child(3),
.huawei-cloud-table td:nth-child(3) { width: 125px; }
.huawei-cloud-table th:nth-child(4),
.huawei-cloud-table td:nth-child(4) { width: 150px; }
.huawei-cloud-table th:nth-child(5),
.huawei-cloud-table td:nth-child(5) { width: 120px; }
.huawei-cloud-table th:nth-child(6),
.huawei-cloud-table td:nth-child(6) { width: 145px; text-align: left; }
.huawei-cloud-table th:nth-child(7),
.huawei-cloud-table td:nth-child(7) { width: 90px; text-align: center; }
.huawei-cloud-table th:nth-child(8),
.huawei-cloud-table td:nth-child(8) { width: 115px; text-align: center; }
.huawei-cloud-table th:nth-child(9),
.huawei-cloud-table td:nth-child(9) { width: 125px; text-align: center; }
.huawei-cloud-table th:nth-child(10),
.huawei-cloud-table td:nth-child(10) { width: 230px; text-align: left; }
.huawei-cloud-table th:nth-child(11),
.huawei-cloud-table td:nth-child(11) { width: 160px; }
.huawei-cloud-table th:nth-child(12),
.huawei-cloud-table td:nth-child(12) { width: 105px; text-align: center; }

.region-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(0, 217, 255, 0.12);
  color: #0284c7;
  font-size: 12px;
  font-weight: 850;
}

.cloud-bandwidth-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(232, 241, 255, 0.92));
  color: #635bff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 8px 18px rgba(99,102,241,0.08);
}

.cloud-bandwidth-icon {
  color: #635bff;
  font-size: 20px;
  line-height: 1;
}

.cloud-bandwidth-pill::before {
  content: "⚡";
  color: #635bff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.cloud-traffic-cell {
  width: 230px;
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
}

.cloud-traffic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #0f172a;
  line-height: 1.2;
}

.cloud-traffic-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 900;
}

.cloud-traffic-head span {
  flex: 0 0 auto;
  color: #8a91a8;
  font-size: 16px;
  font-weight: 900;
}

.cloud-traffic-bar {
  position: relative;
  height: 12px;
  margin: 7px 0 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f7;
}

.cloud-traffic-bar i {
  display: block;
  width: 0;
  min-width: 6px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45d29b, #36c690);
}

.cloud-traffic-sub {
  overflow: hidden;
  color: #9299b1;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aliyun-image-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.aliyun-os-dot {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.16), rgba(0, 217, 255, 0.18));
  color: var(--primary);
  font-weight: 900;
  font-size: 12px;
}

.mini-tag:hover {
  background: rgba(0, 217, 255, 0.25);
  transform: translateY(-1px);
}

/* ---- 鎺㈤拡杩涘害鏉℃牱寮?---- */
.probe-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 60px;
}

.probe-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.probe-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.probe-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.cpu-fill { background: var(--accent); }
.mem-fill { background: var(--success); }

.probe-simple {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- 琛屽唴灞曞紑鎿嶄綔闈㈡澘 ---- */
.expandable-panel {
  display: none;
  background: #FFFFFF;
  border: 1px solid #EBEBEB;
  border-radius: 10px;
  margin: 4px 0 8px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.expandable-panel.is-open { display: table-row; }
.expandable-panel td {
  padding: 0;
  border: none;
}
.expandable-panel .panel-inner {
  padding: 16px 20px;
}
.expandable-panel h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}
.expandable-panel .btn-row {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}
.expandable-panel .btn-row a,
.expandable-panel .btn-row button {
  font-size: 12.5px;
  padding: 7px 14px;
}

/* ---- 琛屽唴灞曞紑鎿嶄綔闈㈡澘鎸夐挳 ---- */
.expandable-panel .btn-row .ghost-btn,
.expandable-panel .btn-row .secondary-btn,
.expandable-panel .btn-row .action-link {
  background: #FFFFFF;
  color: #444;
  border: 1px solid #E0E0E0;
  box-shadow: none;
}
.expandable-panel .btn-row .ghost-btn:hover,
.expandable-panel .btn-row .secondary-btn:hover,
.expandable-panel .btn-row .action-link:hover {
  background: #F5F5F5;
  border-color: #CCC;
  transform: none;
}
.expandable-panel .btn-row .primary-btn {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(108,99,255,0.3);
}
.expandable-panel .btn-row .primary-btn:hover {
  background: var(--primary-dark);
  transform: none;
}
.expandable-panel .btn-row .danger-btn {
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
  box-shadow: none;
}
.expandable-panel .btn-row .danger-btn:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  transform: none;
}

/* 灞曞紑鎸夐挳 */
.expand-btn {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #FFFFFF;
  color: #666;
  border: 1px solid #E0E0E0;
}
.expand-btn:hover {
  background: #F5F5F5;
  border-color: #CCC;
}

/* ---- 瀹夎鐘舵€佸崟鍏冩牸 ---- */
.install-status-cell { text-align: center; }

/* ---- 瀹夎杩涘害鏃ュ織闈㈡澘 ---- */
.install-progress-panel {
  margin-top: 16px;
}

.install-progress-box {
  width: 100%;
  border-radius: 4px;
  background: #1f1f1f;
  color: #d4d4d4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.install-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 4px;
  border-bottom: 0;
}

.install-progress-head h3 {
  margin: 0;
  font-size: 14px;
  color: #569cd6;
  font-weight: 500;
}

.install-progress-head span {
  font-size: 12px;
  color: #9ca3af;
}

.install-progress-head button {
  background: rgba(255,255,255,0.08);
  color: #d4d4d4;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
  border-radius: 3px;
  padding: 3px 10px;
}

#install-progress-console {
  margin: 0;
  padding: 8px 14px 16px;
  min-height: 180px;
  max-height: 260px;
  overflow: auto;
  background: #1f1f1f;
  color: #569cd6;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ---- 鍗忚寰界珷 ---- */
.protocol-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stacked-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   鎻愮ず & 閫氱煡
   ============================================================ */
.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.flash {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
}

.flash.success {
  background: var(--success-bg);
  border-color: rgba(46, 204, 113, 0.25);
  color: #1A9E52;
}
.flash.error {
  background: var(--danger-bg);
  border-color: rgba(255, 107, 107, 0.25);
  color: #CC3333;
}
.flash.warning {
  background: var(--warning-bg);
  border-color: rgba(255, 217, 61, 0.3);
  color: #A08500;
}

/* ============================================================
   鏂板鏈嶅姟鍣ㄥ脊绐?   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 31, 55, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.modal-box {
  background: linear-gradient(145deg, rgba(255,255,255,0.82), rgba(244,250,253,0.66));
  border-radius: 22px;
  padding: 28px;
  width: min(560px, 90vw);
  box-shadow: 0 26px 70px rgba(39, 36, 72, 0.22), inset 0 1px 0 rgba(255,255,255,0.78);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-box-wide {
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.aliyun-buy-modal {
  width: min(1180px, 96vw);
  max-height: none;
  padding: 12px 22px 18px;
  overflow: visible;
  background: #fff;
}

.aliyun-buy-modal .modal-header {
  position: sticky;
  top: -12px;
  z-index: 4;
  margin: -12px -22px 6px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(10px);
  gap: 10px;
}

.aliyun-buy-modal .aliyun-purchase-head-actions {
  margin-bottom: 16px;
  justify-content: flex-end;
}

.aliyun-operation-modal {
  width: min(980px, 92vw);
  background: #fff;
}

.aliyun-operation-modal .form-grid {
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
}

.aliyun-operation-modal .form-grid label {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.aliyun-operation-modal .form-grid label > span {
  color: var(--text-muted);
  font-weight: 900;
}

.aliyun-operation-modal input,
.aliyun-operation-modal select,
.aliyun-operation-modal textarea {
  min-height: 46px;
  border-radius: 7px;
}

.aliyun-xui-modal {
  width: min(430px, 92vw);
}

.aliyun-xui-form {
  gap: 10px;
}

.aliyun-operation-modal .aliyun-xui-form label {
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 0;
}

.aliyun-operation-modal .aliyun-xui-form label > span {
  min-height: 44px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border: 1px solid #d7dde7;
  border-right: 0;
  border-radius: 7px 0 0 7px;
  color: #7b8494;
  font-size: 17px;
}

.aliyun-operation-modal .aliyun-xui-form input {
  border-radius: 0 7px 7px 0;
  font-size: 17px;
}

.aliyun-xui-hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.aliyun-xui-log-panel {
  grid-column: 1 / -1;
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.aliyun-xui-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
}

.aliyun-xui-log-head span {
  color: #93c5fd;
}

#aliyun-xui-log-console {
  min-height: 180px;
  max-height: 280px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #020617;
  color: #d1fae5;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.aliyun-reset-platform {
  display: grid;
  grid-template-columns: 170px repeat(3, max-content);
  align-items: center;
  gap: 18px;
  color: var(--text);
  font-weight: 900;
}

.aliyun-reset-platform span {
  color: var(--text-muted);
}

.aliyun-reset-platform label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 7px;
}

.aliyun-reset-system-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.aliyun-reset-system-section h4 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.aliyun-reset-system-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.aliyun-operation-modal .form-grid .aliyun-reset-system-option {
  grid-column: auto;
  grid-template-columns: 1fr;
  min-height: 76px;
  padding: 14px 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
}

.aliyun-reset-system-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aliyun-operation-modal .form-grid .aliyun-reset-system-option:has(input:checked) {
  border-color: #1d6cff;
  box-shadow: inset 0 0 0 1px #1d6cff;
}

.aliyun-confirm-modal {
  width: min(440px, 92vw);
}

.aliyun-confirm-text {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 0 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.aliyun-password-hint {
  margin: -8px 0 0 184px;
  color: #ef4444;
  font-weight: 900;
}

.aliyun-official-section {
  padding: 6px 0;
  border-top: 6px solid #f4f6f8;
}

.aliyun-official-section h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.aliyun-purchase-region-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.aliyun-region-section {
  padding-top: 8px;
  padding-bottom: 8px;
}

.aliyun-official-image-options {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.aliyun-official-image-options .aliyun-image-option {
  min-height: 100px;
}

.aliyun-region-groups {
  display: grid;
  gap: 10px;
}

.aliyun-region-group {
  display: grid;
  gap: 8px;
}

.aliyun-region-group > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.aliyun-official-region-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 6px;
}

.aliyun-official-region-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 2px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.aliyun-official-region-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aliyun-official-region-option:has(input:checked) {
  border-color: #1d6cff;
  background: #f2f6ff;
  box-shadow: inset 0 0 0 1px #1d6cff;
}

.aliyun-plan-toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.aliyun-plan-toolbar select {
  min-width: 240px;
  height: 42px;
  border-radius: 2px;
}

.aliyun-official-plan-options {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.aliyun-official-plan-card {
  min-height: 230px;
  padding: 12px 14px;
}

.aliyun-key-list {
  display: grid;
  gap: 10px;
}

.aliyun-account-modal-box {
  width: min(1120px, 94vw);
}

.aliyun-account-modal-box .table-wrap {
  max-height: 240px;
  overflow: auto;
  border-radius: 16px;
}

.aliyun-key-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.aliyun-key-import-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.aliyun-key-import-form input[type="file"] {
  max-width: 280px;
}

.aliyun-key-list h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.aliyun-key-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.aliyun-key-table th:nth-child(1),
.aliyun-key-table td:nth-child(1) { width: 140px; }
.aliyun-key-table th:nth-child(2),
.aliyun-key-table td:nth-child(2) { width: 240px; }
.aliyun-key-table th:nth-child(3),
.aliyun-key-table td:nth-child(3) { width: 300px; }
.aliyun-key-table th:nth-child(4),
.aliyun-key-table td:nth-child(4) { width: 100px; }
.aliyun-key-table th:nth-child(5),
.aliyun-key-table td:nth-child(5) { width: 160px; }
.aliyun-key-table th:nth-child(6),
.aliyun-key-table td:nth-child(6) { width: 100px; text-align: center; }
.aliyun-key-table th:nth-child(7),
.aliyun-key-table td:nth-child(7) { width: 90px; text-align: center; }
.aliyun-key-table th:nth-child(8),
.aliyun-key-table td:nth-child(8) { width: 90px; text-align: center; }

.aliyun-key-table th,
.aliyun-key-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aliyun-key-table th {
  color: var(--text-muted);
  font-weight: 950;
  background: #f8fafc;
}

.account-offline-tag {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #ef4444;
  font-size: 11px;
  font-weight: 900;
}

.small-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 12px;
}

.floating-submit-notice {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 9999;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.aliyun-account-form {
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.aliyun-official-plan-card {
  grid-template-columns: 1fr;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
}

.aliyun-official-plan-card:has(input:checked) {
  border-color: #1d6cff;
  background: #f4f7ff;
}

.aliyun-plan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.aliyun-plan-badges em {
  padding: 2px 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 3px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.aliyun-plan-badges .hot {
  border-color: rgba(249, 115, 22, 0.28);
  background: rgba(249, 115, 22, 0.08);
  color: #f97316;
}

.aliyun-plan-spec-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
  margin-top: 2px;
}

.aliyun-plan-spec-grid i {
  display: grid;
  gap: 2px;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.aliyun-plan-spec-grid b {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.huawei-flexus-region-section {
  padding-bottom: 8px;
}

.huawei-flexus-region-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 8px;
}

.huawei-flexus-region-option {
  position: relative;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f3f4f6;
  color: #5f6878;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.huawei-flexus-region-option input,
.huawei-flexus-plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.huawei-flexus-region-option:has(input:checked) {
  background: #1d75ff;
  color: #fff;
}

.huawei-flexus-subtitle {
  margin-left: 10px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.huawei-flexus-plan-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
}

.huawei-flexus-plan-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.huawei-flexus-plan-card:has(input:checked) {
  border-color: #247bff;
  box-shadow: inset 0 0 0 1px rgba(36, 123, 255, 0.45), 0 12px 26px rgba(36, 123, 255, 0.08);
}

.huawei-flexus-plan-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 950;
  color: #0f172a;
}

.huawei-flexus-plan-head em {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #1d75ff;
  color: #fff;
  font-style: normal;
  font-size: 17px;
}

.huawei-flexus-spec-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  color: #8a94a6;
  font-size: 13px;
  font-weight: 850;
}

.huawei-flexus-spec-row b {
  color: #111827;
  font-weight: 950;
}

.huawei-flexus-price {
  align-self: end;
  margin-top: 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.huawei-flexus-price i {
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.batch-modal-box {
  width: min(1080px, 96vw);
  max-height: 96vh;
  padding: 14px 18px;
  gap: 9px;
}

.batch-result-box {
  width: min(1280px, 96vw);
  max-height: 94vh;
}

.batch-result-box #batch-result-content {
  overflow: visible;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { margin: 0; }

.modal-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid rgba(163, 152, 200, 0.15);
  padding-bottom: 0;
}

.tab-btn {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 14px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(108, 99, 255, 0.08);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

.tab-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(163, 152, 200, 0.08);
}

.tab-content { display: flex; flex-direction: column; gap: 16px; }

.modal-form { display: flex; flex-direction: column; gap: 16px; }

.form-hint {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   鐧诲綍椤?   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: min(420px, 100%);
  padding: 40px 36px;
}

.login-card .brand {
  border: none;
  padding: 0 0 24px;
  justify-content: center;
}

.auth-brand { margin-bottom: 24px; }

.hint-box {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.8;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* ============================================================
   鍏朵粬
   ============================================================ */
.inline-form { display: flex; gap: 12px; }

.local-worker-token-panel {
  margin-bottom: 20px;
}

.muted-text {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.code-block,
.result-block {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(163, 152, 200, 0.18);
  border-radius: var(--radius-md);
  background: #F8F7FF;
  color: var(--text);
  font-family: Consolas, 'SFMono-Regular', monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block {
  padding: 14px;
}

.result-block {
  min-width: 240px;
  max-height: 160px;
  padding: 10px;
}

.local-worker-task-table {
  margin-top: 16px;
}

.relay-panel .panel-grid {
  margin-bottom: 0;
}

.relay-box {
  min-width: 0;
}

.relay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.relay-server-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.relay-server-delete-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.relay-server-delete-btn:hover {
  background: rgba(239, 68, 68, 0.14);
}

.relay-server-delete-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.relay-submit-notice {
  display: none;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.relay-submit-notice.active {
  display: block;
}

.relay-submit-btn.is-loading,
.relay-submit-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.relay-record-header {
  gap: 12px;
}

.relay-record-header .inline-form {
  margin-left: auto;
}

.relay-record-pagination .ghost-btn {
  min-width: 64px;
  height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.relay-record-table-wrap {
  border-radius: 22px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 18px 36px rgba(74, 68, 88, 0.12);
}

.relay-record-table {
  min-width: 1180px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.relay-record-table th,
.relay-record-table td {
  height: 72px;
  padding: 14px 18px;
  color: #5f5a72;
  vertical-align: middle;
}

.relay-record-table thead th {
  background: #f8fbfa;
  color: #8c86a5;
  font-size: 13px;
  font-weight: 800;
}

.relay-record-table tbody tr:nth-child(even) {
  background: #fbfdfc;
}

.relay-record-table tbody tr:hover {
  background: #f1fbf7;
}

.relay-record-table th:nth-child(1),
.relay-record-table td:nth-child(1) { width: 82px; }
.relay-record-table th:nth-child(2),
.relay-record-table td:nth-child(2) { width: 104px; }
.relay-record-table th:nth-child(3),
.relay-record-table td:nth-child(3) { width: 210px; }
.relay-record-table th:nth-child(4),
.relay-record-table td:nth-child(4) { width: 190px; }
.relay-record-table th:nth-child(5),
.relay-record-table td:nth-child(5) { width: 190px; }
.relay-record-table th:nth-child(6),
.relay-record-table td:nth-child(6) { width: 118px; }
.relay-record-table th:nth-child(7),
.relay-record-table td:nth-child(7) { width: 112px; }
.relay-record-table th:nth-child(8),
.relay-record-table td:nth-child(8) { width: 126px; }

.relay-record-table code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #6c63ff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-id {
  color: #8c86a5;
  font-weight: 800;
}

.chain-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.15fr) minmax(380px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.chain-source-panel textarea {
  width: 100%;
  min-height: 230px;
  height: 31vh;
  max-height: 360px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  overflow: auto;
}

.chain-server-panel {
  min-width: 0;
  overflow: visible;
}

.chain-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.chain-field-grid label {
  min-width: 0;
}

.chain-field-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.chain-field-grid [hidden],
.chain-password-row [hidden] {
  display: none !important;
}

.chain-actions-panel,
.chain-record-panel {
  grid-column: 1 / -1;
}

.chain-main-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  overflow: visible;
  padding-bottom: 2px;
}

.chain-server-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 235, 244, 0.9);
}

.chain-action-buttons,
.chain-renew-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
}

.chain-action-buttons {
  flex: 0 0 auto;
}

.chain-renew-actions {
  flex: 0 0 auto;
}

.chain-server-picker {
  flex: 0 1 420px;
  min-width: 280px;
  position: relative;
  z-index: 20;
}

.chain-server-input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(93, 77, 196, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-weight: 700;
  white-space: nowrap;
}

.chain-server-input:hover,
.chain-server-input:focus {
  outline: none;
  border-color: rgba(104, 82, 255, 0.72);
  box-shadow: 0 16px 34px rgba(93, 77, 196, 0.2), 0 0 0 3px rgba(104, 82, 255, 0.12);
}

.chain-server-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(32, 26, 79, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.chain-server-menu::-webkit-scrollbar {
  width: 8px;
}

.chain-server-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
}

.chain-server-menu::-webkit-scrollbar-thumb {
  background: rgba(104, 82, 255, 0.42);
  border-radius: 999px;
}

.chain-server-option {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 750;
  box-shadow: none;
}

.chain-server-option:hover,
.chain-server-option.active {
  background: rgba(104, 82, 255, 0.13);
  color: #4f46e5;
}

.chain-server-empty {
  padding: 10px;
  color: var(--muted);
  font-weight: 700;
}

.chain-record-panel .table-actions form:has(input[name="action"][value="check"]) {
  display: none;
}

.chain-record-panel .table-actions {
  display: grid;
  grid-template-columns: repeat(2, 72px);
  justify-content: end;
  align-items: center;
  gap: 8px;
  min-width: 152px;
}

.chain-record-panel .table-actions > .ghost-btn,
.chain-record-panel .table-actions > .inline-form,
.chain-record-panel .table-actions > .inline-form > button {
  width: 72px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 72px;
}

.chain-record-panel .table-actions > .ghost-btn,
.chain-record-panel .table-actions > .inline-form > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.chain-record-panel table {
  min-width: 920px;
}

.chain-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.chain-list-actions {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-left: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.chain-group-table-wrap {
  background: #fff;
  border: 1px solid rgba(232, 235, 244, 0.95);
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(74, 68, 88, 0.12);
  max-height: 680px;
  overflow-x: auto;
  overflow-y: auto;
}

.chain-group-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.chain-group-table thead {
  position: sticky;
  top: 0;
  z-index: 18;
}

.chain-group-table th,
.chain-group-table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  color: #5f5a72;
  border-bottom: 1px solid rgba(232, 235, 244, 0.85);
}

.chain-group-table thead th {
  height: 58px;
  background: #f7fbff;
  color: #8c86a5;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid rgba(232, 235, 244, 0.9);
}

.chain-record-panel > .panel-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 56px;
  padding: 10px 0 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.chain-group-table th:nth-child(1),
.chain-group-table td:nth-child(1) { width: 52px; }
.chain-group-table th:nth-child(2),
.chain-group-table td:nth-child(2) { width: 230px; text-align: left; }
.chain-group-table th:nth-child(3),
.chain-group-table td:nth-child(3) { width: 86px; }
.chain-group-table th:nth-child(4),
.chain-group-table td:nth-child(4) { width: 96px; }
.chain-group-table th:nth-child(5),
.chain-group-table td:nth-child(5) { width: 96px; }
.chain-group-table th:nth-child(6),
.chain-group-table td:nth-child(6) { width: 150px; }
.chain-group-table th:nth-child(7),
.chain-group-table td:nth-child(7) { width: 150px; }
.chain-group-table th:nth-child(8),
.chain-group-table td:nth-child(8) { width: 126px; }
.chain-group-table th:nth-child(9),
.chain-group-table td:nth-child(9) { width: 104px; }
.chain-group-table th:nth-child(10),
.chain-group-table td:nth-child(10) { width: 104px; }

.chain-server-row {
  height: 84px;
  background: #fff;
}

.chain-group-table-wrap.has-open-detail .chain-server-row.is-open {
  position: static;
  z-index: 17;
  background: #fff;
  box-shadow: 0 14px 26px rgba(74, 68, 88, 0.1);
}

.chain-group-table-wrap.has-open-detail .chain-server-row.is-open td {
  border-bottom-color: rgba(198, 227, 246, 0.95);
}

.chain-server-row:nth-of-type(4n + 1) {
  background: #fff;
}

.chain-server-row:hover {
  background: #fafcff;
}

.chain-server-title-cell {
  display: inline-grid;
  justify-items: start;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}

.chain-server-toggle {
  max-width: 100%;
  color: #5f63ff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.chain-server-toggle:hover,
.chain-server-toggle.is-active {
  color: #4f46e5;
}

.chain-server-meta,
.chain-detail-table .cell-sub {
  color: #9690af;
  font-weight: 700;
}

.chain-count,
.chain-metric {
  color: #5f6174;
  font-weight: 800;
}

.chain-server-detail-row > td {
  padding: 0 18px 18px;
  background: #eef9ff;
  white-space: normal;
}

.chain-detail-card {
  padding: 16px 20px 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(660px, calc(100vh - 300px));
  background: #eef9ff;
  border: 1px solid rgba(173, 223, 248, 0.8);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow:
    0 20px 42px rgba(60, 86, 116, 0.16),
    0 6px 14px rgba(60, 86, 116, 0.08);
}

.chain-detail-card .node-xui-table-wrap {
  flex: 1 1 auto;
  min-height: 240px;
  max-height: min(500px, calc(100vh - 410px));
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid rgba(163, 152, 200, 0.14);
  border-radius: 16px;
  box-shadow:
    0 16px 34px rgba(74, 68, 88, 0.12),
    0 4px 10px rgba(74, 68, 88, 0.06);
}

.chain-detail-head {
  margin: -16px -20px 16px;
  padding: 10px 20px 12px;
  background: #dff3ff;
  border-bottom: 1px solid rgba(154, 215, 245, 0.78);
  border-radius: 0;
}

.chain-detail-head strong {
  font-size: 15px;
}

.chain-detail-head span {
  color: var(--text-muted);
  font-size: 12px;
}

.chain-detail-head-actions {
  flex: 0 0 auto;
  order: 1;
}

.chain-detail-head-actions .ghost-btn {
  min-height: 34px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: #6c63ff;
  font-weight: 850;
}

.chain-detail-title {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.chain-detail-title strong,
.chain-detail-title span {
  display: block;
}

.chain-detail-title .cache-hint {
  display: inline-flex;
  margin-top: 5px;
  margin-left: 0;
}

.chain-detail-actions,
.chain-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.chain-row-actions > button,
.chain-detail-actions > button,
.chain-list-actions > button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 850;
  flex: 0 0 auto;
}

.chain-list-actions > button {
  height: 34px;
  box-shadow: 0 10px 22px rgba(76, 67, 132, 0.12);
}

.chain-list-actions > input {
  flex: 0 0 auto;
}

.chain-detail-table {
  min-width: 1320px;
}

.chain-record-panel .table-pagination,
.chain-detail-pagination {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 2px 0;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chain-page-size-control {
  margin: 0;
}

.page-size-control select {
  width: auto;
  min-width: 76px;
  height: 30px;
  padding: 0 26px 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(163, 152, 200, 0.22);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}

.chain-record-panel .toolbar-pagination .pagination-actions,
.chain-detail-pagination .pagination-actions {
  gap: 8px;
  margin-left: auto;
}

.chain-record-panel .toolbar-pagination .ghost-btn,
.chain-detail-pagination .ghost-btn {
  height: 30px;
  min-width: 56px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.chain-record-panel .toolbar-pagination .ghost-btn[disabled],
.chain-detail-pagination .ghost-btn[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.chain-detail-table th,
.chain-detail-table td {
  border-bottom-color: rgba(163, 152, 200, 0.1);
}

.chain-detail-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #eef4fb;
}

.chain-detail-table thead th:first-child {
  border-top-left-radius: 14px;
}

.chain-detail-table thead th:last-child {
  border-top-right-radius: 14px;
}

.chain-detail-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}

.chain-detail-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

.chain-detail-table tbody tr,
.chain-detail-table tbody tr:nth-child(n+3),
.chain-detail-table tbody tr:nth-child(even),
.chain-detail-table tbody tr:hover {
  background: #fff;
}

.chain-detail-table th:nth-child(1),
.chain-detail-table td:nth-child(1) { width: 46px; }
.chain-detail-table th:nth-child(2),
.chain-detail-table td:nth-child(2) { width: 160px; text-align: left; }
.chain-detail-table th:nth-child(3),
.chain-detail-table td:nth-child(3) { width: 110px; }
.chain-detail-table th:nth-child(4),
.chain-detail-table td:nth-child(4) { width: 160px; }
.chain-detail-table th:nth-child(5),
.chain-detail-table td:nth-child(5) { width: 150px; }
.chain-detail-table th:nth-child(6),
.chain-detail-table td:nth-child(6) { width: 132px; }
.chain-detail-table th:nth-child(7),
.chain-detail-table td:nth-child(7) { width: 112px; }
.chain-detail-table th:nth-child(8),
.chain-detail-table td:nth-child(8) { width: 92px; }
.chain-detail-table th:nth-child(9),
.chain-detail-table td:nth-child(9) { width: 112px; }
.chain-detail-table th:nth-child(10),
.chain-detail-table td:nth-child(10) { width: 92px; }
.chain-detail-table th:nth-child(11),
.chain-detail-table td:nth-child(11) { width: 96px; }

.chain-field-grid .clearable-field {
  position: relative;
}

.chain-field-grid .clearable-field input,
.chain-field-grid .clearable-field textarea {
  padding-right: 40px;
}

.chain-field-grid .clearable-field input[type="number"],
.chain-field-grid .clearable-field input[type="datetime-local"] {
  padding-right: 62px;
}

.chain-field-grid .clearable-field select {
  padding-right: 36px;
}

.chain-field-grid .clearable-field .field-clear-btn {
  top: calc(50% + 13px);
  right: 16px;
}

.chain-field-grid .clearable-field textarea + .field-clear-btn {
  top: 42px;
  right: 20px;
}

.chain-field-grid .clearable-field input[type="number"] + .field-clear-btn,
.chain-field-grid .clearable-field input[type="datetime-local"] + .field-clear-btn {
  right: 42px;
}

.chain-field-grid .chain-password-clear-btn {
  right: 96px;
  top: calc(50% + 13px);
}

.chain-server-picker.clearable-field .chain-server-input {
  padding-right: 42px;
}

.chain-server-picker.clearable-field .field-clear-btn {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.chain-detail-table tr.is-disabled {
  opacity: 0.66;
  background: #f8fafc;
}

.chain-detail-table tr.is-expiring-soon {
  background: #fff7ed;
}

.chain-detail-table tr.chain-focus-row {
  outline: 2px solid #f97316;
  outline-offset: -2px;
  background: #ffedd5;
}

.chain-expiring-btn {
  min-width: 58px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid #e6ecf5;
  background: #f8fbff;
  color: #94a3b8;
  font-weight: 850;
  cursor: pointer;
}

.chain-expiring-btn:disabled {
  cursor: default;
  color: #94a3b8;
  background: #f8fbff;
  border-color: #e6ecf5;
}

.chain-detail-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.chain-detail-modal-block {
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
}

.chain-detail-modal-block > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(244,250,253,0.72);
}

.chain-detail-modal-block button {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--primary);
  font-weight: 800;
}

.chain-detail-modal-block pre {
  margin: 0;
  padding: 10px;
  min-height: 92px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.55 Consolas, "Courier New", monospace;
}

.swal2-container {
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.swal2-popup,
.glass-swal-popup {
  border-radius: 22px !important;
  border: 1px solid rgba(255,255,255,0.74) !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.84), rgba(244,250,253,0.68)) !important;
  box-shadow: 0 28px 78px rgba(39,36,72,0.24), inset 0 1px 0 rgba(255,255,255,0.8) !important;
  backdrop-filter: blur(22px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(145%) !important;
}

.chain-glass-modal {
  background:
    radial-gradient(circle at 20% 20%, rgba(105, 235, 210, 0.2), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(255, 105, 138, 0.18), transparent 24%),
    rgba(22, 20, 38, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.chain-renew-modal-box,
.batch-modal-box {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 30px 90px rgba(46, 42, 70, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.chain-renew-modal-box {
  max-width: 520px;
}

.swal2-title {
  color: var(--text) !important;
  letter-spacing: 0 !important;
}

.swal2-html-container {
  color: var(--text) !important;
}

.swal2-actions button {
  border-radius: var(--radius-pill) !important;
  font-weight: 850 !important;
  box-shadow: 0 12px 24px rgba(67,56,126,0.15) !important;
}

.chain-small-input {
  width: 96px;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #c9d3e3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.chain-remark-input {
  width: 150px;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #c9d3e3;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.online {
  background: #d9fbe8;
  color: #22c55e;
}

.status-pill.offline {
  background: #ffe0e0;
  color: #ef4444;
}

.status-pill.processing {
  background: #e0f2fe;
  color: #0284c7;
}

.status-pill.count-pill {
  min-width: 66px;
  height: 38px;
  font-size: 18px;
}

.chain-count {
  display: block;
  color: #5f5a72;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.15;
}

.chain-metric {
  color: #5f5a72;
  font-weight: 800;
}

.limit-pill,
.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid #b9ef88;
  background: #f3ffe9;
  color: #58c829;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.date-pill {
  min-width: 104px;
}

.protocol-badge {
  border-color: #9bd7ff;
  background: #eef9ff;
  color: #2ea3ff;
  font-weight: 850;
}

.chain-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.chain-test-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.chain-test-status {
  min-width: 72px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.chain-test-status.success { color: #059669; }
.chain-test-status.error { color: #dc2626; }
.chain-test-status.pending { color: #6b7280; }

.chain-deploy-monitor {
  margin-top: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  color: #e5e7eb;
}

.chain-deploy-monitor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.chain-deploy-log {
  max-height: 260px;
  min-height: 120px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
  font-family: Consolas, "Courier New", monospace;
}

.chain-copy-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.editor-hint { color: var(--text-muted); font-size: 12.5px; }
.compact-header { margin-bottom: 0; }
.summary { color: var(--text-muted); line-height: 1.7; }
.days-input { width: 120px; }

/* ============================================================
   鍝嶅簲寮?   ============================================================ */
@media (max-width: 1100px) {
  .chain-layout {
    grid-template-columns: 1fr;
  }

  .chain-source-panel textarea {
    min-height: 260px;
  }

  .chain-field-grid {
    grid-template-columns: 1fr;
  }

  .chain-main-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  .chain-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .chain-action-buttons > button {
    width: 100%;
    min-width: 0;
  }

  .chain-record-panel .panel-header {
    align-items: flex-start;
  }

  .chain-list-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .chain-list-actions {
    justify-content: flex-start;
  }

  .chain-server-picker {
    width: 100%;
    min-width: 0;
  }

  .chain-record-panel .table-wrap,
  .relay-record-panel .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .user-action-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid,
  .server-stats-grid,
  .inbound-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    width: 72px;
    overflow: visible;
  }

  .brand-text, .nav a span { display: none; }
  .brand { padding: 20px 14px; justify-content: center; }
  .nav { padding: 12px 8px; }
  .nav a { justify-content: center; padding: 12px; }
  .nav-cloud-toggle {
    justify-content: center;
    padding: 12px;
  }
  .nav-cloud-toggle span:first-child {
    display: none;
  }
  .nav-cloud-panel > a {
    margin-left: 0;
    padding: 10px 12px;
  }

  .content { margin-left: 72px; width: calc(100% - 72px); padding: 24px 20px; }

  .panel-grid.two,
  .form-grid,
  .form-row-3,
  .batch-modal-box .form-row-2,
  .batch-check-inline,
  .server-probe-row,
  .inbound-form-grid,
  .server-form-grid,
  .server-install-grid {
    grid-template-columns: 1fr;
  }

  .relay-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .relay-actions > button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 16px 10px;
  }

  .chain-main-actions {
    gap: 8px;
  }

  .chain-action-buttons {
    grid-template-columns: 1fr;
  }

  .chain-small-input,
  .chain-remark-input {
    width: 100%;
  }

  .chain-record-panel .table-actions {
    grid-template-columns: 1fr;
    min-width: 74px;
  }

  .chain-test-wrap {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .relay-server-picker {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .relay-panel,
  .chain-source-panel,
  .chain-server-panel,
  .chain-actions-panel,
  .chain-record-panel,
  .relay-record-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chain-layout {
    gap: 12px;
  }

  .chain-source-panel textarea {
    min-height: 220px;
    font-size: 12px;
  }

  .chain-field-grid input,
  .chain-field-grid select,
  .chain-server-input,
  .chain-small-input,
  .chain-remark-input {
    height: 38px;
    font-size: 13px;
  }

  .chain-action-buttons > button,
  .chain-renew-actions > button {
    min-height: 38px;
    font-size: 13px;
  }

  .chain-record-panel table {
    min-width: 860px;
  }
}

@media (max-width: 1100px) {
  .stats-grid.admin-dashboard-stats {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .stats-grid.user-dashboard-stats {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

.empty-cell {
  text-align: center;
  color: var(--text-soft);
  padding: 20px;
}

.cell-pass {
  font-family: monospace;
  color: var(--text-soft);
  font-size: 12px;
}

/* 鈹€鈹€ 鎵归噺鍒涘缓缃戞牸甯冨眬 鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€ */
.batch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.batch-config {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.batch-modal-box .form-row-2 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.batch-modal-box .form-row-3 {
  gap: 8px;
}

.batch-modal-box .field-label {
  gap: 3px;
}

.batch-modal-box .field-label > span {
  font-size: 11px;
  line-height: 1.15;
}

.batch-modal-box input,
.batch-modal-box select {
  min-height: 32px;
  height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.batch-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-top: 1px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(163, 152, 200, 0.15);
}

.batch-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-skip-top {
  padding: 4px 10px;
  border: 1px solid rgba(108, 99, 255, 0.16);
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
}

.batch-modal-box .modal-header h3 {
  font-size: 18px;
}

.batch-modal-box .modal-actions {
  margin-top: 2px;
}

.batch-modal-box .modal-actions button {
  min-height: 34px;
  padding: 7px 16px;
  font-size: 12px;
}

.batch-hint-row {
  padding: 4px 0;
}

.batch-check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
}

.batch-check-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.copy-line-btn {
  margin-right: 8px;
  padding: 4px 10px;
  font-size: 12px;
}

.batch-check-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.batch-copy-output {
  width: 100%;
  min-height: 300px;
  max-height: 42vh;
  resize: vertical;
  margin: 8px 0 14px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.55;
}

/* ---- 灞曞紑鎿嶄綔闈㈡澘璇︽儏缃戞牸 ---- */
.server-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f8f9fc;
  border-radius: var(--radius-md);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ---- XUI 鐘舵€佹爣绛?---- */
.xui-status.installed {
  background: var(--success-bg);
  color: var(--success);
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.xui-status.not-installed {
  background: rgba(142, 135, 168, 0.12);
  color: var(--text-muted);
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

/* 妯℃€佹鍐呮寜閽 */
.modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}

.upgrade-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.upgrade-stats div {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #f8f9fc;
  border: 1px solid rgba(163, 152, 200, 0.12);
}

.upgrade-stats span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.upgrade-stats strong {
  display: block;
  font-size: 24px;
  color: var(--primary);
}

.upgrade-note,
.upgrade-details {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #fff8e8;
  color: var(--text);
  border: 1px solid rgba(220, 168, 70, 0.24);
}

.upgrade-list {
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-all;
}

.upgrade-apply-form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

@media (max-width: 900px) {
  .upgrade-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upgrade-apply-form {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ============================================================
   鎵嬫満閫傞厤
   ============================================================ */
@media (max-width: 760px) {
  html {
    font-size: 14px;
  }

  body {
    overflow-x: hidden;
  }

  .layout {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    min-height: auto;
    height: auto;
    max-height: none;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(200, 200, 200, 0.55);
    z-index: 200;
  }

  body.user-shell:not(.has-cloud-view) .sidebar {
    display: none;
  }

  .brand {
    padding: 10px 14px;
    gap: 10px;
    min-height: 54px;
  }

  .brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 17px;
  }

  .brand h1,
  .brand-text h1 {
    font-size: 14px;
    line-height: 1.2;
  }

  .brand p,
  .brand-text p {
    font-size: 10px;
  }

  .nav {
    flex-direction: row;
    gap: 6px;
    padding: 8px 10px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
    justify-content: center;
    min-width: max-content;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .nav a::before {
    display: none;
  }

  .nav-cloud-group {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
  }

  .nav-cloud-toggle {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .nav-cloud-panel {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateX(-4px);
    transition: max-width 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
  }

  .nav-cloud-group.is-open .nav-cloud-panel {
    max-width: 560px;
    opacity: 1;
    transform: translateX(0);
  }

  .nav-cloud-panel > a {
    margin-left: 0;
    padding: 8px 12px;
    font-size: 12px;
  }

  .content,
  body.user-shell .content {
    margin-left: 0;
    width: 100%;
    padding: 16px 12px 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .topbar p {
    font-size: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .user-action-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar-actions .ghost-btn {
    width: auto;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 12px;
  }

  .role-tag {
    padding: 5px 10px;
    font-size: 11px;
  }

  .panel,
  .stat-card,
  .login-card {
    border-radius: 14px;
    padding: 16px;
    box-shadow:
      3px 3px 10px rgba(200, 200, 200, 0.45),
      -2px -2px 8px var(--shadow-light);
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  .panel-header h3 {
    font-size: 15px;
  }

  .stats-grid,
  .stats-grid.admin-dashboard-stats,
  .server-stats-grid,
  .inbound-stats-grid,
  .upgrade-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
  }

  .stat-card {
    width: 100%;
    min-width: 0;
    padding: 14px;
  }

  .stat-card span {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .stats-grid.user-dashboard-stats {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
    width: 100%;
    overflow: visible;
  }

  .user-dashboard-stats .stat-card,
  .user-dashboard-stats .stat-expiring-action {
    width: 100%;
    min-width: 0;
    min-height: 86px;
    padding: 16px;
    border-radius: 14px;
  }

  .user-dashboard-stats .stat-card a {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 0;
  }

  .user-dashboard-stats .stat-card span {
    font-size: 14px;
    line-height: 1.2;
  }

  .user-dashboard-stats .stat-card strong {
    margin-left: 0;
    font-size: 30px;
    text-align: left;
  }

  .user-dashboard-stats .stat-expiring-action .stat-copy-btn {
    right: 12px;
    bottom: 10px;
    height: 28px;
    min-width: 54px;
    padding: 0 10px;
    font-size: 11px;
  }

  .server-filter-row,
  .inbound-toolbar,
  .node-toolbar {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    overflow: visible;
  }

  .filter-actions-left,
  .node-actions-first,
  .table-actions,
  .batch-header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    overflow: visible;
    padding: 0;
  }

  .filter-actions-left > *,
  .node-actions-first > *,
  .table-actions > *,
  .batch-header-actions > * {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .filter-actions-left > .inline-form,
  .node-actions-first > .inline-form,
  .table-actions > .inline-form,
  .batch-header-actions > .inline-form {
    display: block;
  }

  .filter-actions-left > .inline-form button,
  .node-actions-first > .inline-form button,
  .table-actions > .inline-form button,
  .batch-header-actions > .inline-form button {
    width: 100%;
  }

  .filter-controls-right,
  .node-controls-last {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .filter-controls-right > *,
  .node-controls-last > * {
    width: 100%;
    min-width: 0;
  }

  .modal-actions,
  .form-submit-row,
  .upgrade-apply-form {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .modal-actions > *,
  .form-submit-row > *,
  .upgrade-apply-form > * {
    width: 100%;
  }

  .copy-line {
    grid-template-columns: 1fr;
  }

  .copy-line > * {
    width: 100%;
  }

  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .ghost-btn,
  button {
    min-height: 40px;
    white-space: nowrap;
  }

  .server-filter-row .primary-btn,
  .server-filter-row .secondary-btn,
  .server-filter-row .danger-btn,
  .server-filter-row .ghost-btn,
  .inbound-toolbar .primary-btn,
  .inbound-toolbar .secondary-btn,
  .inbound-toolbar .danger-btn,
  .inbound-toolbar .ghost-btn,
  .node-toolbar .primary-btn,
  .node-toolbar .secondary-btn,
  .node-toolbar .danger-btn,
  .node-toolbar .ghost-btn {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 13px;
  }

  .server-filter-row .server-search-field,
  .server-filter-row .toolbar-field.grow,
  .server-filter-row .toolbar-field.small,
  .inbound-toolbar .toolbar-field.grow,
  .inbound-toolbar .toolbar-field.small,
  .node-toolbar .toolbar-field.grow,
  .node-toolbar .toolbar-field.small {
    flex: none;
    min-width: 0;
  }

  .server-filter-row textarea#server-keyword-filter {
    width: 100%;
    min-height: 44px;
    max-height: 96px;
  }

  .clearable-field .field-clear-btn {
    width: 24px;
    height: 24px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px;
  }

  .form-grid,
  .form-grid.single,
  .form-row-2,
  .form-row-3,
  .panel-grid,
  .panel-grid.two,
  .server-form-grid,
  .server-install-grid,
  .inbound-form-grid,
  .batch-modal-box .form-row-2,
  .batch-modal-box .form-row-3,
  .batch-check-inline {
    grid-template-columns: 1fr;
  }

  .table-wrap,
  .node-inbounds-table-wrap,
  .nodes-table-wrap,
  .inbound-table-wrap,
  .server-table-wrap,
  .node-xui-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table,
  .server-table-wrap .server-table,
  .nodes-table-wrap table,
  .inbound-table-wrap table,
  .node-xui-table {
    min-width: 760px;
  }

  .readonly-inbound-table {
    min-width: 640px;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .table-pagination,
  .toolbar-pagination {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .modal-overlay {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
  }

  .modal-box,
  .modal-box-wide,
  .batch-modal-box,
  .batch-result-box {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
    padding: 14px;
  }

  .modal-header {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }

  .modal-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .batch-copy-output {
    min-height: 220px;
    max-height: 48vh;
    font-size: 12px;
  }

  .server-detail-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .flash-stack {
    left: 12px;
    right: 12px;
  }
}

@media (max-width: 420px) {
  .content,
  body.user-shell .content {
    padding: 12px 8px 24px;
  }

  .panel,
  .stat-card,
  .login-card {
    padding: 14px;
  }

  .stats-grid,
  .stats-grid.admin-dashboard-stats,
  .server-stats-grid,
  .inbound-stats-grid,
  .upgrade-stats {
    grid-template-columns: 1fr;
  }

  .stats-grid.user-dashboard-stats {
    grid-template-columns: 1fr !important;
  }
}

/* 鍏ㄥ眬鍏ョ珯椤堕儴缁熻鍗＄墖锛氭墜鏈?绐勫睆寮哄埗鍗曞垪锛岄伩鍏嶈閫氱敤浠〃鐩樿鍒欐拺瀹?*/
@media (max-width: 1100px) {
  .inbound-summary-stats {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    gap: 10px !important;
    padding-bottom: 0 !important;
  }

  .inbound-summary-stats .stat-card,
  .inbound-summary-stats .stat-expiring-action {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 86px !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .inbound-summary-stats .stat-card a {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding-bottom: 24px !important;
  }

  .inbound-summary-stats .stat-card span {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .inbound-summary-stats .stat-card strong {
    margin-left: 0 !important;
    font-size: 32px !important;
    line-height: 1 !important;
    text-align: right !important;
  }
}

/* 鍏ㄥ眬鍏ョ珯缁熻鍗＄墖锛氳窡浠〃鐩樺崱鐗囦繚鎸佷竴鑷?*/
.inbound-summary-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

.inbound-summary-stats .stat-card,
.inbound-summary-stats .stat-expiring-action {
  position: relative;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 116px !important;
  padding: 18px 18px 46px !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  text-align: left !important;
  box-shadow:
    6px 6px 16px var(--shadow-dark),
    -4px -4px 12px var(--shadow-light) !important;
}

.inbound-summary-stats .stat-inbound { border-left-color: #0891b2 !important; }
.inbound-summary-stats .stat-node { border-left-color: #7c3aed !important; }
.inbound-summary-stats .stat-online { border-left-color: #059669 !important; }
.inbound-summary-stats .stat-expiring { border-left-color: #dc2626 !important; }
.inbound-summary-stats .stat-expired { border-left-color: #991b1b !important; }

.inbound-summary-stats .stat-card a {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  color: inherit !important;
}

.inbound-summary-stats .stat-card span {
  display: block !important;
  margin: 0 0 10px !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.inbound-summary-stats .stat-card strong {
  display: block !important;
  margin: 0 !important;
  font-size: 34px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-align: left !important;
}

.inbound-summary-stats .stat-inbound strong { color: #0891b2 !important; }
.inbound-summary-stats .stat-node strong { color: #7c3aed !important; }
.inbound-summary-stats .stat-online strong { color: #059669 !important; }
.inbound-summary-stats .stat-expiring strong { color: #dc2626 !important; }
.inbound-summary-stats .stat-expired strong { color: #991b1b !important; }

.inbound-summary-stats .stat-copy-btn {
  right: 14px !important;
  bottom: 12px !important;
  height: 28px !important;
  min-width: 54px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: rgba(108, 99, 255, 0.1) !important;
  color: var(--primary) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 760px) {
  .inbound-summary-stats {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  .inbound-summary-stats .stat-card,
  .inbound-summary-stats .stat-expiring-action {
    min-height: 104px !important;
    padding: 18px 18px 42px !important;
  }

  .inbound-summary-stats .stat-card span {
    font-size: 14px !important;
    margin-bottom: 10px !important;
  }

  .inbound-summary-stats .stat-card strong {
    font-size: 36px !important;
  }
}

@media (max-width: 1100px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .layout,
  .content,
  body.user-shell .content,
  .inbound-shell,
  .inbound-shell > *,
  .inbound-shell #table-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere;
  }

  .inbound-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .inbound-toolbar,
  .inbound-toolbar .filter-actions-left,
  .inbound-toolbar .filter-controls-right,
  .inbound-toolbar .toolbar-field,
  .inbound-toolbar input,
  .inbound-toolbar select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .inbound-shell .table-wrap,
  .inbound-shell .inbound-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .server-shell,
  .inbound-shell {
    gap: 12px !important;
  }

  .server-toolbar,
  .inbound-toolbar {
    padding: 12px !important;
    gap: 10px !important;
    margin: 0 !important;
    border-radius: 18px !important;
  }

  .server-bulk-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    min-width: 0 !important;
  }

  .server-filter-row,
  .inbound-toolbar {
    margin-bottom: 0 !important;
  }

  .server-toolbar .server-table-wrap,
  .inbound-shell .inbound-table-wrap {
    margin-top: 0 !important;
  }

  .server-toolbar .toolbar-pagination {
    margin-top: 8px !important;
  }

  .stats-grid.inbound-summary-stats {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  .stats-grid.inbound-summary-stats .stat-card,
  .stats-grid.inbound-summary-stats .stat-expiring-action {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 104px !important;
    padding: 18px 18px 42px !important;
    border-left: 5px solid var(--primary) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    text-align: left !important;
  }

  .stats-grid.inbound-summary-stats .stat-card a {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .stats-grid.inbound-summary-stats .stat-card span {
    display: block !important;
    margin: 0 0 10px !important;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .stats-grid.inbound-summary-stats .stat-card strong {
    display: block !important;
    margin: 0 !important;
    font-size: 36px !important;
    line-height: 1 !important;
    text-align: left !important;
  }
}

@media (max-width: 760px) {
  .server-shell,
  .inbound-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .server-toolbar {
    display: block !important;
    padding: 10px !important;
    margin: 0 !important;
    border-radius: 18px !important;
  }

  .server-filter-row,
  .inbound-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: var(--surface) !important;
    box-shadow:
      3px 3px 10px rgba(200, 200, 200, 0.42),
      -2px -2px 8px var(--shadow-light) !important;
  }

  .server-toolbar .server-filter-row {
    padding: 0 !important;
    box-shadow: none !important;
  }

  .server-bulk-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .server-filter-row .filter-actions-left,
  .inbound-toolbar .filter-actions-left,
  .server-filter-row .filter-controls-right,
  .inbound-toolbar .filter-controls-right {
    gap: 8px !important;
  }

  .server-install-panel {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .server-install-panel.is-open {
    display: block !important;
    height: auto !important;
    padding: 12px !important;
    overflow: visible !important;
  }

  .server-table-wrap,
  .inbound-table-wrap {
    margin-top: 0 !important;
    align-self: stretch !important;
  }

  .server-shell .toolbar-pagination,
  .inbound-shell .toolbar-pagination {
    margin-top: 0 !important;
  }

  .inbound-shell #table-form {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
}

@media (max-width: 760px) {
  .server-toolbar {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    align-self: stretch !important;
    flex: 0 0 auto !important;
    block-size: fit-content !important;
  }

  .server-filter-row {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
    block-size: fit-content !important;
  }

  .inbound-toolbar {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    align-self: stretch !important;
    flex: 0 0 auto !important;
    block-size: fit-content !important;
  }

  .server-bulk-shell,
  .server-filter-row .filter-actions-left,
  .server-filter-row .filter-controls-right,
  .inbound-toolbar .filter-actions-left,
  .inbound-toolbar .filter-controls-right {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    block-size: fit-content !important;
  }

  .server-toolbar::before,
  .server-toolbar::after,
  .inbound-toolbar::before,
  .inbound-toolbar::after {
    display: none !important;
    content: none !important;
  }

  .server-table-wrap,
  .inbound-table-wrap {
    transform: translateY(0) !important;
  }
}

/* Chain forward mobile hardening: keep the page inside the viewport. */
@media (max-width: 760px) {
  body:has(.chain-layout),
  body:has(.chain-layout) .layout,
  body:has(.chain-layout) .content {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body:has(.chain-layout) .content {
    padding: 14px 10px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .chain-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .chain-layout .panel,
  .chain-source-panel,
  .chain-server-panel,
  .chain-actions-panel,
  .chain-record-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 14px !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  .chain-source-panel textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 220px !important;
    height: 33vh !important;
    max-height: 360px !important;
    overflow: auto !important;
    resize: vertical !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
    white-space: pre-wrap !important;
  }

  .chain-field-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .chain-field-grid label,
  .chain-field-grid input,
  .chain-field-grid select,
  .chain-field-grid textarea,
  .chain-password-row,
  .chain-password-row input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .chain-test-wrap {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .chain-test-wrap .chain-test-status {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  .chain-test-wrap button,
  .chain-action-buttons button,
  .chain-renew-actions button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
  }

  .chain-main-actions,
  .chain-action-buttons,
  .chain-renew-actions {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  .chain-main-actions,
  .chain-renew-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .chain-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .chain-small-input,
  .chain-remark-input,
  .chain-server-picker,
  .chain-server-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .chain-server-input,
  .chain-small-input,
  .chain-remark-input {
    height: 40px !important;
    font-size: 13px !important;
    border-radius: 14px !important;
  }

  .chain-record-panel .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .chain-record-panel table {
    width: max-content !important;
    min-width: 1120px !important;
    table-layout: auto !important;
  }

  .chain-record-panel .chain-detail-table {
    min-width: 1280px !important;
  }

  .chain-record-panel th,
  .chain-record-panel td {
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 9px 8px !important;
  }

  .chain-record-panel .table-pagination {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .chain-list-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    justify-content: stretch !important;
  }

  .chain-list-toolbar {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .chain-list-actions > button {
    width: 100% !important;
  }

  .chain-record-panel .table-actions {
    grid-template-columns: repeat(2, 58px) !important;
    min-width: 124px !important;
    gap: 6px !important;
  }

  .chain-record-panel .table-actions > .ghost-btn,
  .chain-record-panel .table-actions > .inline-form,
  .chain-record-panel .table-actions > .inline-form > button {
    width: 58px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 760px) {
  .chain-detail-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .chain-action-buttons {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .chain-source-panel textarea {
    min-height: 200px !important;
    height: 32vh !important;
  }
}

/* Aliyun server mobile hardening. */
@media (max-width: 760px) {
  body:has(.aliyun-action-panel),
  body:has(.aliyun-action-panel) .layout,
  body:has(.aliyun-action-panel) .content {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body:has(.aliyun-action-panel) .content {
    padding: 14px 10px calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .aliyun-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .aliyun-stats-grid .stat-card {
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .aliyun-action-panel,
  .aliyun-filter-panel,
  .aliyun-inline-filter-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
    overflow: hidden !important;
    border-radius: 14px !important;
  }

  .aliyun-region-filter-strip {
    width: 100% !important;
    min-height: 44px !important;
    margin-bottom: 12px !important;
    padding: 7px !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .aliyun-region-filter-pill {
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }

  .aliyun-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .aliyun-actions > button,
  .aliyun-actions .toolbar-field,
  .aliyun-actions select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .aliyun-toolbar-account,
  .aliyun-sync-server-btn {
    grid-column: 1 / -1 !important;
  }

  .aliyun-actions > button {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .aliyun-filter-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .aliyun-filter-grid .toolbar-field,
  .filter-clear-wrap,
  .aliyun-filter-grid textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .aliyun-filter-grid textarea {
    min-height: 70px !important;
    max-height: 120px !important;
    font-size: 13px !important;
  }

  .aliyun-search-btn {
    width: 100% !important;
    min-height: 40px !important;
    border-radius: 14px !important;
  }

  .aliyun-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .aliyun-table {
    width: max-content !important;
    min-width: 1220px !important;
    table-layout: fixed !important;
  }

  .aliyun-table th,
  .aliyun-table td {
    padding: 9px 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .aliyun-table .cell-title {
    max-width: 220px !important;
  }

  body:has(.aliyun-action-panel) .table-pagination {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  body:has(.aliyun-action-panel) .table-pagination > * {
    width: 100% !important;
    max-width: 100% !important;
  }

  body:has(.aliyun-action-panel) .modal-content,
  body:has(.aliyun-action-panel) .action-modal-content {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 28px) !important;
    overflow: auto !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 420px) {
  .aliyun-stats-grid:not(.huawei-stats-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .aliyun-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .huawei-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .huawei-stats-grid .stat-card {
    padding: 10px 10px !important;
    border-radius: 12px !important;
  }

  .huawei-stats-grid .stat-card span {
    font-size: 10px !important;
    margin-bottom: 5px !important;
  }

  .huawei-stats-grid .stat-card strong {
    font-size: 21px !important;
  }

  body:has(.aliyun-action-panel) .aliyun-table-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  body:has(.aliyun-action-panel) .aliyun-table.cloud-mobile-card-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-spacing: 0 !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table thead {
    display: none !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table tbody,
  body:has(.aliyun-action-panel) .cloud-mobile-card-table tr,
  body:has(.aliyun-action-panel) .cloud-mobile-card-table td {
    display: block !important;
    width: 100% !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table tbody {
    display: grid !important;
    gap: 10px !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table tr {
    position: relative !important;
    padding: 12px 12px 40px !important;
    border: 1px solid rgba(151, 164, 196, .28) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 10px 24px rgba(31, 42, 68, .08) !important;
    cursor: pointer !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table tr::after {
    content: "展开";
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: #5b6cff;
    font-size: 12px;
    font-weight: 700;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table tr.is-expanded::after {
    content: "收起";
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table td {
    min-height: 30px !important;
    padding: 7px 0 !important;
    border: 0 !important;
    white-space: normal !important;
    text-align: left !important;
    font-size: 12px !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table td:not(:first-child) {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table td:not(:first-child)::before {
    content: attr(data-mobile-label);
    color: #8993ad;
    font-size: 11px;
    font-weight: 700;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table tr:not(.is-expanded) td:nth-child(n+7) {
    display: none !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table td:first-child {
    position: absolute !important;
    right: 10px !important;
    top: 8px !important;
    width: auto !important;
    padding: 0 !important;
    z-index: 2 !important;
  }

  body:has(.aliyun-action-panel) .cloud-mobile-card-table .cell-title,
  body:has(.aliyun-action-panel) .cloud-mobile-card-table .aliyun-image-cell,
  body:has(.aliyun-action-panel) .cloud-mobile-card-table .cloud-traffic-cell {
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 760px) {
  body.cloud-mobile-page .aliyun-table-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  body.cloud-mobile-page .aliyun-table.cloud-mobile-card-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-spacing: 0 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table thead {
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tbody,
  body.cloud-mobile-page .cloud-mobile-card-table tr,
  body.cloud-mobile-page .cloud-mobile-card-table td {
    display: block !important;
    width: 100% !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tbody {
    display: grid !important;
    gap: 10px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr {
    position: relative !important;
    padding: 12px 12px 40px !important;
    border: 1px solid rgba(151, 164, 196, .28) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 10px 24px rgba(31, 42, 68, .08) !important;
    cursor: pointer !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr::after {
    content: "\5c55\5f00";
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: #5b6cff;
    font-size: 12px;
    font-weight: 700;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr.is-expanded::after {
    content: "\6536\8d77";
  }

  body.cloud-mobile-page .cloud-mobile-card-table td {
    min-height: 30px !important;
    padding: 7px 0 !important;
    border: 0 !important;
    white-space: normal !important;
    text-align: left !important;
    font-size: 12px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child) {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child)::before {
    content: attr(data-mobile-label);
    color: #8993ad;
    font-size: 11px;
    font-weight: 700;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr:not(.is-expanded) td:nth-child(n+7) {
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:first-child {
    position: absolute !important;
    right: 10px !important;
    top: 8px !important;
    width: auto !important;
    padding: 0 !important;
    z-index: 2 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table .cell-title,
  body.cloud-mobile-page .cloud-mobile-card-table .aliyun-image-cell,
  body.cloud-mobile-page .cloud-mobile-card-table .cloud-traffic-cell {
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Unified glassmorphism modals. */
.modal-overlay,
.swal2-container,
.chain-glass-modal {
  background:
    linear-gradient(135deg, rgba(42, 45, 68, 0.26), rgba(111, 93, 164, 0.22)),
    rgba(17, 24, 39, 0.18) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
}

.modal-box,
.modal-box-wide,
.aliyun-buy-modal,
.aliyun-operation-modal,
.aliyun-account-modal-box,
.batch-modal-box,
.batch-result-box,
.chain-renew-modal-box,
.swal2-popup,
.glass-swal-popup {
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(244, 248, 255, 0.56)) !important;
  box-shadow:
    0 30px 88px rgba(31, 35, 63, 0.26),
    0 10px 28px rgba(79, 70, 229, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(24px) saturate(155%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(155%) !important;
}

.modal-header,
.aliyun-buy-modal .modal-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58) !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.06) !important;
  backdrop-filter: blur(18px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
}

.aliyun-purchase-bottom {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.86)) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.62) !important;
  box-shadow: 0 -14px 30px rgba(31, 35, 63, 0.08) !important;
  backdrop-filter: blur(18px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
}

.modal-box input,
.modal-box select,
.modal-box textarea,
.batch-modal-box input,
.batch-modal-box select,
.batch-modal-box textarea {
  background: rgba(255, 255, 255, 0.76) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 20px rgba(31, 35, 63, 0.06) !important;
}

/* Apple-style frosted glass: soft gray translucency, white cards, quiet shadows. */
.modal-overlay,
.swal2-container,
.chain-glass-modal {
  background: rgba(112, 116, 132, 0.34) !important;
  backdrop-filter: blur(28px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(130%) !important;
}

.modal-box,
.modal-box-wide,
.aliyun-buy-modal,
.aliyun-operation-modal,
.aliyun-account-modal-box,
.batch-modal-box,
.batch-result-box,
.chain-renew-modal-box,
.swal2-popup,
.glass-swal-popup {
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  border-radius: 28px !important;
  background: rgba(232, 234, 243, 0.68) !important;
  box-shadow:
    0 42px 100px rgba(30, 34, 55, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(34px) saturate(138%) !important;
  -webkit-backdrop-filter: blur(34px) saturate(138%) !important;
}

.modal-header,
.aliyun-buy-modal .modal-header {
  background: rgba(255, 255, 255, 0.62) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
  backdrop-filter: blur(24px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(130%) !important;
}

.modal-box .panel,
.modal-box .table-wrap,
.aliyun-image-option,
.aliyun-plan-option,
.aliyun-official-region-option,
.aliyun-reset-system-option,
.batch-modal-box .form-row-2,
.batch-modal-box .form-row-3,
.chain-detail-modal-block,
.aliyun-key-list .table-wrap {
  border: 1px solid rgba(222, 226, 236, 0.86) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow:
    0 14px 34px rgba(31, 35, 63, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(18px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(125%) !important;
}

.aliyun-image-option:has(input:checked),
.aliyun-plan-option:has(input:checked),
.aliyun-official-region-option:has(input:checked),
.aliyun-operation-modal .form-grid .aliyun-reset-system-option:has(input:checked) {
  border-color: #4f8cff !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow:
    inset 0 0 0 1px #4f8cff,
    0 18px 42px rgba(79, 140, 255, 0.14) !important;
}

.modal-box input,
.modal-box select,
.modal-box textarea,
.batch-modal-box input,
.batch-modal-box select,
.batch-modal-box textarea,
.aliyun-image-option select {
  background: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid rgba(214, 219, 232, 0.9) !important;
  box-shadow:
    0 10px 30px rgba(31, 35, 63, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.aliyun-purchase-bottom {
  background: rgba(246, 247, 251, 0.76) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.76) !important;
  box-shadow: 0 -18px 44px rgba(31, 35, 63, 0.08) !important;
  backdrop-filter: blur(26px) saturate(132%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(132%) !important;
}

/* Keep modal interiors translucent too; avoid large flat white panels. */
.modal-box table,
.modal-box thead,
.modal-box tbody,
.modal-box tr,
.modal-box th,
.modal-box td,
.modal-box .table-wrap,
.modal-box .form-grid,
.modal-box .aliyun-key-list,
.modal-box .aliyun-account-form,
.modal-box .aliyun-official-section,
.modal-box .aliyun-region-group,
.modal-box .aliyun-region-groups,
.modal-box .aliyun-official-region-options,
.modal-box .aliyun-plan-options,
.modal-box .aliyun-image-options {
  background: transparent !important;
}

.modal-box .table-wrap,
.modal-box .aliyun-key-list .table-wrap,
.modal-box .aliyun-official-section,
.modal-box .aliyun-account-form {
  border-color: rgba(255, 255, 255, 0.34) !important;
  box-shadow: none !important;
}

.modal-box th,
.modal-box td {
  background: rgba(255, 255, 255, 0.22) !important;
}

.modal-box th {
  background: rgba(255, 255, 255, 0.30) !important;
}

.modal-box .aliyun-image-option,
.modal-box .aliyun-plan-option,
.modal-box .aliyun-official-region-option,
.modal-box .aliyun-reset-system-option {
  background: rgba(255, 255, 255, 0.56) !important;
  border-color: rgba(255, 255, 255, 0.62) !important;
  box-shadow:
    0 12px 30px rgba(30, 34, 55, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

.modal-box .aliyun-image-option:has(input:checked),
.modal-box .aliyun-plan-option:has(input:checked),
.modal-box .aliyun-official-region-option:has(input:checked),
.modal-box .aliyun-reset-system-option:has(input:checked) {
  background: rgba(255, 255, 255, 0.68) !important;
}

.modal-box input,
.modal-box select,
.modal-box textarea,
.modal-box input[type="file"],
.batch-modal-box input,
.batch-modal-box select,
.batch-modal-box textarea {
  background: rgba(255, 255, 255, 0.54) !important;
  border-color: rgba(255, 255, 255, 0.66) !important;
}

.modal-box .secondary-btn,
.modal-box .ghost-btn,
.batch-modal-box .secondary-btn,
.batch-modal-box .ghost-btn {
  background: rgba(255, 255, 255, 0.46) !important;
  border-color: rgba(255, 255, 255, 0.58) !important;
  box-shadow: 0 12px 28px rgba(30, 34, 55, 0.08) !important;
}

/* Final modal tone pass: header/body/footer share one frosted gray material. */
.modal-box,
.modal-box-wide,
.aliyun-buy-modal,
.aliyun-operation-modal,
.aliyun-account-modal-box,
.batch-modal-box,
.batch-result-box,
.chain-renew-modal-box {
  background: rgba(218, 222, 233, 0.90) !important;
}

.modal-header,
.aliyun-buy-modal .modal-header,
.aliyun-purchase-bottom {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.modal-box .aliyun-image-option,
.modal-box .aliyun-plan-option,
.modal-box .aliyun-official-region-option,
.modal-box .aliyun-reset-system-option,
.modal-box input,
.modal-box select,
.modal-box textarea,
.modal-box input[type="file"],
.batch-modal-box input,
.batch-modal-box select,
.batch-modal-box textarea,
.modal-box .secondary-btn,
.modal-box .ghost-btn {
  background: rgba(238, 240, 247, 0.74) !important;
  border-color: rgba(255, 255, 255, 0.64) !important;
  box-shadow:
    0 16px 36px rgba(30, 34, 55, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.modal-box .aliyun-image-option:has(input:checked),
.modal-box .aliyun-plan-option:has(input:checked),
.modal-box .aliyun-official-region-option:has(input:checked),
.modal-box .aliyun-reset-system-option:has(input:checked) {
  background: rgba(242, 244, 250, 0.82) !important;
  box-shadow:
    inset 0 0 0 1px #4f8cff,
    0 22px 48px rgba(79, 140, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

.aliyun-buy-modal .modal-header {
  position: static !important;
  margin: 0 !important;
  padding: 0 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.aliyun-purchase-bottom {
  position: static !important;
  margin: 0 !important;
  padding: 10px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.modal-box select,
.modal-box select option,
.batch-modal-box select,
.batch-modal-box select option {
  border-radius: 14px !important;
}

.modal-box select,
.batch-modal-box select {
  appearance: auto;
  background-color: rgba(226, 231, 242, 0.42) !important;
  color: var(--text) !important;
}

.modal-box select option,
.batch-modal-box select option {
  background-color: rgba(226, 231, 242, 0.94) !important;
  color: var(--text) !important;
}

.modal-box select option:checked,
.batch-modal-box select option:checked {
  background-color: rgba(164, 176, 196, 0.72) !important;
  color: #fff !important;
}

/* Dark broadcast-glass modal style: transparent smoky panels over the page. */
.modal-overlay,
.swal2-container,
.chain-glass-modal {
  background: rgba(24, 22, 24, 0.34) !important;
  backdrop-filter: blur(24px) saturate(118%) brightness(0.88) !important;
  -webkit-backdrop-filter: blur(24px) saturate(118%) brightness(0.88) !important;
}

.modal-box,
.modal-box-wide,
.aliyun-buy-modal,
.aliyun-operation-modal,
.aliyun-account-modal-box,
.batch-modal-box,
.batch-result-box,
.chain-renew-modal-box,
.swal2-popup,
.glass-swal-popup {
  color: rgba(255, 255, 255, 0.88) !important;
  background: rgba(46, 42, 38, 0.56) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(30px) saturate(128%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(128%) !important;
}

.modal-box h3,
.modal-box h4,
.modal-box strong,
.modal-box label,
.modal-box .required-label,
.modal-box .aliyun-region-group > strong,
.modal-box .aliyun-plan-spec-grid b,
.modal-box .aliyun-order-price strong,
.modal-box .aliyun-plan-price,
.batch-modal-box h3,
.batch-modal-box label {
  color: rgba(255, 255, 255, 0.92) !important;
}

.modal-box span,
.modal-box .toolbar-field span,
.modal-box .aliyun-plan-spec-grid i,
.modal-box .aliyun-order-price,
.modal-box th,
.modal-box td,
.batch-modal-box span {
  color: rgba(255, 255, 255, 0.72) !important;
}

.modal-header,
.aliyun-buy-modal .modal-header,
.aliyun-purchase-bottom {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

.modal-box .aliyun-image-option,
.modal-box .aliyun-plan-option,
.modal-box .aliyun-official-region-option,
.modal-box .aliyun-reset-system-option,
.modal-box .table-wrap,
.modal-box .aliyun-key-list .table-wrap,
.modal-box input,
.modal-box select,
.modal-box textarea,
.modal-box input[type="file"],
.batch-modal-box input,
.batch-modal-box select,
.batch-modal-box textarea {
  color: rgba(255, 255, 255, 0.88) !important;
  background: rgba(72, 67, 60, 0.44) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
  backdrop-filter: blur(18px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(118%) !important;
}

.modal-box input::placeholder,
.modal-box textarea::placeholder {
  color: rgba(255, 255, 255, 0.48) !important;
}

.modal-box .aliyun-image-option:has(input:checked),
.modal-box .aliyun-plan-option:has(input:checked),
.modal-box .aliyun-official-region-option:has(input:checked),
.modal-box .aliyun-reset-system-option:has(input:checked) {
  background: rgba(84, 79, 72, 0.54) !important;
  border-color: rgba(117, 161, 255, 0.88) !important;
  box-shadow:
    inset 0 0 0 1px rgba(117, 161, 255, 0.88),
    0 24px 54px rgba(0, 0, 0, 0.20),
    0 0 34px rgba(117, 161, 255, 0.14) !important;
}

.modal-box .primary-btn,
.batch-modal-box .primary-btn {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: linear-gradient(135deg, rgba(105, 93, 255, 0.92), rgba(82, 70, 224, 0.92)) !important;
  box-shadow: 0 18px 44px rgba(82, 70, 224, 0.32) !important;
}

.modal-box .secondary-btn,
.modal-box .ghost-btn,
.batch-modal-box .secondary-btn,
.batch-modal-box .ghost-btn {
  color: rgba(255, 255, 255, 0.86) !important;
  background: rgba(72, 67, 60, 0.38) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.modal-box select option,
.batch-modal-box select option {
  background-color: rgba(48, 45, 41, 0.96) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.modal-box select option:checked,
.batch-modal-box select option:checked {
  background-color: rgba(105, 93, 255, 0.88) !important;
  color: #fff !important;
}

.aliyun-buy-modal {
  max-height: none !important;
  overflow: visible !important;
}

/* Broadcast glass final pass: one smoky rounded sheet, floating inner controls. */
.modal-overlay,
.swal2-container,
.chain-glass-modal {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(12, 10, 12, 0.42) !important;
  backdrop-filter: blur(28px) saturate(126%) brightness(0.82) !important;
  -webkit-backdrop-filter: blur(28px) saturate(126%) brightness(0.82) !important;
}

.modal-box,
.modal-box-wide,
.aliyun-buy-modal,
.aliyun-operation-modal,
.aliyun-account-modal-box,
.batch-modal-box,
.batch-result-box,
.chain-renew-modal-box,
.swal2-popup,
.glass-swal-popup {
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.90) !important;
  background:
    linear-gradient(145deg, rgba(76, 69, 60, 0.54), rgba(34, 31, 29, 0.58)) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 28px !important;
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.42),
    0 12px 38px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(34px) saturate(132%) !important;
  -webkit-backdrop-filter: blur(34px) saturate(132%) !important;
}

.modal-header,
.aliyun-buy-modal .modal-header,
.aliyun-purchase-bottom {
  position: static !important;
  margin: 0 !important;
  padding: 0 0 10px !important;
  color: rgba(255, 255, 255, 0.92) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.aliyun-purchase-bottom {
  grid-template-columns: minmax(190px, 0.9fr) max-content minmax(270px, 1.35fr) minmax(150px, 0.8fr) max-content !important;
  align-items: end !important;
  padding-top: 8px !important;
}

.modal-box .required-label::before,
.batch-modal-box .required-label::before {
  content: none !important;
}

.modal-box h3,
.modal-box h4,
.modal-box strong,
.modal-box label,
.modal-box .required-label,
.modal-box .aliyun-region-group > strong,
.modal-box .aliyun-plan-spec-grid b,
.modal-box .aliyun-order-price strong,
.modal-box .aliyun-plan-price,
.batch-modal-box h3,
.batch-modal-box label,
.swal2-title {
  color: rgba(255, 255, 255, 0.94) !important;
}

.modal-box span,
.modal-box .toolbar-field span,
.modal-box .aliyun-plan-spec-grid i,
.modal-box .aliyun-order-price,
.modal-box th,
.modal-box td,
.modal-box p,
.batch-modal-box span,
.swal2-html-container {
  color: rgba(255, 255, 255, 0.72) !important;
}

.modal-box .aliyun-official-section,
.modal-box .aliyun-region-group,
.modal-box .aliyun-region-groups,
.modal-box .aliyun-official-region-options,
.modal-box .aliyun-plan-options,
.modal-box .aliyun-image-options,
.modal-box .form-grid,
.modal-box .aliyun-account-form,
.modal-box .aliyun-key-list,
.modal-box table,
.modal-box thead,
.modal-box tbody,
.modal-box tr,
.modal-box th,
.modal-box td {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  box-shadow: none !important;
}

.modal-box .aliyun-official-section {
  padding: 4px 0 !important;
  border-top: 0 !important;
}

.modal-box .aliyun-image-option,
.modal-box .aliyun-plan-option,
.modal-box .aliyun-official-region-option,
.modal-box .aliyun-reset-system-option,
.modal-box .table-wrap,
.modal-box .aliyun-key-list .table-wrap,
.modal-box input,
.modal-box select,
.modal-box textarea,
.modal-box input[type="file"],
.batch-modal-box input,
.batch-modal-box select,
.batch-modal-box textarea,
.modal-box .secondary-btn,
.modal-box .ghost-btn,
.modal-box .danger-btn {
  color: rgba(255, 255, 255, 0.90) !important;
  background: rgba(255, 255, 255, 0.105) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 18px !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(18px) saturate(116%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(116%) !important;
}

.modal-box .aliyun-image-option:hover,
.modal-box .aliyun-plan-option:hover,
.modal-box .aliyun-official-region-option:hover,
.modal-box .aliyun-reset-system-option:hover,
.modal-box .secondary-btn:hover,
.modal-box .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px);
}

.modal-box .aliyun-image-option:has(input:checked),
.modal-box .aliyun-plan-option:has(input:checked),
.modal-box .aliyun-official-region-option:has(input:checked),
.modal-box .aliyun-reset-system-option:has(input:checked) {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(144, 182, 255, 0.92) !important;
  box-shadow:
    inset 0 0 0 1px rgba(144, 182, 255, 0.86),
    0 24px 58px rgba(0, 0, 0, 0.28),
    0 0 38px rgba(144, 182, 255, 0.18) !important;
}

.modal-box input::placeholder,
.modal-box textarea::placeholder,
.batch-modal-box input::placeholder,
.batch-modal-box textarea::placeholder {
  color: rgba(255, 255, 255, 0.42) !important;
}

.modal-box select,
.batch-modal-box select,
.aliyun-image-option select {
  min-height: 42px !important;
  padding-right: 30px !important;
  color: rgba(255, 255, 255, 0.92) !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
}

.modal-box select option,
.batch-modal-box select option {
  color: rgba(255, 255, 255, 0.94) !important;
  background-color: rgba(43, 38, 34, 0.98) !important;
}

.modal-box select option:checked,
.batch-modal-box select option:checked {
  background-color: rgba(126, 149, 255, 0.92) !important;
  color: #fff !important;
}

.modal-box .primary-btn,
.batch-modal-box .primary-btn,
.swal2-confirm {
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(127, 113, 255, 0.95), rgba(92, 84, 228, 0.94)) !important;
  box-shadow:
    0 18px 46px rgba(92, 84, 228, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.modal-box .aliyun-official-region-option {
  min-height: 30px !important;
  border-radius: 999px !important;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.modal-box .aliyun-official-plan-card {
  min-height: 190px !important;
}

.modal-box .aliyun-plan-spec-grid {
  gap: 4px !important;
}

.modal-box .aliyun-duration-plain {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.modal-box .aliyun-count-control button,
.modal-box .aliyun-count-control input {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.11) !important;
}

.modal-box .aliyun-count-control > div {
  gap: 6px !important;
  grid-template-columns: 36px 66px 36px !important;
}

.aliyun-buy-modal {
  width: min(1120px, 94vw) !important;
  padding: 16px 20px 18px !important;
  max-height: calc(100vh - 30px) !important;
  overflow: visible !important;
}

@media (max-width: 900px) {
  .aliyun-buy-modal,
  .modal-box-wide,
  .aliyun-operation-modal {
    width: min(94vw, 720px) !important;
    max-height: calc(100vh - 22px) !important;
    overflow-y: auto !important;
  }

  .aliyun-purchase-bottom {
    grid-template-columns: 1fr !important;
  }
}

/* Hard modal cleanup: no page blur, no square bars, no white controls. */
body .modal-overlay,
body .swal2-container,
body .chain-glass-modal {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body .modal-overlay .required-label::before,
body .swal2-container .required-label::before {
  content: "" !important;
  display: none !important;
}

body .modal-overlay .modal-box,
body .modal-overlay .modal-box-wide,
body .modal-overlay .aliyun-buy-modal,
body .modal-overlay .aliyun-operation-modal,
body .modal-overlay .aliyun-account-modal-box,
body .modal-overlay .batch-modal-box {
  background:
    linear-gradient(145deg, rgba(50, 48, 50, 0.58), rgba(28, 27, 29, 0.62)) !important;
  background-color: rgba(32, 31, 33, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  border-radius: 34px !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.48),
    inset -1px -1px 2px rgba(255, 255, 255, 0.08),
    4px 4px 25px rgba(0, 0, 0, 0.62),
    0 30px 90px rgba(0, 0, 0, 0.36) !important;
  backdrop-filter: blur(7px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(7px) saturate(112%) !important;
  overflow: hidden !important;
}

body .modal-overlay .modal-header,
body .modal-overlay .aliyun-buy-modal .modal-header,
body .modal-overlay .aliyun-purchase-bottom,
body .modal-overlay .aliyun-official-section,
body .modal-overlay .aliyun-reset-system-section,
body .modal-overlay .form-grid,
body .modal-overlay .modal-actions {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body .modal-overlay .aliyun-official-section::before,
body .modal-overlay .aliyun-official-section::after,
body .modal-overlay .aliyun-purchase-bottom::before,
body .modal-overlay .modal-header::before,
body .modal-overlay .modal-header::after {
  content: none !important;
  display: none !important;
}

body .modal-overlay .aliyun-official-section {
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

body .modal-overlay .aliyun-plan-sync-form input,
body .modal-overlay .aliyun-sync-time,
body .modal-overlay .aliyun-toolbar-balance,
body .modal-overlay .aliyun-count-control button,
body .modal-overlay .aliyun-count-control input,
body .modal-overlay input[type="number"],
body .modal-overlay input[type="text"],
body .modal-overlay input[type="password"],
body .modal-overlay input[type="date"],
body .modal-overlay input[type="datetime-local"],
body .modal-overlay textarea,
body .modal-overlay select {
  appearance: none !important;
  -webkit-appearance: none !important;
  color: rgba(255, 255, 255, 0.92) !important;
  background: rgba(41, 39, 42, 0.46) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 18px !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.26),
    4px 4px 25px rgba(0, 0, 0, 0.32) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}

body .modal-overlay .aliyun-count-control > div {
  display: grid !important;
  grid-template-columns: 44px 70px 44px !important;
  gap: 8px !important;
}

body .modal-overlay .aliyun-count-control button:first-child,
body .modal-overlay .aliyun-count-control button:last-child,
body .modal-overlay .aliyun-count-control input {
  border-radius: 18px !important;
}

body .modal-overlay .aliyun-official-region-option,
body .modal-overlay .aliyun-region-option,
body .modal-overlay .page-size-control select,
body .modal-overlay .probe-pagination-bar select {
  border-radius: 999px !important;
  background: rgba(41, 39, 42, 0.40) !important;
}

body .modal-overlay .aliyun-image-option,
body .modal-overlay .aliyun-plan-option,
body .modal-overlay .aliyun-reset-system-option,
body .modal-overlay .chain-detail-modal-block,
body .modal-overlay .table-wrap {
  border-radius: 20px !important;
  background: rgba(41, 39, 42, 0.42) !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.22),
    4px 4px 25px rgba(0, 0, 0, 0.30) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}

body .modal-overlay .secondary-btn,
body .modal-overlay .ghost-btn,
body .modal-overlay .danger-btn,
body .modal-overlay .primary-btn {
  border-radius: 20px !important;
}

body .modal-overlay .secondary-btn,
body .modal-overlay .ghost-btn,
body .modal-overlay .danger-btn {
  background: rgba(41, 39, 42, 0.44) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.26),
    4px 4px 25px rgba(0, 0, 0, 0.32) !important;
}

body .modal-overlay .primary-btn {
  background: linear-gradient(135deg, rgba(110, 92, 255, 0.92), rgba(83, 69, 224, 0.94)) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.34),
    0 0 18px rgba(110, 92, 255, 0.28),
    4px 4px 25px rgba(0, 0, 0, 0.42) !important;
}

body .modal-overlay .aliyun-image-option:has(input:checked),
body .modal-overlay .aliyun-plan-option:has(input:checked),
body .modal-overlay .aliyun-official-region-option:has(input:checked),
body .modal-overlay .aliyun-reset-system-option:has(input:checked) {
  background: rgba(50, 48, 54, 0.54) !important;
  border-color: rgba(105, 151, 255, 0.92) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.34),
    inset 0 0 0 1px rgba(105, 151, 255, 0.78),
    0 0 16px rgba(105, 151, 255, 0.22),
    4px 4px 25px rgba(0, 0, 0, 0.38) !important;
}

body .modal-overlay .aliyun-plan-options,
body .modal-overlay .aliyun-official-region-options,
body .modal-overlay .aliyun-image-options {
  border: 0 !important;
}

/* High-transparency glass: clear glass surface, no black acrylic blocks. */
body .modal-overlay,
body .swal2-container,
body .chain-glass-modal {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body .modal-overlay .modal-box,
body .modal-overlay .modal-box-wide,
body .modal-overlay .aliyun-buy-modal,
body .modal-overlay .aliyun-operation-modal,
body .modal-overlay .aliyun-account-modal-box,
body .modal-overlay .batch-modal-box,
body .swal2-popup,
body .glass-swal-popup {
  color: rgba(20, 24, 36, 0.86) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.10)) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 34px !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.88),
    inset -1px -1px 2px rgba(255, 255, 255, 0.18),
    0 24px 70px rgba(22, 26, 38, 0.24),
    0 8px 28px rgba(22, 26, 38, 0.14) !important;
  backdrop-filter: blur(7px) saturate(138%) !important;
  -webkit-backdrop-filter: blur(7px) saturate(138%) !important;
}

body .modal-overlay .modal-header,
body .modal-overlay .aliyun-buy-modal .modal-header,
body .modal-overlay .aliyun-purchase-bottom,
body .modal-overlay .aliyun-official-section,
body .modal-overlay .aliyun-reset-system-section,
body .modal-overlay .form-grid,
body .modal-overlay .modal-actions,
body .modal-overlay .aliyun-region-group,
body .modal-overlay .aliyun-region-groups,
body .modal-overlay .aliyun-official-region-options,
body .modal-overlay .aliyun-plan-options,
body .modal-overlay .aliyun-image-options {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .modal-overlay h3,
body .modal-overlay h4,
body .modal-overlay strong,
body .modal-overlay label,
body .modal-overlay .required-label,
body .modal-overlay .aliyun-region-group > strong,
body .modal-overlay .aliyun-plan-spec-grid b,
body .modal-overlay .aliyun-order-price strong,
body .modal-overlay .aliyun-plan-price {
  color: rgba(15, 18, 30, 0.88) !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.38) !important;
}

body .modal-overlay span,
body .modal-overlay .toolbar-field span,
body .modal-overlay .aliyun-plan-spec-grid i,
body .modal-overlay .aliyun-order-price,
body .modal-overlay th,
body .modal-overlay td,
body .modal-overlay p {
  color: rgba(26, 30, 44, 0.72) !important;
}

body .modal-overlay .aliyun-image-option,
body .modal-overlay .aliyun-plan-option,
body .modal-overlay .aliyun-official-region-option,
body .modal-overlay .aliyun-reset-system-option,
body .modal-overlay .table-wrap,
body .modal-overlay .aliyun-key-list .table-wrap,
body .modal-overlay input,
body .modal-overlay textarea,
body .modal-overlay select,
body .modal-overlay .aliyun-plan-sync-form input,
body .modal-overlay .aliyun-sync-time,
body .modal-overlay .aliyun-toolbar-balance,
body .modal-overlay .aliyun-count-control button,
body .modal-overlay .aliyun-count-control input,
body .modal-overlay .secondary-btn,
body .modal-overlay .ghost-btn,
body .modal-overlay .danger-btn {
  color: rgba(18, 22, 34, 0.86) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.12)) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.52) !important;
  border-radius: 20px !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.72),
    0 12px 34px rgba(22, 26, 38, 0.13) !important;
  backdrop-filter: blur(7px) saturate(132%) !important;
  -webkit-backdrop-filter: blur(7px) saturate(132%) !important;
}

body .modal-overlay .aliyun-official-region-option,
body .modal-overlay .aliyun-region-option {
  border-radius: 999px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.10)) !important;
  min-height: 32px !important;
}

body .modal-overlay .aliyun-image-option:has(input:checked),
body .modal-overlay .aliyun-plan-option:has(input:checked),
body .modal-overlay .aliyun-official-region-option:has(input:checked),
body .modal-overlay .aliyun-reset-system-option:has(input:checked) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.16)) !important;
  border-color: rgba(72, 126, 255, 0.74) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(72, 126, 255, 0.56),
    0 0 20px rgba(72, 126, 255, 0.16),
    0 14px 36px rgba(22, 26, 38, 0.16) !important;
}

body .modal-overlay .primary-btn {
  color: #fff !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, rgba(105, 94, 255, 0.92), rgba(82, 70, 224, 0.92)) !important;
  border-color: rgba(255, 255, 255, 0.36) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.32),
    0 14px 34px rgba(82, 70, 224, 0.26) !important;
}

body .modal-overlay input::placeholder,
body .modal-overlay textarea::placeholder {
  color: rgba(20, 24, 36, 0.46) !important;
}

body .modal-overlay select option {
  color: rgba(18, 22, 34, 0.92) !important;
  background: rgba(244, 247, 252, 0.98) !important;
}

body .modal-overlay .aliyun-duration-plain {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Modal audit pass: keep every modal rounded and remove straight boxed rows. */
body .modal-overlay * {
  box-sizing: border-box;
}

body .modal-overlay .modal-box,
body .modal-overlay .modal-box-wide,
body .modal-overlay .batch-modal-box,
body .modal-overlay .batch-result-box,
body .modal-overlay .chain-renew-modal-box,
body .modal-overlay .aliyun-operation-modal,
body .modal-overlay .aliyun-account-modal-box,
body .modal-overlay .aliyun-buy-modal {
  overflow: hidden !important;
}

body .modal-overlay fieldset,
body .modal-overlay .form-row-2,
body .modal-overlay .form-row-3,
body .modal-overlay .form-section,
body .modal-overlay .batch-config,
body .modal-overlay .batch-proto-block,
body .modal-overlay .inbound-form-grid,
body .modal-overlay .server-form-grid,
body .modal-overlay .inbound-form-main,
body .modal-overlay .modal-form,
body .modal-overlay .tab-content {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .modal-overlay .form-row-2,
body .modal-overlay .form-row-3 {
  align-items: end !important;
}

body .modal-overlay .field-label,
body .modal-overlay .toolbar-field,
body .modal-overlay .batch-check-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .modal-overlay .field-label > span,
body .modal-overlay .toolbar-field > span {
  display: block;
  margin-bottom: 7px !important;
  color: rgba(30, 34, 52, 0.70) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body .modal-overlay input,
body .modal-overlay select,
body .modal-overlay textarea,
body .modal-overlay button,
body .modal-overlay .batch-check-row,
body .modal-overlay .tab-btn,
body .modal-overlay .batch-skip-top {
  border-radius: 999px !important;
}

body .modal-overlay textarea {
  border-radius: 20px !important;
}

body .modal-overlay input[type="checkbox"],
body .modal-overlay input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  accent-color: #5d7cff;
}

body .modal-overlay input[type="datetime-local"] {
  border-radius: 22px !important;
}

body .modal-overlay .modal-header {
  min-height: 54px !important;
  gap: 14px !important;
}

body .modal-overlay .modal-header h3 {
  flex: 1 1 auto !important;
}

body .modal-overlay .modal-actions {
  gap: 12px !important;
  padding-top: 12px !important;
}

/* Batch inbound modal layout: less crowded, all rows rounded glass. */
body #batch-modal .batch-modal-box {
  width: min(1320px, 92vw) !important;
  max-height: calc(100vh - 54px) !important;
  padding: 26px 30px 24px !important;
  gap: 18px !important;
  overflow-y: auto !important;
}

body #batch-modal .batch-grid,
body #batch-modal .batch-config {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

body #batch-modal .batch-section-title {
  margin: 8px 0 -2px !important;
  padding: 0 !important;
  border: 0 !important;
  color: rgba(89, 80, 170, 0.58) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body #batch-modal .form-row-2,
body #batch-modal .form-row-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

body #batch-modal .batch-config > .form-row-2:nth-of-type(3) {
  grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
}

body #batch-modal #batch-protocol-fields .form-row-2,
body #batch-modal #batch-protocol-fields .form-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body #batch-modal .field-label {
  display: grid !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body #batch-modal input,
body #batch-modal select {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
}

body #batch-modal .batch-skip-top {
  min-height: 46px !important;
  padding: 0 18px !important;
  gap: 10px !important;
  color: rgba(30, 34, 52, 0.72) !important;
}

body #batch-modal .batch-header-actions {
  gap: 12px !important;
}

body #batch-modal .modal-actions {
  position: sticky !important;
  bottom: 0 !important;
  justify-content: flex-end !important;
  padding: 14px 0 0 !important;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0)) !important;
}

body #batch-modal .modal-actions button {
  min-width: 90px !important;
  min-height: 44px !important;
  font-size: 14px !important;
}

body #batch-modal #batch-expiry {
  width: 100% !important;
}

body #batch-modal .form-hint {
  padding: 14px 16px !important;
  border-radius: 18px !important;
  color: rgba(30, 34, 52, 0.68) !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

@media (max-width: 900px) {
  body #batch-modal .batch-modal-box {
    width: min(94vw, 720px) !important;
    padding: 20px 18px !important;
  }

  body #batch-modal .form-row-2,
  body #batch-modal .form-row-3,
  body #batch-modal .batch-config > .form-row-2:nth-of-type(3),
  body #batch-modal #batch-protocol-fields .form-row-2,
  body #batch-modal #batch-protocol-fields .form-row-3 {
    grid-template-columns: 1fr !important;
  }

  body #batch-modal .batch-header-actions {
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }
}

/* Last guard against old dark acrylic modal fragments. */
body .modal-overlay .modal-box :is(input, select, textarea, button, label, .field-label, .toolbar-field, .batch-check-row, .batch-skip-top, .tab-btn),
body .modal-overlay .batch-modal-box :is(input, select, textarea, button, label, .field-label, .toolbar-field, .batch-check-row, .batch-skip-top, .tab-btn) {
  background-color: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.52) !important;
}

body .modal-overlay .modal-box :is(input, select, textarea),
body .modal-overlay .batch-modal-box :is(input, select, textarea) {
  color: rgba(18, 22, 34, 0.88) !important;
}

body .modal-overlay .modal-box :is(input, select, textarea):disabled,
body .modal-overlay .batch-modal-box :is(input, select, textarea):disabled {
  opacity: 0.72 !important;
}

body .modal-overlay .modal-box :is(input, select, textarea, button):not(.primary-btn),
body .modal-overlay .batch-modal-box :is(input, select, textarea, button):not(.primary-btn) {
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.72),
    0 10px 28px rgba(22, 26, 38, 0.12) !important;
}

body .modal-overlay .modal-box :is(input, select, button):not([type="checkbox"]):not([type="radio"]),
body .modal-overlay .batch-modal-box :is(input, select, button):not([type="checkbox"]):not([type="radio"]) {
  border-radius: 999px !important;
}

/* Modal standard template: match Aliyun purchase dialog for all future modals. */
:root {
  --modal-glass-bg: rgba(255, 255, 255, 0.30);
  --modal-glass-bg-soft: rgba(255, 255, 255, 0.20);
  --modal-glass-border: rgba(255, 255, 255, 0.66);
  --modal-glass-shadow: 0 24px 70px rgba(32, 38, 56, 0.18), 0 8px 26px rgba(32, 38, 56, 0.10);
  --modal-glass-inset: inset 1px 1px 3px rgba(255, 255, 255, 0.86);
}

body .modal-overlay {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body .modal-overlay .modal-box,
body .modal-overlay .modal-box-wide,
body .modal-overlay .batch-modal-box,
body .modal-overlay .batch-result-box,
body .modal-overlay .chain-renew-modal-box,
body .modal-overlay .aliyun-operation-modal,
body .modal-overlay .aliyun-account-modal-box,
body .modal-overlay .aliyun-buy-modal {
  color: #202638 !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.22)) !important;
  border: 1px solid var(--modal-glass-border) !important;
  border-radius: 34px !important;
  box-shadow: var(--modal-glass-inset), var(--modal-glass-shadow) !important;
  backdrop-filter: blur(14px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(145%) !important;
}

body .modal-overlay .modal-header,
body .modal-overlay .modal-actions,
body .modal-overlay .form-row-2,
body .modal-overlay .form-row-3,
body .modal-overlay .form-section,
body .modal-overlay .batch-config,
body .modal-overlay .batch-proto-block,
body .modal-overlay .tab-content,
body .modal-overlay .modal-form,
body .modal-overlay .inbound-form-main,
body .modal-overlay .inbound-form-grid,
body .modal-overlay .server-form-grid,
body .modal-overlay fieldset {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .modal-overlay h3,
body .modal-overlay h4,
body .modal-overlay strong,
body .modal-overlay label,
body .modal-overlay .required-label,
body .modal-overlay .batch-section-title,
body .modal-overlay .field-label > span,
body .modal-overlay .toolbar-field > span {
  color: #202638 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.42) !important;
}

body .modal-overlay span,
body .modal-overlay p,
body .modal-overlay th,
body .modal-overlay td,
body .modal-overlay .form-hint,
body .modal-overlay .aliyun-order-price,
body .modal-overlay .aliyun-plan-spec-grid i {
  color: rgba(32, 38, 56, 0.72) !important;
}

body .modal-overlay .field-label,
body .modal-overlay .toolbar-field,
body .modal-overlay label:not(.aliyun-image-option):not(.aliyun-plan-option):not(.aliyun-official-region-option):not(.aliyun-reset-system-option):not(.batch-skip-top):not(.batch-check-row) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .modal-overlay :is(input, select, textarea),
body .modal-overlay .batch-skip-top,
body .modal-overlay .batch-check-row,
body .modal-overlay .tab-btn,
body .modal-overlay .secondary-btn,
body .modal-overlay .ghost-btn,
body .modal-overlay .danger-btn,
body .modal-overlay .aliyun-sync-time,
body .modal-overlay .aliyun-toolbar-balance {
  color: #202638 !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.22)) !important;
  border: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-radius: 999px !important;
  box-shadow: var(--modal-glass-inset), 0 12px 34px rgba(32, 38, 56, 0.11) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}

body .modal-overlay textarea {
  border-radius: 22px !important;
}

body .modal-overlay .aliyun-image-option,
body .modal-overlay .aliyun-plan-option,
body .modal-overlay .aliyun-reset-system-option,
body .modal-overlay .table-wrap,
body .modal-overlay .chain-detail-modal-block,
body .modal-overlay .form-hint {
  color: #202638 !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.18)) !important;
  border: 1px solid rgba(255, 255, 255, 0.56) !important;
  border-radius: 24px !important;
  box-shadow: var(--modal-glass-inset), 0 16px 40px rgba(32, 38, 56, 0.13) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}

body .modal-overlay .aliyun-official-region-option,
body .modal-overlay .aliyun-region-option {
  color: #202638 !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.22)) !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 999px !important;
  box-shadow: var(--modal-glass-inset), 0 10px 28px rgba(32, 38, 56, 0.10) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}

body .modal-overlay :is(input, select, textarea)::placeholder {
  color: rgba(32, 38, 56, 0.44) !important;
}

body .modal-overlay .primary-btn {
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.44) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(105, 94, 255, 0.96), rgba(82, 70, 224, 0.94)) !important;
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.35), 0 14px 34px rgba(82, 70, 224, 0.28) !important;
}

body .modal-overlay :is(.aliyun-image-option, .aliyun-plan-option, .aliyun-official-region-option, .aliyun-reset-system-option):has(input:checked) {
  border-color: rgba(94, 142, 255, 0.82) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.88),
    inset 0 0 0 1px rgba(94, 142, 255, 0.62),
    0 0 20px rgba(94, 142, 255, 0.18),
    0 16px 40px rgba(32, 38, 56, 0.14) !important;
}

body .modal-overlay input[type="checkbox"],
body .modal-overlay input[type="radio"] {
  background: rgba(255, 255, 255, 0.54) !important;
  border-radius: 999px !important;
  accent-color: #4f8cff;
}

/* Targeted fixes after reverting custom dropdown changes. */
#aliyun-sk5-modal .aliyun-operation-modal {
  width: min(430px, 92vw) !important;
}

#aliyun-xui-modal .aliyun-xui-form label > span {
  min-height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: rgba(32, 38, 56, 0.72) !important;
  justify-content: flex-start !important;
}

#aliyun-xui-modal .aliyun-xui-form label {
  gap: 14px !important;
}

#aliyun-xui-modal .aliyun-xui-form input {
  border-radius: 999px !important;
}

body .modal-overlay .huawei-flexus-plan-card {
  display: grid !important;
  gap: 14px !important;
  min-height: 220px !important;
  padding: 18px !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.18)) !important;
  border: 1px solid rgba(255, 255, 255, 0.56) !important;
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.86), 0 16px 40px rgba(32, 38, 56, 0.13) !important;
}

body .modal-overlay .huawei-flexus-plan-card:has(input:checked) {
  border-color: rgba(94, 142, 255, 0.82) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.88),
    inset 0 0 0 1px rgba(94, 142, 255, 0.62),
    0 0 20px rgba(94, 142, 255, 0.18),
    0 16px 40px rgba(32, 38, 56, 0.14) !important;
}

/* Huawei purchase: plans must read as real cards. */
#huawei-instance-modal .huawei-flexus-plan-options {
  grid-template-columns: repeat(4, minmax(210px, 1fr)) !important;
  gap: 18px !important;
}

#huawei-instance-modal .huawei-flexus-plan-card {
  min-height: 238px !important;
  padding: 22px 24px !important;
  border-radius: 26px !important;
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.92),
    0 18px 48px rgba(32, 38, 56, 0.16) !important;
}

#huawei-instance-modal .huawei-flexus-plan-card:has(input:checked) {
  border-color: rgba(94, 142, 255, 0.92) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.94),
    inset 0 0 0 1px rgba(94, 142, 255, 0.70),
    0 0 22px rgba(94, 142, 255, 0.20),
    0 18px 48px rgba(32, 38, 56, 0.16) !important;
}

/* Batch inbound: no section labels, 3 fields per row. */
#batch-modal .batch-modal-box {
  width: min(1380px, 94vw) !important;
}

#batch-modal .batch-config,
#batch-modal .batch-grid {
  gap: 14px !important;
}

#batch-modal .batch-section-title {
  display: none !important;
}

#batch-modal .form-row-2,
#batch-modal .form-row-3,
#batch-modal #batch-protocol-fields .form-row-2,
#batch-modal #batch-protocol-fields .form-row-3,
#batch-modal .batch-config > .form-row-2:nth-of-type(3) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

#batch-modal .field-label {
  min-width: 0 !important;
}

#batch-modal .field-label > span {
  margin-bottom: 8px !important;
}

@media (max-width: 1100px) {
  #batch-modal .form-row-2,
  #batch-modal .form-row-3,
  #batch-modal #batch-protocol-fields .form-row-2,
  #batch-modal #batch-protocol-fields .form-row-3,
  #batch-modal .batch-config > .form-row-2:nth-of-type(3) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #batch-modal .form-row-2,
  #batch-modal .form-row-3,
  #batch-modal #batch-protocol-fields .form-row-2,
  #batch-modal #batch-protocol-fields .form-row-3,
  #batch-modal .batch-config > .form-row-2:nth-of-type(3) {
    grid-template-columns: 1fr !important;
  }
}

/* Clear blue checked state for the batch skip toggle. */
#batch-modal #batch-skip-existing {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  border: 2px solid rgba(79, 140, 255, 0.42) !important;
  background: rgba(255, 255, 255, 0.58) !important;
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.88), 0 10px 24px rgba(32, 38, 56, 0.12) !important;
}

#batch-modal #batch-skip-existing:checked {
  background: #4f8cff !important;
  border-color: #4f8cff !important;
  box-shadow: 0 0 0 5px rgba(79, 140, 255, 0.16), 0 12px 28px rgba(79, 140, 255, 0.24) !important;
}

#batch-modal #batch-skip-existing:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Force batch inbound fields into true 3-column rows. */
#batch-modal .batch-config {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(240px, 1fr)) !important;
  gap: 16px 18px !important;
  align-items: end !important;
}

#batch-modal .batch-config > .form-row-2,
#batch-modal .batch-config > .form-row-3,
#batch-modal #batch-protocol-fields,
#batch-modal .batch-proto-block:not([style*="display: none"]) {
  display: contents !important;
}

#batch-modal .batch-proto-block[style*="display:none"],
#batch-modal .batch-proto-block[style*="display: none"] {
  display: none !important;
}

#batch-modal .batch-config .field-label {
  min-width: 0 !important;
  width: 100% !important;
}

#batch-modal .batch-config .field-label input,
#batch-modal .batch-config .field-label select {
  width: 100% !important;
}

#batch-modal .form-hint {
  grid-column: 1 / -1 !important;
}

#batch-modal .modal-actions {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1100px) {
  #batch-modal .batch-config {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #batch-modal .batch-config {
    grid-template-columns: 1fr !important;
  }
}

/* Huawei region block should be a glass card, not loose text on background. */
#huawei-instance-modal .huawei-flexus-region-section {
  padding: 22px 24px !important;
  border-radius: 26px !important;
  background: rgba(255, 255, 255, 0.34) !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.86),
    0 16px 42px rgba(32, 38, 56, 0.12) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}

#huawei-instance-modal .huawei-flexus-region-options {
  grid-template-columns: repeat(5, minmax(140px, 1fr)) !important;
  gap: 12px !important;
}

/* Mobile modal fit: Aliyun purchase/reset and batch inbound must stay inside the viewport. */
@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body .modal-overlay {
    align-items: flex-start !important;
    justify-content: center !important;
    width: 100vw !important;
    min-width: 0 !important;
    padding: 12px 10px 20px !important;
    overflow: hidden !important;
  }

  body .modal-overlay .modal-box,
  body .modal-overlay .modal-box-wide,
  body .modal-overlay .aliyun-buy-modal,
  body .modal-overlay .aliyun-operation-modal,
  body .modal-overlay .batch-modal-box {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    max-height: calc(100svh - 28px) !important;
    padding: 22px 16px !important;
    border-radius: 28px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body .modal-overlay .modal-header,
  body .modal-overlay .aliyun-buy-modal .modal-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
    padding: 0 0 14px !important;
    margin: 0 !important;
  }

  body .modal-overlay .modal-header h3 {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  body .modal-overlay .modal-header .ghost-btn,
  body .modal-overlay .modal-header .secondary-btn,
  body .modal-overlay .aliyun-plan-sync-form,
  body .modal-overlay .batch-header-actions {
    width: 100% !important;
    min-width: 0 !important;
    position: static !important;
  }

  body .modal-overlay .aliyun-plan-sync-form,
  body .modal-overlay .batch-header-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body .modal-overlay .aliyun-purchase-form,
  body .modal-overlay .form-grid,
  body .modal-overlay .batch-grid,
  body .modal-overlay .batch-config {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 14px !important;
    overflow: visible !important;
  }

  body .modal-overlay .aliyun-official-section,
  body .modal-overlay .aliyun-reset-system-section {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body .modal-overlay .aliyun-official-section h4,
  body .modal-overlay .aliyun-reset-system-section h4 {
    margin: 10px 0 10px !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  body .modal-overlay .aliyun-image-options,
  body .modal-overlay .aliyun-official-image-options,
  body .modal-overlay .aliyun-plan-options,
  body .modal-overlay .aliyun-official-plan-options,
  body .modal-overlay .aliyun-region-groups,
  body .modal-overlay .aliyun-official-region-options {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body .modal-overlay .aliyun-image-options,
  body .modal-overlay .aliyun-official-image-options,
  body .modal-overlay .aliyun-plan-options,
  body .modal-overlay .aliyun-official-plan-options {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body .modal-overlay .aliyun-image-option {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 16px !important;
    min-height: auto !important;
  }

  body .modal-overlay .aliyun-image-option strong {
    font-size: 17px !important;
    line-height: 1.2 !important;
  }

  body .modal-overlay .aliyun-image-option select,
  body .modal-overlay .aliyun-image-option input,
  body .modal-overlay select,
  body .modal-overlay input,
  body .modal-overlay textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body .modal-overlay .aliyun-region-group {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body .modal-overlay .aliyun-region-group > strong {
    display: block !important;
    margin: 14px 0 10px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  body .modal-overlay .aliyun-official-region-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body .modal-overlay .aliyun-official-region-option {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 10px 8px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body .modal-overlay .aliyun-official-region-option span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
  }

  body .modal-overlay .aliyun-plan-option,
  body .modal-overlay .aliyun-official-plan-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    padding: 16px !important;
  }

  body .modal-overlay .aliyun-plan-price {
    font-size: 24px !important;
    line-height: 1.15 !important;
  }

  body .modal-overlay .aliyun-plan-spec-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body .modal-overlay .aliyun-purchase-bottom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 4px 0 0 !important;
    position: static !important;
    overflow: visible !important;
  }

  body .modal-overlay .aliyun-count-control > div,
  body .modal-overlay .aliyun-duration-options {
    width: 100% !important;
    min-width: 0 !important;
  }

  body .modal-overlay .aliyun-duration-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body .modal-overlay .aliyun-duration-options > span {
    grid-column: 1 / -1 !important;
  }

  body .modal-overlay .aliyun-duration-plain {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 10px 6px !important;
    font-size: 13px !important;
  }

  body .modal-overlay .modal-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 6px 0 0 !important;
    position: static !important;
    transform: none !important;
  }

  body .modal-overlay .modal-actions button,
  body .modal-overlay .primary-btn,
  body .modal-overlay .ghost-btn,
  body .modal-overlay .secondary-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
  }

  #aliyun-reset-modal .aliyun-operation-modal {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
  }

  #batch-modal .batch-modal-box {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
  }

  #batch-modal .batch-config > .form-row-2,
  #batch-modal .batch-config > .form-row-3,
  #batch-modal #batch-protocol-fields,
  #batch-modal .batch-proto-block:not([style*="display: none"]) {
    display: contents !important;
  }

  #batch-modal .batch-proto-block[style*="display:none"],
  #batch-modal .batch-proto-block[style*="display: none"] {
    display: none !important;
  }

  #batch-modal .field-label,
  #batch-modal .batch-check-row,
  #batch-modal .batch-skip-top {
    width: 100% !important;
    min-width: 0 !important;
  }

  #batch-modal .batch-config {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  #batch-modal .field-label > span {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  #batch-modal input,
  #batch-modal select {
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    border-radius: 999px !important;
  }

  #batch-modal .form-hint,
  #batch-modal .modal-actions {
    grid-column: 1 / -1 !important;
  }

  #batch-modal .modal-actions {
    grid-template-columns: 1fr !important;
  }

  #batch-modal .batch-skip-top {
    justify-content: flex-start !important;
    padding: 10px 12px !important;
  }

  #batch-modal #batch-skip-existing {
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
  }
}

/* Final mobile guard for real phone browsers: no sticky/floating controls in the three large dialogs. */
@media (max-width: 920px) {
  #aliyun-instance-modal,
  #aliyun-reset-modal,
  #batch-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 10px !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #aliyun-instance-modal .aliyun-buy-modal,
  #aliyun-reset-modal .aliyun-operation-modal,
  #batch-modal .batch-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: calc(100dvh - 20px) !important;
    margin: 0 !important;
    padding: 22px 18px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 28px !important;
    box-sizing: border-box !important;
  }

  #aliyun-instance-modal .modal-header,
  #aliyun-reset-modal .modal-header,
  #batch-modal .modal-header {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 0 14px !important;
    margin: 0 !important;
    transform: none !important;
  }

  #aliyun-instance-modal .modal-header h3,
  #aliyun-reset-modal .modal-header h3,
  #batch-modal .modal-header h3 {
    width: 100% !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  #aliyun-instance-modal .aliyun-plan-sync-form,
  #batch-modal .batch-header-actions {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
  }

  #batch-modal .batch-header-actions h3 {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    transform: none !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    flex-shrink: 1 !important;
  }

  #batch-modal .batch-header-actions .ghost-btn {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }

  #batch-modal .batch-skip-top {
    width: 100% !important;
    justify-content: flex-start !important;
    margin-top: 8px !important;
  }

  @media (max-width: 760px) {
    #batch-modal .batch-header-actions {
      flex-direction: column !important;
      align-items: stretch !important;
    }

    #batch-modal .batch-header-actions h3 {
      font-size: 22px !important;
      text-align: center !important;
    }

    #batch-modal .batch-header-actions .ghost-btn {
      width: 100% !important;
    }
  }

  #aliyun-instance-modal .modal-header .ghost-btn,
  #aliyun-reset-modal .modal-header .ghost-btn,
  #batch-modal .modal-header .ghost-btn,
  #aliyun-instance-modal .aliyun-plan-sync-form > *,
  #batch-modal .batch-header-actions > * {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
  }

  #aliyun-instance-modal .aliyun-purchase-form,
  #aliyun-reset-modal .form-grid,
  #batch-modal .batch-grid,
  #batch-modal .batch-config {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 14px !important;
    overflow: visible !important;
  }

  #aliyun-instance-modal .aliyun-official-section,
  #aliyun-reset-modal .aliyun-official-section,
  #aliyun-reset-modal .aliyun-reset-system-section {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  #aliyun-instance-modal .aliyun-image-options,
  #aliyun-reset-modal .aliyun-image-options,
  #aliyun-instance-modal .aliyun-plan-options {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 12px !important;
  }

  #aliyun-instance-modal .aliyun-image-option,
  #aliyun-reset-modal .aliyun-image-option,
  #aliyun-instance-modal .aliyun-plan-option {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: auto !important;
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  #aliyun-instance-modal .aliyun-image-option {
    grid-template-columns: 1fr !important;
  }

  #aliyun-instance-modal .aliyun-image-option select,
  #aliyun-reset-modal .aliyun-image-option select,
  #aliyun-instance-modal input,
  #aliyun-instance-modal select,
  #aliyun-reset-modal input,
  #aliyun-reset-modal select,
  #batch-modal input,
  #batch-modal select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #aliyun-instance-modal .aliyun-region-groups,
  #aliyun-instance-modal .aliyun-region-group,
  #aliyun-instance-modal .aliyun-official-region-options {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  #aliyun-instance-modal .aliyun-official-region-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #aliyun-instance-modal .aliyun-official-region-option {
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 8px !important;
    text-align: center !important;
  }

  #aliyun-instance-modal .aliyun-official-region-option span {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 14px !important;
  }

  #aliyun-instance-modal .aliyun-purchase-bottom,
  #batch-modal .modal-actions {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 8px 0 0 !important;
    transform: none !important;
  }

  #batch-modal .batch-config > .form-row-2,
  #batch-modal .batch-config > .form-row-3,
  #batch-modal #batch-protocol-fields,
  #batch-modal .batch-proto-block:not([style*="display: none"]) {
    display: contents !important;
  }

  #batch-modal .batch-proto-block[style*="display:none"],
  #batch-modal .batch-proto-block[style*="display: none"] {
    display: none !important;
  }

  #batch-modal .field-label,
  #batch-modal .batch-check-row,
  #batch-modal .batch-skip-top {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (min-width: 921px) {
  #batch-modal .batch-modal-box {
    width: min(1320px, 94vw) !important;
  }

  #batch-modal .batch-config {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 18px !important;
    align-items: end !important;
  }

  #batch-modal .batch-config > .form-row-2,
  #batch-modal .batch-config > .form-row-3,
  #batch-modal #batch-protocol-fields,
  #batch-modal .batch-proto-block:not([style*="display: none"]) {
    display: contents !important;
  }

  #batch-modal .batch-proto-block[style*="display:none"],
  #batch-modal .batch-proto-block[style*="display: none"] {
    display: none !important;
  }

  #batch-modal .field-label {
    width: 100% !important;
    min-width: 0 !important;
  }

  #batch-modal .form-hint,
  #batch-modal .modal-actions {
    grid-column: 1 / -1 !important;
  }
}

/* Compact Huawei purchase modal: same glass language, smaller footprint, first four plans only. */
#huawei-instance-modal .aliyun-buy-modal {
  width: min(1120px, 90vw) !important;
  max-height: calc(100vh - 56px) !important;
  padding: 20px 24px !important;
  border-radius: 28px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#huawei-instance-modal .modal-header {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
  padding: 0 !important;
}

#huawei-instance-modal .modal-header h3 {
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
}

#huawei-instance-modal .aliyun-purchase-form {
  display: grid !important;
  gap: 12px !important;
}

#huawei-instance-modal .aliyun-official-section {
  padding: 14px 16px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
}

#huawei-instance-modal .aliyun-official-section h4 {
  margin: 0 0 10px !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
}

#huawei-instance-modal .huawei-flexus-region-section {
  margin: 0 !important;
}

#huawei-instance-modal .huawei-flexus-region-options {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#huawei-instance-modal .huawei-flexus-region-option {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.56) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

#huawei-instance-modal .huawei-flexus-region-option span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#huawei-instance-modal .aliyun-image-options {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#huawei-instance-modal .aliyun-image-option {
  min-height: 64px !important;
  padding: 10px 12px !important;
  border-radius: 18px !important;
}

#huawei-instance-modal .aliyun-image-option span {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

#huawei-instance-modal .aliyun-image-option select {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
}

#huawei-instance-modal .huawei-flexus-plan-options {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#huawei-instance-modal .huawei-flexus-plan-card {
  min-height: 176px !important;
  padding: 14px !important;
  border-radius: 20px !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08) !important;
}

#huawei-instance-modal .huawei-flexus-plan-head strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

#huawei-instance-modal .huawei-flexus-spec-row {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

#huawei-instance-modal .huawei-flexus-price {
  margin-top: 2px !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
}

#huawei-instance-modal .aliyun-purchase-bottom {
  position: static !important;
  display: grid !important;
  grid-template-columns: minmax(190px, 1.4fr) minmax(150px, 0.9fr) minmax(150px, 0.8fr) auto !important;
  align-items: end !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

#huawei-instance-modal .aliyun-purchase-bottom input,
#huawei-instance-modal .aliyun-purchase-bottom select {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 13px !important;
}

#huawei-instance-modal .aliyun-buy-btn {
  min-height: 40px !important;
  white-space: nowrap !important;
}

@media (max-width: 920px) {
  body #huawei-instance-modal {
    align-items: flex-start !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  body #huawei-instance-modal .aliyun-buy-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 16px !important;
    border-radius: 24px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body #huawei-instance-modal .modal-header {
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
  }

  body #huawei-instance-modal .modal-header h3 {
    font-size: 20px !important;
  }

  body #huawei-instance-modal .aliyun-plan-sync-form {
    grid-column: 1 / -1 !important;
    order: 3 !important;
  }

  body #huawei-instance-modal .aliyun-plan-sync-form button {
    width: 100% !important;
  }

  body #huawei-instance-modal .aliyun-official-section {
    padding: 12px !important;
    border-radius: 20px !important;
  }

  body #huawei-instance-modal .huawei-flexus-region-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body #huawei-instance-modal .aliyun-image-options,
  body #huawei-instance-modal .huawei-flexus-plan-options,
  body #huawei-instance-modal .aliyun-purchase-bottom {
    grid-template-columns: 1fr !important;
  }

  body #huawei-instance-modal .huawei-flexus-plan-card {
    min-height: auto !important;
  }

  body #huawei-instance-modal .aliyun-purchase-bottom {
    align-items: stretch !important;
    padding: 12px !important;
  }
}

/* Final phone fit: purchase/reset/batch dialogs must never overflow or cover fields. */
@media (max-width: 920px) {
  body #aliyun-instance-modal,
  body #aliyun-reset-modal,
  body #batch-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 8px !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body #aliyun-instance-modal .aliyun-buy-modal,
  body #aliyun-reset-modal .aliyun-operation-modal,
  body #batch-modal .batch-modal-box {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: calc(100dvh - 16px) !important;
    margin: 0 !important;
    padding: 18px 14px calc(env(safe-area-inset-bottom, 0px) + 22px) !important;
    border-radius: 26px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain !important;
  }

  body #aliyun-instance-modal .modal-header,
  body #aliyun-reset-modal .modal-header,
  body #batch-modal .modal-header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body #aliyun-instance-modal .modal-header h3,
  body #aliyun-reset-modal .modal-header h3,
  body #batch-modal .modal-header h3 {
    font-size: 24px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    padding-right: 86px !important;
    text-align: left !important;
  }

  body #aliyun-instance-modal .modal-header > .ghost-btn,
  body #aliyun-reset-modal .modal-header > .ghost-btn,
  body #batch-modal .modal-header > .ghost-btn,
  body #batch-modal .batch-header-actions > .ghost-btn {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: auto !important;
    min-width: 72px !important;
    min-height: 40px !important;
    padding: 0 16px !important;
    transform: none !important;
  }

  body #aliyun-instance-modal .aliyun-plan-sync-form,
  body #batch-modal .batch-header-actions {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }

  body #batch-modal .batch-header-actions {
    padding-right: 86px !important;
  }

  body #aliyun-instance-modal .aliyun-plan-sync-form > *,
  body #batch-modal .batch-skip-top {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 40px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }

  body #aliyun-instance-modal .aliyun-purchase-form,
  body #aliyun-reset-modal .form-grid,
  body #batch-modal .batch-grid,
  body #batch-modal .batch-config {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body #aliyun-instance-modal .aliyun-official-section,
  body #aliyun-reset-modal .aliyun-official-section,
  body #aliyun-reset-modal .aliyun-reset-system-section {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body #aliyun-instance-modal .aliyun-official-section h4,
  body #aliyun-reset-modal .aliyun-official-section h4 {
    margin: 10px 0 8px !important;
    font-size: 20px !important;
    line-height: 1.15 !important;
  }

  body #aliyun-instance-modal .aliyun-image-options,
  body #aliyun-reset-modal .aliyun-image-options,
  body #aliyun-instance-modal .aliyun-plan-options {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  body #aliyun-instance-modal .aliyun-image-option,
  body #aliyun-reset-modal .aliyun-image-option,
  body #aliyun-instance-modal .aliyun-plan-option {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: auto !important;
    padding: 14px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  body #aliyun-instance-modal .aliyun-image-option strong,
  body #aliyun-reset-modal .aliyun-image-option strong {
    font-size: 17px !important;
    line-height: 1.15 !important;
  }

  body #aliyun-instance-modal .aliyun-official-region-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body #aliyun-instance-modal .aliyun-region-group {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body #aliyun-instance-modal .aliyun-region-group > strong {
    display: block !important;
    margin: 12px 0 8px !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  body #aliyun-instance-modal .aliyun-official-region-option {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 8px 6px !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  body #aliyun-instance-modal .aliyun-official-region-option span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 13px !important;
  }

  body #aliyun-instance-modal .aliyun-plan-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body #aliyun-instance-modal .aliyun-purchase-bottom,
  body #batch-modal .modal-actions {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    transform: none !important;
  }

  body #batch-modal .batch-config > .form-row-2,
  body #batch-modal .batch-config > .form-row-3,
  body #batch-modal .batch-proto-block:not([style*="display: none"]) {
    display: contents !important;
  }

  body #batch-modal .batch-form-row-4 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body #batch-modal #batch-protocol-fields,
  body #batch-modal .batch-hidden-defaults {
    display: none !important;
  }

  body #batch-modal .batch-proto-block[style*="display:none"],
  body #batch-modal .batch-proto-block[style*="display: none"] {
    display: none !important;
  }

  body #batch-modal .field-label {
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  body #batch-modal .field-label > span {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  body #aliyun-instance-modal input,
  body #aliyun-instance-modal select,
  body #aliyun-reset-modal input,
  body #aliyun-reset-modal select,
  body #batch-modal input,
  body #batch-modal select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
  }

  body #batch-modal .batch-switch {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,0.58) !important;
    border: 1px solid rgba(255,255,255,0.72) !important;
    box-sizing: border-box !important;
  }

  body #batch-modal .batch-switch input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    pointer-events: none !important;
  }

  body #batch-modal .batch-switch-track {
    position: relative !important;
    width: 40px !important;
    height: 24px !important;
    min-width: 40px !important;
    border-radius: 999px !important;
    background: rgba(148,163,184,0.36) !important;
  }

  body #batch-modal .batch-switch-track i {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin: 2px !important;
    border-radius: 999px !important;
    background: #fff !important;
    box-shadow: 0 3px 9px rgba(15,23,42,0.18) !important;
    transition: transform .18s ease !important;
  }

  body #batch-modal .batch-switch input:checked + .batch-switch-track {
    background: linear-gradient(135deg, #38bdf8, #6366f1) !important;
  }

  body #batch-modal .batch-switch input:checked + .batch-switch-track i {
    transform: translateX(16px) !important;
  }

  body #batch-modal .batch-switch em {
    font-style: normal !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #172033 !important;
  }

  body #aliyun-instance-modal button,
  body #aliyun-reset-modal button,
  body #batch-modal button {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Compact batch inbound modal: dense desktop layout without changing logic. */
@media (min-width: 921px) {
  #batch-modal .batch-modal-box {
    width: min(1080px, calc(100vw - 96px)) !important;
    max-height: calc(100vh - 96px) !important;
    padding: 24px 28px 26px !important;
    border-radius: 26px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #batch-modal .modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
    padding: 0 !important;
  }

  #batch-modal .modal-header h3 {
    font-size: 24px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }

  #batch-modal .batch-header-actions {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  #batch-modal .batch-skip-top {
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
  }

  #batch-modal .batch-skip-inline {
    justify-content: flex-start !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 12px !important;
  }

  #batch-modal .batch-grid,
  #batch-modal .batch-config {
    gap: 12px !important;
  }

  #batch-modal .batch-config {
    grid-template-columns: 1fr !important;
  }

  #batch-modal .batch-form-row-4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px 16px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #batch-modal #batch-protocol-fields,
  #batch-modal .batch-hidden-defaults {
    display: none !important;
  }

  #batch-modal .field-label {
    gap: 7px !important;
    min-width: 0 !important;
  }

  #batch-modal .field-label > span {
    margin-bottom: 0 !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
  }

  #batch-modal input,
  #batch-modal select {
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 14px !important;
    border-radius: 16px !important;
    font-size: 14px !important;
  }

  #batch-modal .batch-skip-inline {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    height: 42px !important;
    min-height: 42px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.58) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(15, 23, 42, 0.06) !important;
    box-sizing: border-box !important;
  }

  #batch-modal .batch-skip-inline input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    accent-color: #3b82f6 !important;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
  }

  #batch-modal .batch-skip-inline span {
    display: inline !important;
    margin: 0 !important;
    color: #1f2937 !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  #batch-modal .form-hint {
    min-height: 40px !important;
    padding: 10px 14px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
  }

  #batch-modal .modal-actions {
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 14px 0 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  #batch-modal .modal-actions button {
    width: auto !important;
    min-width: 96px !important;
    min-height: 40px !important;
    padding: 0 22px !important;
    font-size: 14px !important;
  }
}

/* Batch inbound final polish: compact glass form, balanced rows. */
@media (min-width: 921px) {
  #batch-modal .batch-modal-box {
    width: min(960px, calc(100vw - 120px)) !important;
    padding: 26px 30px 28px !important;
    border-radius: 30px !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.76), rgba(255,255,255,0.46)),
      radial-gradient(circle at 16% 18%, rgba(99, 102, 241, 0.12), transparent 28%),
      radial-gradient(circle at 82% 24%, rgba(14, 165, 233, 0.12), transparent 30%) !important;
    border: 1px solid rgba(255,255,255,0.72) !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.9) !important;
  }

  #batch-modal .modal-header {
    margin-bottom: 18px !important;
  }

  #batch-modal .batch-header-actions h3 {
    font-size: 25px !important;
    font-weight: 800 !important;
    color: #111827 !important;
  }

  #batch-modal .batch-header-actions .ghost-btn {
    min-width: 62px !important;
    min-height: 38px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.58) !important;
    border: 1px solid rgba(255,255,255,0.72) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08) !important;
  }

  #batch-modal .batch-config {
    padding: 16px !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.32) !important;
    border: 1px solid rgba(255, 255, 255, 0.46) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.62), 0 16px 44px rgba(15, 23, 42, 0.08) !important;
  }

  #batch-modal .batch-form-row-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  #batch-modal .field-label,
  #batch-modal .batch-toggle-field {
    display: grid !important;
    grid-template-rows: auto 44px !important;
    align-content: start !important;
    gap: 7px !important;
  }

  #batch-modal .field-label > span,
  #batch-modal .batch-toggle-field > span {
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    padding-left: 2px !important;
  }

  #batch-modal input,
  #batch-modal select {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.76) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 10px 24px rgba(15,23,42,0.06) !important;
    color: #1f2937 !important;
  }

  #batch-modal input:focus,
  #batch-modal select:focus {
    border-color: rgba(59,130,246,0.56) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.13), 0 12px 26px rgba(15,23,42,0.08) !important;
  }

  #batch-modal .batch-skip-inline {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.76) !important;
  }

  #batch-modal .batch-skip-inline input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: grid !important;
    place-items: center !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    border-radius: 999px !important;
    border: 2px solid rgba(59,130,246,0.5) !important;
    background: rgba(255,255,255,0.78) !important;
  }

  #batch-modal .batch-skip-inline input[type="checkbox"]:checked {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
  }

  #batch-modal .batch-skip-inline input[type="checkbox"]:checked::after {
    content: "" !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 999px !important;
    background: #fff !important;
  }

  #batch-modal .batch-switch {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    height: 44px !important;
    margin-right: auto !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.5) !important;
    border: 1px solid rgba(255,255,255,0.72) !important;
    box-shadow: 0 10px 24px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.78) !important;
    color: #172033 !important;
    cursor: pointer !important;
    user-select: none !important;
  }

  #batch-modal .batch-switch input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    pointer-events: none !important;
  }

  #batch-modal .batch-switch-track {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    width: 40px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background: rgba(148,163,184,0.36) !important;
    box-shadow: inset 0 1px 4px rgba(15,23,42,0.12) !important;
    transition: background .18s ease !important;
  }

  #batch-modal .batch-switch-track i {
    width: 20px !important;
    height: 20px !important;
    margin-left: 2px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.96) !important;
    box-shadow: 0 3px 9px rgba(15,23,42,0.18) !important;
    transition: transform .18s ease !important;
  }

  #batch-modal .batch-switch input:checked + .batch-switch-track {
    background: linear-gradient(135deg, #38bdf8, #6366f1) !important;
  }

  #batch-modal .batch-switch input:checked + .batch-switch-track i {
    transform: translateX(16px) !important;
  }

  #batch-modal .batch-switch em {
    font-style: normal !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  #batch-modal .modal-actions {
    padding-top: 18px !important;
  }

  #batch-modal .modal-actions .primary-btn,
  #batch-modal .modal-actions .ghost-btn {
    min-width: 112px !important;
    height: 44px !important;
    border-radius: 18px !important;
  }
}

@media (min-width: 921px) and (max-width: 1160px) {
  #batch-modal .batch-modal-box {
    width: min(900px, calc(100vw - 48px)) !important;
  }
}

/* Batch inbound protocol-aware layout: 3 clean columns, no horizontal clipping. */
@media (min-width: 921px) {
  #batch-modal .batch-modal-box {
    width: min(760px, calc(100vw - 56px)) !important;
    max-width: calc(100vw - 56px) !important;
  }

  #batch-modal .batch-config {
    overflow: visible !important;
    padding: 14px !important;
  }

  #batch-modal .batch-form-row-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px 12px !important;
  }

  #batch-modal .batch-field-hidden {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  #batch-modal .batch-expiry-field input {
    max-width: 100% !important;
  }

  #batch-modal .field-label[style*="display:none"],
  #batch-modal .field-label[style*="display: none"] {
    display: none !important;
  }
}

/* Batch inbound compact controls: keep fields short instead of stretching across empty space. */
@media (min-width: 921px) {
  #batch-modal .batch-modal-box {
    width: min(710px, calc(100vw - 64px)) !important;
    max-width: min(710px, calc(100vw - 64px)) !important;
  }

  #batch-modal .batch-config {
    display: grid !important;
    gap: 14px !important;
    justify-items: start !important;
    width: auto !important;
  }

  #batch-modal .batch-form-row-4 {
    display: grid !important;
    grid-template-columns: repeat(3, 200px) !important;
    align-items: end !important;
    justify-content: start !important;
    gap: 12px 16px !important;
    width: auto !important;
  }

  #batch-modal .field-label {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  #batch-modal .field-label > input,
  #batch-modal .field-label > select {
    width: 100% !important;
    max-width: 100% !important;
  }

  #batch-modal #batch-project-select,
  #batch-modal #batch-node-group-select,
  #batch-modal #batch-user-select {
    width: 200px !important;
    max-width: 200px !important;
  }

  #batch-modal #batch-protocol {
    width: 200px !important;
    max-width: 200px !important;
  }

  #batch-modal #batch-port,
  #batch-modal #batch-speed-limit,
  #batch-modal #batch-traffic-limit {
    width: 200px !important;
    max-width: 200px !important;
  }

  #batch-modal #batch-count-per-project {
    width: 200px !important;
    max-width: 200px !important;
  }

  #batch-modal #batch-expiry,
  #batch-modal #batch-remark,
  #batch-modal #batch-socks-username,
  #batch-modal #batch-socks-password,
  #batch-modal #batch-ss-method,
  #batch-modal #batch-ss-password,
  #batch-modal #batch-vless-flow {
    width: 200px !important;
    max-width: 200px !important;
  }

  #batch-modal .batch-protocol-field.batch-field-hidden {
    display: none !important;
  }
}

/* Final compact modal pass: trim dead space while keeping aligned controls. */
body .modal-overlay .modal-box,
body .modal-overlay .modal-box-wide,
body .modal-overlay .aliyun-operation-modal,
body .modal-overlay .aliyun-account-modal-box,
body .modal-overlay .chain-renew-modal-box {
  padding: 18px 20px !important;
  max-height: calc(100vh - 44px) !important;
}

body .modal-overlay .modal-header {
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
}

body .modal-overlay .modal-header h3 {
  font-size: 22px !important;
  line-height: 1.15 !important;
}

body .modal-overlay .form-grid {
  gap: 10px 12px !important;
}

/* Chain detail output must stay readable over the high-transparency glass modal. */
body .swal2-popup.glass-swal-popup,
body .swal2-popup.glass-swal-popup * {
  color: #202638 !important;
  text-shadow: none !important;
}

body .swal2-popup.glass-swal-popup .swal2-title {
  color: #141827 !important;
}

body .swal2-popup.glass-swal-popup .chain-detail-modal-grid {
  color: #202638 !important;
}

body .swal2-popup.glass-swal-popup .chain-detail-modal-block {
  background: rgba(255, 255, 255, 0.76) !important;
  border: 1px solid rgba(210, 218, 238, 0.82) !important;
  border-radius: 20px !important;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.9), 0 14px 34px rgba(36, 43, 66, 0.12) !important;
}

body .swal2-popup.glass-swal-popup .chain-detail-modal-block > div {
  background: rgba(246, 250, 255, 0.82) !important;
  color: #202638 !important;
  border-radius: 18px 18px 0 0 !important;
}

body .swal2-popup.glass-swal-popup .chain-detail-modal-block strong {
  color: #202638 !important;
  font-weight: 800 !important;
}

body .swal2-popup.glass-swal-popup .chain-detail-modal-block pre {
  color: #30364a !important;
  background: rgba(255, 255, 255, 0.62) !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

body .swal2-popup.glass-swal-popup .chain-detail-copy-btn {
  color: #6357f6 !important;
  background: rgba(255,255,255,0.86) !important;
}

/* Dashboard probe table: remove corrupted icon prefixes from old CSS. */
.qingshe-probe-table th::before {
  content: none !important;
}

body .modal-overlay .modal-actions {
  margin-top: 12px !important;
  padding-top: 0 !important;
  gap: 10px !important;
}

body .modal-overlay input,
body .modal-overlay select,
body .modal-overlay textarea {
  min-height: 40px !important;
}

@media (min-width: 921px) {
  body #batch-modal .batch-modal-box {
    width: 704px !important;
    max-width: 704px !important;
    padding: 18px 20px 20px !important;
    border-radius: 26px !important;
  }

  body #batch-modal .modal-header {
    margin-bottom: 12px !important;
  }

  body #batch-modal .batch-header-actions h3 {
    font-size: 23px !important;
  }

  body #batch-modal .batch-config {
    width: 664px !important;
    padding: 12px !important;
    gap: 10px !important;
    border-radius: 20px !important;
  }

  body #batch-modal .batch-form-row-4 {
    display: grid !important;
    grid-template-columns: repeat(3, 200px) !important;
    gap: 10px 12px !important;
    width: 624px !important;
  }

  body #batch-modal .field-label {
    grid-template-rows: auto 40px !important;
    gap: 5px !important;
  }

  body #batch-modal .field-label > span {
    font-size: 12px !important;
    line-height: 1.05 !important;
  }

  body #batch-modal input,
  body #batch-modal select {
    width: 200px !important;
    max-width: 200px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 15px !important;
    font-size: 13px !important;
  }

  body #batch-modal .batch-field-hidden {
    display: none !important;
  }

  body #batch-modal .modal-actions {
    width: 664px !important;
    margin-top: 12px !important;
    padding-top: 0 !important;
  }

  body #batch-modal .modal-actions .primary-btn,
  body #batch-modal .modal-actions .ghost-btn,
  body #batch-modal .batch-switch {
    height: 40px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 920px) {
  body .modal-overlay .modal-box,
  body .modal-overlay .modal-box-wide,
  body .modal-overlay .aliyun-operation-modal,
  body .modal-overlay .aliyun-account-modal-box,
  body .modal-overlay .batch-modal-box {
    padding: 14px !important;
  }
}

/* Batch protocol visibility and user picker must win over older mobile/desktop rules. */
body #batch-modal .batch-field-hidden,
body #batch-modal .batch-protocol-field.batch-field-hidden {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body #batch-modal .batch-user-combo {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 66px !important;
  gap: 6px !important;
  width: 200px !important;
  max-width: 200px !important;
}

body #batch-modal .batch-user-combo input,
body #batch-modal .batch-user-combo select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body #batch-modal .batch-user-combo select {
  padding-left: 8px !important;
  padding-right: 18px !important;
}
/* Proxy checker */
.proxy-checker-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.glass-panel {
  background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(248,251,255,0.72));
  border: 1px solid rgba(214, 221, 240, 0.58);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(31, 35, 63, 0.10), inset 0 1px 0 rgba(255,255,255,0.88);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.proxy-checker-head {
  min-height: 76px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.proxy-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.proxy-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6, #6c63ff);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.28);
}

.proxy-title h3 {
  margin: 0;
  font-size: 22px;
  color: var(--text);
}

.proxy-title p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.segmented-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.82);
}

.segmented-tabs button {
  border: 0;
  min-width: 104px;
  min-height: 38px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  cursor: pointer;
}

.segmented-tabs button.active {
  color: #2563eb;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.proxy-checker-body {
  padding: 22px;
}

.notice-line,
.format-line {
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.82);
  color: #7c6a24;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}

.format-line {
  margin-top: 12px;
  border-left-color: #3b82f6;
  background: rgba(248, 250, 252, 0.88);
  color: var(--text-muted);
}

.proxy-tab-panel { display: none; }
.proxy-tab-panel.active { display: block; }

.proxy-check-form {
  margin-top: 18px;
}

.proxy-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 14px;
  margin-bottom: 14px;
}

.proxy-list-field textarea {
  min-height: 220px;
  resize: vertical;
}

.proxy-start-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
}

.proxy-divider {
  height: 3px;
  margin: 22px 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.92);
}

.proxy-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.proxy-stat-card {
  min-height: 88px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.68);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

.proxy-stat-card span {
  color: var(--text-muted);
  font-weight: 800;
}

.proxy-stat-card strong {
  font-size: 26px;
  line-height: 1.1;
  color: var(--text);
}

.proxy-stat-card.success strong { color: #059669; }
.proxy-stat-card.danger strong { color: #dc2626; }
.proxy-stat-card.warning strong { color: #d97706; }
.proxy-stat-card.running strong { color: #3b82f6; }

.proxy-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.proxy-result-head h3 {
  margin: 0;
  color: var(--text);
}

.proxy-copy-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.success-btn,
.danger-btn {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.success-btn { background: #10b981; }
.danger-btn { background: #ef4444; }

.proxy-result-table {
  overflow-x: auto;
}

.proxy-result-table table {
  min-width: 980px;
}

.proxy-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.proxy-status.ok {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.proxy-status.bad {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.proxy-status.partial {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.muted-empty,
.empty-module-note {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 12px;
}

@media (max-width: 900px) {
  .proxy-checker-head,
  .proxy-result-head {
    align-items: stretch;
    flex-direction: column;
  }
  .segmented-tabs {
    width: 100%;
  }
  .segmented-tabs button {
    flex: 1;
  }
  .proxy-form-grid,
  .proxy-stats-grid {
    grid-template-columns: 1fr;
  }
  .proxy-checker-body {
    padding: 14px;
  }
  .proxy-list-field textarea {
    min-height: 180px;
  }
  .proxy-copy-actions button {
    flex: 1 1 120px;
  }
}
/* UCloud purchase modal: compact official-style choices. */
#ucloud-instance-modal .aliyun-buy-modal {
  max-width: min(1180px, calc(100vw - 36px));
}

#ucloud-instance-modal .ucloud-purchase-form {
  display: grid;
  gap: 12px;
}

#ucloud-instance-modal .ucloud-buy-section {
  padding: 14px;
}

#ucloud-instance-modal .ucloud-buy-section h4 {
  margin-bottom: 10px;
}

#ucloud-instance-modal .ucloud-image-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#ucloud-instance-modal .ucloud-image-option {
  min-height: 50px;
}

#ucloud-instance-modal .ucloud-region-group + .ucloud-region-group {
  margin-top: 10px;
}

#ucloud-instance-modal .ucloud-region-group h5 {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
}

#ucloud-instance-modal .ucloud-region-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}

#ucloud-instance-modal .ucloud-region-option {
  min-height: 42px;
  padding: 0 10px;
}

#ucloud-instance-modal .ucloud-region-option span {
  font-size: 13px;
  white-space: nowrap;
}

#ucloud-instance-modal .ucloud-plan-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#ucloud-instance-modal .ucloud-plan-card {
  min-height: 208px;
  padding: 0;
  overflow: hidden;
}

#ucloud-instance-modal .ucloud-plan-card > input {
  position: absolute;
  opacity: 0;
}

#ucloud-instance-modal .ucloud-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

#ucloud-instance-modal .ucloud-plan-head strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-plan-head i {
  width: 20px;
  height: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
}

#ucloud-instance-modal .ucloud-plan-card:has(input:checked) .ucloud-plan-head strong {
  color: #315cff;
}

#ucloud-instance-modal .ucloud-plan-card:has(input:checked) .ucloud-plan-head i {
  border: 6px solid #3b63ff;
}

#ucloud-instance-modal .ucloud-plan-spec {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 0;
  color: #7f8da8;
}

#ucloud-instance-modal .ucloud-plan-spec em {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #5eead4;
}

#ucloud-instance-modal .ucloud-plan-spec b {
  font-weight: 800;
}

#ucloud-instance-modal .ucloud-plan-spec i {
  color: #0f172a;
  font-style: normal;
  font-weight: 800;
}

#ucloud-instance-modal .ucloud-plan-price {
  display: block;
  margin-top: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
  color: #64748b;
  font-weight: 800;
}

#ucloud-instance-modal .ucloud-plan-price strong {
  color: #315cff;
  font-size: 24px;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-buy-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#ucloud-instance-modal .ucloud-create-switches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

#ucloud-instance-modal .ucloud-create-switches label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.58);
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

#ucloud-instance-modal .ucloud-buy-actions {
  justify-content: flex-end;
}

@media (max-width: 920px) {
  #ucloud-instance-modal .ucloud-image-options,
  #ucloud-instance-modal .ucloud-buy-settings {
    grid-template-columns: 1fr;
  }
  #ucloud-instance-modal .ucloud-region-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #ucloud-instance-modal .ucloud-plan-options {
    grid-template-columns: 1fr;
  }
}

/* UCloud purchase layout v2: region, image, spec, fixed purchase row. */
#ucloud-instance-modal .ucloud-buy-modal {
  max-width: min(1180px, calc(100vw - 24px));
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 18px 22px;
}

#ucloud-instance-modal .ucloud-buy-header {
  align-items: center;
  margin-bottom: 10px;
}

#ucloud-instance-modal .ucloud-buy-header h3 {
  font-size: 22px;
  letter-spacing: 0;
}

#ucloud-instance-modal .ucloud-buy-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

#ucloud-instance-modal .ucloud-buy-header-actions button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 18px;
}

#ucloud-instance-modal .ucloud-purchase-form {
  display: grid;
  gap: 10px;
}

#ucloud-instance-modal .ucloud-buy-section {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.82), 0 18px 48px rgba(32, 38, 56, 0.10);
}

#ucloud-instance-modal .ucloud-buy-section h4 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-region-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

#ucloud-instance-modal .ucloud-region-option,
#ucloud-instance-modal .ucloud-image-card {
  position: relative;
  min-height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(203, 213, 225, 0.72);
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.80), 0 12px 28px rgba(32,38,56,0.07);
  cursor: pointer;
}

#ucloud-instance-modal .ucloud-region-option input,
#ucloud-instance-modal .ucloud-image-card input,
#ucloud-instance-modal .ucloud-plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#ucloud-instance-modal .ucloud-region-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

#ucloud-instance-modal .ucloud-region-option:has(input:checked),
#ucloud-instance-modal .ucloud-image-card:has(input:checked),
#ucloud-instance-modal .ucloud-plan-card:has(input:checked) {
  border-color: rgba(49, 92, 255, 0.86);
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.86), 0 0 0 1px rgba(49,92,255,0.18), 0 18px 42px rgba(49,92,255,0.14);
}

#ucloud-instance-modal .ucloud-region-option:has(input:checked) span {
  color: #315cff;
}

#ucloud-instance-modal .ucloud-image-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#ucloud-instance-modal .ucloud-image-card {
  min-height: 76px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  gap: 10px;
}

#ucloud-instance-modal .ucloud-image-card strong {
  color: #475569;
  font-size: 16px;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-image-card select {
  width: 100%;
  min-height: 34px;
  border-radius: 12px;
  border: 0;
  padding: 0 14px;
  background: rgba(255,255,255,0.58);
  color: #111827;
  font-weight: 800;
}

#ucloud-instance-modal .ucloud-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

#ucloud-instance-modal .ucloud-section-title-row h4 {
  margin: 0;
}

#ucloud-instance-modal .ucloud-section-title-row span {
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
}

#ucloud-instance-modal .ucloud-plan-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#ucloud-instance-modal .ucloud-plan-card {
  position: relative;
  min-height: 150px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(203,213,225,0.72);
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.82), 0 14px 34px rgba(32,38,56,0.08);
  display: grid;
  gap: 6px;
  cursor: pointer;
}

#ucloud-instance-modal .ucloud-plan-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

#ucloud-instance-modal .ucloud-plan-title i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677ff, #4f8cff);
  position: relative;
}

#ucloud-instance-modal .ucloud-plan-title i::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 3px;
  background: #fff;
  transform: rotate(45deg);
}

#ucloud-instance-modal .ucloud-plan-title strong {
  color: #111827;
  font-size: 17px;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-plan-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

#ucloud-instance-modal .ucloud-plan-row em {
  color: #111827;
  font-style: normal;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-plan-price {
  margin-top: 2px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

#ucloud-instance-modal .ucloud-plan-price strong {
  color: #4b5563;
  font-size: 20px;
  font-weight: 950;
}

#ucloud-instance-modal .ucloud-buy-footer {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) 110px 120px minmax(160px, 1fr) minmax(190px, 1.2fr) auto auto;
  gap: 8px;
  align-items: end;
}

#ucloud-instance-modal .ucloud-buy-footer > label {
  margin: 0;
}

#ucloud-instance-modal .ucloud-buy-flags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-content: end;
}

#ucloud-instance-modal .ucloud-buy-flags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.64);
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

#ucloud-instance-modal .ucloud-buy-cost {
  align-self: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

#ucloud-instance-modal .ucloud-buy-cost strong {
  color: #111827;
  font-size: 18px;
  margin-left: 6px;
}

#ucloud-instance-modal .ucloud-buy-submit {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 18px;
}

@media (max-width: 1180px) {
  #ucloud-instance-modal .ucloud-region-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #ucloud-instance-modal .ucloud-plan-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #ucloud-instance-modal .ucloud-buy-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #ucloud-instance-modal .ucloud-buy-modal {
    padding: 18px 14px;
  }
  #ucloud-instance-modal .ucloud-buy-header {
    align-items: stretch;
    flex-direction: column;
  }
  #ucloud-instance-modal .ucloud-buy-header-actions {
    justify-content: stretch;
  }
  #ucloud-instance-modal .ucloud-buy-header-actions button {
    flex: 1;
  }
  #ucloud-instance-modal .ucloud-region-options,
  #ucloud-instance-modal .ucloud-image-options,
  #ucloud-instance-modal .ucloud-plan-options,
  #ucloud-instance-modal .ucloud-buy-footer {
    grid-template-columns: 1fr;
  }
}

/* UCloud purchase final: match Huawei compact modal density. */
#ucloud-instance-modal .ucloud-buy-modal {
  width: min(1120px, 90vw) !important;
  max-height: calc(100vh - 56px) !important;
  padding: 20px 24px !important;
  border-radius: 28px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#ucloud-instance-modal .ucloud-buy-header {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
  padding: 0 !important;
}

#ucloud-instance-modal .ucloud-buy-header h3 {
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
}

#ucloud-instance-modal .ucloud-buy-header-actions button {
  min-height: 40px !important;
  padding: 0 18px !important;
}

#ucloud-instance-modal .ucloud-purchase-form {
  display: grid !important;
  gap: 12px !important;
}

#ucloud-instance-modal .ucloud-buy-section {
  padding: 14px 16px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
}

#ucloud-instance-modal .ucloud-buy-section h4 {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
}

#ucloud-instance-modal .ucloud-region-options {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#ucloud-instance-modal .ucloud-region-option {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.56) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

#ucloud-instance-modal .ucloud-region-option span {
  font-size: 12px !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#ucloud-instance-modal .ucloud-image-options {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#ucloud-instance-modal .ucloud-image-card {
  min-height: 64px !important;
  padding: 10px 12px !important;
  border-radius: 18px !important;
}

#ucloud-instance-modal .ucloud-image-card strong {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

#ucloud-instance-modal .ucloud-image-card select {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
}

#ucloud-instance-modal .ucloud-section-title-row {
  margin-bottom: 10px !important;
}

#ucloud-instance-modal .ucloud-section-title-row span {
  font-size: 12px !important;
}

#ucloud-instance-modal .ucloud-plan-options {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#ucloud-instance-modal .ucloud-plan-card {
  min-height: 176px !important;
  padding: 14px !important;
  border-radius: 20px !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08) !important;
}

#ucloud-instance-modal .ucloud-plan-title i {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
}

#ucloud-instance-modal .ucloud-plan-title i::after {
  inset: 12px !important;
}

#ucloud-instance-modal .ucloud-plan-title strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

#ucloud-instance-modal .ucloud-plan-row {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

#ucloud-instance-modal .ucloud-plan-price {
  margin-top: 2px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

#ucloud-instance-modal .ucloud-plan-price strong {
  font-size: 18px !important;
}

#ucloud-instance-modal .ucloud-buy-footer {
  position: static !important;
  display: grid !important;
  grid-template-columns: minmax(160px, 1.2fr) 108px 118px minmax(150px, 1fr) minmax(170px, 1fr) auto auto !important;
  align-items: end !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.52) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

#ucloud-instance-modal .ucloud-buy-footer input,
#ucloud-instance-modal .ucloud-buy-footer select {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 13px !important;
}

#ucloud-instance-modal .ucloud-buy-flags label {
  min-height: 30px !important;
  font-size: 12px !important;
}

#ucloud-instance-modal .ucloud-buy-cost {
  font-size: 14px !important;
}

#ucloud-instance-modal .ucloud-buy-cost strong {
  font-size: 18px !important;
}

#ucloud-instance-modal .ucloud-buy-submit {
  min-height: 40px !important;
  white-space: nowrap !important;
}

@media (max-width: 920px) {
  body #ucloud-instance-modal {
    align-items: flex-start !important;
    padding: 8px !important;
    overflow: hidden !important;
  }
  body #ucloud-instance-modal .ucloud-buy-modal {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 16px !important;
    border-radius: 24px !important;
  }
  body #ucloud-instance-modal .ucloud-region-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body #ucloud-instance-modal .ucloud-image-options,
  body #ucloud-instance-modal .ucloud-plan-options,
  body #ucloud-instance-modal .ucloud-buy-footer {
    grid-template-columns: 1fr !important;
  }
}

/* UCloud purchase selection states: JS toggles .is-selected for reliable feedback. */
#ucloud-instance-modal :is(.ucloud-region-option, .ucloud-image-card, .ucloud-plan-card) {
  cursor: pointer !important;
  user-select: none !important;
}

#ucloud-instance-modal :is(.ucloud-region-option, .ucloud-image-card, .ucloud-plan-card).is-selected {
  border-color: rgba(49, 92, 255, 0.9) !important;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.88), 0 0 0 1px rgba(49,92,255,0.22), 0 14px 32px rgba(49,92,255,0.14) !important;
}

#ucloud-instance-modal .ucloud-region-option.is-selected span,
#ucloud-instance-modal .ucloud-image-card.is-selected strong,
#ucloud-instance-modal .ucloud-plan-card.is-selected .ucloud-plan-title strong {
  color: #315cff !important;
}

#ucloud-instance-modal .ucloud-plan-card.is-selected .ucloud-plan-title i {
  box-shadow: 0 0 0 3px rgba(49,92,255,0.18) !important;
}

#ucloud-instance-modal .ucloud-buy-flags {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

#ucloud-instance-modal .ucloud-buy-flags label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  padding: 0 10px !important;
}

#ucloud-instance-modal .ucloud-buy-flags input[type="checkbox"] {
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(49, 92, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.08) !important;
}

#ucloud-instance-modal .ucloud-buy-flags input[type="checkbox"]:checked {
  border: 5px solid #315cff !important;
}
/* Batch create result modal: match content width, taller output, no giant empty shell. */
body #batch-result-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

body #batch-result-modal .batch-result-box {
  width: min(640px, calc(100vw - 32px)) !important;
  max-width: min(640px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 40px) !important;
  padding: 18px 20px !important;
  border-radius: 26px !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body #batch-result-modal .modal-header {
  margin-bottom: 4px !important;
  padding: 0 !important;
}

body #batch-result-modal .modal-header h3 {
  font-size: 22px !important;
  line-height: 1.15 !important;
}

body #batch-result-modal #batch-result-content {
  max-height: calc(100dvh - 210px) !important;
  overflow: auto !important;
}

body #batch-result-modal #batch-result-content p {
  margin: 0 0 10px !important;
}

body #batch-result-modal .batch-copy-output {
  width: 100% !important;
  min-height: 260px !important;
  height: min(320px, calc(100dvh - 300px)) !important;
  max-height: 360px !important;
  resize: vertical !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  white-space: pre !important;
}

body #batch-result-modal .modal-actions {
  justify-content: flex-end !important;
  margin-top: 8px !important;
  padding-top: 0 !important;
}

body #batch-result-modal .modal-actions button {
  min-height: 42px !important;
  border-radius: 18px !important;
  padding: 0 20px !important;
}

@media (max-width: 720px) {
  body #batch-result-modal {
    align-items: flex-start !important;
    padding: 8px !important;
  }
  body #batch-result-modal .batch-result-box {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 14px !important;
  }
  body #batch-result-modal .batch-copy-output {
    min-height: 220px !important;
    height: calc(100dvh - 290px) !important;
  }
  body #batch-result-modal .modal-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
  }
  body #batch-result-modal .modal-actions button {
    padding: 0 10px !important;
  }
}

/* ============================================================
   42IPwin full-site theme overlay - version 12.0.0.197
   Keep this block last-ish and easy to remove for rollback.
   ============================================================ */
body {
  --bg: #f7f8fc;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fbfcff;
  --sidebar: #151a21;
  --sidebar-soft: #1b222b;
  --text: #242736;
  --text-muted: #8b8fa3;
  --text-soft: #9aa1b3;
  --line: #edf0f6;
  --primary: #5b6cff;
  --primary-light: #8ab9ff;
  --primary-dark: #4b43d9;
  --accent: #18c8ff;
  --accent-soft: rgba(24, 200, 255, .12);
  --success: #22c979;
  --success-bg: #dff9ec;
  --danger: #ff5b6b;
  --danger-bg: #ffe7eb;
  --warning: #ffb020;
  --warning-bg: #fff3d6;
  --shadow: 0 14px 36px rgba(32, 38, 60, 0.10);
  --shadow-soft: 0 8px 22px rgba(32, 38, 60, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --radius-xl: 26px;
  --radius-pill: 999px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body .layout {
  min-height: 100vh;
  background: var(--bg);
}

body .sidebar {
  width: 232px;
  min-width: 232px;
  background: var(--sidebar);
  color: #cfd6e6;
  box-shadow: 12px 0 34px rgba(19, 24, 33, 0.12);
}

body .brand {
  min-height: 88px;
  padding: 0 18px;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

body .brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6675ff, #39bfff);
  box-shadow: 0 10px 24px rgba(91,108,255,.28);
}

body .brand h1,
body .brand-text h1 {
  color: #edf3ff;
  font-size: 18px;
  font-weight: 900;
}

body .brand p,
body .brand-text p {
  color: rgba(237,243,255,.48);
  font-size: 11px;
  font-weight: 750;
}

body .nav {
  padding: 18px 10px;
  gap: 8px;
}

body .nav a,
body .nav-cloud-toggle {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #c9d1df;
  font-weight: 700;
  transition: background .18s, color .18s, transform .18s;
}

body .nav a::before {
  display: none;
}

body .nav a:hover,
body .nav a.active,
body .nav-cloud-toggle:hover,
body .nav-cloud-toggle.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(91,108,255,.22), rgba(24,200,255,.12));
  box-shadow: none;
  transform: translateX(2px);
}

body .nav-cloud-panel > a {
  margin-left: 10px;
  padding: 9px 12px 9px 18px;
  font-size: 13px;
}

body .nav-cloud-chevron {
  background: rgba(255,255,255,.08);
  color: #9fb0ce;
}

body .content {
  margin-left: 232px;
  width: calc(100% - 232px);
  padding: 36px 38px;
  background: var(--bg);
}

body.user-shell:not(.has-cloud-view) .content {
  margin-left: 0;
  width: 100%;
}

body .topbar {
  margin-bottom: 26px;
}

body .topbar h2 {
  color: #222433;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

body .topbar p {
  color: #8f96aa;
  font-weight: 700;
}

body .role-tag {
  border-radius: var(--radius-pill);
  background: #e9edff;
  color: #5b6cff;
  font-weight: 850;
}

body .panel,
body .stat-card,
body .login-card,
body .server-toolbar,
body .install-progress-panel,
body .relay-panel,
body .chain-detail-card,
body .modal-box,
body .modal-box-wide,
body .batch-modal-box,
body .batch-result-box,
body .chain-renew-modal-box,
body .aliyun-buy-modal,
body .aliyun-operation-modal,
body .aliyun-account-modal-box {
  background: var(--panel) !important;
  border: 1px solid rgba(229,234,246,.92) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
}

body .panel,
body .server-toolbar,
body .install-progress-panel {
  padding: 22px !important;
}

body .panel-header,
body .modal-header,
body .compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body .panel-header h3,
body .modal-header h3,
body .modal-box h3 {
  color: #303348 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body .stats-grid {
  gap: 14px;
}

body .stat-card {
  min-height: 112px;
  padding: 22px 24px !important;
  position: relative;
  overflow: hidden;
}

body .stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

body .stat-card span {
  color: #7d8398 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body .stat-card strong {
  color: #1e2433 !important;
  font-size: 32px !important;
  font-weight: 950 !important;
}

body .stat-server strong { color: #2563eb !important; }
body .stat-node strong { color: #7c3aed !important; }
body .stat-inbound strong { color: #0891b2 !important; }
body .stat-user strong { color: #16a34a !important; }
body .stat-online strong { color: #059669 !important; }
body .stat-expiring strong,
body .stat-expired strong { color: #dc2626 !important; }

body .primary-btn,
body .secondary-btn,
body .ghost-btn,
body .danger-btn,
body .action-link,
body .mini-btn,
body button,
body input[type="submit"] {
  min-height: 38px;
  border-radius: 12px;
  font-weight: 850;
  box-shadow: none;
}

body .primary-btn {
  border: 0 !important;
  background: linear-gradient(135deg, #6675ff, #5b45e8) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(91,108,255,.24) !important;
}

body .secondary-btn,
body .ghost-btn,
body .action-link.secondary-btn {
  background: #fff !important;
  color: #5b6cff !important;
  border: 1px solid #e6eaf4 !important;
}

body .secondary-btn:hover,
body .ghost-btn:hover,
body .action-link.secondary-btn:hover {
  background: #f7faff !important;
  transform: translateY(-1px);
}

body .danger-btn {
  border: 0 !important;
  background: #ff5b6b !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(255,91,107,.20) !important;
}

body .toolbar-field,
body .field-label,
body .modal-form label,
body .form-grid label {
  color: #25293a;
  font-weight: 850;
}

body input:not([type="checkbox"]):not([type="radio"]),
body select,
body textarea,
body .toolbar-field input,
body .toolbar-field select,
body .toolbar-field textarea,
body .modal-box input,
body .modal-box select,
body .modal-box textarea {
  background: #fbfcff !important;
  border: 1px solid #eef1f7 !important;
  border-radius: 14px !important;
  color: #293044 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body input:not([type="checkbox"]):not([type="radio"]):focus,
body select:focus,
body textarea:focus {
  background: #fff !important;
  border-color: #8ab9ff !important;
  box-shadow: 0 0 0 4px rgba(91,108,255,.14) !important;
  outline: none !important;
}

body .table-wrap,
body .server-table-wrap,
body .node-xui-table-wrap,
body .aliyun-table-wrap,
body .chain-group-table-wrap,
body .relay-table-wrap,
body .qingshe-probe-table-wrap {
  background: #fff !important;
  border: 1px solid #eef1f7 !important;
  border-radius: 22px !important;
  box-shadow: 0 16px 34px rgba(32,38,60,.07) !important;
  overflow: auto !important;
}

body table,
body .server-table,
body .node-xui-table,
body .aliyun-table,
body .chain-group-table,
body .qingshe-probe-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: #555b6f !important;
}

body table thead th,
body .server-table th,
body .node-xui-table th,
body .aliyun-table th,
body .chain-group-table th,
body .qingshe-probe-table th {
  background: #f7faff !important;
  color: #8990a6 !important;
  border: 0 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  padding: 14px 12px !important;
  text-align: center;
  white-space: nowrap;
}

body table tbody td,
body .server-table td,
body .node-xui-table td,
body .aliyun-table td,
body .chain-group-table td,
body .qingshe-probe-table td {
  border-top: 1px solid #eef1f7 !important;
  color: #555b6f !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 12px 10px !important;
  vertical-align: middle !important;
}

body table tbody tr:hover,
body .server-table tbody tr:hover,
body .node-xui-table tbody tr:hover,
body .aliyun-table tbody tr:hover,
body .chain-group-table tbody tr:hover {
  background: #fbfdff !important;
}

body .status-pill,
body .state-pill,
body .region-badge,
body .proto-pill,
body .port-pill,
body .node-protocol-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill) !important;
  padding: 7px 12px !important;
  min-height: 26px;
  font-size: 12px !important;
  font-weight: 900 !important;
  border: 1px solid transparent !important;
}

body .status-pill.online,
body .state-pill.on {
  background: #dff9ec !important;
  color: #20c473 !important;
  border-color: #bdf0d6 !important;
}

body .status-pill.offline,
body .state-pill.off,
body .status-pill.disabled {
  background: #f0f1f7 !important;
  color: #8b8fa3 !important;
  border-color: #e3e6ee !important;
}

body .status-pill.processing {
  background: #fff3d6 !important;
  color: #b97800 !important;
  border-color: #ffe4a3 !important;
}

body .metric-pill,
body .cloud-bandwidth-pill,
body .node-traffic,
body .chain-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 104px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill) !important;
  color: #6a55ff !important;
  background: linear-gradient(135deg, #f0efff, #e9fbff) !important;
  border: 1px solid #dedbff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  white-space: nowrap;
}

body .metric-pill::before,
body .cloud-bandwidth-pill::before {
  content: none;
  color: #6a55ff;
  font-weight: 950;
}

body .traffic-meter,
body .cloud-traffic-cell {
  width: 132px !important;
  margin: 0 auto !important;
  text-align: left !important;
}

body .traffic-top,
body .cloud-traffic-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 5px !important;
  color: #4e566c !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

body .traffic-top strong,
body .cloud-traffic-head strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #303348 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body .traffic-top span,
body .cloud-traffic-head span {
  color: #8b8fa3 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body .meter-track,
body .cloud-traffic-bar {
  height: 7px !important;
  border-radius: var(--radius-pill) !important;
  overflow: hidden !important;
  background: #eef2f8 !important;
  margin: 0 !important;
}

body .meter-fill,
body .cloud-traffic-bar i {
  display: block !important;
  height: 100% !important;
  min-width: 4px !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #22c979, #75e3ae) !important;
}

body .meter-fill.warn {
  background: linear-gradient(90deg, #ffb020, #ffd56f) !important;
}

body .meter-fill.danger {
  background: linear-gradient(90deg, #ff5b6b, #ff8c98) !important;
}

body .meter-fill.free {
  background: linear-gradient(90deg, #8ab9ff, #18c8ff) !important;
}

body .traffic-limit,
body .cloud-traffic-sub {
  margin-top: 4px !important;
  color: #9aa1b3 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .table-pagination,
body .toolbar-pagination,
body .user-pagination {
  background: #fff !important;
  border: 1px solid #eef1f7 !important;
  border-radius: 18px !important;
  box-shadow: var(--shadow-soft) !important;
  padding: 12px 16px !important;
}

body .modal-overlay {
  background: rgba(15, 23, 42, .22) !important;
  backdrop-filter: none !important;
  padding: 18px !important;
}

body .modal-box,
body .modal-box-wide,
body .batch-modal-box,
body .batch-result-box,
body .chain-renew-modal-box,
body .aliyun-buy-modal,
body .aliyun-operation-modal,
body .aliyun-account-modal-box {
  color: #25293a !important;
  max-height: calc(100dvh - 36px) !important;
  overflow: auto !important;
}

body .modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body .form-hint,
body .muted-text,
body small {
  color: #9aa1b3 !important;
}

body .empty-cell {
  color: #9aa1b3 !important;
  font-weight: 850 !important;
  text-align: center !important;
}

body .flash {
  border-radius: 14px !important;
  box-shadow: var(--shadow-soft) !important;
  border: 1px solid #eef1f7 !important;
}

@media (max-width: 900px) {
  body .layout {
    display: block;
  }
  body .sidebar {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
  }
  body .brand {
    min-height: 70px;
  }
  body .nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
  }
  body .nav a,
  body .nav-cloud-toggle {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }
  body .nav-cloud-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 126px;
    z-index: 20;
    background: var(--sidebar-soft);
    border-radius: 14px;
    padding: 8px;
  }
  body .content {
    margin-left: 0;
    width: 100%;
    padding: 18px 12px;
  }
  body .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  body .stats-grid,
  body .admin-dashboard-stats,
  body .management-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body .panel,
  body .server-toolbar,
  body .install-progress-panel {
    padding: 14px !important;
  }
  body .modal-overlay {
    align-items: flex-start !important;
    padding: 8px !important;
  }
  body .modal-box,
  body .modal-box-wide,
  body .batch-modal-box,
  body .batch-result-box,
  body .chain-renew-modal-box,
  body .aliyun-buy-modal,
  body .aliyun-operation-modal,
  body .aliyun-account-modal-box {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 14px !important;
  }
  body .modal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
body .modal-actions > * {
    width: 100%;
  }
}

/* 42IPwin structural pass: force current pages into the compact admin shape. */
body .server-table,
body .node-xui-table,
body .aliyun-table,
body .chain-group-table,
body .chain-detail-table,
body .qingshe-probe-table,
body .user-table,
body .logs-table,
body .relay-table,
body .upgrade-table {
  table-layout: fixed !important;
}

body .server-table tbody td,
body .node-xui-table tbody td,
body .aliyun-table tbody td,
body .chain-group-table tbody td,
body .chain-detail-table tbody td,
body .qingshe-probe-table tbody td {
  height: 54px !important;
  max-width: 1px;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .server-table td :is(.cell-title, .server-main-name, .node-name-btn),
body .aliyun-table td :is(.cell-title, .aliyun-image-cell),
body .node-xui-table td :is(.node-name, .node-name-btn),
body .chain-group-table td :is(.node-name-btn, .chain-detail-server-meta) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body .table-actions,
body .line-actions,
body .btn-row,
body .chain-list-toolbar,
body .aliyun-actions,
body .server-actions-vertical,
body .topbar-actions,
body .toolbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

body .table-actions > *,
body .line-actions > *,
body .btn-row > *,
body .server-actions-vertical > *,
body .chain-list-toolbar > *,
body .aliyun-actions > * {
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

body .server-table-wrap,
body .node-xui-table-wrap,
body .aliyun-table-wrap,
body .chain-group-table-wrap {
  border-radius: 24px 24px 0 0 !important;
}

body .table-pagination.page-bottom-right,
body .toolbar-pagination.page-bottom-right {
  border-radius: 0 0 24px 24px !important;
  border-top: 0 !important;
  margin-top: 0 !important;
}

body .panel + .table-wrap,
body .panel + form .table-wrap,
body form + .table-pagination {
  margin-top: 14px !important;
}

body .modal-box,
body .modal-box-wide,
body .batch-modal-box,
body .batch-result-box,
body .chain-renew-modal-box {
  padding: 22px 24px !important;
}

body .modal-form,
body .form-grid,
body .server-form-grid,
body .inbound-form-grid,
body .batch-config,
body .batch-grid {
  gap: 14px !important;
}

body .modal-box :is(label, .field-label, .toolbar-field) > span:first-child,
body .modal-box label,
body .batch-modal-box :is(label, .field-label, .toolbar-field) > span:first-child {
  color: #25293a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body .modal-box :is(input, select, textarea),
body .batch-modal-box :is(input, select, textarea) {
  min-height: 42px !important;
  padding: 9px 12px !important;
}

body .modal-box textarea,
body .batch-modal-box textarea {
  min-height: 110px !important;
}

body .login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top left, rgba(91,108,255,.13), transparent 32%), var(--bg) !important;
}

body .login-card {
  width: min(420px, calc(100vw - 28px));
  padding: 28px !important;
  border-radius: 26px !important;
}

/* 42IPwin component unification pass - version 12.0.0.198.
   Keep inbound management and node management on the same component system. */
body {
  --ui-bg: #f7f8fc;
  --ui-panel: #ffffff;
  --ui-sidebar: #151a21;
  --ui-text: #242736;
  --ui-muted: #8b8fa3;
  --ui-line: #edf0f6;
  --ui-primary: #5b6cff;
  --ui-primary-2: #18c8ff;
  --ui-danger: #ff5b6b;
  --ui-success: #22c979;
  --ui-shadow: 0 14px 36px rgba(32, 38, 60, 0.10);
  background: var(--ui-bg) !important;
  color: var(--ui-text) !important;
}

body .content {
  background: var(--ui-bg) !important;
}

body .panel,
body .inbound-shell > .inbound-toolbar,
body .server-toolbar,
body .install-progress-panel,
body .table-wrap,
body .stat-card,
body .login-card {
  background: var(--ui-panel) !important;
  border: 1px solid rgba(229, 234, 246, .94) !important;
  border-radius: 22px !important;
  box-shadow: var(--ui-shadow) !important;
}

body .panel {
  padding: 20px !important;
  margin-bottom: 24px !important;
}

body .panel-header {
  min-height: 34px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body .panel-header h3,
body .page-title,
body .topbar-title,
body .modal-header h3 {
  color: var(--ui-text) !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

body .node-toolbar,
body .inbound-toolbar,
body .server-filter-row,
body .table-control-bar,
body .toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
  margin: 0 0 16px !important;
  padding: 12px 14px !important;
  background: #fff !important;
  border: 1px solid rgba(229, 234, 246, .94) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(32, 38, 60, .07) !important;
  overflow-x: auto !important;
}

body .node-actions-first,
body .filter-actions-left,
body .server-action-bar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
}

body .node-controls-last,
body .filter-controls-right,
body .toolbar-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-width: 260px !important;
  flex-wrap: nowrap !important;
}

body .toolbar-field {
  min-width: 0 !important;
}

body .toolbar-field.grow {
  flex: 0 1 260px !important;
  width: 260px !important;
  min-width: 180px !important;
}

body .toolbar-field.small {
  flex: 0 0 112px !important;
  width: 112px !important;
  min-width: 92px !important;
}

body :is(button, .btn, .primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .action-link, .inbound-copy-btn) {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease !important;
}

body :is(button, .btn, .primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .action-link, .inbound-copy-btn):hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(32, 38, 60, .12) !important;
}

body :is(button, .btn, .primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .action-link, .inbound-copy-btn):active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 5px 12px rgba(32, 38, 60, .10) !important;
}

body .primary-btn,
body .btn-primary {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #6675ff, #5b45e8) !important;
  box-shadow: 0 10px 24px rgba(91, 108, 255, .24) !important;
}

body .secondary-btn,
body .action-link.secondary-btn,
body .inbound-copy-btn {
  color: #5364f4 !important;
  background: #fff !important;
  border-color: #e4e8f3 !important;
}

body .ghost-btn {
  color: #6f7689 !important;
  background: #f8faff !important;
  border-color: #e8edf7 !important;
}

body .danger-btn {
  color: var(--ui-danger) !important;
  background: #fff7f8 !important;
  border-color: #ffe1e5 !important;
}

body .green-btn,
body .success-btn {
  color: #12a96a !important;
  background: #effbf5 !important;
  border-color: #d6f4e4 !important;
}

body :is(input, select, textarea, .form-control, .form-select) {
  min-height: 40px !important;
  color: #293044 !important;
  background-color: #fbfcff !important;
  border: 1px solid #eef1f7 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

body :is(input, select, textarea, .form-control, .form-select):focus {
  background: #fff !important;
  border-color: #8ab9ff !important;
  box-shadow: 0 0 0 4px rgba(91,108,255,.14) !important;
}

body .table-wrap,
body .nodes-table-wrap,
body .inbound-table-wrap,
body .node-xui-table-wrap {
  overflow: auto !important;
  border-radius: 22px !important;
  border: 1px solid rgba(229, 234, 246, .94) !important;
  background: #fff !important;
}

body :is(.nodes-table, .inbound-table, .node-xui-table, .server-table, .aliyun-table, .user-table, .relay-table, .logs-table) {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: #555b6f !important;
}

body :is(.nodes-table, .inbound-table, .node-xui-table, .server-table, .aliyun-table, .user-table, .relay-table, .logs-table) th {
  height: 44px !important;
  padding: 11px 12px !important;
  color: #8990a6 !important;
  background: #f7faff !important;
  border: 0 !important;
  border-bottom: 1px solid #eef1f7 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

body :is(.nodes-table, .inbound-table, .node-xui-table, .server-table, .aliyun-table, .user-table, .relay-table, .logs-table) td {
  height: 50px !important;
  padding: 10px 12px !important;
  color: #555b6f !important;
  background: #fff !important;
  border-top: 0 !important;
  border-bottom: 1px solid #eef1f7 !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}

body :is(.nodes-table, .inbound-table, .node-xui-table, .server-table, .aliyun-table, .user-table, .relay-table, .logs-table) tbody tr:hover td {
  background: #f9fbff !important;
}

body .nodes-table,
body .inbound-table {
  min-width: 1100px !important;
}

body .protocol-badge,
body .node-protocol-badge,
body .node-traffic,
body .node-limit,
body .node-group-badge,
body .status,
body .badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

body .protocol-badge,
body .node-protocol-badge,
body .node-traffic {
  color: #0aa6d8 !important;
  background: #e9fbff !important;
  border: 1px solid #c8f2ff !important;
}

body .node-limit,
body .node-group-badge {
  color: #12a96a !important;
  background: #effbf5 !important;
  border: 1px solid #d6f4e4 !important;
}

body .inbound-enable-btn {
  min-width: 52px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 9px !important;
  border-radius: 999px !important;
}

body .inbound-enable-btn.enabled {
  color: #12a96a !important;
  background: #effbf5 !important;
  border-color: #d6f4e4 !important;
}

body .inbound-enable-btn.disabled {
  color: var(--ui-danger) !important;
  background: #fff7f8 !important;
  border-color: #ffe1e5 !important;
}

body .stat-card {
  min-height: 104px !important;
  padding: 20px 22px !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 22px !important;
}

body .stat-card::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 5px !important;
  background: linear-gradient(180deg, var(--ui-primary), var(--ui-primary-2)) !important;
}

body .stat-card span {
  color: #7d8398 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body .stat-card strong {
  color: #1e2433 !important;
  font-size: 30px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
}

body .modal-box,
body .modal-box-wide,
body .batch-modal-box,
body .batch-result-box,
body .chain-renew-modal-box,
body .aliyun-buy-modal,
body .aliyun-operation-modal,
body .aliyun-account-modal-box {
  background: rgba(255, 255, 255, .96) !important;
  border: 1px solid rgba(229, 234, 246, .95) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 70px rgba(32, 38, 60, .22) !important;
}

body .modal-header {
  min-height: 40px !important;
  padding: 0 0 14px !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid #eef1f7 !important;
  background: transparent !important;
}

body .table-pagination,
body .toolbar-pagination {
  background: #fff !important;
  border: 1px solid rgba(229, 234, 246, .94) !important;
  border-radius: 18px !important;
  padding: 10px 12px !important;
  box-shadow: 0 10px 28px rgba(32, 38, 60, .07) !important;
}

body .pagination-current {
  color: #293044 !important;
  background: #f7faff !important;
  border: 1px solid #eef1f7 !important;
}

@media (max-width: 900px) {
  body .node-toolbar,
  body .inbound-toolbar,
  body .server-filter-row,
  body .table-control-bar,
  body .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-x: visible !important;
  }
  body .node-actions-first,
  body .filter-actions-left,
  body .node-controls-last,
  body .filter-controls-right,
  body .server-action-bar {
    width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }
  body .toolbar-field.grow,
  body .toolbar-field.small {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body .stats-grid,
  body .dashboard-stats,
  body .management-stats-grid {
    gap: 10px !important;
  }
  body .stat-card {
    min-height: 86px !important;
    padding: 16px 18px !important;
  }
  body .stat-card strong {
    font-size: 24px !important;
  }
}

/* 42IPwin icon and density pass - version 12.0.0.199. */
body .inbound-page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 38px !important;
  margin: 0 0 -6px !important;
  padding: 0 2px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .inbound-page-header h3,
body #nodes-app > .panel-header h3 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
}

body .inbound-page-header h3 .bi,
body #nodes-app > .panel-header h3 .bi {
  color: #54a3ff !important;
  font-size: 18px !important;
}

body .primary-btn .bi,
body .secondary-btn .bi,
body .danger-btn .bi,
body .ghost-btn .bi,
body .inbound-copy-btn .bi,
body .btn .bi {
  flex: 0 0 auto !important;
  font-size: 14px !important;
  line-height: 1 !important;
  margin-top: -1px !important;
}

body .node-toolbar,
body .inbound-toolbar {
  padding: 9px 10px !important;
  gap: 8px !important;
  border-radius: 16px !important;
  margin-bottom: 12px !important;
}

body .node-actions-first,
body .filter-actions-left,
body .node-controls-last,
body .filter-controls-right {
  gap: 6px !important;
}

body :is(.node-toolbar, .inbound-toolbar) :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn) {
  min-height: 32px !important;
  padding: 0 11px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  gap: 5px !important;
}

body :is(.node-toolbar, .inbound-toolbar) :is(input, select) {
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

body :is(.node-toolbar, .inbound-toolbar) .toolbar-field.grow {
  flex-basis: 220px !important;
  width: 220px !important;
}

body :is(.node-toolbar, .inbound-toolbar) .toolbar-field.small {
  flex-basis: 92px !important;
  width: 92px !important;
}

body :is(.nodes-table, .inbound-table) th {
  height: 38px !important;
  padding: 8px 10px !important;
}

body :is(.nodes-table, .inbound-table) td {
  height: 46px !important;
  padding: 8px 10px !important;
}

body .nodes-table-wrap,
body .inbound-table-wrap {
  border-radius: 18px !important;
}

body .table-actions .ghost-btn,
body .node-edit-btn,
body .refresh-detail-btn,
body .node-copy-btn,
body .node-view-btn,
body .inbound-copy-btn,
body .mini-page-btn {
  min-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  gap: 4px !important;
}

body .field-clear-btn {
  min-width: 24px !important;
  min-height: 24px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border-radius: 999px !important;
}

/* Fix navigation performance, checkbox visibility and 42IPwin inbound table shape. */

body input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-grid !important;
  place-content: center !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1.5px solid #d7deec !important;
  border-radius: 6px !important;
  background: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(31,41,55,.05) !important;
  opacity: 1 !important;
  visibility: visible !important;
  cursor: pointer !important;
}

body input[type="checkbox"]::after {
  content: "" !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 3px !important;
  background: #5b6cff !important;
  transform: scale(0) !important;
  transition: transform .12s ease !important;
}

body input[type="checkbox"]:checked {
  border-color: #5b6cff !important;
  background: #eef2ff !important;
}

body input[type="checkbox"]:checked::after {
  transform: scale(1) !important;
}

body .nav {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
}

body .nav::-webkit-scrollbar,
body .nav-cloud-panel::-webkit-scrollbar {
  display: none !important;
}

body .nav-cloud-toggle {
  justify-content: flex-start !important;
}

body .nav-cloud-chevron {
  display: none !important;
}

body .nav-cloud-panel {
  overflow-y: auto !important;
  scrollbar-width: none !important;
}

body .nav-cloud-group.is-open .nav-cloud-panel {
  max-height: 280px !important;
}

body .inbound-table {
  min-width: 1450px !important;
  table-layout: fixed !important;
}

body .inbound-table th,
body .inbound-table td {
  height: 54px !important;
  padding: 9px 10px !important;
  color: #555b6f !important;
  font-weight: 750 !important;
  text-align: center !important;
}

body .inbound-table th {
  height: 48px !important;
  color: #8990a6 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  background: #f7faff !important;
}

body .inbound-table th:nth-child(1),
body .inbound-table td:nth-child(1) { width: 44px !important; }
body .inbound-table th:nth-child(2),
body .inbound-table td:nth-child(2) { width: 155px !important; text-align: left !important; }
body .inbound-table th:nth-child(3),
body .inbound-table td:nth-child(3) { width: 110px !important; }
body .inbound-table th:nth-child(4),
body .inbound-table td:nth-child(4) { width: 110px !important; }
body .inbound-table th:nth-child(5),
body .inbound-table td:nth-child(5) { width: 120px !important; }
body .inbound-table th:nth-child(6),
body .inbound-table td:nth-child(6) { width: 86px !important; }
body .inbound-table th:nth-child(7),
body .inbound-table td:nth-child(7) { width: 76px !important; }
body .inbound-table th:nth-child(8),
body .inbound-table td:nth-child(8) { width: 86px !important; }
body .inbound-table th:nth-child(9),
body .inbound-table td:nth-child(9) { width: 125px !important; }
body .inbound-table th:nth-child(10),
body .inbound-table td:nth-child(10) { width: 120px !important; }
body .inbound-table th:nth-child(11),
body .inbound-table td:nth-child(11) { width: 92px !important; }
body .inbound-table th:nth-child(12),
body .inbound-table td:nth-child(12) { width: 190px !important; }
body .inbound-table th:nth-child(13),
body .inbound-table td:nth-child(13) { width: 112px !important; }
body .inbound-table th:nth-child(14),
body .inbound-table td:nth-child(14) { width: 90px !important; }

body .inbound-bandwidth-pill,
body .inbound-free-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 26px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body .inbound-bandwidth-pill {
  color: #3386ff !important;
  background: #eaf4ff !important;
  border: 1px solid #cfe5ff !important;
}

body .inbound-free-pill {
  color: #7d8398 !important;
  background: #f2f5fa !important;
  border: 1px solid #e7ecf5 !important;
}

body .inbound-traffic-meter {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
  text-align: left !important;
}

body .inbound-traffic-meter .traffic-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body .inbound-traffic-meter .traffic-top strong {
  color: #303348 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body .inbound-traffic-meter .traffic-top span,
body .inbound-traffic-meter .traffic-limit {
  color: #8990a6 !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
}

body .inbound-traffic-meter .meter-track {
  height: 7px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: #edf1f8 !important;
}

body .inbound-traffic-meter .meter-track i {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #5b6cff, #18c8ff) !important;
}

/* 42IPwin site-wide module template - version 12.0.0.202.
   This maps every legacy page to the same toolbar/table/pagination/button modules. */
body {
  --m42-bg: #f7f8fc;
  --m42-panel: #fff;
  --m42-text: #242736;
  --m42-muted: #8b8fa3;
  --m42-line: #edf0f6;
  --m42-primary: #5b6cff;
  --m42-primary-dark: #5b45e8;
  --m42-danger: #ff474d;
  --m42-warning: #ffb020;
  --m42-shadow: 0 18px 42px rgba(32, 38, 60, 0.13);
  background: var(--m42-bg) !important;
}

body .page-header,
body .panel-header,
body .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .page-header h2,
body .panel-header h3,
body .topbar h2 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  color: var(--m42-text) !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body .user-toolbar,
body .node-toolbar,
body .inbound-toolbar,
body .server-toolbar,
body .server-filter-row,
body .aliyun-actions,
body .chain-list-toolbar,
body .table-control-bar,
body .toolbar,
body .line-head-actions,
body .topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: 0 0 22px !important;
  padding: 18px !important;
  background: var(--m42-panel) !important;
  border: 1px solid rgba(236, 239, 247, .95) !important;
  border-radius: 22px !important;
  box-shadow: var(--m42-shadow) !important;
  overflow: visible !important;
}

body .toolbar-actions,
body .filter-actions-left,
body .node-actions-first,
body .server-action-bar,
body .table-actions,
body .line-actions,
body .btn-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

body .aliyun-action-panel > .aliyun-actions {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 12px !important;
  margin-bottom: 14px !important;
}

body .aliyun-action-panel > .aliyun-actions > button {
  flex: 0 0 auto !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
}

body .aliyun-action-panel > .aliyun-actions > .cloud-toolbar-search {
  flex: 0 1 340px !important;
  min-width: 260px !important;
  max-width: 360px !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body .aliyun-action-panel > .aliyun-actions .cloud-search-field {
  flex: 1 1 190px !important;
  min-width: 190px !important;
}

body .toolbar-search,
body .filter-controls-right,
body .node-controls-last,
body .toolbar-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex: 1 1 300px !important;
  min-width: 300px !important;
  flex-wrap: wrap !important;
}

body .btn,
body .primary-btn,
body .secondary-btn,
body .danger-btn,
body .ghost-btn,
body .action-link,
body .inbound-copy-btn,
body .mini-btn,
body button.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  border-radius: 16px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border: 1px solid #eef1f7 !important;
  box-shadow: 0 9px 20px rgba(32, 38, 60, .10) !important;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
}

body .btn:hover,
body .primary-btn:hover,
body .secondary-btn:hover,
body .danger-btn:hover,
body .ghost-btn:hover,
body .action-link:hover,
body .inbound-copy-btn:hover,
body .mini-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 13px 26px rgba(32, 38, 60, .14) !important;
}

body .btn .bi,
body .primary-btn .bi,
body .secondary-btn .bi,
body .danger-btn .bi,
body .ghost-btn .bi,
body .mini-btn .bi,
body .action-link .bi {
  color: currentColor !important;
  transition: transform .16s ease, color .16s ease !important;
}

body .btn:hover .bi,
body .primary-btn:hover .bi,
body .secondary-btn:hover .bi,
body .danger-btn:hover .bi,
body .ghost-btn:hover .bi,
body .mini-btn:hover .bi,
body .action-link:hover .bi {
  transform: scale(1.12) !important;
}

body .btn-primary,
body .primary-btn {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #6675ff, #5b45e8) !important;
}

body .btn-soft,
body .secondary-btn,
body .ghost-btn,
body .action-link,
body .inbound-copy-btn {
  color: #716cf6 !important;
  background: #fff !important;
}

body .btn-danger,
body .danger-btn {
  color: #fff !important;
  border-color: var(--m42-danger) !important;
  background: var(--m42-danger) !important;
}

body .btn-warning {
  color: #111827 !important;
  border-color: #ffb020 !important;
  background: #ffca2c !important;
  box-shadow: 0 12px 26px rgba(255, 176, 32, .22) !important;
}

body .btn-warning:hover {
  background: #ffc107 !important;
  border-color: #ffc107 !important;
}

body .mini-btn {
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  color: #168dce !important;
  background: #edf7ff !important;
  font-size: 12px !important;
}

body .mini-btn.danger {
  color: #ff5266 !important;
  background: #fff0f2 !important;
}

body :is(input, select, textarea, .form-control, .form-select) {
  min-height: 46px !important;
  border-radius: 18px !important;
  background: #fff !important;
  border: 1px solid #eef1f7 !important;
  color: #293044 !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

body .toolbar-search :is(input, textarea, .form-control),
body .filter-controls-right :is(input, textarea, .form-control) {
  flex: 1 1 260px !important;
  min-width: 260px !important;
}

body .toolbar-search :is(select, .form-select),
body .filter-controls-right :is(select, .form-select) {
  width: 136px !important;
  flex: 0 0 136px !important;
}

body .user-table-wrap,
body .table-wrap,
body .nodes-table-wrap,
body .inbound-table-wrap,
body .server-table-wrap,
body .aliyun-table-wrap,
body .node-xui-table-wrap,
body .chain-group-table-wrap,
body .chain-detail-table-wrap,
body .relay-table-wrap {
  background: #fff !important;
  border: 0 !important;
  border-radius: 24px 24px 0 0 !important;
  box-shadow: 0 16px 34px rgba(32, 38, 60, .07) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body :is(.user-table, .node-table, .nodes-table, .inbound-table, .server-table, .aliyun-table, .node-xui-table, .chain-group-table, .chain-detail-table, .relay-table, .user-table, .logs-table, .upgrade-table) {
  width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  color: #575a70 !important;
}

body :is(.user-table, .node-table, .nodes-table, .inbound-table, .server-table, .aliyun-table, .node-xui-table, .chain-group-table, .chain-detail-table, .relay-table, .logs-table, .upgrade-table) thead th {
  height: 48px !important;
  padding: 0 8px !important;
  color: #9494b5 !important;
  background: #f6fbff !important;
  border: 0 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

body :is(.user-table, .node-table, .nodes-table, .inbound-table, .server-table, .aliyun-table, .node-xui-table, .chain-group-table, .chain-detail-table, .relay-table, .logs-table, .upgrade-table) tbody td {
  height: 54px !important;
  padding: 0 8px !important;
  color: #575a70 !important;
  background: #fff !important;
  border-top: 1px solid #f1f2f7 !important;
  border-bottom: 0 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  vertical-align: middle !important;
}

body :is(.user-table, .node-table, .nodes-table, .inbound-table, .server-table, .aliyun-table, .node-xui-table, .chain-group-table, .chain-detail-table, .relay-table, .logs-table, .upgrade-table) tbody tr:hover td {
  background: #fbfdff !important;
}

body .node-table,
body .inbound-table {
  min-width: 1408px !important;
}

body .node-table th:last-child,
body .node-table td:last-child,
body .inbound-table th:last-child,
body .inbound-table td:last-child {
  position: sticky !important;
  right: 0 !important;
  z-index: 2 !important;
  background: #fff !important;
  box-shadow: -10px 0 18px rgba(32, 38, 60, .06) !important;
}

body .node-table thead th:last-child,
body .inbound-table thead th:last-child {
  z-index: 3 !important;
  background: #f6fbff !important;
}

body .user-pagination,
body .table-pagination,
body .toolbar-pagination {
  background: #fff !important;
  border: 0 !important;
  border-top: 1px solid #f1f2f7 !important;
  border-radius: 0 0 24px 24px !important;
  box-shadow: 0 16px 34px rgba(32, 38, 60, .07) !important;
  min-height: 64px !important;
  padding: 12px 18px !important;
  margin-top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body .page-summary,
body .pagination-summary {
  color: #8f96aa !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body .page-controls,
body .pagination-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
}

body .page-number,
body .pagination-current {
  min-width: 76px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #34384d !important;
  background: #f8faff !important;
  border: 1px solid #eef1f7 !important;
  border-radius: 10px !important;
  font-weight: 900 !important;
}

@media (max-width: 760px) {
  body .user-toolbar,
  body .node-toolbar,
  body .inbound-toolbar,
  body .server-toolbar,
  body .server-filter-row,
  body .aliyun-actions,
  body .chain-list-toolbar,
  body .table-control-bar,
  body .toolbar {
    padding: 12px !important;
    margin-bottom: 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    border-radius: 16px !important;
  }
  body .toolbar-actions,
  body .filter-actions-left,
  body .node-actions-first,
  body .toolbar-search,
  body .filter-controls-right,
  body .node-controls-last {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body .aliyun-action-panel > .aliyun-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px !important;
    align-items: stretch !important;
  }

  body .aliyun-action-panel > .aliyun-actions > button {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  body .aliyun-action-panel > .aliyun-actions > .cloud-toolbar-search {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  body .aliyun-action-panel > .aliyun-actions .cloud-search-field {
    min-width: 0 !important;
  }
  body .toolbar-actions > *,
  body .filter-actions-left > *,
  body .node-actions-first > *,
  body .toolbar-search > *,
  body .filter-controls-right > *,
  body .node-controls-last > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  body .toolbar-search :is(input, textarea, .form-control),
  body .filter-controls-right :is(input, textarea, .form-control) {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }
  body .user-table-wrap,
  body .table-wrap,
  body .nodes-table-wrap,
  body .inbound-table-wrap,
  body .server-table-wrap,
  body .aliyun-table-wrap,
  body .node-xui-table-wrap {
    margin-left: -12px !important;
    margin-right: -12px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body .node-table,
  body .inbound-table {
    min-width: 1260px !important;
  }
  body .user-pagination,
  body .table-pagination,
  body .toolbar-pagination {
    margin-left: -12px !important;
    margin-right: -12px !important;
    border-radius: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

/* Server management toolbar final compact fix. Keep this scoped so XUI node UI stays untouched. */
body .server-filter-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  margin-bottom: 14px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

body .server-filter-row .filter-actions-left,
body .server-filter-row .filter-controls-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  width: auto !important;
}

body .server-filter-row .filter-actions-left {
  flex: 0 0 auto !important;
  justify-content: flex-start !important;
}

body .server-filter-row .filter-controls-right {
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
}

body .server-filter-row :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn) {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

body .server-filter-row .toolbar-field {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body .server-filter-row .server-search-field {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}

body .server-filter-row .toolbar-field.small {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
}

@media (max-width: 760px) {
  body.cloud-mobile-page .aliyun-table-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  body.cloud-mobile-page .aliyun-table.cloud-mobile-card-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table thead {
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tbody {
    display: grid !important;
    gap: 10px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    padding: 12px 12px 40px !important;
    border: 1px solid rgba(151, 164, 196, .28) !important;
    border-radius: 14px !important;
    background: #fff !important;
    cursor: pointer !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr::after {
    content: "\5c55\5f00";
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: #5b6cff;
    font-size: 12px;
    font-weight: 800;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr.is-expanded::after {
    content: "\6536\8d77";
  }

  body.cloud-mobile-page .cloud-mobile-card-table td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 30px !important;
    padding: 7px 0 !important;
    border: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child) {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child)::before {
    content: attr(data-mobile-label);
    color: #8993ad;
    font-size: 11px;
    font-weight: 800;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr:not(.is-expanded) td:nth-child(n+7) {
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:first-child {
    position: absolute !important;
    right: 10px !important;
    top: 8px !important;
    width: auto !important;
    padding: 0 !important;
    z-index: 2 !important;
  }
}

body .server-filter-row :is(input#server-keyword-filter, select) {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  width: 100% !important;
  min-width: 0 !important;
  border-radius: 13px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  font-size: 12px !important;
  line-height: 36px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06) !important;
}

@media (max-width: 760px) {
  body .server-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-x: visible !important;
  }

  body .server-filter-row .filter-actions-left,
  body .server-filter-row .filter-controls-right {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .server-filter-row .filter-actions-left > *,
  body .server-filter-row .filter-controls-right > *,
  body .server-filter-row .server-search-field,
  body .server-filter-row .toolbar-field.small {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body .server-filter-row .server-search-field {
    grid-column: 1 / -1 !important;
  }
}

/* 42IPwin-like semantic stats and toolbar hover feedback. */
body .management-stats-grid .stat-card strong {
  color: #1e2433 !important;
}

body .management-stats-grid .stat-server strong { color: #2f6bff !important; }
body .management-stats-grid .stat-online strong { color: #20ba69 !important; }
body .management-stats-grid .stat-stopped strong { color: #e78200 !important; }
body .management-stats-grid .stat-expired strong { color: #dc2938 !important; }
body .management-stats-grid .stat-node strong { color: #6f5dff !important; }

body .management-stats-grid .stat-stopped::before { background: #ffb020 !important; }
body .management-stats-grid .stat-expired::before { background: #ff5b6b !important; }

body :is(.secondary-btn, .ghost-btn, .danger-btn, .green-btn, .success-btn):hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 24px rgba(32, 38, 60, .12) !important;
}

body .secondary-btn:hover:not(:disabled),
body .ghost-btn:hover:not(:disabled) {
  color: #4f5dff !important;
  background: #eef3ff !important;
  border-color: #cad6ff !important;
}

body .green-btn:hover:not(:disabled),
body .success-btn:hover:not(:disabled) {
  color: #059669 !important;
  background: #ddf9ea !important;
  border-color: #bdf0d6 !important;
}

body .danger-btn:hover:not(:disabled),
body .danger-btn.stop-action:hover:not(:disabled) {
  color: #f34f63 !important;
  background: #ffe7eb !important;
  border-color: #ffd1d8 !important;
}

body .danger-btn.warning-action:hover:not(:disabled) {
  color: #b97800 !important;
  background: #fff3d6 !important;
  border-color: #ffe2a0 !important;
}

body :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .green-btn) .bi {
  font-size: 14px !important;
  line-height: 1 !important;
}

/* Server management: remove the double card layer and keep filters one-row compact. */
body .server-toolbar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 14px !important;
}

body .server-toolbar .server-filter-row {
  background: #fff !important;
  border: 1px solid rgba(229, 234, 246, .94) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 36px rgba(32, 38, 60, .10) !important;
  min-height: 84px !important;
  padding: 14px 16px !important;
  gap: 8px !important;
}

body .server-filter-row .filter-actions-left {
  gap: 8px !important;
}

body .server-filter-row .filter-controls-right {
  gap: 8px !important;
}

body .server-filter-row .server-search-field {
  flex: 0 0 260px !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
}

body .server-filter-row input#server-keyword-filter {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  resize: none !important;
  overflow: hidden !important;
}

body .server-filter-row .toolbar-field.small {
  flex: 0 0 116px !important;
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
}

body .server-filter-row .field-clear-btn {
  width: 22px !important;
  height: 22px !important;
  font-size: 16px !important;
}

/* Unified management pages: XUI nodes, global inbounds and servers share one shell. */
body :is(.management-action-panel, .server-action-panel, .inbound-action-panel, #nodes-app) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border-radius: 22px !important;
  background: #fff !important;
  border: 1px solid rgba(226, 232, 244, .96) !important;
  box-shadow: 0 18px 42px rgba(31, 41, 70, .10) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body :is(.management-action-panel, .server-action-panel, .inbound-action-panel, #nodes-app) > .panel-header {
  display: none !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 66px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  gap: 10px !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
  box-sizing: border-box !important;
}

body :is(.server-toolbar, .server-bulk-shell, #table-form, #nodes-action-form) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body :is(.node-actions-first, .filter-actions-left, .node-controls-last, .filter-controls-right) {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

body :is(.node-actions-first, .filter-actions-left) {
  flex: 0 0 auto !important;
}

body :is(.node-controls-last, .filter-controls-right) {
  flex: 0 0 auto !important;
  margin-left: 8px !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .inbound-copy-btn) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  height: 38px !important;
  max-height: 38px !important;
  padding: 0 13px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 38px !important;
  white-space: nowrap !important;
  gap: 7px !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn):hover:not(:disabled),
body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn):hover:not(:disabled) .bi {
  color: #1e2433 !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(.toolbar-field.grow, .server-search-field) {
  flex: 0 0 250px !important;
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
  position: relative !important;
  margin: 0 !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .toolbar-field.small {
  flex: 0 0 104px !important;
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  position: relative !important;
  margin: 0 !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(input[type="text"], input[type="search"], textarea#server-keyword-filter, select) {
  display: block !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 34px 0 14px !important;
  border-radius: 13px !important;
  border: 1px solid #eef1f7 !important;
  background-color: #fff !important;
  color: #596070 !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 38px !important;
  resize: none !important;
  overflow: hidden !important;
  box-shadow: 0 8px 18px rgba(32, 38, 60, .06) !important;
  box-sizing: border-box !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) select {
  appearance: none !important;
  padding-right: 30px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #7d86a1 50%),
    linear-gradient(135deg, #7d86a1 50%, transparent 50%) !important;
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(input, textarea, select):focus {
  outline: 0 !important;
  border-color: #8ea4ff !important;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, .12) !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .field-clear-btn {
  width: 24px !important;
  height: 24px !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: transparent !important;
  color: #b3bacb !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 24px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .clearable-field:hover .field-clear-btn,
body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .clearable-field:focus-within .field-clear-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .field-clear-btn:hover {
  color: #5364f4 !important;
  background: transparent !important;
}

body :is(.nodes-table-wrap, .server-table-wrap, .inbound-table-wrap) {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid #eef1f7 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  box-sizing: border-box !important;
}

body :is(.nodes-table, .server-table, .inbound-table) {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  color: #555b6f !important;
}

body .nodes-table { min-width: 1260px !important; }
body .server-table { min-width: 1260px !important; }
body .inbound-table { min-width: 1540px !important; }

body :is(.nodes-table, .server-table, .inbound-table) th {
  height: 46px !important;
  padding: 11px 12px !important;
  color: #8990a6 !important;
  background: #f7faff !important;
  border: 0 !important;
  border-bottom: 1px solid #eef1f7 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

body :is(.nodes-table, .server-table, .inbound-table) td {
  height: 50px !important;
  padding: 10px 12px !important;
  color: #555b6f !important;
  background: #fff !important;
  border-top: 0 !important;
  border-bottom: 1px solid #eef1f7 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  vertical-align: middle !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body :is(.nodes-table, .server-table, .inbound-table) tbody tr:hover td {
  background: #f9fbff !important;
}

body :is(.nodes-table, .server-table, .inbound-table) th:first-child,
body :is(.nodes-table, .server-table, .inbound-table) td:first-child {
  width: 42px !important;
  text-align: center !important;
}

body :is(.nodes-table, .server-table, .inbound-table) input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  border-radius: 6px !important;
  accent-color: #6675ff !important;
}

body :is(.server-action-panel, .inbound-action-panel, #nodes-app) .toolbar-pagination {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 12px 16px 14px !important;
  border-top: 1px solid #eef1f7 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

body .pagination-actions :is(select, .page-size-control select),
body .toolbar-pagination .ghost-btn,
body .table-pagination .ghost-btn {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body .inbound-summary-stats,
body .node-stats-grid,
body .server-stats-grid {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body .inbound-summary-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body .inbound-table th:nth-child(2),
body .inbound-table td:nth-child(2) { width: 170px !important; }
body .inbound-table th:nth-child(3),
body .inbound-table td:nth-child(3) { width: 92px !important; }
body .inbound-table th:nth-child(4),
body .inbound-table td:nth-child(4) { width: 90px !important; }
body .inbound-table th:nth-child(5),
body .inbound-table td:nth-child(5) { width: 120px !important; }
body .inbound-table th:nth-child(6),
body .inbound-table td:nth-child(6) { width: 96px !important; }
body .inbound-table th:nth-child(7),
body .inbound-table td:nth-child(7) { width: 76px !important; }
body .inbound-table th:nth-child(8),
body .inbound-table td:nth-child(8) { width: 82px !important; }
body .inbound-table th:nth-child(9),
body .inbound-table td:nth-child(9) { width: 118px !important; }
body .inbound-table th:nth-child(10),
body .inbound-table td:nth-child(10) { width: 118px !important; }
body .inbound-table th:nth-child(11),
body .inbound-table td:nth-child(11) { width: 104px !important; }
body .inbound-table th:nth-child(12),
body .inbound-table td:nth-child(12) { width: 220px !important; }
body .inbound-table th:nth-child(13),
body .inbound-table td:nth-child(13) { width: 116px !important; }
body .inbound-table th:nth-child(14),
body .inbound-table td:nth-child(14) { width: 96px !important; }

body .inbound-table th:first-child,
body .inbound-table td:first-child,
body .inbound-table th:last-child,
body .inbound-table td:last-child {
  position: static !important;
  left: auto !important;
  right: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
  background: inherit !important;
}

body .cloud-bandwidth-pill,
body .inbound-bandwidth-pill {
  min-width: 64px !important;
  height: 28px !important;
  padding: 0 10px !important;
  gap: 4px !important;
  border-radius: 999px !important;
  color: #6a55ff !important;
  background: linear-gradient(135deg, #f0efff, #e9fbff) !important;
  border: 1px solid #dedbff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body .inbound-copy-btn,
body .node-edit-btn,
body .expand-btn {
  color: #5364f4 !important;
  background: #fff !important;
  border: 1px solid #e4e8f3 !important;
  box-shadow: 0 8px 18px rgba(32, 38, 60, .08) !important;
}

@media (max-width: 760px) {
  body :is(.management-action-panel, .server-action-panel, .inbound-action-panel, #nodes-app) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 14px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 12px !important;
    overflow-x: visible !important;
    min-height: 0 !important;
  }

  body :is(.node-actions-first, .filter-actions-left, .node-controls-last, .filter-controls-right) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body :is(.node-actions-first, .filter-actions-left) > *,
  body :is(.node-controls-last, .filter-controls-right) > *,
  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(button, .toolbar-field, .inline-form) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .inline-form {
    display: block !important;
  }

  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .toolbar-field.grow,
  body .server-search-field {
    grid-column: 1 / -1 !important;
    order: 1 !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body :is(.node-controls-last, .filter-controls-right) > button {
    order: 2 !important;
  }

  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) .toolbar-field.small {
    order: 3 !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(.primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .inbound-copy-btn) {
    min-height: 38px !important;
    height: 38px !important;
    max-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    font-size: 12.5px !important;
    line-height: 38px !important;
    white-space: nowrap !important;
  }

  body :is(.node-toolbar, .inbound-toolbar, .server-filter-row) :is(input[type="text"], input[type="search"], textarea#server-keyword-filter, select) {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 13px !important;
  }

  body :is(.nodes-table-wrap, .server-table-wrap, .inbound-table-wrap) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body .toolbar-pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 10px 12px 12px !important;
    overflow-x: auto !important;
  }

  body .toolbar-pagination .pagination-summary,
  body .toolbar-pagination .pagination-current {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  body .toolbar-pagination .pagination-actions {
    flex: 0 0 auto !important;
    gap: 6px !important;
  }

  body .inbound-summary-stats,
  body .node-stats-grid,
  body .server-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body :is(.inbound-summary-stats, .node-stats-grid, .server-stats-grid) .stat-card {
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 420px) {
  body :is(.node-actions-first, .filter-actions-left, .node-controls-last, .filter-controls-right) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .inbound-summary-stats,
  body .node-stats-grid,
  body .server-stats-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

body .huawei-actions {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  padding: 14px !important;
}

body .huawei-actions > button {
  flex: 0 0 auto !important;
  margin: 0 !important;
}

body .huawei-actions .cloud-toolbar-search {
  flex: 0 1 360px !important;
  min-width: 260px !important;
  max-width: 420px !important;
  margin-left: auto !important;
  gap: 8px !important;
}

body .huawei-actions .cloud-search-field {
  flex: 1 1 180px !important;
  min-width: 180px !important;
}

@media (max-width: 760px) {
  body .huawei-actions .cloud-toolbar-search {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
  }
}

.cloud-mobile-expand-btn {
  display: none;
}

@media (max-width: 760px) {
  body.cloud-mobile-page .cloud-mobile-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    margin-left: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  body .inbound-shell,
  body .inbound-shell .panel,
  body .inbound-shell .table-wrap,
  body .inbound-shell .inbound-table-wrap,
  body .inbound-table-wrap {
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: auto !important;
  }

  body .inbound-table-wrap::-webkit-scrollbar,
  body .inbound-shell .table-wrap::-webkit-scrollbar {
    height: 8px !important;
  }

  body .inbound-table-wrap::-webkit-scrollbar-thumb,
  body .inbound-shell .table-wrap::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45) !important;
    border-radius: 999px !important;
  }

  body .inbound-table {
    min-width: 1540px !important;
    width: 1540px !important;
  }
}

@media (max-width: 760px) {
  body .sidebar {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    z-index: 300 !important;
  }

  body .nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 10px 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  body .nav a,
  body .nav-cloud-toggle {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    min-height: 36px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
  }

  body .nav-cloud-group {
    position: static !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
  }

  body .nav-cloud-panel {
    position: static !important;
    display: flex !important;
    flex: 0 0 auto !important;
    gap: 6px !important;
    max-width: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transform: translateX(-4px) !important;
    transition: max-width 0.22s ease, opacity 0.18s ease, transform 0.18s ease !important;
  }

  body .nav-cloud-group.is-open .nav-cloud-panel {
    max-width: 720px !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }

  body .nav-cloud-panel > a {
    margin-left: 0 !important;
    min-width: max-content !important;
    padding: 8px 12px !important;
  }
}

@media (max-width: 760px) {
  body.cloud-mobile-page .aliyun-action-panel,
  body.cloud-mobile-page .aliyun-table-wrap,
  body.cloud-mobile-page .huawei-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table,
  body.cloud-mobile-page .cloud-mobile-card-table tbody,
  body.cloud-mobile-page .cloud-mobile-card-table tr,
  body.cloud-mobile-page .cloud-mobile-card-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table {
    border-spacing: 0 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tbody {
    display: grid !important;
    gap: 12px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr {
    position: relative !important;
    padding: 42px 14px 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.07) !important;
    overflow: visible !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr::after {
    content: none !important;
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 0 !important;
    border: 0 !important;
    overflow: visible !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child) {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    align-items: start !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child)::before {
    content: attr(data-mobile-label) !important;
    min-width: 0 !important;
    color: #7b8499 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    white-space: nowrap !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:first-child {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    z-index: 3 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table td:first-child input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  body.cloud-mobile-page .cloud-mobile-expand-btn {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 56px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid rgba(91, 108, 255, 0.28) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #5b6cff !important;
    box-shadow: 0 6px 14px rgba(91, 108, 255, 0.1) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table .cell-title,
  body.cloud-mobile-page .cloud-mobile-card-table .aliyun-image-cell,
  body.cloud-mobile-page .cloud-mobile-card-table .cloud-traffic-cell,
  body.cloud-mobile-page .cloud-mobile-card-table .region-badge,
  body.cloud-mobile-page .cloud-mobile-card-table .cloud-bandwidth-pill {
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table .region-badge,
  body.cloud-mobile-page .cloud-mobile-card-table .cloud-bandwidth-pill {
    width: fit-content !important;
    min-height: 28px !important;
    padding: 5px 12px !important;
  }
}

@media (max-width: 760px) {
  body.cloud-mobile-page .aliyun-action-panel,
  body.cloud-mobile-page .aliyun-table-wrap,
  body.cloud-mobile-page .huawei-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: auto !important;
  }

  body.cloud-mobile-page .aliyun-table-wrap::-webkit-scrollbar,
  body.cloud-mobile-page .huawei-table-wrap::-webkit-scrollbar {
    height: 8px !important;
  }

  body.cloud-mobile-page .aliyun-table-wrap::-webkit-scrollbar-thumb,
  body.cloud-mobile-page .huawei-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45) !important;
    border-radius: 999px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table,
  body.cloud-mobile-page .aliyun-table.cloud-mobile-card-table {
    display: table !important;
    width: 1380px !important;
    min-width: 1380px !important;
    max-width: none !important;
    table-layout: fixed !important;
    border-spacing: 0 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table thead {
    display: table-header-group !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tbody {
    display: table-row-group !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr {
    display: table-row !important;
    position: static !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: default !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr::after,
  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child)::before {
    content: none !important;
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table th,
  body.cloud-mobile-page .cloud-mobile-card-table td,
  body.cloud-mobile-page .cloud-mobile-card-table td:not(:first-child),
  body.cloud-mobile-page .cloud-mobile-card-table td:first-child {
    display: table-cell !important;
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
    vertical-align: middle !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table th:first-child,
  body.cloud-mobile-page .cloud-mobile-card-table td:first-child {
    width: 54px !important;
    text-align: center !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table th:nth-child(2),
  body.cloud-mobile-page .cloud-mobile-card-table td:nth-child(2) {
    width: 150px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table th:nth-child(3),
  body.cloud-mobile-page .cloud-mobile-card-table td:nth-child(3) {
    width: 120px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table th:nth-child(4),
  body.cloud-mobile-page .cloud-mobile-card-table td:nth-child(4) {
    width: 150px !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table .cloud-mobile-expand-btn {
    display: none !important;
  }

  body.cloud-mobile-page .cloud-mobile-card-table tr:not(.is-expanded) td:nth-child(n+7) {
    display: table-cell !important;
  }
}
/* Final override: global inbound batch modal full-width layout. Keep at EOF. */
body #batch-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  background: rgba(15, 23, 42, 0.52) !important;
}

body #batch-modal .batch-modal-box {
  display: flex !important;
  flex-direction: column !important;
  width: min(1120px, calc(100vw - 36px)) !important;
  max-width: min(1120px, calc(100vw - 36px)) !important;
  height: min(940px, calc(100vh - 36px)) !important;
  max-height: calc(100vh - 36px) !important;
  padding: 0 !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #edf1f7 !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32) !important;
}

body #batch-modal .modal-header {
  flex: 0 0 auto !important;
  min-height: 86px !important;
  padding: 24px 30px !important;
  margin: 0 !important;
  border-bottom: 1px solid #eef1f7 !important;
  background: #fff !important;
}

body #batch-modal .batch-header-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

body #batch-modal .batch-header-actions h3 {
  margin: 0 !important;
  color: #172033 !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body #batch-modal .batch-header-actions .ghost-btn {
  min-width: 76px !important;
  height: 50px !important;
  border-radius: 16px !important;
  color: #6b5cff !important;
  background: #fff !important;
  border: 1px solid #eef1f7 !important;
  box-shadow: 0 14px 34px rgba(32, 38, 60, 0.08) !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

body #batch-modal .batch-grid {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

body #batch-modal .batch-config {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: none !important;
  overflow-y: auto !important;
  padding: 26px 30px 22px !important;
  margin: 0 !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

body #batch-modal .batch-form-row-4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
  max-width: none !important;
}

body #batch-modal .field-label {
  display: grid !important;
  grid-template-rows: auto minmax(56px, auto) !important;
  gap: 9px !important;
  min-width: 0 !important;
}

body #batch-modal .field-label > span,
body #batch-modal .batch-node-group-filter > span {
  color: #697386 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

body #batch-modal input,
body #batch-modal select {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 18px !important;
  border: 1px solid #eef1f7 !important;
  background: #fff !important;
  box-shadow: 0 18px 36px rgba(32, 38, 60, 0.05) !important;
  color: #697386 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  padding: 0 18px !important;
}

body #batch-modal input::placeholder {
  color: #aeb7c6 !important;
  opacity: 1 !important;
}

body #batch-modal .batch-user-combo {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 92px !important;
  gap: 8px !important;
}

body #batch-modal .batch-node-picker {
  width: 100% !important;
  max-width: none !important;
  margin: 20px 0 22px !important;
  border-radius: 24px !important;
  border: 1px solid #edf1f7 !important;
  background: #fbfdff !important;
  box-shadow: 0 24px 60px rgba(32, 38, 60, 0.06) !important;
  overflow: hidden !important;
}

body #batch-modal .batch-node-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 64px !important;
  padding: 16px 22px !important;
  color: #172033 !important;
}

body #batch-modal .batch-check-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-right: auto !important;
  color: #172033 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

body #batch-modal .batch-check-title input,
body #batch-modal .batch-node-card input {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: grid !important;
  place-items: center !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 7px !important;
  border: 2px solid #cfe0ff !important;
  background: #fff !important;
  box-shadow: none !important;
}

body #batch-modal .batch-check-title input:checked,
body #batch-modal .batch-node-card input:checked {
  background: #2f6bff !important;
  border-color: #2f6bff !important;
}

body #batch-modal .batch-check-title input:checked::after,
body #batch-modal .batch-node-card input:checked::after {
  content: "" !important;
  width: 9px !important;
  height: 6px !important;
  border-left: 2px solid #fff !important;
  border-bottom: 2px solid #fff !important;
  transform: rotate(-45deg) translate(1px, -1px) !important;
}

body #batch-modal .batch-node-group-filter {
  display: inline-grid !important;
  grid-template-columns: auto 220px !important;
  align-items: center !important;
  gap: 10px !important;
}

body #batch-modal .batch-node-group-filter select {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
  padding: 0 12px !important;
}

body #batch-modal #batch-node-count {
  color: #697386 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body #batch-modal .batch-node-list {
  width: 100% !important;
  max-width: none !important;
  max-height: 330px !important;
  overflow-y: auto !important;
  padding: 0 22px 20px !important;
  display: grid !important;
  gap: 14px !important;
}

body #batch-modal .batch-node-card {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 82px !important;
  padding: 14px 18px !important;
  border-radius: 14px !important;
  border: 1px solid #8ab6ff !important;
  border-left: 6px solid #2f7bff !important;
  background: #f2f7ff !important;
  color: #172033 !important;
}

body #batch-modal .batch-node-card.is-selected {
  background: #eef6ff !important;
}

body #batch-modal .batch-node-card.is-local {
  border-color: #6ee7a6 !important;
  border-left-color: #22c773 !important;
  background: #effcf5 !important;
}

body #batch-modal .batch-node-main {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
}

body #batch-modal .batch-node-main strong {
  color: #172033 !important;
  font-size: 21px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
}

body #batch-modal .batch-node-main small {
  color: #808b9d !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}

body #batch-modal .batch-node-main em {
  display: inline-flex !important;
  margin-left: 8px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  background: #d8fbe7 !important;
  color: #079455 !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  vertical-align: middle !important;
}

body #batch-modal .batch-node-empty {
  min-height: 96px !important;
  display: grid !important;
  place-items: center !important;
  color: #8a94a6 !important;
  font-size: 18px !important;
  font-weight: 850 !important;
}

body #batch-modal .batch-expiry-field {
  grid-template-rows: auto 56px auto !important;
}

body #batch-modal .batch-quick-days {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body #batch-modal .batch-quick-days button {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 12px !important;
  border: 1px solid #dce8ff !important;
  background: #f4f8ff !important;
  color: #2f6bff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body #batch-modal .batch-field-hidden,
body #batch-modal .batch-protocol-field.batch-field-hidden,
body #batch-modal #batch-protocol-fields,
body #batch-modal .batch-hidden-defaults {
  display: none !important;
}

body #batch-modal .modal-actions {
  flex: 0 0 auto !important;
  position: static !important;
  width: 100% !important;
  min-height: 92px !important;
  padding: 18px 30px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 34px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border-top: 1px solid #eef1f7 !important;
  box-shadow: 0 -16px 38px rgba(32, 38, 60, 0.06) !important;
}

body #batch-modal .modal-actions .primary-btn {
  width: 220px !important;
  height: 64px !important;
  border-radius: 20px !important;
  font-size: 21px !important;
  font-weight: 950 !important;
}

body #batch-modal .modal-actions .ghost-btn {
  min-width: 92px !important;
  height: 50px !important;
  border-radius: 16px !important;
  color: #6b5cff !important;
  background: #fff !important;
  border: 1px solid #eef1f7 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

@media (max-width: 980px) {
  body #batch-modal {
    padding: 10px !important;
  }

  body #batch-modal .batch-modal-box {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    border-radius: 22px !important;
  }

  body #batch-modal .batch-config {
    padding: 22px 16px !important;
  }

  body #batch-modal .batch-form-row-4 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body #batch-modal .batch-node-toolbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body #batch-modal .batch-node-group-filter {
    grid-template-columns: 1fr !important;
  }
}
