﻿:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafd;
  --border: #dbe3ef;
  --border-strong: #c7d2e2;
  --text: #1d2738;
  --muted: #66758d;
  --subtle: #94a3b8;
  --blue: #116eea;
  --blue-strong: #075bd1;
  --blue-soft: #e8f1ff;
  --green: #168a5a;
  --green-soft: #e7f6ef;
  --orange: #cf6f0e;
  --orange-soft: #fff3e4;
  --red: #cf3f3f;
  --red-soft: #fff0f0;
  --shadow: 0 14px 36px rgba(29, 39, 56, 0.08);
  --radius: 8px;
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}



* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(360px, 520px);
  place-content: center;
  gap: 0;
  padding: 32px;
}

.login-screen.compact {
  grid-template-columns: minmax(320px, 430px);
}

.login-art,
.login-panel {
  min-height: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.login-art {
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 56px;
  background:
    linear-gradient(180deg, rgba(232, 241, 255, 0.92), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(17, 110, 234, 0.07) 48px),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(22, 138, 90, 0.06) 48px);
}

.login-art h1 {
  margin: 24px 0 24px;
  max-width: 420px;
  font-size: 40px;
  line-height: 1.18;
}

.login-art ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #30415c;
}

.login-art li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--blue);
  vertical-align: 1px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 56px;
}

.compact .login-panel {
  border-left: 1px solid var(--border);
  border-radius: var(--radius);
}

.login-panel h2 {
  margin: 4px 0 0;
  font-size: 32px;
}

.admin-auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
  background:
    linear-gradient(180deg, #f6f8fc 0%, #edf2f8 100%),
    repeating-linear-gradient(90deg, transparent, transparent 72px, rgba(21, 37, 64, 0.035) 73px);
}

.admin-login-card {
  display: grid;
  grid-template-columns: minmax(420px, 540px) minmax(380px, 460px);
  width: min(100%, 1000px);
  min-height: 620px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(21, 37, 64, 0.13);
  overflow: hidden;
}

.admin-login-side {
  display: grid;
  align-content: space-between;
  gap: 36px;
  padding: 44px;
  background:
    linear-gradient(145deg, rgba(16, 33, 59, 0.98), rgba(20, 63, 99, 0.96)),
    repeating-linear-gradient(90deg, transparent, transparent 58px, rgba(255, 255, 255, 0.06) 59px);
  color: #fff;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-login-brand .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #116eea;
  box-shadow: 0 14px 32px rgba(17, 110, 234, 0.3);
}

.admin-login-brand div {
  display: grid;
  gap: 4px;
}

.admin-login-brand strong {
  font-size: 18px;
}

.admin-login-brand em,
.admin-login-copy .eyebrow {
  color: rgba(232, 241, 255, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-login-copy {
  display: grid;
  gap: 16px;
  max-width: 440px;
}

.admin-login-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.admin-login-copy p:not(.eyebrow) {
  margin: 0;
  color: rgba(232, 241, 255, 0.82);
  font-size: 15px;
  line-height: 1.9;
}

.admin-login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-login-metrics span {
  display: grid;
  gap: 6px;
  min-height: 108px;
  border: 1px solid rgba(232, 241, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
}

.admin-login-metrics svg {
  width: 19px;
  height: 19px;
  color: #7dd3a8;
}

.admin-login-metrics strong {
  font-size: 18px;
}

.admin-login-metrics em {
  color: rgba(232, 241, 255, 0.74);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.admin-login-form {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 50px;
}

.admin-login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 6px;
}

.admin-login-head h2 {
  margin: 5px 0 6px;
  color: #10213b;
  font-size: 32px;
  line-height: 1.15;
}

.admin-login-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-login-head > svg {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #cfe0f6;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--blue);
  padding: 11px;
}

.admin-auth-field {
  display: grid;
  gap: 8px;
  color: #10213b;
  font-weight: 900;
}

.admin-auth-field > div {
  position: relative;
}

.admin-auth-field svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #8da0b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-auth-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #fbfdff;
  color: #10213b;
  padding: 12px 14px 12px 46px;
  font-weight: 800;
  outline: 0;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.admin-auth-field input:focus {
  border-color: #73aaf0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(17, 110, 234, 0.1);
}

.admin-auth-field:focus-within svg {
  color: var(--blue);
}

.admin-login-submit {
  width: 100%;
  min-height: 50px;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(17, 110, 234, 0.24);
  font-size: 15px;
  font-weight: 900;
}

.admin-login-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 0;
  border-top: 1px solid #e2eaf4;
  padding-top: 16px;
  color: #66758d;
  line-height: 1.7;
}

.admin-login-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--green);
  margin-top: 2px;
}

.admin-login-form .form-status {
  min-height: 22px;
  margin: -2px 0 0;
  border-radius: 8px;
  background: #f4f7fb;
  padding: 8px 10px;
}

.admin-login-form .form-status.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .admin-auth-screen {
    padding: 20px;
  }

  .admin-login-card {
    grid-template-columns: 1fr;
    width: min(100%, 520px);
    min-height: auto;
  }

  .admin-login-side {
    min-height: auto;
    gap: 24px;
    padding: 32px;
  }

  .admin-login-copy h1 {
    font-size: 34px;
  }

  .admin-login-form {
    padding: 34px;
  }
}

@media (max-width: 620px) {
  .admin-auth-screen {
    padding: 12px;
  }

  .admin-login-side {
    display: none;
  }

  .admin-login-form {
    min-height: calc(100dvh - 24px);
    padding: 24px;
  }

  .admin-login-head h2 {
    font-size: 28px;
  }

  .admin-login-head > svg {
    width: 40px;
    height: 40px;
    padding: 10px;
  }
}

.user-auth-screen {
  grid-template-columns: minmax(620px, 820px) minmax(420px, 520px);
  align-content: center;
  width: 100%;
  gap: 0;
  padding: clamp(28px, 5vh, 56px) clamp(32px, 5vw, 72px);
  background:
    linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%),
    repeating-linear-gradient(90deg, transparent, transparent 72px, rgba(21, 37, 64, 0.03) 73px);
}

.user-auth-art {
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-height: min(760px, calc(100vh - 88px));
  border-color: #cdd9ea;
  border-right: 0;
  padding: clamp(42px, 5vw, 64px);
  background:
    linear-gradient(180deg, rgba(235, 243, 255, 0.96), rgba(255, 255, 255, 0.97)),
    linear-gradient(135deg, rgba(17, 110, 234, 0.11), transparent 48%),
    repeating-linear-gradient(90deg, transparent, transparent 54px, rgba(17, 110, 234, 0.05) 55px);
}

.user-auth-art h1 {
  max-width: 640px;
  margin: 0;
  color: #10213b;
  font-size: clamp(42px, 4.2vw, 64px);
  line-height: 1.08;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-brand-row > span {
  color: #57708f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-hero-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.auth-hero-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0;
  color: #40516b;
  font-size: 17px;
  line-height: 1.8;
}

.login-art-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 430px;
}

.login-art-metrics span {
  display: grid;
  gap: 4px;
  border: 1px solid #d4e2f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.login-art-metrics strong {
  color: var(--blue);
  font-size: 18px;
}

.login-art-metrics em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.user-auth-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 560px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-radius: 8px;
  background: #f0f4fa;
  padding: 4px;
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #40516b;
  font-weight: 900;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(21, 37, 64, 0.08);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-head {
  display: grid;
  gap: 5px;
}

.auth-head h2 {
  margin: 0;
  color: #10213b;
}

.auth-head span {
  color: var(--muted);
  font-size: 13px;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-footer .link-btn {
  min-height: 28px;
  padding: 0;
}

.auth-form .form-status {
  margin: -4px 0 0;
}

.auth-command-board {
  display: grid;
  gap: 14px;
  max-width: 680px;
  border: 1px solid #cbd9eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(21, 37, 64, 0.08);
  padding: 16px;
}

.auth-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e3ebf6;
  padding-bottom: 12px;
}

.auth-board-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-board-head strong {
  color: #10213b;
  font-size: 16px;
}

.auth-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-board-grid div,
.auth-country-strip span {
  border: 1px solid #d8e4f3;
  border-radius: 8px;
  background: #f8fbff;
}

.auth-board-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.auth-board-grid span,
.auth-board-grid em,
.auth-country-strip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.auth-board-grid strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.auth-country-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-country-strip span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 10px 12px;
  color: #20314a;
  font-size: 13px;
  font-weight: 900;
}

.auth-country-strip b {
  grid-row: span 2;
  font-size: 18px;
}

.auth-board-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-board-list div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #40516b;
  font-size: 12px;
  line-height: 1.55;
}

.auth-board-list svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--blue);
  margin-top: 2px;
}

.user-auth-panel {
  min-height: min(760px, calc(100vh - 88px));
  border-color: #cdd9ea;
  padding: clamp(44px, 5vw, 64px);
  box-shadow: 0 24px 70px rgba(21, 37, 64, 0.1);
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e4ebf5;
  padding-bottom: 16px;
}

.auth-panel-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-panel-top strong {
  color: #10213b;
  font-size: 15px;
}

.user-auth-panel .primary-btn {
  min-height: 44px;
  font-weight: 900;
}

.user-auth-panel input {
  min-height: 42px;
  border-color: #ccd8e8;
  background: #fbfdff;
}

.user-auth-panel input:focus {
  border-color: #8ab8f5;
  box-shadow: 0 0 0 3px rgba(17, 110, 234, 0.1);
}

.auth-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-top: 1px solid #e4ebf5;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-security-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--blue);
  margin-top: 2px;
}

.brand-line,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 8px;
  color: #3b4a61;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 11px;
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(17, 110, 234, 0.11);
}

.form-note {
  margin: 0;
  color: var(--muted);
}

.form-status {
  min-height: 20px;
  font-size: 13px;
}

.form-status[data-tone="success"] {
  color: var(--green);
}

.form-status[data-tone="error"] {
  color: var(--red);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
}

.brand {
  width: 100%;
  padding: 2px 4px 20px;
  font-size: 24px;
  font-weight: 800;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #35445b;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  color: var(--blue);
  background: var(--blue-soft);
}

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

.nav-parent .nav-chevron {
  margin-left: auto;
  transition: transform 0.18s ease;
}

.nav-group.expanded .nav-chevron {
  transform: rotate(180deg);
}

.nav-sublist {
  display: none;
  gap: 4px;
  margin-left: 18px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.nav-group.expanded .nav-sublist {
  display: grid;
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  border-radius: 7px;
  color: #52647d;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.nav-subitem:hover,
.nav-subitem.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.nav-item svg,
.nav-subitem svg,
button svg,
.link-btn svg,
.pill svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  padding: 12px 24px;
}

.breadcrumb {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.top-actions {
  justify-content: flex-end;
}

.relay-top-panel-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #243247;
  font-weight: 700;
}

.relay-top-panel-select span {
  white-space: nowrap;
}

.relay-top-panel-select select {
  min-width: 200px;
  min-height: 34px;
  border-color: #d3deea;
  background: #fff;
}

.top-admin-btn {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #34445c;
  padding: 0 4px;
  font-weight: 700;
}

.top-balance,
.top-service,
.top-menu-trigger,
.avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #243247;
  padding: 0 8px;
  font-weight: 700;
}

.top-balance {
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.top-balance svg {
  color: #536177;
}

.top-service {
  color: var(--blue);
}

.top-divider {
  width: 1px;
  height: 22px;
  background: var(--border-strong);
}

.top-menu {
  position: relative;
}

.top-menu-trigger svg,
.avatar-btn svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.flag-mini {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 16px;
  overflow: hidden;
  border-radius: 2px;
  font-size: 15px;
  line-height: 1;
}

.flag-mini img,
.flag-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-btn {
  padding: 0 4px;
}

.avatar-circle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #eef3fb;
  border-radius: 999px;
  background: #5d6a80;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.top-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 150px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(28, 40, 60, 0.15);
  padding: 6px;
}

.top-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: #fff;
  transform: rotate(45deg);
}

.top-menu.open .top-dropdown {
  display: grid;
  gap: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #30415c;
  padding: 0 10px;
  font-weight: 600;
  text-align: left;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.dropdown-item.danger {
  color: var(--red);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
}

button,
.primary-btn,
.ghost-btn,
.link-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.primary-btn {
  background: var(--blue);
  color: #fff;
}

.primary-btn:hover {
  background: var(--blue-strong);
}

button:disabled,
button.is-busy {
  opacity: 0.72;
}

button:disabled {
  cursor: not-allowed;
}

button.is-busy {
  cursor: wait;
}

button.is-busy svg {
  animation: relay-spin 0.8s linear infinite;
}

.primary-btn.small,
.ghost-btn.small,
.link-btn.small,
.danger-btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.ghost-btn,
.link-btn {
  border-color: var(--border);
  background: #fff;
  color: #30415c;
}

.ghost-btn.danger {
  border-color: #f2c1c1;
  background: #fff;
  color: var(--red);
}

.ghost-btn.danger:hover {
  background: var(--red-soft);
}

.link-btn {
  color: var(--blue);
}

.danger-btn {
  border-color: #f2c1c1;
  background: var(--red-soft);
  color: var(--red);
}

.page-root {
  padding: 20px 24px 40px;
}

.relay-embed-page {
  height: calc(100vh - 104px);
  min-height: 720px;
  margin: -20px -24px -40px;
  background: #f4f7fb;
}

.relay-manager-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

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

.page-stack > * {
  min-width: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.four-col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.admin-summary-row {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

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

.admin-summary-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-summary-row div,
.admin-kpi-list div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 13px 14px;
}

.admin-summary-row span,
.admin-summary-row em,
.admin-kpi-list span,
.admin-kpi-list em,
.admin-stack em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-summary-row strong,
.admin-kpi-list strong {
  color: #14223a;
  font-size: 20px;
}

.admin-side-panel {
  min-height: 100%;
  padding: 18px;
}

.admin-kpi-list {
  display: grid;
  gap: 12px;
}

.admin-stack {
  display: grid;
  gap: 4px;
}

.admin-content-cell {
  display: block;
  max-width: 460px;
  color: #26364d;
  line-height: 1.55;
}

.admin-filterbar {
  margin-bottom: 16px;
}

.admin-order-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(520px, 1.25fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.admin-order-hero h2 {
  margin: 4px 0 12px;
  font-size: 22px;
}

.admin-order-hero-copy {
  margin: -4px 0 12px;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.65;
}

.admin-order-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-order-caption span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #f8fbff;
  color: #53657f;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.admin-order-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-order-hero-stats div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-order-hero-stats div.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffaf0;
}

.admin-order-hero-stats div.danger {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fff6f6;
}

.admin-order-hero-stats span,
.admin-order-hero-stats em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.admin-order-hero-stats strong {
  min-width: 0;
  color: #14223a;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.admin-order-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.admin-order-tab {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-height: 72px;
  border-color: #d8e5f5;
  background: #fff;
  color: #31425a;
  padding: 10px 12px;
  white-space: normal;
}

.admin-order-tab.active {
  border-color: #9ec5ff;
  background: #f3f8ff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(17, 110, 234, 0.08);
}

.admin-order-tab span,
.admin-order-tab em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-order-tab strong {
  color: #14223a;
  font-size: 18px;
}

.admin-order-table-scroll table {
  min-width: 1160px;
}

.admin-order-row.pending-row td {
  background: #fffdf8;
}

.admin-order-id-cell,
.admin-order-business-cell {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.order-priority-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 6px;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid #d9e3ef;
  background: #f5f7fb;
  color: #607086;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-priority-pill i {
  width: 14px;
  height: 14px;
}

.order-priority-pill.active {
  border-color: rgba(0, 154, 102, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.order-priority-pill.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--orange-soft);
  color: var(--orange);
}

.order-priority-pill.danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.admin-order-no strong {
  color: #14223a;
  font-family: Consolas, "SFMono-Regular", monospace;
  letter-spacing: 0;
}

.admin-order-money em {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.admin-order-money .payment-badge {
  min-height: 24px;
}

.admin-order-money strong {
  color: #14223a;
  font-size: 15px;
}

.admin-order-status-cell {
  gap: 8px;
}

.admin-order-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-order-time svg {
  width: 15px;
  height: 15px;
}

.admin-order-time.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-order-time.success,
.admin-order-time.stable {
  background: var(--green-soft);
  color: var(--green);
}

.admin-order-time.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.admin-order-time.danger {
  background: var(--red-soft);
  color: var(--red);
}

.admin-order-actions {
  min-width: 260px;
  flex-wrap: wrap;
}

.admin-order-fulfillment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 190px;
}

.admin-order-fulfillment > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f5f7fb;
  color: #607086;
  padding: 7px;
}

.admin-order-fulfillment.active > i {
  background: var(--green-soft);
  color: var(--green);
}

.admin-order-fulfillment.warn > i {
  background: var(--orange-soft);
  color: var(--orange);
}

.admin-order-fulfillment.danger > i {
  background: var(--red-soft);
  color: var(--red);
}

.admin-order-fulfillment span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-order-fulfillment strong {
  color: #14223a;
  font-size: 13px;
}

.admin-order-fulfillment em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.admin-order-lock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid #d8e3f1;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-order-lock svg {
  width: 14px;
  height: 14px;
}

.admin-order-lock.success {
  border-color: rgba(22, 138, 90, 0.18);
  background: var(--green-soft);
  color: var(--green);
}

.admin-order-lock.danger {
  border-color: rgba(207, 63, 63, 0.18);
  background: var(--red-soft);
  color: var(--red);
}

.admin-order-lock.muted,
.admin-order-time.muted {
  background: #eef1f5;
  color: var(--muted);
}

.admin-order-lock.active {
  border-color: rgba(17, 110, 234, 0.18);
  background: var(--blue-soft);
  color: var(--blue);
}

.proxy-modal.admin-order-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
}

.admin-order-modal .panel-header h3 {
  margin: 3px 0 8px;
  font-size: 20px;
}

.admin-order-modal-head {
  position: sticky;
  top: -20px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #edf2f8;
  margin: -20px -20px 16px;
  padding: 18px 20px 14px;
}

.admin-order-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-order-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-order-modal-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f9fbff;
  padding: 11px 12px;
}

.admin-order-modal-summary span,
.admin-order-modal-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-order-modal-summary strong {
  min-width: 0;
  color: #14223a;
  overflow-wrap: anywhere;
}

.admin-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-order-detail-card {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-order-detail-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-order-detail-card-head i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 7px;
}

.admin-order-detail-card-head h4,
.admin-order-flow h4 {
  margin: 0;
  color: #14223a;
  font-size: 15px;
}

.admin-order-kv-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.admin-order-kv-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 34px;
  border-top: 1px solid #edf2f8;
  padding: 7px 0;
}

.admin-order-kv-list div:first-child {
  border-top: 0;
}

.admin-order-kv-list dt,
.admin-order-kv-list dd {
  margin: 0;
  min-width: 0;
}

.admin-order-kv-list dt {
  color: var(--muted);
  font-size: 12px;
}

.admin-order-kv-list dd {
  color: #14223a;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-order-flow {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-order-fulfillment-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  margin: 12px 0 0;
  padding: 12px;
}

.admin-order-fulfillment-panel > i {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 9px;
}

.admin-order-fulfillment-panel.active {
  border-color: rgba(0, 154, 102, 0.22);
  background: #f3fbf7;
}

.admin-order-fulfillment-panel.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffaf0;
}

.admin-order-fulfillment-panel.danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff6f6;
}

.admin-order-fulfillment-panel div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-order-fulfillment-panel strong {
  color: #14223a;
}

.admin-order-fulfillment-panel span,
.admin-order-fulfillment-panel em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.admin-order-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-order-flow-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  color: #53657f;
  padding: 0 12px;
  font-weight: 800;
}

.admin-order-flow-steps svg {
  width: 16px;
  height: 16px;
}

.admin-order-flow-steps .done {
  border-color: rgba(22, 138, 90, 0.18);
  background: var(--green-soft);
  color: var(--green);
}

.admin-order-flow-steps .active {
  border-color: rgba(207, 111, 14, 0.2);
  background: var(--orange-soft);
  color: var(--orange);
}

.admin-order-flow-steps .danger {
  border-color: rgba(207, 63, 63, 0.18);
  background: var(--red-soft);
  color: var(--red);
}

.admin-order-flow-steps .muted {
  background: #eef1f5;
  color: var(--muted);
}

.admin-order-modal-actions {
  position: sticky;
  bottom: -20px;
  z-index: 4;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  margin: 0 -20px -20px;
  padding: 14px 20px 18px;
}

.admin-order-modal-actions select {
  width: auto;
  min-width: 140px;
}

.admin-management-hero {
  display: grid;
  gap: 16px;
}

.admin-management-hero h2 {
  margin: 2px 0 6px;
}

.admin-management-hero .admin-summary-row {
  margin-bottom: 0;
}

.relay-toolbar-panel .history-filterbar {
  margin-bottom: 0;
}

.relay-toolbar-panel select {
  min-width: 160px;
}

.relay-toolbar-panel .keyword-field {
  flex: 1 1 300px;
  width: min(100%, 360px);
}

.admin-management-table table {
  min-width: 1320px;
}

.relay-management-table table {
  min-width: 1080px;
}

.relay-console-page {
  padding: 0;
}

.relay-console-card {
  border-radius: 4px;
  padding: 20px;
}

.relay-console-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.relay-console-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.relay-console-tip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #8a95a5;
  padding: 0 12px;
}

.relay-console-tip button {
  min-height: 24px;
  border: 0;
  background: transparent;
  color: #a0a8b4;
  padding: 0;
}

.relay-search-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 260px);
  min-height: 34px;
  border: 1px solid #d8e2ef;
  border-radius: 4px;
  background: #fff;
  padding: 0 10px;
  color: #9aa6b5;
}

.relay-search-box input {
  width: 100%;
  min-height: 30px;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.relay-console-table {
  border: 1px solid #e1e8f2;
  border-radius: 0;
}

.relay-console-table table {
  min-width: 980px;
}

.relay-console-table th,
.relay-console-table td {
  border-right: 1px solid #e5ebf4;
}

.relay-console-table th:last-child,
.relay-console-table td:last-child {
  border-right: 0;
}

.relay-console-table th {
  background: #fbfcfe;
  color: #6d7788;
  font-weight: 800;
}

.relay-panel-table table {
  min-width: 880px;
}

.relay-user-port-table table {
  min-width: 960px;
}

.relay-user-port-table th:first-child,
.relay-user-port-table td:first-child,
.relay-rule-table th:first-child,
.relay-rule-table td:first-child {
  width: 48px;
  text-align: center;
}

.relay-rule-table table {
  min-width: 1180px;
}

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

.relay-rule-table th:last-child,
.relay-rule-table td:last-child {
  width: 132px;
}

.relay-inline-code {
  display: inline-flex;
  max-width: 220px;
  border: 1px solid #d8e5f5;
  border-radius: 4px;
  background: #f8fbff;
  color: #1f3b5f;
  padding: 4px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-region-badge {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 132px;
  max-width: 220px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  color: #273a55;
  padding: 7px 9px;
  text-align: left;
}

.relay-region-badge.loading {
  border-color: #d9e8ff;
  background: #f4f9ff;
}

.relay-region-badge.failed,
.relay-region-badge.pending {
  border-color: #f0dfbf;
  background: #fffaf0;
}

.relay-region-badge strong,
.relay-region-badge em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-region-badge strong {
  font-size: 12px;
  font-weight: 850;
}

.relay-region-badge em {
  color: #77849a;
  font-size: 11px;
  font-style: normal;
  margin-top: 2px;
}

.relay-region-badge svg {
  width: 15px;
  height: 15px;
}

.relay-region-badge.loading svg {
  animation: relay-spin 0.9s linear infinite;
}

.relay-region-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  border-radius: 4px;
  background: #eef4fb;
  overflow: hidden;
  flex: 0 0 auto;
}

.relay-region-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.relay-region-flag.fallback {
  color: #55708f;
}

.relay-region-empty {
  color: #98a3b3;
}

.relay-table-expand {
  width: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #66758d;
  padding: 0;
}

.relay-toggle-mini {
  position: relative;
  width: 42px;
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  background: #d2d9e4;
  padding: 0;
}

.relay-toggle-mini span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s ease;
}

.relay-toggle-mini.active {
  background: #8cc7ff;
}

.relay-toggle-mini.active span {
  transform: translateX(20px);
}

.relay-link-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.relay-text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

.relay-text-action.primary {
  color: #2990ff;
}

.relay-text-action.success {
  color: #43b72a;
}

.relay-text-action.danger {
  color: #ff5b61;
}

.relay-text-action svg {
  width: 14px;
  height: 14px;
}

.relay-blue-soft {
  background: #2f92ff;
}

.relay-green {
  background: #5dbb35;
}

.relay-orange {
  background: #e59b2f;
}

.relay-soft-danger {
  border-color: transparent;
  background: #f5a8ae;
  color: #fff;
}

.relay-rule-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 12px;
}

.relay-rule-pill.green {
  border: 1px solid #d9f0d1;
  background: #f0faea;
  color: #31bb1c;
}

.relay-rule-pill.orange {
  border: 1px solid #ffe1ba;
  background: #fff6ea;
  color: #f08a1f;
}

.relay-rule-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.relay-rule-main strong {
  max-width: 240px;
  overflow: hidden;
  color: #1f314a;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-rule-main span {
  color: #7b8798;
  font-size: 12px;
}

.relay-rule-server-card {
  display: inline-flex;
  max-width: 260px;
  min-width: 210px;
}

.relay-rule-server-main {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
}

.relay-rule-server-main code,
.relay-rule-server-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-rule-server-main code {
  color: #1f3b5f;
  font-weight: 850;
}

.relay-rule-server-main span {
  color: #7b8798;
  font-size: 12px;
  margin-top: 2px;
}

.relay-rule-meta-list,
.relay-routing-scope,
.relay-routing-conditions {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.relay-rule-credential {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 220px;
  color: #52647f;
  font-size: 12px;
  font-weight: 750;
}

.relay-rule-credential.muted {
  color: #98a3b3;
}

.relay-rule-credential svg {
  width: 14px;
  height: 14px;
}

.relay-routing-scope > div,
.relay-routing-conditions > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.relay-routing-scope > div > span:first-child,
.relay-routing-conditions > div > span:first-child {
  color: #7b8798;
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
}

.relay-rule-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.relay-rule-chip {
  display: inline-flex;
  align-items: center;
  max-width: 160px;
  min-height: 24px;
  border: 1px solid #dae5f2;
  border-radius: 6px;
  background: #fff;
  color: #33445e;
  padding: 0 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-rule-chip.muted {
  border-color: #e7edf5;
  background: #f7f9fc;
  color: #98a3b3;
}

.relay-rule-chip.more {
  background: #eef5ff;
  color: #2f79c7;
}

.relay-panel-chip {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  min-height: 28px;
  border: 1px solid #dbe7f4;
  border-radius: 999px;
  background: #fff;
  color: #40536f;
  padding: 0 10px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-expanded-row > td {
  background: #fbfdff;
}

.relay-client-detail-row > td {
  padding: 0 !important;
  background: #f5f7fb;
}

.relay-expanded-panel {
  display: grid;
  gap: 10px;
  padding: 10px 0;
}

.relay-expanded-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.relay-user-detail-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 16px;
  background: #f5f7fb;
}

.relay-user-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.relay-user-detail-head > div:first-child {
  display: grid;
  gap: 4px;
}

.relay-user-detail-head strong {
  color: #27364f;
  font-size: 14px;
}

.relay-user-detail-head span {
  color: #7b8798;
  font-size: 12px;
}

.relay-client-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.relay-nested-table {
  min-width: 720px !important;
  border: 1px solid #e5ebf4;
}

.relay-user-detail-table {
  min-width: 980px !important;
  background: #fff;
  table-layout: fixed;
}

.relay-user-detail-table th,
.relay-user-detail-table td {
  border-right: 1px solid #e5ebf4;
  border-bottom: 1px solid #e5ebf4;
  text-align: center;
  vertical-align: middle;
}

.relay-user-detail-table th:last-child,
.relay-user-detail-table td:last-child {
  border-right: 0;
}

.relay-user-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.relay-user-detail-table th {
  color: #526075;
  white-space: nowrap;
}

.relay-user-detail-table th svg {
  width: 13px;
  height: 13px;
  margin-left: 4px;
  vertical-align: -2px;
  color: #9aa6b5;
}

.relay-user-detail-table th:first-child,
.relay-user-detail-table td:first-child {
  width: 44px;
}

.relay-user-detail-table th:nth-child(2),
.relay-user-detail-table td:nth-child(2) {
  width: 58px;
}

.relay-user-detail-table th:nth-child(3),
.relay-user-detail-table td:nth-child(3) {
  width: 300px;
}

.relay-user-detail-table th:nth-child(4),
.relay-user-detail-table td:nth-child(4) {
  width: 140px;
}

.relay-user-detail-table th:nth-child(5),
.relay-user-detail-table td:nth-child(5) {
  width: 150px;
}

.relay-user-detail-table th:nth-child(6),
.relay-user-detail-table td:nth-child(6) {
  width: 90px;
}

.relay-user-detail-table th:nth-child(7),
.relay-user-detail-table td:nth-child(7) {
  width: 72px;
}

.relay-user-detail-table th:nth-child(8),
.relay-user-detail-table td:nth-child(8) {
  width: 190px;
}

.relay-user-detail-table td:nth-child(3) {
  text-align: left;
}

.relay-user-detail-table .relay-link-actions {
  flex-wrap: nowrap;
  gap: 10px;
}

.relay-user-detail-table .relay-text-action {
  font-size: 12px;
}

.relay-user-primary {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.relay-user-region-cell {
  justify-items: start;
}

.relay-user-region-cell .relay-region-badge {
  min-width: 0;
  max-width: 260px;
  width: 100%;
  padding: 6px 8px;
}

.relay-client-user .relay-region-badge {
  min-width: 0;
  max-width: 220px;
  width: fit-content;
  margin-top: 2px;
}

.relay-user-primary code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: #1d334f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-user-primary > span:not(.relay-region-badge) {
  max-width: 100%;
  overflow: hidden;
  color: #9aa6b5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-cell-sub {
  margin-top: 4px;
  color: #9aa6b5;
  font-size: 12px;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-table-summary {
  margin-top: 16px;
  text-align: right;
  color: #34445c;
}

.relay-inbound-tree-table {
  min-width: 760px;
  table-layout: fixed;
}

.relay-management-table .relay-inbound-tree-table {
  min-width: 760px;
}

.relay-node-manager {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.relay-node-card {
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.relay-node-card.is-expanded {
  border-color: #b8d3f8;
  box-shadow: 0 10px 24px rgba(17, 110, 234, 0.07);
}

.relay-node-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
}

.relay-node-main > .relay-expand-btn {
  grid-column: 1;
  grid-row: 1;
}

.relay-node-title {
  grid-column: 2;
  grid-row: 1;
}

.relay-node-summary {
  grid-column: 2 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 10px;
  min-width: 0;
}

.relay-node-main > .relay-status-btn {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.relay-node-title,
.relay-node-meta,
.relay-client-user,
.relay-client-metric,
.relay-client-toolbar > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.relay-node-title strong {
  color: #13233b;
  font-size: 14px;
}

.relay-node-title span,
.relay-node-meta span,
.relay-client-user span,
.relay-client-metric span,
.relay-client-toolbar span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-node-meta strong {
  color: #1f3048;
  font-size: 13px;
}

.relay-node-meta code,
.relay-client-user code {
  max-width: 100%;
}

.relay-node-actions,
.relay-client-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.relay-node-actions {
  grid-column: 2 / -1;
  grid-row: 3;
  justify-content: flex-start;
  padding-top: 2px;
}

.relay-node-actions .small,
.relay-client-actions .small {
  min-height: 30px;
  padding: 0 8px;
}

.relay-status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 30px;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  background: #fff;
  color: #52647f;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.relay-status-btn.active {
  border-color: #bde9d0;
  background: #f0fbf5;
  color: #168a5a;
}

.relay-status-btn.is-busy,
.relay-status-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.relay-status-btn.is-busy svg,
.row-actions .is-busy svg {
  animation: relay-spin 0.8s linear infinite;
}

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

.relay-client-panel {
  border-top: 1px solid #d8e5f5;
  background: #f8fbff;
  padding: 12px;
}

.relay-client-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.relay-client-toolbar strong {
  color: #13233b;
}

.relay-client-grid-wrap {
  border-radius: 8px;
  background: #fff;
}

.relay-client-grid-wrap .relay-user-detail-table {
  margin: 0;
}

.relay-client-list {
  display: grid;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.relay-client-row {
  display: grid;
  grid-template-columns: 70px minmax(150px, 1fr) minmax(180px, 1.1fr) 88px minmax(220px, auto);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid #e4edf8;
  padding: 9px 12px;
}

.relay-client-row:last-child {
  border-bottom: 0;
}

.relay-client-head {
  min-height: 42px;
  background: #f3f7fc;
  color: #52637a;
  font-size: 12px;
  font-weight: 800;
}

.relay-client-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #52637a;
}

.relay-client-details {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.relay-client-details span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid #e0e9f5;
  border-radius: 6px;
  background: #f8fbff;
  color: #26364e;
  padding: 0 7px;
  font-size: 12px;
}

.relay-client-details b {
  color: var(--muted);
  font-size: 11px;
}

.relay-client-details em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.relay-client-details .relay-client-expiry {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  padding: 5px 7px;
}

.relay-client-expiry strong {
  color: #24344d;
  font-size: 12px;
  line-height: 1.2;
}

.relay-client-expiry em.success,
.relay-expiry-cell.success span,
.relay-field-hint.success {
  color: #168a5a;
}

.relay-client-expiry em.warning,
.relay-expiry-cell.warning span,
.relay-field-hint.warning {
  color: #b7791f;
}

.relay-client-expiry em.danger,
.relay-expiry-cell.danger span,
.relay-field-hint.danger {
  color: #df4b53;
}

.relay-expiry-cell {
  display: grid;
  gap: 3px;
  justify-items: center;
  line-height: 1.25;
}

.relay-expiry-cell strong {
  color: #26364e;
  font-size: 12px;
  font-weight: 800;
}

.relay-expiry-cell span {
  font-size: 12px;
  font-weight: 700;
}

.relay-client-check input,
.relay-client-head input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  accent-color: #2f92ff;
}

.relay-user-detail-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  accent-color: #2f92ff;
}

.relay-inbound-tree-table th:nth-child(1),
.relay-inbound-tree-table td:nth-child(1) {
  width: 42px;
}

.relay-inbound-tree-table th:nth-child(3),
.relay-inbound-tree-table td:nth-child(3) {
  width: 86px;
}

.relay-inbound-tree-table th:nth-child(4),
.relay-inbound-tree-table td:nth-child(4) {
  width: 94px;
}

.relay-inbound-tree-table th:nth-child(5),
.relay-inbound-tree-table td:nth-child(5) {
  width: 112px;
}

.relay-inbound-tree-table th:nth-child(6),
.relay-inbound-tree-table td:nth-child(6) {
  width: 78px;
}

.relay-inbound-tree-table th:nth-child(7),
.relay-inbound-tree-table td:nth-child(7) {
  width: 88px;
}

.relay-inbound-tree-table th:nth-child(8),
.relay-inbound-tree-table td:nth-child(8) {
  width: 188px;
}

.relay-inbound-tree-table .relay-node-row.is-expanded td {
  background: #f8fbff;
}

.relay-expand-col {
  width: 42px;
  text-align: center;
}

.relay-expand-btn {
  width: 28px;
  min-height: 28px;
  border: 1px solid #d8e2f0;
  border-radius: 6px;
  background: #fff;
  color: #52647f;
  padding: 0;
}

.relay-expand-btn svg {
  width: 16px;
  height: 16px;
}

.relay-protocol-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  background: #f4f8ff;
  color: #244469;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.relay-user-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #26364e;
}

.relay-user-count strong {
  font-size: 17px;
}

.relay-user-count em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.relay-switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #33445e;
  font-size: 13px;
  font-weight: 700;
}

.relay-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #c8d2df;
  transition: background 0.18s ease;
}

.relay-switch i {
  position: absolute;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 33, 59, 0.2);
  transition: transform 0.18s ease;
}

.relay-switch.on {
  background: #22c55e;
}

.relay-switch.on i {
  transform: translateX(16px);
}

.relay-users-row > td {
  background: #f8fbff;
  padding: 0 12px 14px;
}

.relay-users-panel {
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.relay-users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e4edf8;
  padding: 12px 14px;
}

.relay-users-head > div:first-child {
  display: grid;
  gap: 3px;
}

.relay-users-head strong {
  color: #1f3048;
}

.relay-users-head span {
  color: var(--muted);
  font-size: 12px;
}

.relay-users-table {
  border: 0;
  border-radius: 0;
}

.relay-users-table table {
  min-width: 720px;
  table-layout: fixed;
}

.relay-users-table th,
.relay-users-table td {
  padding: 9px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.relay-users-table .select-col {
  width: 42px;
}

.relay-users-table th:nth-child(2),
.relay-users-table td:nth-child(2),
.relay-users-table th:nth-child(4),
.relay-users-table td:nth-child(4) {
  width: 42px;
}

.relay-users-table th:nth-child(3),
.relay-users-table td:nth-child(3) {
  width: 118px;
}

.relay-users-table th:nth-child(5),
.relay-users-table td:nth-child(5) {
  width: 128px;
}

.relay-users-table th:nth-child(6),
.relay-users-table td:nth-child(6),
.relay-users-table th:nth-child(7),
.relay-users-table td:nth-child(7) {
  width: 84px;
}

.relay-users-table th:nth-child(8),
.relay-users-table td:nth-child(8),
.relay-users-table th:nth-child(9),
.relay-users-table td:nth-child(9) {
  width: 72px;
}

.relay-users-table code {
  max-width: 104px;
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
}

.relay-users-table .admin-stack em {
  max-width: 112px;
}

.relay-users-table tr:last-child td {
  border-bottom: 0;
}

.admin-management-table td {
  vertical-align: top;
}

.admin-management-table .admin-stack {
  min-width: 0;
}

.admin-management-table .admin-stack em {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-management-table .provider-credential em {
  max-width: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-management-table code {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 28px;
  border: 1px solid #d8e5f5;
  border-radius: 6px;
  background: #f8fbff;
  color: #10213b;
  padding: 0 8px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-modal {
  max-width: 920px;
}

.admin-provider-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1fr);
  align-items: stretch;
  padding: 18px;
}

.admin-provider-hero-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.admin-provider-hero-copy .muted {
  max-width: 760px;
  margin: 0;
}

.admin-settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: stretch;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  padding: 18px;
}

.admin-settings-hero h2 {
  margin: 4px 0 8px;
  color: #10213b;
  font-size: 24px;
}

.admin-settings-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-settings-price-card {
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  text-align: right;
}

.admin-settings-price-card span,
.admin-settings-price-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.admin-settings-price-card strong {
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.admin-settings-panel {
  max-width: 860px;
}

.admin-settings-modal {
  display: grid;
  gap: 14px;
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.admin-settings-modal.compact {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
}

.admin-settings-modal.email-only {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  overflow-x: hidden;
}

.admin-settings-modal .admin-settings-hero {
  grid-template-columns: minmax(0, 1fr) 220px;
  padding: 16px;
}

.admin-settings-modal .admin-settings-panel {
  max-width: none;
  min-width: 0;
}

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

.admin-settings-form > label,
.admin-settings-section label {
  display: grid;
  gap: 8px;
  color: #30415c;
  font-size: 13px;
  font-weight: 800;
}

.admin-settings-form > label {
  max-width: 360px;
}

.admin-settings-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.admin-settings-section input,
.admin-settings-section select {
  min-width: 0;
  width: 100%;
}

.admin-settings-section h3 {
  margin: 2px 0 0;
  color: #10213b;
  font-size: 17px;
}

.admin-settings-section .muted {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.admin-settings-toggle {
  display: inline-flex !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: fit-content;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
}

.admin-settings-toggle input {
  width: auto;
  min-height: auto;
}

.admin-settings-email-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.smtp-account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(112px, auto);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.smtp-account-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.smtp-account-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.smtp-account-summary strong {
  color: #10213b;
  font-size: 20px;
  line-height: 1;
}

.smtp-account-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.smtp-account-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.smtp-account-card.ready {
  border-color: #b7dec8;
  background: linear-gradient(180deg, #fbfffd, #fff);
}

.smtp-account-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.smtp-account-head > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  min-width: 0;
}

.smtp-account-head strong {
  min-width: 0;
  color: #10213b;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smtp-account-head em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.smtp-account-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 24px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.smtp-account-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.mini-toggle {
  display: inline-flex !important;
  gap: 6px !important;
  align-items: center;
  width: auto;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #f8fbff;
  padding: 7px 10px;
  white-space: nowrap;
}

.mini-toggle input {
  width: auto;
  min-height: auto;
}

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

.smtp-test-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.smtp-test-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}

.smtp-test-panel-head strong {
  color: #10213b;
  font-size: 14px;
  white-space: nowrap;
}

.smtp-test-panel-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smtp-test-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.15fr);
  gap: 10px;
  min-width: 0;
}

.smtp-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.smtp-test-actions .ghost-btn {
  min-height: 38px;
  white-space: nowrap;
}

.admin-settings-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.admin-settings-preview div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-settings-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-settings-preview strong {
  color: #10213b;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.admin-provider-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-provider-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-provider-kpi-grid div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 13px 14px;
}

.admin-provider-kpi-grid span,
.admin-provider-kpi-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-provider-kpi-grid strong {
  color: #14223a;
  font-size: 20px;
}

.admin-provider-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(207, 63, 63, 0.22);
  border-radius: 8px;
  background: var(--red-soft);
  color: #8a2424;
  padding: 12px 14px;
}

.admin-provider-alert svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.admin-provider-alert strong,
.admin-provider-alert span {
  display: block;
}

.admin-provider-alert span {
  margin-top: 4px;
  color: #9b3a3a;
  font-size: 12px;
  line-height: 1.55;
}

.admin-provider-console .panel-header {
  align-items: center;
}

.admin-provider-filterbar {
  margin: 0 0 14px;
}

.admin-provider-card-grid {
  display: grid;
  gap: 10px;
}

.admin-provider-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 14px 14px 12px;
}

.admin-provider-card.failed {
  border-color: rgba(207, 63, 63, 0.28);
  background: linear-gradient(0deg, rgba(255, 240, 240, 0.55), #fff 58%);
}

.admin-provider-card.warn {
  border-color: rgba(217, 119, 6, 0.32);
  background: linear-gradient(0deg, rgba(255, 247, 237, 0.68), #fff 58%);
}

.admin-provider-card.inactive {
  background: #fbfcfe;
}

.admin-provider-card-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 0.72fr);
  gap: 14px;
  align-items: center;
}

.admin-provider-card-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.admin-provider-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-provider-avatar.active {
  background: var(--green-soft);
  color: var(--green);
}

.admin-provider-avatar.failed {
  background: var(--red-soft);
  color: var(--red);
}

.admin-provider-avatar.inactive {
  background: #eef1f5;
  color: var(--muted);
}

.admin-provider-avatar svg {
  width: 21px;
  height: 21px;
}

.admin-provider-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-provider-title > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.admin-provider-title h3 {
  margin: 0;
  overflow: hidden;
  color: #14223a;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-title span,
.admin-provider-title em,
.admin-provider-status-block p,
.admin-provider-config span,
.admin-provider-config em,
.admin-provider-binding span,
.admin-provider-binding em,
.admin-provider-sync-row span,
.admin-provider-sync-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-provider-title em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-head-right {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 0;
}

.admin-provider-head-right .status {
  gap: 5px;
}

.admin-provider-head-right .status svg {
  width: 14px;
  height: 14px;
}

.admin-provider-head-right p {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-status-block {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #e3ebf6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.admin-provider-status-block .status {
  gap: 5px;
}

.admin-provider-status-block .status svg {
  width: 14px;
  height: 14px;
}

.admin-provider-status-block p {
  margin: 0;
  line-height: 1.5;
}

.admin-provider-config {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-provider-body-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1.1fr 1fr 1.18fr;
  gap: 8px;
}

.admin-provider-body-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #e3ebf6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 9px 10px;
}

.admin-provider-body-grid span,
.admin-provider-body-grid em,
.admin-provider-plan-strip > span,
.admin-provider-plan-strip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-provider-body-grid strong,
.admin-provider-body-grid em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-body-grid strong {
  color: #14223a;
}

.admin-provider-config div,
.admin-provider-binding,
.admin-provider-sync-row {
  border: 1px solid #e3ebf6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.admin-provider-config div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-provider-config strong,
.admin-provider-config em,
.admin-provider-sync-row strong,
.admin-provider-sync-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-config strong,
.admin-provider-binding strong,
.admin-provider-sync-row strong {
  color: #14223a;
}

.admin-provider-binding {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 0.38fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-provider-binding > div:first-child {
  display: grid;
  gap: 5px;
}

.admin-provider-plan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.admin-provider-plan-tags span {
  display: inline-flex;
  max-width: 160px;
  min-height: 26px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #fff;
  padding: 0 9px;
  overflow: hidden;
  color: #42536c;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-sync-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
}

.admin-provider-sync-row > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-provider-sync-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-provider-sync-metrics span {
  display: inline-grid;
  min-width: 82px;
  gap: 3px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
}

.admin-provider-sync-metrics strong {
  font-size: 15px;
}

.admin-provider-plan-strip {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 6px 10px;
}

.admin-provider-plan-strip > span {
  font-weight: 800;
}

.admin-provider-plan-strip.empty {
  grid-template-columns: 46px minmax(0, 1fr);
}

.admin-provider-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #edf2f8;
  padding-top: 12px;
}

.admin-provider-sync-result {
  border-color: #d8e5f5;
}

.admin-provider-sync-result-inline {
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.admin-provider-sync-result-inline .panel-header {
  align-items: center;
  margin-bottom: 10px;
}

.admin-provider-sync-result-inline .panel-header h2 {
  font-size: 15px;
}

.admin-provider-sync-result.failed {
  border-color: rgba(207, 63, 63, 0.26);
}

.admin-provider-sync-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-provider-sync-kpis div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.admin-provider-sync-kpis span {
  color: var(--muted);
  font-size: 12px;
}

.admin-provider-sync-kpis strong {
  color: #14223a;
  font-size: 18px;
}

.admin-provider-sync-list {
  display: grid;
  gap: 8px;
}

.admin-provider-sync-item {
  display: grid;
  grid-template-columns: 34px minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.admin-provider-sync-item > span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.admin-provider-sync-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-provider-sync-item strong,
.admin-provider-sync-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-provider-sync-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-provider-sync-item p {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.admin-provider-sync-item code {
  min-height: 24px;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #f8fbff;
  color: #33445e;
  padding: 3px 8px;
  font-size: 12px;
}

.relay-inbound-modal {
  width: min(620px, 100%);
}

.relay-inbound-form {
  display: grid;
  gap: 18px;
  padding: 4px 0 2px;
}

.relay-inbound-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0;
}

.relay-inbound-row > span {
  color: #33445e;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.relay-inbound-row.required > span::before {
  content: "*";
  color: #ef4444;
  margin-right: 4px;
}

.relay-inbound-row input,
.relay-inbound-row select,
.relay-inbound-row textarea {
  min-height: 34px;
}

.relay-inbound-row textarea {
  min-height: 52px;
  resize: vertical;
}

.relay-security-fields {
  display: grid;
  gap: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px 12px;
}

.relay-security-fields[hidden] {
  display: none !important;
}

.relay-checkbox-row {
  align-items: center;
}

.relay-panel-cert-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.relay-panel-cert-btn {
  min-height: 34px;
}

.relay-panel-cert-btn.is-active {
  border-color: #16a34a;
  background: #22c55e;
  color: #fff;
}

.relay-panel-cert-btn.is-active:hover {
  background: #16a34a;
}

.relay-inbound-row input.is-readonly {
  background: #eef7f2;
  color: #31513e;
}

.relay-security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.relay-port-control {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.relay-port-step {
  width: 42px;
  min-height: 34px;
  border: 1px solid #d8e2f0;
  border-radius: 0;
  background: #f8fbff;
  color: #52647f;
  padding: 0;
  font-size: 18px;
  font-weight: 500;
}

.relay-port-step:first-child {
  border-radius: 6px 0 0 6px;
}

.relay-port-control input {
  width: 92px;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  text-align: center;
}

.relay-port-control .relay-port-step + input + .relay-port-step {
  border-radius: 0 6px 6px 0;
}

.relay-random-port {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0 0 0 12px;
}

.relay-client-edit-modal {
  position: relative;
  width: min(700px, 100%);
}

.relay-form-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(248, 251, 255, 0.78);
  backdrop-filter: blur(2px);
}

.relay-form-loading.hidden {
  display: none !important;
}

.relay-form-loading-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: min(280px, 86%);
  border: 1px solid #d8e5f5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(18, 35, 66, 0.16);
  padding: 18px 20px;
  color: #30415c;
  text-align: center;
}

.relay-form-loading-card svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
  animation: relay-spin 0.8s linear infinite;
}

.relay-form-loading-card strong {
  color: #12223b;
  font-size: 15px;
}

.relay-form-loading-card span {
  color: var(--muted);
  font-size: 12px;
}

.relay-mode-tabs {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 3px;
  margin-bottom: 14px;
}

.relay-mode-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #52647f;
  padding: 0 12px;
  font-weight: 800;
}

.relay-mode-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(16, 32, 64, 0.08);
}

.relay-batch-import-row textarea {
  min-height: 132px;
  font-family: Consolas, "Courier New", monospace;
}

.relay-batch-note {
  margin: 0;
  width: 100%;
}

.relay-routing-modal {
  width: min(760px, 100%);
}

.relay-client-form {
  gap: 16px;
}

.relay-mail-row,
.relay-stepper-field,
.relay-reset-row,
.relay-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.relay-mail-row input {
  flex: 1;
  min-width: 0;
}

.relay-stepper-field {
  flex-wrap: wrap;
}

.relay-number-shell {
  display: inline-grid;
  grid-template-columns: 38px minmax(118px, 1fr) 38px;
  align-items: center;
  width: min(240px, 100%);
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 34, 63, 0.04);
}

.relay-number-shell input {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-left: 1px solid #e3ebf5;
  border-right: 1px solid #e3ebf5;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  font-weight: 800;
  color: #1f314a;
  padding: 0 10px;
}

.relay-number-shell input:focus {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(47, 146, 255, 0.16);
}

.relay-number-shell .relay-port-step {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: #f6f9fd;
  color: #2b5f9a;
  font-size: 18px;
  font-weight: 900;
  padding: 0;
}

.relay-number-shell .relay-port-step:hover {
  background: #eaf4ff;
}

.relay-field-hint {
  color: #7b8798;
  font-size: 12px;
  line-height: 1.4;
}

.relay-expiry-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.relay-date-field {
  position: relative;
  display: block;
  margin: 0;
}

.relay-date-field svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 15px;
  height: 15px;
  color: #93a0b1;
  transform: translateY(-50%);
}

.relay-date-field input {
  width: 100%;
  padding-left: 34px;
}

.relay-expiry-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.relay-expiry-shortcuts button {
  min-height: 28px;
  border: 1px solid #d8e2f0;
  border-radius: 6px;
  background: #f8fbff;
  color: #52647f;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.relay-expiry-shortcuts button:hover {
  border-color: #9fc8ff;
  color: #1f7eea;
}

.relay-reset-row span {
  color: #66758d;
  font-size: 12px;
  font-weight: 700;
}

.relay-gold {
  background: #d99b28;
}

.relay-gold:hover {
  background: #c2871f;
}

.relay-form-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  background: #fff;
  color: #52647f;
  padding: 0 12px 0 9px;
  font-size: 13px;
  font-weight: 800;
}

.relay-form-switch.active {
  border-color: #bde9d0;
  background: #f0fbf5;
  color: #168a5a;
}

.admin-provider-detail-modal {
  width: min(1180px, 100%);
  max-height: calc(100vh - 42px);
  overflow: auto;
}

.admin-provider-sync-panel .admin-summary-row {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-bottom: 12px;
}

.provider-detail-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.provider-detail-section {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  margin-bottom: 14px;
  padding: 12px;
}

.provider-detail-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.provider-detail-section-head h4 {
  margin: 0 0 3px;
  font-size: 15px;
}

.provider-detail-table table {
  min-width: 860px;
}

.provider-detail-table th,
.provider-detail-table td {
  white-space: nowrap;
}

.provider-detail-table code {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  min-height: 26px;
  border: 1px solid #d8e5f5;
  border-radius: 6px;
  background: #fff;
  color: #10213b;
  padding: 0 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.provider-country-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 118px;
}

.provider-country-cell .admin-proxy-plan-flag {
  width: 22px;
  height: 16px;
}

.provider-country-cell .admin-proxy-plan-flag img {
  width: 22px;
  height: 16px;
  object-fit: cover;
}

.provider-isp-page {
  gap: 16px;
}

.provider-isp-hero {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  align-items: center;
}

.provider-isp-toolbar {
  padding: 14px 16px;
}

.provider-isp-toolbar .panel-header {
  align-items: center;
  margin-bottom: 0;
}

.provider-isp-select {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.provider-isp-select select {
  width: auto;
  min-width: 170px;
  min-height: 34px;
  padding: 6px 30px 6px 10px;
}

.provider-isp-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.provider-isp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.provider-isp-card-head h3 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.provider-isp-card-head .muted {
  max-width: 900px;
  line-height: 1.55;
}

.provider-isp-metrics {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.provider-isp-section-grid {
  display: grid;
  gap: 12px;
}

.provider-isp-card .provider-detail-section {
  margin-bottom: 0;
  background: #fff;
}

.provider-isp-card .provider-detail-table {
  max-height: 320px;
  overflow: auto;
}

.provider-isp-card .provider-detail-table table {
  min-width: 920px;
}

.provider-isp-error {
  margin: 0;
}

.provider-isp-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.provider-isp-provider-panel {
  gap: 12px;
}

.provider-isp-provider-menu {
  gap: 10px;
}

.provider-isp-provider-item {
  display: grid;
  width: 100%;
  min-height: auto;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 11px;
}

.provider-isp-provider-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.provider-isp-provider-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.provider-isp-provider-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #14223a;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-provider-title svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.provider-isp-provider-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.provider-isp-provider-state {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-provider-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  color: var(--muted);
  text-align: left;
}

.provider-isp-provider-stats.one {
  grid-template-columns: minmax(0, 1fr);
}

.provider-isp-provider-stats > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid #e2ebf6;
  border-radius: 7px;
  background: #f8fbff;
  padding: 7px;
}

.provider-isp-provider-stats strong {
  color: #14223a;
  font-size: 16px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-provider-stats em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-provider-menu .provider-isp-provider-item span,
.provider-isp-provider-menu .provider-isp-provider-item em {
  overflow-wrap: normal;
}

.provider-isp-provider-item.active .provider-isp-provider-title,
.provider-isp-provider-item.active .provider-isp-provider-stats strong {
  color: var(--blue);
}

.provider-isp-table-panel {
  min-width: 0;
}

.provider-isp-inline-summary {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin: -4px 0 14px;
}

.provider-isp-inline-summary div {
  min-height: 68px;
}

.provider-isp-inline-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-adapter-brief {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: center;
  margin: -2px 0 14px;
  border: 1px solid #d8e5f5;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.provider-isp-adapter-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.provider-isp-adapter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  background: #eef6ff;
  color: var(--blue);
}

.provider-isp-adapter-icon svg {
  width: 20px;
  height: 20px;
}

.provider-isp-adapter-main h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 2px 0 5px;
  color: #14223a;
  font-size: 18px;
}

.provider-isp-adapter-main h3 em {
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  background: #fff;
  color: #49627f;
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.provider-isp-adapter-main span:not(.provider-isp-adapter-icon) {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.provider-isp-adapter-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 9px;
}

.provider-isp-adapter-traits span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid #e2ebf6;
  border-radius: 999px;
  background: #fff;
  padding: 5px 9px;
}

.provider-isp-adapter-traits em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.provider-isp-adapter-traits strong {
  min-width: 0;
  color: #14223a;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-adapter-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  gap: 10px;
  min-width: 0;
}

.provider-isp-adapter-summary div {
  display: grid;
  gap: 8px;
  min-height: 76px;
  min-width: 0;
  border: 1px solid #d5e5f7;
  border-radius: 7px;
  background: #f7fbff;
  padding: 12px 14px;
}

.provider-isp-adapter-summary span {
  color: #607089;
  font-size: 12px;
  line-height: 1;
}

.provider-isp-adapter-summary strong {
  min-width: 0;
  color: #111d33;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-adapter-985proxy {
  border-left-color: #116eea;
}

.provider-isp-adapter-985proxy .provider-isp-adapter-icon {
  background: #edf5ff;
  color: #116eea;
}

.provider-isp-adapter-proxy_ipv4 {
  border-left-color: #16a34a;
}

.provider-isp-adapter-proxy_ipv4 .provider-isp-adapter-icon {
  background: #ecfdf3;
  color: #15803d;
}

.provider-isp-adapter-geonix {
  border-left-color: #7c3aed;
}

.provider-isp-adapter-geonix .provider-isp-adapter-icon {
  background: #f4f0ff;
  color: #6d28d9;
}

.provider-isp-adapter-onip {
  border-left-color: #0891b2;
}

.provider-isp-adapter-onip .provider-isp-adapter-icon {
  background: #ecfeff;
  color: #0e7490;
}

.provider-isp-adapter-ipcook {
  border-left-color: #ea580c;
}

.provider-isp-adapter-ipcook .provider-isp-adapter-icon {
  background: #fff7ed;
  color: #c2410c;
}

.provider-isp-adapter-520proxy {
  border-left-color: #475569;
}

.provider-isp-adapter-520proxy .provider-isp-adapter-icon {
  background: #f1f5f9;
  color: #334155;
}

.provider-isp-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.provider-isp-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #26364d;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.provider-isp-tab svg {
  width: 16px;
  height: 16px;
  color: #64748b;
}

.provider-isp-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-tab em {
  min-width: 28px;
  border-radius: 999px;
  background: #eef4fb;
  color: #41536d;
  padding: 2px 8px;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.provider-isp-tab:hover,
.provider-isp-tab.active {
  border-color: rgba(17, 110, 234, 0.35);
  background: #f3f8ff;
  color: var(--blue);
}

.provider-isp-tab.active svg {
  color: var(--blue);
}

.provider-isp-tab.active em {
  background: #e8f2ff;
  color: var(--blue);
}

.provider-isp-query {
  margin-bottom: 12px;
}

.provider-isp-filterbar {
  flex-wrap: wrap;
}

.provider-isp-filterbar .keyword-field {
  min-width: min(360px, 100%);
  flex: 1 1 280px;
}

.provider-isp-filterbar select {
  min-width: 150px;
}

.provider-isp-table-scroll {
  max-height: calc(100vh - 430px);
  min-height: 240px;
}

.provider-isp-table {
  min-width: 860px;
}

.provider-isp-table.provider-isp-adapter-520proxy {
  min-width: 780px;
}

.provider-isp-table.provider-isp-adapter-ipcook,
.provider-isp-table.provider-isp-adapter-geonix {
  min-width: 800px;
}

.provider-isp-table th {
  white-space: nowrap;
}

.provider-isp-table td {
  vertical-align: top;
}

.provider-isp-table code,
.provider-isp-token {
  display: inline-block;
  max-width: 190px;
  color: #10213b;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.provider-isp-token.long {
  display: block;
  max-width: 230px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.provider-isp-date-cell {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #1f3556;
  font-weight: 800;
  white-space: nowrap;
}

.provider-isp-table td:nth-child(3) code,
.provider-isp-table td:nth-child(3) .provider-isp-token {
  max-width: 130px;
}

.provider-isp-provider-cell {
  min-width: 150px;
}

.provider-isp-provider-cell strong,
.provider-isp-provider-cell em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-connection-cell {
  display: grid;
  gap: 5px;
  min-width: 210px;
}

.provider-isp-endpoint {
  display: inline-block;
  width: fit-content;
  max-width: 220px;
  color: #0f172a;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-connection-cell > span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.provider-isp-connection-cell em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.provider-isp-connection-cell > span strong {
  min-width: 0;
  color: #1f3556;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-isp-price-rules {
  display: grid;
  gap: 7px;
  min-width: 190px;
  max-width: 360px;
  white-space: normal;
}

.provider-isp-price-rules.simple {
  min-width: 120px;
}

.provider-isp-price-rules.simple strong {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #d8e5f5;
  border-radius: 7px;
  background: #fff;
  color: #10213b;
  padding: 5px 8px;
  font-size: 13px;
}

.provider-isp-price-rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.provider-isp-price-rule {
  display: grid;
  gap: 2px;
  min-width: 134px;
  border: 1px solid #d8e5f5;
  border-radius: 7px;
  background: #f8fbff;
  padding: 7px 9px;
}

.provider-isp-price-rule strong {
  color: #10213b;
  font-size: 13px;
  line-height: 1.2;
}

.provider-isp-price-rule em,
.provider-isp-period-rule {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.provider-isp-period-rule {
  display: block;
  max-width: 100%;
}

.admin-provider-preview {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.admin-provider-preview code {
  display: block;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #10213b;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-provider-ipcook-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-provider-ipcook-fields[hidden] {
  display: none;
}

.admin-plan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.admin-plan-hero h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.admin-plan-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-plan-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-plan-hero-stats div {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-plan-hero-stats span {
  color: var(--muted);
  font-size: 12px;
}

.admin-plan-hero-stats strong {
  color: #14223a;
  font-size: 18px;
}

.admin-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  gap: 16px;
  align-items: start;
}

.admin-plan-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.relay-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.relay-single-layout {
  align-items: start;
}

.relay-scope-only {
  display: grid;
  gap: 12px;
}

.admin-plan-label-panel {
  position: sticky;
  top: 92px;
  padding: 16px;
}

.relay-function-panel {
  gap: 14px;
}

.admin-plan-label-panel .panel-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
}

.admin-plan-tag-add {
  width: fit-content;
}

.admin-plan-label-menu {
  display: grid;
  gap: 8px;
}

.admin-plan-label-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #fff;
  color: #26364d;
  padding: 4px 7px 4px 12px;
}

.admin-plan-label-item:hover,
.admin-plan-label-item.active {
  border-color: rgba(17, 110, 234, 0.35);
  background: #f3f8ff;
  color: var(--blue);
}

.admin-plan-label-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.admin-plan-label-actions {
  display: inline-flex;
  gap: 4px;
  opacity: 0.72;
  transition: opacity 0.16s ease;
}

.admin-plan-label-item:hover .admin-plan-label-actions,
.admin-plan-label-item.active .admin-plan-label-actions {
  opacity: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dbe6f5;
  border-radius: 7px;
  background: #fff;
  color: #41536d;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: rgba(17, 110, 234, 0.35);
  color: var(--blue);
}

.icon-btn.danger:hover {
  border-color: rgba(239, 68, 68, 0.35);
  color: #dc2626;
  background: #fff5f5;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.admin-plan-label-menu span,
.admin-plan-label-menu em {
  min-width: 0;
}

.admin-plan-label-menu span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-label-menu span svg {
  width: 15px;
  height: 15px;
}

.provider-isp-provider-menu .provider-isp-provider-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.provider-isp-provider-menu .provider-isp-provider-main,
.provider-isp-provider-menu .provider-isp-provider-top,
.provider-isp-provider-menu .provider-isp-provider-stats,
.provider-isp-provider-menu .provider-isp-provider-stats > span {
  display: grid;
}

.provider-isp-provider-menu .provider-isp-provider-main {
  gap: 6px;
}

.provider-isp-provider-menu .provider-isp-provider-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.provider-isp-provider-menu .provider-isp-provider-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.provider-isp-provider-menu .provider-isp-provider-stats.one {
  grid-template-columns: minmax(0, 1fr);
}

.provider-isp-provider-menu .provider-isp-provider-stats > span {
  gap: 2px;
  align-items: start;
}

.provider-isp-provider-menu .provider-isp-provider-title {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-proxy-country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  font-size: 15px;
  line-height: 1;
}

.admin-proxy-country-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-proxy-country-cell .admin-proxy-plan-flag {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.admin-proxy-country-cell .admin-proxy-plan-flag img {
  width: 22px;
  height: 16px;
}

.admin-plan-label-menu em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.relay-function-menu {
  margin-bottom: 2px;
}

.relay-scope-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e3ebf7;
  padding-top: 12px;
}

.relay-scope-list {
  display: grid;
  gap: 8px;
}

.relay-scope-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #fff;
  color: #26364d;
  padding: 4px 7px 4px 12px;
  cursor: pointer;
  text-align: left;
}

.relay-scope-item:hover,
.relay-scope-item.active {
  border-color: rgba(17, 110, 234, 0.35);
  background: #f3f8ff;
  color: var(--blue);
}

.relay-scope-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.relay-scope-item strong {
  color: inherit;
}

.relay-scope-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-scope-item b {
  min-width: 24px;
  text-align: right;
}

.admin-plan-label-item.active em {
  color: var(--blue);
}

.admin-plan-create {
  padding: 18px;
}

.admin-plan-form-grid,
.admin-plan-tag-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-plan-form-grid .primary-btn,
.admin-plan-tag-form .primary-btn {
  width: fit-content;
}

.admin-plan-fixed-field {
  background: #f8fbff;
  color: #1f3556;
  cursor: default;
}

.admin-plan-supplier-panel {
  display: grid;
  gap: 9px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.admin-plan-supplier-panel {
  background: #f8fbff;
}

.admin-plan-supplier-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-plan-supplier-head strong {
  color: #14223a;
}

.admin-plan-supplier-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-plan-supplier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.admin-plan-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #1f3556;
  font-size: 13px;
  font-weight: 700;
}

.admin-plan-checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.admin-plan-wide {
  grid-column: 1 / -1;
}

.admin-plan-form-note,
.admin-plan-query {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-plan-form-note {
  grid-column: 1 / -1;
}

.admin-plan-form-note span,
.admin-plan-query span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-plan-query {
  margin-bottom: 16px;
}

.relay-query-panel {
  margin-bottom: 16px;
}

.admin-plan-query .admin-filterbar {
  margin: 8px 0 0;
}

.relay-query-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.relay-query-actions .keyword-field {
  width: min(100%, 300px);
  flex: 1 1 260px;
}

.admin-plan-table-scroll table {
  min-width: 760px;
  table-layout: fixed;
}

.admin-plan-supplier-cell {
  min-width: 0;
}

.admin-plan-supplier-cell strong {
  color: #14223a;
}

.admin-plan-supplier-cell em {
  max-width: 230px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-stock-cell strong {
  color: #14223a;
}

.admin-plan-stock-cell .warn-text {
  color: #d97706;
}

.admin-plan-supplier-stock-cell {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-plan-supplier-stock-cell .admin-plan-supplier-cell {
  gap: 3px;
}

.admin-plan-stock-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-plan-stock-inline strong {
  color: #14223a;
  font-size: 13px;
  white-space: nowrap;
}

.admin-plan-stock-inline em {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-stock-inline .warn-text {
  color: #d97706;
}

.admin-plan-region-price-cell,
.admin-plan-group-status-cell,
.admin-plan-table .admin-stack {
  min-width: 0;
}

.admin-plan-region-price-cell strong,
.admin-plan-table .admin-stack strong {
  min-width: 0;
}

.admin-plan-region-price-cell strong {
  gap: 6px;
}

.admin-plan-region-price-cell strong span,
.admin-plan-table .admin-stack strong span,
.admin-plan-table .admin-stack em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-region-price-cell strong b {
  flex: 0 0 auto;
  margin-left: 0;
  color: #10213b;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-plan-region-price-cell strong span {
  max-width: 92px;
}

.admin-plan-group-status-cell {
  align-items: flex-start;
}

.admin-plan-import-modal {
  width: min(1280px, calc(100vw - 28px));
  max-height: calc(100vh - 42px);
  overflow: auto;
  padding-bottom: 14px;
}

.admin-plan-import-head {
  align-items: flex-start;
}

.admin-plan-import-head .row-actions {
  flex: 0 0 auto;
}

.admin-plan-import-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f7fbff;
  padding: 8px;
}

.admin-plan-import-strip > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2ebf6;
  border-radius: 999px;
  background: #fff;
  padding: 5px 10px;
}

.admin-plan-import-strip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-plan-import-strip strong {
  color: #14223a;
  font-size: 13px;
}

.admin-plan-import-strip .warn strong {
  color: #b45309;
}

.admin-plan-import-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.admin-plan-import-tools > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.admin-plan-import-bulkbar {
  display: grid;
  grid-template-columns: 132px 122px auto;
  gap: 8px;
  align-items: end;
  flex: 0 0 auto;
}

.admin-plan-import-bulkbar label {
  display: grid;
  gap: 4px;
}

.admin-plan-import-bulkbar label > span,
.admin-plan-import-bulkbar > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.admin-plan-import-bulkbar input,
.admin-plan-import-bulkbar select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
}

.admin-plan-import-bulkbar input {
  padding: 0 10px;
}

.admin-plan-import-bulkbar select {
  padding: 0 8px;
}

.admin-plan-import-bulkbar > em {
  grid-column: 1 / -1;
}

.admin-plan-import-search {
  position: relative;
  display: block;
  flex: 1 1 420px;
  max-width: 560px;
}

.admin-plan-import-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
}

.admin-plan-import-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-plan-import-list {
  display: grid;
  gap: 10px;
}

.admin-plan-import-card {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-plan-import-card-main {
  display: grid;
  grid-template-columns: minmax(112px, 0.75fr) minmax(180px, 1.35fr) minmax(90px, 0.55fr) minmax(124px, 0.62fr);
  gap: 12px;
  align-items: center;
}

.admin-plan-import-card input,
.admin-plan-import-card select {
  width: 100%;
  min-width: 0;
}

.admin-plan-import-provider .type-pill {
  width: fit-content;
  margin-top: 2px;
}

.admin-plan-import-cost strong {
  color: #0f1f38;
}

.admin-plan-import-cost em {
  color: #47617e;
}

.admin-plan-import-config {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) minmax(110px, 0.5fr) minmax(170px, 0.85fr);
  gap: 8px;
  align-items: end;
  border-top: 1px solid #edf2f8;
  padding-top: 10px;
}

.admin-plan-import-config label {
  display: grid;
  gap: 4px;
}

.admin-plan-import-config label > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.admin-plan-import-card-actions {
  display: grid;
  gap: 6px;
}

.admin-plan-import-card-actions .small {
  width: 100%;
}

.admin-plan-import-region strong,
.admin-plan-table .admin-stack strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-plan-table .select-col {
  width: 42px;
  text-align: center;
}

.admin-plan-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.admin-plan-table tr.selected-row td {
  background: #f4f8ff;
}

.admin-proxy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
  gap: 18px;
  align-items: center;
}

.admin-proxy-table-scroll table {
  min-width: 1320px;
}

.admin-proxy-plan-shortcuts {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
  margin-bottom: 14px;
}

.admin-proxy-plan-shortcuts.empty-shortcuts {
  color: var(--muted);
}

.admin-proxy-plan-shortcuts-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-proxy-plan-shortcuts strong {
  color: #14223a;
}

.admin-proxy-plan-shortcuts span,
.admin-proxy-plan-shortcuts em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-style: normal;
}

.admin-proxy-plan-shortcuts-head > div,
.admin-proxy-plan-card-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-proxy-plan-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.admin-proxy-plan-shortcut {
  display: grid;
  gap: 12px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

.admin-proxy-plan-shortcut.active {
  border-color: #9ec5ff;
  background: #f3f8ff;
  box-shadow: inset 0 0 0 1px rgba(17, 110, 234, 0.08);
}

.admin-proxy-plan-shortcut.active strong {
  color: var(--blue);
}

.admin-proxy-plan-card-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.admin-proxy-plan-flag {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #253a58;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
}

.admin-proxy-plan-flag img {
  width: 24px;
  height: 18px;
  display: block;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(21, 37, 64, 0.08);
}

.admin-proxy-plan-flag.fallback {
  font-size: 14px;
}

.admin-proxy-plan-card-title strong,
.admin-proxy-plan-card-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-proxy-plan-card-title strong {
  font-size: 15px;
}

.admin-proxy-plan-card-head > em {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4fb;
  color: #53657f;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-proxy-plan-card-head > em.status-active {
  background: #e8f2ff;
  color: var(--blue);
}

.admin-proxy-plan-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.admin-proxy-plan-card-stats > span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #e2ebf6;
  border-radius: 8px;
  background: #f8fbff;
}

.admin-proxy-plan-card-stats em {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
}

.admin-proxy-plan-card-stats strong {
  color: #14223a;
  font-size: 16px;
  line-height: 1.15;
}

.admin-proxy-plan-shortcut .row-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.admin-proxy-plan-shortcut .row-actions .small {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 0 8px;
}

.admin-proxy-plan-shortcut .row-actions .small svg {
  flex: 0 0 auto;
}

.admin-proxy-table .select-col {
  width: 42px;
  text-align: center;
}

.admin-proxy-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.admin-proxy-table tr.selected-row td {
  background: #f4f8ff;
}

.proxy-modal.admin-proxy-create-modal,
.proxy-modal.admin-proxy-edit-modal,
.proxy-modal.admin-proxy-assign-modal,
.proxy-modal.admin-proxy-single-assign-modal,
.proxy-modal.admin-proxy-plan-link-modal,
.proxy-modal.admin-proxy-renew-modal {
  width: min(820px, calc(100vw - 32px));
  max-width: 820px;
  display: grid;
  gap: 14px;
  padding: 22px;
}

.admin-proxy-renew-hero {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e6f6;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  padding: 14px;
}

.admin-proxy-renew-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #c8dcf4;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
}

.admin-proxy-renew-hero h3 {
  margin: 2px 0 3px;
}

.admin-proxy-renew-hero span,
.admin-proxy-renew-summary span,
.admin-proxy-renew-section-title span {
  color: var(--muted);
}

.admin-proxy-renew-hero > strong {
  max-width: 260px;
  overflow: hidden;
  color: var(--text);
  font-family: Consolas, "SFMono-Regular", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-proxy-renew-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-proxy-renew-summary article {
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-proxy-renew-summary article span,
.admin-proxy-renew-summary article strong {
  display: block;
}

.admin-proxy-renew-summary article strong {
  margin-top: 4px;
  color: var(--text);
}

.admin-proxy-renew-section {
  display: grid;
  gap: 10px;
}

.admin-proxy-renew-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-proxy-renew-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.admin-proxy-renew-options label {
  display: grid;
  gap: 2px;
  min-height: 62px;
  align-content: center;
  border: 1px solid #d7e4f5;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
}

.admin-proxy-renew-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-proxy-renew-options label:has(input:checked) {
  border-color: var(--blue);
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.admin-proxy-renew-options span {
  color: var(--text);
  font-weight: 800;
}

.admin-proxy-renew-options em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.admin-proxy-renew-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.admin-proxy-renew-list-head,
.admin-proxy-renew-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-proxy-renew-list-head {
  color: var(--muted);
  font-size: 12px;
}

.admin-proxy-renew-row {
  border-bottom: 1px solid #e4edf8;
  padding: 8px 0;
}

.admin-proxy-renew-row:last-of-type {
  border-bottom: 0;
}

.admin-proxy-renew-list strong {
  font-family: Consolas, "SFMono-Regular", monospace;
  color: var(--text);
}

.admin-proxy-renew-list span,
.admin-proxy-renew-list em {
  color: var(--muted);
  font-style: normal;
}

@media (max-width: 720px) {
  .admin-proxy-renew-hero {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .admin-proxy-renew-hero > strong,
  .admin-proxy-renew-hero > .ghost-btn {
    grid-column: 1 / -1;
  }

  .admin-proxy-renew-summary,
  .admin-proxy-renew-options,
  .admin-proxy-renew-list-head,
  .admin-proxy-renew-row {
    grid-template-columns: 1fr;
  }
}

.proxy-modal.admin-proxy-bulk-create-modal {
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
}

.admin-proxy-create-mode {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  margin: 0 0 12px;
}

.admin-proxy-create-modal textarea,
.admin-proxy-bulk-create-modal textarea,
.admin-proxy-assign-modal textarea {
  min-height: 220px;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.proxy-modal.admin-plan-inventory-modal {
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  overflow: hidden;
}

.admin-plan-inventory-header {
  margin-bottom: 0;
}

.admin-plan-inventory-header h3 {
  font-size: 20px;
}

.admin-plan-inventory-header .muted {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.admin-plan-inventory-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(430px, 0.95fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-plan-inventory-summary-main {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.admin-plan-inventory-summary-main > strong {
  color: #14223a;
  font-size: 16px;
}

.admin-plan-inventory-summary-main > em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.admin-plan-inventory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-plan-inventory-metrics > div {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  border: 1px solid #e1eaf6;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.admin-plan-inventory-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-plan-inventory-metrics strong {
  color: #14223a;
  font-size: 20px;
  line-height: 1.1;
}

.admin-plan-inventory-metrics .warn strong {
  color: var(--orange);
}

.admin-inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  margin-bottom: 0;
}

.admin-inventory-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border-right: 1px solid #d8e5f5;
  padding-right: 8px;
}

.admin-inventory-toolbar-group:last-child {
  border-right: 0;
  padding-right: 0;
}

.admin-inventory-toolbar-group > span {
  color: #53657f;
  font-size: 11px;
  font-weight: 900;
}

.admin-inventory-toolbar-group.danger > span {
  color: var(--red);
}

.admin-inventory-bulk-control {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.admin-inventory-bulk-control select {
  width: auto;
  min-width: 150px;
}

.admin-inventory-selected-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}

.admin-plan-inventory-query {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.admin-plan-inventory-query-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-plan-inventory-query-title strong {
  color: #14223a;
  font-size: 13px;
  line-height: 1.25;
}

.admin-plan-inventory-query-title span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.admin-plan-inventory-query .admin-filterbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 150px minmax(230px, 0.82fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0;
}

.admin-plan-inventory-filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-plan-inventory-filter-field > span {
  color: #53657f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.admin-plan-inventory-filter-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  align-self: end;
}

.admin-plan-inventory-query input,
.admin-plan-inventory-query select,
.admin-plan-inventory-query button {
  min-height: 34px;
}

.admin-plan-inventory-query .primary-btn.small,
.admin-plan-inventory-query .ghost-btn.small {
  padding-inline: 10px;
  justify-content: center;
}

.admin-plan-inventory-scroll table {
  min-width: 980px;
}

.admin-plan-inventory-scroll {
  min-height: 0;
  max-height: min(52vh, 560px);
}

.admin-plan-inventory-table td {
  vertical-align: middle;
}

.admin-plan-inventory-table .admin-proxy-connection strong {
  font-variant-numeric: tabular-nums;
}

.admin-plan-inventory-status-grid {
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(150px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 250px;
}

.admin-plan-inventory-status-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-plan-inventory-status-grid select {
  min-height: 34px;
  padding: 6px 9px;
}

.admin-proxy-form-grid {
  margin-top: 12px;
}

.admin-user-picker {
  position: relative;
  min-width: 0;
}

.admin-user-picker input[data-user-picker-input] {
  width: 100%;
  min-width: 0;
}

.admin-user-picker.compact input[data-user-picker-input] {
  min-height: 34px;
  font-size: 12px;
}

.admin-user-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 130;
  display: grid;
  width: min(420px, max(100%, 260px));
  max-height: 280px;
  overflow: auto;
  border: 1px solid #cad9eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  padding: 6px;
}

.admin-user-picker-menu.hidden {
  display: none;
}

.admin-user-picker-menu button {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.admin-user-picker-menu button:hover {
  background: #eef6ff;
}

.admin-user-picker-menu strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-picker-menu span,
.admin-user-picker-empty {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-picker-empty {
  padding: 10px;
}

.proxy-modal.admin-plan-edit-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.proxy-modal.admin-plan-create-modal,
.proxy-modal.admin-plan-tag-modal,
.proxy-modal.admin-plan-move-modal {
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
}

.admin-plan-tag-modal,
.admin-plan-move-modal {
  max-width: 560px;
}

.admin-plan-create-modal form,
.admin-plan-tag-form,
.admin-plan-move-form {
  margin-top: 12px;
}

.admin-plan-move-form {
  display: grid;
  gap: 14px;
}

.admin-plan-move-form label {
  display: grid;
  gap: 7px;
  color: #26364d;
  font-size: 13px;
  font-weight: 800;
}

.admin-plan-move-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-plan-move-summary span {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.admin-plan-move-summary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.admin-plan-move-summary strong {
  min-width: 0;
  color: #14223a;
  overflow-wrap: anywhere;
}

.admin-plan-modal-actions {
  grid-column: 1 / -1;
}

.admin-plan-edit-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.admin-plan-edit-head {
  margin-bottom: 14px;
}

.admin-plan-edit-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-plan-edit-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-plan-edit-title > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-plan-edit-title strong,
.admin-plan-edit-title em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-edit-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-plan-edit-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-plan-edit-metrics div {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.admin-plan-edit-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.admin-plan-edit-metrics strong {
  min-width: 0;
  color: #14223a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-edit-section,
.admin-plan-advanced {
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-plan-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-plan-section-title strong {
  color: #14223a;
}

.admin-plan-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.admin-plan-advanced {
  padding: 0;
  overflow: hidden;
}

.admin-plan-advanced summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

.admin-plan-advanced summary::-webkit-details-marker {
  display: none;
}

.admin-plan-advanced summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #14223a;
  font-weight: 800;
}

.admin-plan-advanced summary span svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.admin-plan-advanced summary em {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-plan-advanced[open] summary {
  border-bottom: 1px solid #d8e5f5;
  background: #f8fbff;
}

.admin-plan-advanced-grid {
  padding: 12px;
}

.admin-plan-edit-form {
  margin-bottom: 0;
}

.admin-plan-edit-actions {
  margin-top: 14px;
  background: #fff;
}

.admin-user-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.admin-user-hero h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.admin-user-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-user-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-hero-stats div {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.admin-user-hero-stats span {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-hero-stats em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.admin-user-hero-stats strong {
  font-size: 18px;
}

.admin-user-table-scroll table {
  min-width: 1040px;
}

.admin-user-cell,
.admin-user-heading,
.admin-balance-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--blue);
  font-weight: 900;
}

.admin-user-avatar.large {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  font-size: 16px;
}

.admin-risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.admin-risk.success {
  background: var(--green-soft);
  color: var(--green);
}

.admin-risk.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.admin-risk.danger {
  background: var(--red-soft);
  color: var(--red);
}

.user-tier {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  min-height: 26px;
  border: 1px solid #d9e3ef;
  border-radius: 999px;
  background: #f5f7fb;
  color: #607086;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.user-tier i {
  width: 14px;
  height: 14px;
}

.user-tier.active,
.user-tier.success {
  border-color: rgba(0, 154, 102, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.user-tier.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--orange-soft);
  color: var(--orange);
}

.user-tier.danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.admin-user-status-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.admin-user-status-cell em {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.admin-user-money strong {
  color: #14223a;
  font-size: 15px;
}

.admin-user-login-line {
  color: var(--blue) !important;
  font-weight: 800;
}

.admin-user-login strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #14223a;
  font-size: 13px;
}

.admin-user-login.active strong {
  color: var(--blue);
}

.admin-user-login.muted strong {
  color: var(--muted);
}

.admin-user-table tr.disabled-row td {
  background: #fbfbfc;
}

.admin-user-table tr.attention-row td {
  background: #fffdf8;
}

.admin-row-actions {
  flex-wrap: nowrap;
}

.proxy-modal.admin-user-modal {
  width: min(1040px, calc(100vw - 32px));
  max-width: 1040px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
}

.proxy-modal.admin-balance-modal,
.proxy-modal.admin-email-modal {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
}

.admin-user-heading h3 {
  margin: 2px 0 4px;
}

.admin-user-modal-head {
  position: sticky;
  top: -20px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #edf2f8;
  margin: -20px -20px 16px;
  padding: 18px 20px 14px;
}

.admin-user-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  margin-bottom: 12px;
  padding: 14px;
}

.admin-user-profile-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.admin-user-profile-main div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-profile-main strong {
  color: #14223a;
  font-size: 16px;
}

.admin-user-profile-main span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-user-profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-user-heading span,
.admin-balance-user span {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-user-status-strip > span,
.admin-user-status-strip > article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
  color: var(--muted);
}

.admin-user-status-strip span,
.admin-user-status-strip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.admin-user-status-strip strong {
  color: var(--text);
}

.admin-user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.admin-user-activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 12px;
  margin-top: 12px;
}

.admin-user-profile-card,
.admin-user-action-card {
  align-content: start;
}

.admin-user-profile-card.refined,
.admin-user-action-card.refined,
.admin-user-activity-card {
  border-color: #d8e5f5;
  background: #fff;
}

.admin-user-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-user-card-head.compact {
  margin-bottom: 10px;
}

.admin-user-card-head > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 7px;
}

.admin-user-card-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.admin-user-card-head h3 {
  margin: 0;
  color: #14223a;
  font-size: 15px;
}

.admin-user-card-head span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-profile-lines {
  display: grid;
  gap: 10px;
}

.admin-profile-lines div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid #e9eef6;
  padding-bottom: 10px;
}

.admin-profile-lines div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-profile-lines span,
.admin-action-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-profile-lines strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-user-kv-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.admin-user-kv-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 34px;
  border-top: 1px solid #edf2f8;
  padding: 7px 0;
}

.admin-user-kv-list div:first-child {
  border-top: 0;
}

.admin-user-kv-list dt,
.admin-user-kv-list dd {
  margin: 0;
  min-width: 0;
}

.admin-user-kv-list dt {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-kv-list dd {
  color: #14223a;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.panel-header.compact {
  margin-bottom: 8px;
}

.admin-user-actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-actions > * {
  justify-content: center;
  width: 100%;
}

.admin-action-note {
  margin: 12px 0 0;
}

.admin-mini-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.admin-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.admin-user-modal-actions {
  position: sticky;
  bottom: -20px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  margin: 14px -20px -20px;
  padding: 14px 20px 18px;
}

.admin-mini-row strong {
  overflow-wrap: anywhere;
}

.admin-mini-row span:first-child {
  display: grid;
  gap: 3px;
}

.admin-mini-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-balance-user {
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  margin-bottom: 14px;
}

.admin-balance-user div {
  display: grid;
  gap: 3px;
}

.admin-balance-form {
  margin-bottom: 12px;
}

.payment-badge.balance {
  border-color: rgba(22, 138, 90, 0.2);
}

.payment-badge.alipay {
  border-color: rgba(17, 110, 234, 0.2);
}

.payment-badge.wechat {
  border-color: rgba(22, 138, 90, 0.18);
}

.payment-badge.other {
  border-color: rgba(103, 116, 134, 0.18);
}

.panel,
.metric-card,
.plan-card,
.notice-card,
.table-panel,
.form-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel,
.table-panel,
.form-panel {
  min-width: 0;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header h2,
.panel-header h3,
.panel-title {
  margin: 0;
  font-size: 18px;
}

.muted {
  color: var(--muted);
}

.tiny {
  color: var(--subtle);
  font-size: 12px;
}

.metric-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.metric-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1;
}

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

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
}

.static-card {
  min-height: 100%;
}

.static-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e6ebf3;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.pill-list,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.tab {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #31425a;
  padding: 0 12px;
  cursor: pointer;
}

.tab.active,
.pill.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 220px;
  padding: 16px 8px 4px;
  border-top: 1px solid var(--border);
}

.bar {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.bar span {
  width: 100%;
  max-width: 34px;
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: var(--blue);
}

.bar em {
  font-style: normal;
}

.notice-card {
  padding: 14px;
}

.notice-card + .notice-card {
  margin-top: 10px;
}

.notice-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.overview-page {
  align-items: stretch;
}

.overview-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  align-items: stretch;
  padding: 20px;
}

.overview-command-main {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.overview-command-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.overview-command-title h2 {
  margin: 0 0 6px;
  color: #101b2d;
  font-size: 24px;
}

.overview-command-title p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.65;
}

.overview-command-time {
  display: grid;
  gap: 4px;
  min-width: 160px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
  text-align: right;
}

.overview-command-time span {
  color: var(--muted);
  font-size: 12px;
}

.overview-command-time strong {
  color: #14223a;
  font-size: 14px;
}

.overview-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-command-score {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.overview-command-score .health-ring {
  width: 112px;
  height: 112px;
}

.overview-command-status {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.overview-status-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
}

.overview-status-pill em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-status-pill strong {
  color: #14223a;
  font-size: 13px;
}

.overview-status-pill.active strong {
  color: var(--green);
}

.overview-status-pill.danger strong {
  color: var(--red);
}

.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.overview-kpi-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 10px;
  align-content: start;
  min-height: 112px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  padding: 13px;
  text-decoration: none;
}

.overview-kpi-card:hover {
  border-color: rgba(17, 110, 234, 0.35);
  background: #f8fbff;
}

.overview-kpi-card i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 8px;
}

.overview-kpi-card span,
.overview-kpi-card em {
  min-width: 0;
  color: var(--muted);
  font-style: normal;
}

.overview-kpi-card span {
  align-self: center;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-kpi-card strong {
  grid-column: 1 / -1;
  min-width: 0;
  color: #101b2d;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.overview-kpi-card em {
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.4;
}

.overview-kpi-card.active i {
  background: var(--green-soft);
  color: var(--green);
}

.overview-kpi-card.warn i {
  background: var(--orange-soft);
  color: var(--orange);
}

.overview-kpi-card.danger i {
  background: var(--red-soft);
  color: var(--red);
}

.overview-command-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.overview-workbench {
  min-width: 0;
}

.overview-work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-work-item,
.overview-clear-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #fbfdff;
  color: inherit;
  padding: 12px;
  text-decoration: none;
}

.overview-work-item:hover {
  border-color: rgba(17, 110, 234, 0.35);
  background: #f8fbff;
}

.overview-work-item i,
.overview-clear-state i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 8px;
}

.overview-work-item.warn i {
  background: var(--orange-soft);
  color: var(--orange);
}

.overview-work-item.danger i {
  background: var(--red-soft);
  color: var(--red);
}

.overview-work-item div,
.overview-clear-state div {
  min-width: 0;
}

.overview-work-item strong,
.overview-clear-state strong {
  display: block;
  min-width: 0;
  color: #14223a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-work-item span,
.overview-clear-state span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-work-item > em {
  border-radius: 999px;
  background: #eef4fb;
  color: #41536d;
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.overview-work-item > em.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.overview-work-item > em.danger {
  background: var(--red-soft);
  color: var(--red);
}

.overview-clear-state {
  grid-template-columns: auto minmax(0, 1fr);
  background: #f7fcfa;
  border-color: rgba(20, 148, 96, 0.2);
}

.overview-clear-state i {
  background: var(--green-soft);
  color: var(--green);
}

.overview-stock-dial {
  display: grid;
  place-items: center;
  align-content: center;
  width: 128px;
  height: 128px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
}

.overview-stock-dial strong {
  color: #14223a;
  font-size: 24px;
  line-height: 1;
}

.overview-stock-dial span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(232, 241, 255, 0.82), rgba(255, 255, 255, 0.95) 46%),
    var(--surface);
}

.overview-intro {
  display: grid;
  align-content: center;
  gap: 10px;
}

.overview-intro h2 {
  margin: 0;
  font-size: 24px;
}

.overview-intro p {
  margin: 0;
  max-width: 480px;
  color: var(--muted);
  line-height: 1.7;
}

.overview-actions,
.overview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.overview-actions {
  margin-top: 4px;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-content: start;
  align-items: center;
  min-height: 118px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

.overview-metric i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 8px;
}

.overview-metric span,
.overview-metric em {
  min-width: 0;
  color: var(--muted);
  font-style: normal;
}

.overview-metric span {
  font-weight: 700;
}

.overview-metric strong {
  grid-column: 1 / -1;
  min-width: 0;
  color: #101b2d;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.overview-metric em {
  grid-column: 1 / -1;
  font-size: 12px;
}

.overview-metric.warn i {
  background: var(--orange-soft);
  color: var(--orange);
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.overview-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.overview-health,
.overview-chart-card,
.overview-orders,
.overview-account,
.overview-expiry,
.overview-announcements {
  min-width: 0;
}

.overview-health-body {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.health-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--ring-color, var(--orange)) calc(var(--value) * 1%), #dce7f5 0);
}

.health-ring strong {
  font-size: 25px;
  line-height: 1;
}

.health-ring span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.overview-health-stats {
  display: grid;
  gap: 10px;
}

.overview-health-stats div,
.overview-chart-summary div {
  display: grid;
  gap: 4px;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 11px 12px;
}

.overview-health-stats span,
.overview-chart-summary span {
  color: var(--muted);
  font-size: 12px;
}

.overview-health-stats strong,
.overview-chart-summary strong {
  color: #14223a;
  font-size: 18px;
}

.overview-progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.overview-country-list,
.overview-order-list,
.overview-expiry-list,
.overview-service-list,
.overview-audit-list {
  display: grid;
  gap: 10px;
}

.overview-country-row,
.overview-order-row,
.overview-expiry-row,
.overview-announcement-row {
  display: grid;
  gap: 6px;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.overview-country-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.overview-country-row strong {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.overview-country-row strong > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-country-row .admin-proxy-plan-flag {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.overview-country-row .admin-proxy-plan-flag img {
  width: 22px;
  height: 16px;
}

.overview-country-row .progress {
  grid-column: 1 / -1;
}

.overview-country-row > span,
.overview-country-row > em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

.overview-chart {
  border-top: 1px solid var(--border);
}

.overview-chart-visual {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: 18px 6px 4px;
}

.overview-chart-visual::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 26px;
  left: 0;
  width: 38px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  opacity: 0.65;
  transform: translateX(-80px);
  animation: trendSweep 3.8s ease-in-out infinite;
  pointer-events: none;
}

.overview-trend-svg {
  position: absolute;
  z-index: 1;
  inset: 14px 6px 28px;
  width: calc(100% - 12px);
  height: calc(100% - 42px);
  pointer-events: none;
}

.overview-trend-area {
  fill: url(#balanceAreaGradient);
  opacity: 0;
  animation: trendAreaIn 0.9s ease 0.3s forwards;
}

.overview-trend-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  vector-effect: non-scaling-stroke;
  animation: trendLineDraw 1.2s ease forwards;
}

.overview-trend-dot {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  animation: trendDotPulse 1.8s ease-in-out infinite;
}

.overview-chart-bars {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 172px;
}

.overview-chart-bar {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.overview-chart-bar span {
  width: min(34px, 100%);
  height: var(--bar-height, 44px);
  min-height: 18px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--blue), #4ea37a);
  opacity: 0;
  transform: scaleY(0.25);
  transform-origin: bottom;
  animation: balanceBarGrow 0.68s ease forwards;
  animation-delay: var(--delay, 0ms);
}

.overview-chart-bar em {
  font-style: normal;
}

@keyframes balanceBarGrow {
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes trendLineDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes trendAreaIn {
  to {
    opacity: 1;
  }
}

@keyframes trendDotPulse {
  0%,
  100% {
    r: 5;
    opacity: 1;
  }
  50% {
    r: 7;
    opacity: 0.72;
  }
}

@keyframes trendSweep {
  0% {
    transform: translateX(-80px);
  }
  62%,
  100% {
    transform: translateX(560px);
  }
}

.overview-chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.overview-chart-summary .positive {
  color: var(--green);
}

.overview-chart-summary .negative {
  color: var(--red);
}

.overview-order-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr) 92px minmax(128px, auto);
  align-items: center;
}

.overview-order-row.pending {
  border-color: rgba(207, 111, 14, 0.28);
  background: #fffaf3;
}

.overview-order-row.expired,
.overview-order-row.failed {
  border-color: rgba(207, 63, 63, 0.2);
  background: #fffbfb;
}

.overview-order-row div,
.overview-expiry-row div {
  min-width: 0;
}

.overview-order-row strong,
.overview-expiry-row strong,
.overview-announcement-row strong {
  overflow-wrap: anywhere;
}

.overview-order-row div span,
.overview-expiry-row span,
.overview-announcement-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.overview-order-row > em {
  min-width: 0;
  color: var(--muted);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-order-note {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.overview-order-note svg {
  width: 14px;
  height: 14px;
}

.overview-order-note.success {
  color: var(--green);
}

.overview-order-note.warn,
.overview-order-note.active {
  color: var(--orange);
}

.overview-order-note.danger {
  color: var(--red);
}

.overview-order-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.overview-order-actions .ghost-btn {
  min-height: 28px;
  padding: 0 10px;
}

.overview-network-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  color: #31425a;
  line-height: 1.65;
}

.overview-network-note i {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.overview-expiry-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.overview-expiry-row em {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.overview-expiry-row em.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.overview-announcement-row + .overview-announcement-row {
  margin-top: 10px;
}

.overview-business-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overview-business-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.overview-business-grid span,
.overview-business-grid em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.overview-business-grid strong {
  min-width: 0;
  color: #14223a;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.overview-service-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.overview-service-row > i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 8px;
}

.overview-service-row div {
  min-width: 0;
}

.overview-service-row strong,
.overview-service-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-service-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.overview-service-row > em {
  font-style: normal;
}

.overview-audit-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.overview-audit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.overview-audit-row i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 7px;
}

.overview-audit-row.active i {
  background: var(--green-soft);
  color: var(--green);
}

.overview-audit-row.warn i {
  background: var(--orange-soft);
  color: var(--orange);
}

.overview-audit-row.danger i {
  background: var(--red-soft);
  color: var(--red);
}

.overview-audit-row div {
  min-width: 0;
}

.overview-audit-row strong,
.overview-audit-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-audit-row strong {
  color: #14223a;
  font-size: 13px;
}

.overview-audit-row span,
.overview-audit-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-audit-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(560px, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.admin-audit-hero h2 {
  margin: 0 0 8px;
  color: #101b2d;
}

.admin-audit-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-audit-table-scroll {
  overflow-x: auto;
}

.admin-audit-table {
  min-width: 1040px;
}

.admin-audit-table th:nth-child(1) {
  width: 150px;
}

.admin-audit-table th:nth-child(2) {
  width: 120px;
}

.admin-audit-table th:nth-child(3) {
  width: 190px;
}

.admin-audit-table th:nth-child(4) {
  width: 210px;
}

.admin-audit-table th:nth-child(5) {
  width: 160px;
}

.admin-audit-row-table.danger {
  background: #fffafa;
}

.admin-audit-row-table.warn {
  background: #fffdf7;
}

.admin-audit-time strong {
  font-size: 13px;
}

.admin-audit-action strong,
.admin-audit-actor strong {
  color: #14223a;
  font-size: 13px;
}

.admin-audit-action em,
.admin-audit-actor em {
  overflow-wrap: anywhere;
}

.audit-category-pill,
.audit-risk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border: 1px solid #dbe8f7;
  border-radius: 999px;
  background: #f3f8ff;
  color: #0f63d8;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.audit-category-pill i {
  width: 14px;
  height: 14px;
}

.audit-category-pill.active,
.audit-risk.active {
  border-color: rgba(0, 154, 102, 0.25);
  background: var(--green-soft);
  color: var(--green);
}

.audit-category-pill.warn,
.audit-risk.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--orange-soft);
  color: var(--orange);
}

.audit-category-pill.danger,
.audit-risk.danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: var(--red-soft);
  color: var(--red);
}

.audit-category-pill.muted,
.audit-risk.muted {
  border-color: #d9e3ef;
  background: #f5f7fb;
  color: #607086;
}

.admin-audit-target {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-audit-detail {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 420px;
}

.admin-audit-detail p {
  margin: 0;
  color: #26364d;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-announcement-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(560px, 1.22fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
}

.admin-announcement-hero h2 {
  margin: 0 0 8px;
  color: #101b2d;
}

.admin-announcement-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-announcement-filterbar {
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.5fr) minmax(140px, 0.45fr) minmax(260px, 0.9fr) auto auto;
}

.admin-announcement-table {
  min-width: 980px;
}

.admin-announcement-table th:nth-child(1) {
  width: 230px;
}

.admin-announcement-table th:nth-child(2) {
  width: 110px;
}

.admin-announcement-table th:nth-child(4) {
  width: 96px;
}

.admin-announcement-table th:nth-child(5) {
  width: 150px;
}

.admin-announcement-table th:nth-child(6) {
  width: 230px;
}

.admin-announcement-table tr.is-muted {
  background: #fbfcfe;
}

.admin-announcement-title strong {
  color: #14223a;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-announcement-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.announcement-category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #dbe8f7;
  border-radius: 999px;
  background: #f3f8ff;
  color: #0f63d8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.announcement-content-preview {
  display: -webkit-box;
  max-width: 420px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.announcement-actions {
  flex-wrap: nowrap;
}

.admin-announcement-modal {
  max-width: 760px;
}

.admin-announcement-form {
  align-items: start;
}

.announcement-content-field {
  grid-column: 1 / -1;
}

.announcement-content-field textarea {
  min-height: 180px;
  resize: vertical;
}

.empty.compact {
  min-height: auto;
  padding: 18px;
}

.relay-empty-action {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
}

.relay-empty-action strong {
  color: var(--text);
  font-size: 14px;
}

.relay-empty-action span {
  font-size: 13px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.plan-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.plan-card.popular {
  border-color: rgba(17, 110, 234, 0.45);
}

.plan-card h3 {
  margin: 0;
  font-size: 17px;
}

.price {
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge.active {
  background: var(--green-soft);
  color: var(--green);
}

.badge.pending {
  background: var(--orange-soft);
  color: var(--orange);
}

.status.active,
.status.paid,
.status.assigned,
.status.used {
  background: var(--green-soft);
  color: var(--green);
}

.status.pending,
.status.available,
.status.unused {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.status.disabled,
.status.failed,
.status.expired,
.status.maintenance {
  background: var(--red-soft);
  color: var(--red);
}

.status.inactive {
  background: #eef1f5;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #52637a;
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.summary-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.summary-line-block {
  display: grid;
  gap: 10px;
}

.account-page {
  display: grid;
  gap: 16px;
}

.account-hero,
.account-card,
.account-metric-card {
  border: 1px solid #e2e8f2;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 44, 63, 0.05);
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(232, 241, 255, 0.9), rgba(255, 255, 255, 0.95)),
    #fff;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: #5d6a80;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(51, 70, 102, 0.18);
}

.account-hero h2,
.account-hero p {
  margin: 0;
}

.account-hero h2 {
  font-size: 22px;
}

.account-hero p {
  color: var(--muted);
  margin: 6px 0 10px;
}

.account-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.account-metric-card > span {
  color: var(--muted);
  font-weight: 700;
}

.account-metric-card > strong {
  font-size: 28px;
  line-height: 1;
}

.account-metric-card .primary-btn,
.account-metric-card .ghost-btn {
  width: fit-content;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-card {
  padding: 18px;
}

.account-wide {
  grid-column: 1 / -1;
}

.account-info-list {
  display: grid;
  gap: 10px;
}

.account-info-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  border-bottom: 1px solid #edf2f8;
}

.account-info-list div:last-child {
  border-bottom: 0;
}

.account-info-list span {
  color: var(--muted);
}

.security-list,
.account-tips {
  display: grid;
  gap: 12px;
}

.security-row,
.account-tips div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.security-row > i,
.account-tips i {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.security-row strong,
.security-row span {
  display: block;
}

.security-row span,
.account-tips span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.account-tips div {
  grid-template-columns: auto minmax(0, 1fr);
}

.security-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-security-modal {
  max-width: 520px;
}

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

.security-form-grid label {
  display: grid;
  gap: 7px;
  color: #31435e;
  font-weight: 800;
}

.security-current-value {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.security-current-value span {
  color: var(--muted);
}

.security-email-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.security-email-box span,
.security-email-box strong,
.security-email-box em {
  display: block;
}

.security-email-box span,
.security-email-box em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.security-email-box strong {
  color: #14223a;
  margin: 3px 0;
}

.email-code-row {
  display: grid;
}

.email-code-feedback {
  display: grid;
  gap: 10px;
}

.email-code-sent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #ccead9;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  padding: 12px;
}

.email-code-sent svg {
  width: 18px;
  height: 18px;
}

.email-code-sent span {
  display: block;
  color: #2e6d51;
  font-size: 12px;
  margin-top: 4px;
}

.email-code-sent b {
  font-size: 14px;
  letter-spacing: 2px;
}

.email-template-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.email-template-preview summary {
  cursor: pointer;
  color: #26364d;
  font-weight: 800;
  padding: 10px 12px;
}

.email-template-preview iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  border-top: 1px solid var(--border);
  background: #f4f6fa;
}

.security-inline-note {
  margin-top: 12px;
}

.split-pane {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.balance-center-page {
  display: grid;
  gap: 16px;
}

.balance-record-embedded {
  margin-top: 0;
}

.route-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 0 2px;
}

.route-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 5px;
  background: #fff;
  color: #31425a;
  padding: 0 14px;
}

.route-tab.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.route-tab button {
  min-height: 22px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.feature-tabs {
  display: flex;
  min-height: 44px;
  align-items: stretch;
  border-radius: 6px;
  background: #fff;
  padding: 0 16px;
}

.feature-tabs button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #30415c;
  padding: 0 0;
  margin-right: 40px;
}

.feature-tabs button.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.static-buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.static-picker-panel,
.order-sidebar,
.static-owned-panel {
  min-width: 0;
  border: 1px solid #e2e8f2;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 44, 63, 0.05);
}

.static-picker-panel {
  min-height: 640px;
  padding: 24px;
}

.country-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-radius: 999px;
  background: #f0f4fa;
  padding: 4px;
}

.region-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #35445b;
  padding: 0 14px;
}

.region-tabs button.active {
  background: var(--blue);
  color: #fff;
}

.country-search {
  position: relative;
  display: block;
  min-width: 190px;
}

.country-search input {
  border-radius: 999px;
  padding-right: 36px;
}

.country-search svg {
  position: absolute;
  right: 11px;
  top: 10px;
  width: 16px;
  height: 16px;
  color: var(--subtle);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: 12px 14px;
  margin-bottom: 28px;
}

.country-chip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 9px;
  min-height: 58px;
  border: 1px solid #d4dfed;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  color: #30415c;
  padding: 8px 10px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(30, 45, 68, 0.04);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.country-chip:hover {
  border-color: #9fbae0;
  box-shadow: 0 9px 18px rgba(30, 45, 68, 0.08);
  transform: translateY(-1px);
}

.country-chip.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 10px 22px rgba(17, 110, 234, 0.13);
}

.static-discount-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid #ffd9b4;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf4, #fff);
  color: #8a4a12;
  margin: -4px 0 16px;
  padding: 8px 12px;
}

.static-discount-notice > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border-radius: 999px;
  background: #fff0df;
  color: #d66200;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.static-discount-notice svg {
  width: 14px;
  height: 14px;
}

.static-discount-notice strong {
  color: #26364d;
  font-size: 13px;
  white-space: nowrap;
}

.static-discount-notice em {
  color: #7b8798;
  font-size: 12px;
  font-style: normal;
}

.country-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.country-price-box,
.discount-price-box,
.order-unit-price {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.country-price-box.standard-price,
.discount-price-box.standard-price,
.order-unit-price.standard-price {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 1px;
}

.country-price-box > strong,
.discount-price-box > strong,
.order-unit-price > strong {
  color: var(--muted);
  font-size: 12px;
}

.discount-price-main,
.discount-price-sub {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.discount-price-main {
  color: var(--blue);
}

.discount-price-main svg {
  width: 13px;
  height: 13px;
  color: #f47a20;
}

.discount-price-main strong {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.discount-price-main em,
.discount-price-box > em,
.order-unit-price > em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.discount-price-sub del {
  color: #9aa6b6;
  font-size: 10px;
  font-weight: 700;
  text-decoration-thickness: 1px;
}

.discount-price-sub b {
  min-height: 16px;
  border-radius: 999px;
  background: #fff0df;
  color: #d66200;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 900;
}

.country-chip.active .discount-price-main {
  color: var(--blue);
}

.country-chip.active .discount-price-sub b {
  background: #fff;
}

.flag-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  overflow: hidden;
  border: 1px solid #dce5f1;
  border-radius: 5px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.country-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.country-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-copy em {
  color: var(--subtle);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0;
}

.country-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.country-inline > span:last-child {
  display: grid;
  gap: 2px;
}

.country-inline b {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.country-inline em {
  color: var(--subtle);
  font-size: 11px;
  font-style: normal;
}

.static-option-block {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.static-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 22px 0 12px;
}

.static-spec-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value";
  align-items: center;
  gap: 3px 10px;
  min-height: 64px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
  padding: 10px 12px;
}

.static-spec-card svg {
  grid-area: icon;
  width: 34px;
  height: 34px;
  border: 1px solid #d6e5f7;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 8px;
}

.static-spec-card span {
  grid-area: label;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.static-spec-card strong {
  grid-area: value;
  min-width: 0;
  overflow: hidden;
  color: #10213b;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.static-option-block h3,
.order-section h3 {
  margin: 0;
  font-size: 16px;
}

.option-chip {
  width: fit-content;
  min-width: 120px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.inline-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  padding: 0 10px;
  line-height: 1.4;
}

.inline-alert.success {
  background: var(--green-soft);
  color: var(--green);
}

.inline-alert.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.inline-alert svg {
  width: 15px;
  height: 15px;
}

.inline-alert.slim {
  max-width: 180px;
  font-size: 12px;
}

.order-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 22px;
}

.order-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-sidebar-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.order-safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.order-safe-badge svg {
  width: 14px;
  height: 14px;
}

.order-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.order-warning svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: 0 0 auto;
}

.order-country-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6faff, #fff);
  padding: 12px;
  margin-bottom: 12px;
}

.order-country-card strong,
.order-country-card span {
  display: block;
}

.order-country-card span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.order-country-card b {
  color: var(--blue);
  font-size: 13px;
}

.order-country-card .order-unit-price {
  justify-self: end;
}

.order-country-card .order-unit-price > strong {
  color: var(--blue);
  font-size: 13px;
}

.flag-badge.large {
  width: 40px;
  height: 30px;
}

.order-summary {
  display: grid;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  padding: 14px;
}

.order-summary div,
.total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-summary span {
  color: var(--muted);
}

.order-summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  text-align: right;
}

.order-summary strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.order-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.duration-grid button {
  position: relative;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: #30415c;
}

.duration-grid button.active {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.duration-grid span {
  position: absolute;
  right: -7px;
  top: -10px;
  border-radius: 999px;
  background: #ff7a00;
  color: #fff;
  padding: 2px 7px;
  font-size: 11px;
}

.qty-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
}

.qty-stepper button {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.qty-stepper input {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: center;
}

.min-quantity-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.min-quantity-note span,
.min-quantity-note em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #f8fbff;
  color: #49607d;
  padding: 0 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.min-quantity-note em {
  border-color: rgba(255, 108, 0, 0.18);
  background: #fff6ed;
  color: #c44d00;
}

.checkbox-line {
  display: flex;
  grid-auto-flow: initial;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: #42536b;
  font-weight: 500;
}

.checkbox-line input {
  width: 16px;
  min-height: 16px;
}

.payment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recharge-order-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.recharge-summary-card {
  display: grid;
  gap: 6px;
  border: 1px solid #d7e4f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  padding: 16px;
}

.recharge-summary-card span,
.recharge-summary-card small {
  color: var(--muted);
}

.recharge-summary-card strong {
  color: #13233c;
  font-size: 30px;
  line-height: 1;
}

.recharge-pay-section {
  display: grid;
  gap: 10px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row span {
  color: #26364d;
  font-weight: 900;
}

.section-title-row small {
  color: var(--muted);
}

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

.recharge-submit-btn {
  width: 100%;
}

.payment-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-start;
  min-height: 48px;
  border-color: var(--border-strong);
  background: #fff;
  color: #30415c;
  padding: 6px 12px;
  text-align: left;
}

.payment-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.payment-text strong,
.payment-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-text strong {
  font-size: 13px;
}

.payment-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.payment-option.active .payment-text small {
  color: var(--blue);
}

.payment-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.payment-mark svg {
  width: 16px;
  height: 16px;
}

.payment-mark.balance {
  background: #e9f2ff;
  color: #0f63d8;
}

.payment-mark.alipay {
  background: #e8f2ff;
  color: #1677ff;
}

.payment-mark.wechat {
  background: #e8f7ee;
  color: #10a257;
}

.payment-mark.other {
  background: #eef2f7;
  color: #42536b;
}

.payment-mark.small {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 6px;
  font-size: 12px;
}

.payment-option b {
  margin-left: auto;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.payment-option.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(17, 110, 234, 0.1);
}

.payment-option.active b {
  border: 5px solid var(--blue);
}

.payment-badge,
.payment-summary-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.payment-badge {
  min-height: 28px;
  border: 1px solid #d8e3f1;
  border-radius: 999px;
  background: #fff;
  color: #26364d;
  padding: 2px 8px 2px 4px;
  font-weight: 700;
  white-space: nowrap;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0f63d8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-record-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.recharge-record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.balance-record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.order-record-summary div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 13px 14px;
}

.recharge-record-summary div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 13px 14px;
}

.balance-record-summary div {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 13px 14px;
}

.order-record-summary span,
.order-record-summary em,
.recharge-record-summary span,
.recharge-record-summary em,
.balance-record-summary span,
.balance-record-summary em,
.order-no-stack em,
.order-content-stack em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.order-record-summary strong {
  color: #14223a;
  font-size: 20px;
}

.recharge-record-summary strong {
  color: #14223a;
  font-size: 20px;
}

.balance-record-summary strong {
  color: #14223a;
  font-size: 20px;
}

.balance-record-summary strong.positive,
.balance-delta.positive {
  color: var(--green);
}

.balance-record-summary strong.negative,
.balance-delta.negative {
  color: var(--red);
}

.order-record-table table {
  min-width: 1180px;
}

.recharge-record-table table {
  min-width: 980px;
}

.order-no-stack,
.order-content-stack {
  display: grid;
  gap: 5px;
}

.order-no-stack strong,
.order-content-stack strong {
  color: #10213b;
  white-space: nowrap;
}

.history-state {
  display: grid;
  gap: 4px;
  min-width: 118px;
}

.history-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.history-state-chip svg {
  width: 14px;
  height: 14px;
}

.history-state em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.history-state.success .history-state-chip {
  border-color: #bbebd1;
  background: #ecfdf5;
  color: #047857;
}

.history-state.warn .history-state-chip {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b45309;
}

.history-state.danger .history-state-chip {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.history-state.muted .history-state-chip {
  border-color: #d8e3f1;
  background: #f4f7fb;
  color: #667085;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  margin-top: 14px;
  padding: 10px 12px;
}

.history-pagination-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.history-pagination-info strong {
  color: #14223a;
  font-size: 15px;
}

.history-pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.history-pagination-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-pagination-actions select {
  width: auto;
  min-width: 90px;
  min-height: 32px;
  padding: 5px 8px;
}

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

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-actions .small {
  min-height: 30px;
}

.total-line {
  margin-top: 8px;
}

.total-line strong {
  font-size: 26px;
}

.order-total-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  border-top: 1px dashed var(--border-strong);
  padding-top: 16px;
}

.order-total-card span,
.order-total-card small {
  display: block;
}

.order-total-card span {
  color: #26364d;
  font-weight: 800;
}

.order-total-card small {
  color: var(--muted);
  margin-top: 3px;
}

.order-total-card .order-discount-saving {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: #d66200;
  font-weight: 800;
}

.order-total-card .order-discount-saving svg {
  width: 13px;
  height: 13px;
}

.order-total-card strong {
  color: #152238;
  font-size: 30px;
  line-height: 1;
}

.refund-line {
  margin: 14px 0;
}

.refund-agreement {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.refund-check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #30415c;
  font-size: 13px;
  font-weight: 700;
}

.refund-check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.refund-link {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-size: 13px;
  font-weight: 900;
}

.refund-link:hover {
  text-decoration: underline;
}

.refund-policy-modal {
  max-width: 560px;
}

.refund-policy-body {
  display: grid;
  gap: 12px;
  color: #30415c;
  line-height: 1.65;
}

.refund-policy-body p {
  margin: 0;
}

.refund-policy-body ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.static-buy-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.static-buy-btn.is-busy {
  background: linear-gradient(90deg, var(--blue), #1f7cf3, var(--blue));
  background-size: 200% 100%;
  box-shadow: 0 10px 24px rgba(24, 105, 226, 0.22);
  animation: staticPurchaseButtonFlow 1.15s linear infinite;
}

.static-buy-btn.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.28) 42%, transparent 70%);
  transform: translateX(-100%);
  animation: staticPurchaseSheen 1.35s ease-in-out infinite;
  pointer-events: none;
}

.static-purchase-progress {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #b9d8ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  color: #18365f;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(24, 105, 226, 0.08);
}

.static-purchase-progress svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--blue);
  animation: relay-spin 0.8s linear infinite;
}

.static-purchase-progress div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.static-purchase-progress strong {
  font-size: 13px;
  line-height: 1.25;
}

.static-purchase-progress span {
  color: #5d6d85;
  font-size: 12px;
  line-height: 1.45;
}

@keyframes staticPurchaseButtonFlow {
  to {
    background-position: -200% 0;
  }
}

@keyframes staticPurchaseSheen {
  55%,
  100% {
    transform: translateX(115%);
  }
}

.payment-checkout-page {
  display: grid;
  gap: 16px;
}

.payment-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.payment-gateway-card,
.payment-order-card {
  box-shadow: 0 12px 30px rgba(31, 44, 63, 0.05);
}

.payment-amount-card {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  padding: 18px;
}

.payment-amount-card span,
.payment-amount-card em {
  color: var(--muted);
  font-style: normal;
}

.payment-amount-card strong {
  color: #14223a;
  font-size: 34px;
  line-height: 1;
}

.payment-method-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.payment-method-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-method-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.mock-pay-box,
.payment-success-box,
.payment-expired-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  border: 1px dashed #c8d6e8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
}

.mock-qr {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  display: grid;
  place-items: center;
  border: 1px solid #d5e1f0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #edf4ff 12px, transparent 1%) center / 18px 18px,
    linear-gradient(#edf4ff 12px, transparent 1%) center / 18px 18px,
    #fff;
  color: var(--blue);
}

.mock-qr svg,
.payment-success-box svg,
.payment-expired-box svg {
  width: 28px;
  height: 28px;
}

.mock-pay-box strong,
.mock-pay-box span,
.payment-success-box strong,
.payment-success-box span,
.payment-expired-box strong,
.payment-expired-box span {
  display: block;
}

.mock-pay-box span,
.payment-success-box span,
.payment-expired-box span {
  color: var(--muted);
  margin-top: 4px;
}

.payment-success-box {
  border-style: solid;
  border-color: #ccead9;
  background: var(--green-soft);
  color: var(--green);
}

.payment-expired-box {
  border-style: solid;
  border-color: #f1c9c9;
  background: var(--red-soft);
  color: var(--red);
}

.payment-expired-box span {
  color: #8d3434;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.payment-empty {
  min-height: 320px;
}

.static-owned-panel {
  min-height: 620px;
  padding: 22px;
}

.static-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid #e3ebf6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.static-filterbar input,
.static-filterbar select {
  width: 180px;
  background: #fff;
}

.static-filterbar input[data-static-owned-field="keyword"] {
  width: 260px;
}

.static-owned-resultbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.static-owned-resultbar span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  border: 1px solid #d8e5f5;
  border-radius: 999px;
  background: #f8fbff;
  padding: 0 10px;
  font-weight: 700;
}

.static-owned-resultbar strong {
  color: #14223a;
}

.history-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.history-filterbar input,
.history-filterbar select,
.history-date-range {
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background-color: #fff;
}

.history-filterbar input,
.history-filterbar select {
  width: 160px;
  padding: 0 12px;
}

.history-filterbar .order-field {
  width: 180px;
}

.history-filterbar .keyword-field {
  width: 220px;
}

.history-filterbar .user-field {
  width: 220px;
}

.history-filterbar[data-history-filter="recharge"] {
  gap: 10px;
}

.history-filterbar[data-history-filter="recharge"] .order-field {
  width: 170px;
}

.history-filterbar[data-history-filter="recharge"] select {
  width: 150px;
}

.history-filterbar[data-history-filter="recharge"] .keyword-field {
  width: 190px;
}

.history-filterbar[data-history-filter="recharge"] .history-date-range {
  width: 330px;
}

.history-filterbar[data-history-filter="consumption"] {
  gap: 10px;
}

.history-filterbar[data-history-filter="consumption"] .order-field {
  width: 160px;
}

.history-filterbar[data-history-filter="consumption"] select {
  width: 150px;
}

.history-filterbar[data-history-filter="consumption"] .keyword-field {
  width: 190px;
}

.history-filterbar[data-history-filter="consumption"] .history-date-range {
  width: 320px;
}

.history-date-range {
  width: 350px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.history-date-range > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.history-date-range span {
  color: var(--muted);
  font-weight: 700;
}

.history-date-range input {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.history-date-range input:focus {
  outline: none;
  box-shadow: none;
}

.admin-plan-inventory-filterbar.history-filterbar .history-date-range {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
  gap: 6px;
  align-items: center;
  padding: 0;
}

.admin-plan-inventory-filterbar.history-filterbar .history-date-range > svg {
  display: none;
}

.admin-plan-inventory-filterbar.history-filterbar .history-date-range span {
  text-align: center;
}

.admin-plan-inventory-filterbar.history-filterbar .history-date-range input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
}

.admin-plan-inventory-filterbar.history-filterbar .history-date-range input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(17, 110, 234, 0.11);
}

.ghost-icon-btn {
  width: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.ghost-icon-btn:not(:disabled):hover {
  background: var(--surface-soft);
  color: var(--text);
}

.ghost-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.batch-actions {
  position: relative;
}

.batch-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  padding: 0 5px;
}

.batch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 25;
  display: none;
  min-width: 170px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(28, 40, 60, 0.15);
  padding: 6px;
}

.batch-actions.open .batch-menu {
  display: grid;
  gap: 2px;
}

.batch-menu button {
  justify-content: flex-start;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #30415c;
  padding: 0 10px;
  font-weight: 700;
}

.batch-menu button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.owned-alert {
  margin-bottom: 12px;
}

.admin-plan-import-confirm {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 10px 12px;
}

.admin-plan-import-confirm > span {
  flex: 1 1 auto;
  font-weight: 800;
}

.admin-plan-import-confirm .row-actions {
  flex: 0 0 auto;
}

.owned-action-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 0 12px;
  font-weight: 700;
  line-height: 1.45;
}

.owned-action-notice svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.owned-action-notice.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.owned-action-notice.success {
  background: var(--green-soft);
  color: var(--green);
}

.owned-action-notice.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.owned-action-notice.error {
  background: var(--red-soft);
  color: var(--red);
}

.static-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
}

.static-table-scroll table {
  min-width: 1210px;
}

.static-owned-table {
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.static-owned-table th:nth-child(2),
.static-owned-table td:nth-child(2) {
  width: 310px;
}

.static-owned-table th:nth-child(3),
.static-owned-table td:nth-child(3) {
  width: 88px;
  text-align: center;
}

.static-owned-table th:nth-child(4),
.static-owned-table td:nth-child(4) {
  width: 96px;
  text-align: center;
}

.static-owned-table th:nth-child(5),
.static-owned-table td:nth-child(5) {
  width: 140px;
}

.static-owned-table th:nth-child(6),
.static-owned-table td:nth-child(6) {
  width: 196px;
}

.static-owned-table th:nth-child(7),
.static-owned-table td:nth-child(7),
.static-owned-table th:nth-child(8),
.static-owned-table td:nth-child(8) {
  width: 118px;
}

.static-owned-table th:nth-child(7),
.static-owned-table td:nth-child(7) {
  width: 220px;
}

.static-owned-table th:nth-child(9),
.static-owned-table td:nth-child(9) {
  width: 152px;
}

.static-owned-table th,
.static-owned-table td {
  white-space: normal;
  word-break: break-word;
  border-right: 0;
  padding: 14px 12px;
}

.static-owned-table th {
  border-bottom: 1px solid #d8e3f1;
  background: #f5f8fc;
}

.static-owned-table tbody tr {
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.static-owned-table tbody tr:hover {
  background: #f9fcff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.static-owned-table tbody tr.selected-row {
  background: #f2f7ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.static-owned-table tbody tr.row-processing {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.static-owned-table tbody tr.recent-purchase-row {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.045) 0, rgba(37, 99, 235, 0.018) 34%, #fff 76%);
  box-shadow: inset 2px 0 0 #8bb7ff;
}

.static-owned-table tbody tr.recent-purchase-row:hover {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.065) 0, rgba(37, 99, 235, 0.025) 34%, #fbfdff 76%);
  box-shadow: inset 2px 0 0 var(--blue);
}

.static-owned-table tbody tr.recent-purchase-row.selected-row {
  background: #f2f7ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.static-owned-table .select-col {
  width: 54px;
  text-align: center;
}

.static-owned-table input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.proxy-info-cell,
.date-stack {
  display: grid;
  gap: 5px;
}

.proxy-info-cell {
  align-items: start;
  max-width: 310px;
}

.proxy-info-title {
  display: flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
}

.proxy-info-cell strong {
  display: block;
  overflow: hidden;
  color: #10213b;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-info-cell .protocol-pill {
  width: fit-content;
  min-height: 24px;
}

.table-subtext,
.date-stack em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.owned-date-stack {
  gap: 7px;
}

.owned-date-stack span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 132px;
}

.owned-date-stack em {
  min-width: 30px;
}

.owned-date-stack strong {
  color: #10213b;
  font-size: 13px;
}

.owned-date-timeline {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 172px;
  max-width: 184px;
  gap: 5px;
  border-left: 3px solid #c9d8ec;
  padding: 3px 0 3px 10px;
}

.owned-date-timeline span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.owned-date-timeline em {
  grid-column: 1;
  grid-row: 1;
  color: #60708a;
  font-size: 12px;
  font-style: normal;
}

.owned-date-timeline strong {
  grid-column: 2;
  grid-row: 1;
  color: #10213b;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
}

.owned-date-timeline small {
  justify-self: start;
  width: fit-content;
  min-height: 18px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #205a9f;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
}

.owned-date-timeline .owned-date-year {
  border-radius: 0;
  background: transparent;
  color: #60708a;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.owned-date-timeline .owned-date-left {
  margin-top: 1px;
}

.owned-date-timeline.soon {
  border-left-color: #f0b95a;
}

.owned-date-timeline.soon small {
  background: #fff7e6;
  color: #a05a00;
}

.owned-date-timeline.urgent {
  border-left-color: #ef4444;
}

.owned-date-timeline.urgent small {
  background: #fee2e2;
  color: #b42318;
}

.proxy-info-cell code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #d7e2f1;
  border-radius: 7px;
  background: #f8fbff;
  color: #1e2d44;
  padding: 8px 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-owned-mini {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  gap: 6px;
  border: 1px solid #cde0f7;
  border-radius: 999px;
  background: #f4f9ff;
  color: #205a9f;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.relay-owned-mini svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.relay-owned-mini span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-owned-mini.processing {
  border-color: #bed7ff;
  background: #eef6ff;
  color: var(--blue);
}

.relay-owned-mini.processing svg,
.remark-edit-cell.saving svg {
  animation: relay-spin 0.8s linear infinite;
}

.remark-edit-cell {
  position: relative;
  display: block;
  min-width: 180px;
}

.remark-edit-cell input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7e2f1;
  border-radius: 7px;
  background: #f8fbff;
  color: #1e2d44;
  padding: 0 34px 0 10px;
  font-size: 13px;
  outline: none;
}

.remark-edit-cell input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.remark-edit-cell input:disabled {
  cursor: wait;
  opacity: 0.72;
}

.remark-edit-cell svg {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 15px;
  height: 15px;
  color: #7b8da8;
  transform: translateY(-50%);
}

.link-inline {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-size: 12px;
  justify-content: flex-start;
}

.link-inline:focus,
.link-inline:focus-visible {
  outline: none;
  border-radius: 6px;
  color: var(--blue-strong);
  box-shadow: 0 0 0 3px rgba(17, 110, 234, 0.12);
}

.qr-placeholder {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d5dfed;
  border-radius: 7px;
  background: #f8fbff;
  color: #243247;
  padding: 0;
}

.qr-placeholder:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.qr-placeholder:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.qr-placeholder:disabled:hover {
  border-color: #d5dfed;
  color: #243247;
  background: #f8fbff;
}

.qr-placeholder svg {
  width: 21px;
  height: 21px;
}

.relay-qr-ready {
  position: relative;
  border-color: #b9d8ff;
  background: #eef6ff;
  color: var(--blue);
}

.relay-qr-ready::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #16a34a;
  content: "";
}

.relay-lock-cell {
  display: inline-grid;
  justify-items: center;
  gap: 4px;
  min-width: 42px;
}

.relay-lock-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.relay-lock-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid #cfe0f5;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: #47617f;
  padding: 0;
  box-shadow: 0 8px 18px rgba(35, 70, 112, 0.08);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.relay-lock-action::before {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0) 62%);
  content: "";
  opacity: 0;
  transform: scale(0.7);
}

.relay-lock-action::after {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 7px;
  content: "";
  opacity: 0;
  transform: scale(0.72);
}

.relay-lock-action svg {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
}

.relay-lock-action:hover {
  border-color: var(--blue);
  background: linear-gradient(180deg, #f8fbff 0%, #eaf3ff 100%);
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

.relay-lock-action:hover svg {
  animation: relay-lock-nudge 0.55s ease;
}

.relay-lock-action:not(:disabled)::before {
  animation: relay-lock-pulse 1.9s ease-out infinite;
}

.relay-lock-action.is-busy {
  border-color: #9ec5ff;
  background: var(--blue);
  color: #fff;
  cursor: wait;
}

.relay-lock-action.is-busy svg {
  animation: relay-spin 0.8s linear infinite;
}

.relay-lock-action:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.relay-lock-action.is-busy:disabled {
  cursor: wait;
  opacity: 1;
}

.relay-lock-action:disabled::before {
  animation: none;
}

.relay-lock-action.is-busy::after {
  opacity: 1;
  animation: relay-lock-ring 1.1s ease-in-out infinite;
}

@keyframes relay-lock-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.65);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes relay-lock-ring {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.72);
  }
  50% {
    opacity: 0.65;
    transform: scale(1);
  }
}

@keyframes relay-lock-nudge {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  35% {
    transform: translateY(-1px) rotate(-7deg);
  }
  70% {
    transform: translateY(0) rotate(6deg);
  }
}

.protocol-pill,
.days-pill,
.renew-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.protocol-pill {
  border: 1px solid #d8e3f1;
  background: #f8fbff;
  color: #30415c;
}

.days-pill {
  background: var(--green-soft);
  color: var(--green);
}

.days-pill.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.renew-state {
  border: 0;
  background: #f0f4fa;
  color: var(--muted);
}

.renew-state.on {
  background: var(--blue-soft);
  color: var(--blue);
}

.renew-btn {
  min-width: 70px;
}

.static-row-actions {
  display: grid;
  min-width: 124px;
  gap: 8px;
}

.static-row-actions .small {
  justify-content: center;
  width: 100%;
}

.relay-owned-btn {
  min-width: 92px;
}

.table-scroll {
  scrollbar-gutter: stable both-edges;
}

.admin-plan-table-scroll th:last-child,
.admin-plan-table-scroll td:last-child,
.admin-proxy-table-scroll th:last-child,
.admin-proxy-table-scroll td:last-child,
.admin-plan-inventory-scroll th:last-child,
.admin-plan-inventory-scroll td:last-child,
.admin-order-table-scroll th:last-child,
.admin-order-table-scroll td:last-child,
.admin-user-table-scroll th:last-child,
.admin-user-table-scroll td:last-child,
.admin-management-table th:last-child,
.admin-management-table td:last-child,
.relay-panel-table th:last-child,
.relay-panel-table td:last-child,
.relay-users-table th:last-child,
.relay-users-table td:last-child,
.relay-user-port-table th:last-child,
.relay-user-port-table td:last-child,
.relay-rule-table th:last-child,
.relay-rule-table td:last-child,
.static-owned-table th:last-child,
.static-owned-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 210px;
  min-width: 210px;
  max-width: 230px;
  background: #fff;
  box-shadow: -10px 0 18px rgba(19, 39, 74, 0.08);
}

.admin-plan-table-scroll th:last-child,
.admin-proxy-table-scroll th:last-child,
.admin-plan-inventory-scroll th:last-child,
.admin-order-table-scroll th:last-child,
.admin-user-table-scroll th:last-child,
.admin-management-table th:last-child,
.relay-panel-table th:last-child,
.relay-users-table th:last-child,
.relay-user-port-table th:last-child,
.relay-rule-table th:last-child,
.static-owned-table th:last-child {
  z-index: 3;
  background: #f7f9fc;
}

.static-owned-table th:last-child {
  background: #f5f8fc;
}

.admin-order-table-scroll th:last-child,
.admin-order-table-scroll td:last-child {
  width: 270px;
  min-width: 270px;
  max-width: 290px;
}

.admin-user-table-scroll th:last-child,
.admin-user-table-scroll td:last-child {
  width: 280px;
  min-width: 280px;
  max-width: 300px;
}

.admin-plan-table tr.selected-row td:last-child,
.admin-proxy-table tr.selected-row td:last-child,
.static-owned-table tbody tr.selected-row td:last-child,
.static-owned-table tbody tr.row-processing td:last-child {
  background: #f4f8ff;
}

.static-owned-table tbody tr:hover td:last-child {
  background: #f9fcff;
}

.admin-plan-table-scroll .admin-row-actions,
.admin-proxy-table-scroll .admin-row-actions,
.admin-plan-inventory-scroll .admin-row-actions,
.admin-order-table-scroll .admin-row-actions,
.admin-user-table-scroll .admin-row-actions,
.admin-management-table .row-actions,
.relay-panel-table .row-actions,
.relay-users-table .row-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 7px;
  min-width: 0;
}

.admin-plan-table-scroll .admin-row-actions .small,
.admin-proxy-table-scroll .admin-row-actions .small,
.admin-plan-inventory-scroll .admin-row-actions .small,
.admin-order-table-scroll .admin-row-actions .small,
.admin-user-table-scroll .admin-row-actions .small,
.admin-management-table .row-actions .small,
.relay-panel-table .row-actions .small,
.relay-users-table .row-actions .small,
.relay-user-port-table .relay-link-actions .relay-text-action,
.relay-rule-table .relay-link-actions .relay-text-action {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding-inline: 8px;
}

.relay-user-port-table .relay-link-actions,
.relay-rule-table .relay-link-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 7px;
  min-width: 0;
}

.admin-plan-table-scroll th:last-child,
.admin-plan-table-scroll td:last-child {
  width: 176px;
  min-width: 176px;
  max-width: 176px;
}

.admin-plan-table-scroll .admin-row-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.admin-plan-table-scroll .admin-row-actions .small {
  min-height: 30px;
  gap: 5px;
  padding-inline: 6px;
  font-size: 12px;
}

.admin-plan-inventory-scroll th:last-child,
.admin-plan-inventory-scroll td:last-child {
  width: 210px;
  min-width: 210px;
  max-width: 220px;
}

.admin-plan-inventory-scroll .admin-row-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.admin-plan-inventory-scroll .admin-row-actions .danger-btn {
  grid-column: 1 / -1;
}

.admin-plan-inventory-scroll .admin-row-actions .small {
  min-height: 32px;
  gap: 5px;
  padding-inline: 7px;
  font-size: 12px;
}

.static-owned-table th:last-child,
.static-owned-table td:last-child {
  width: 136px;
  min-width: 136px;
  max-width: 150px;
}

.static-owned-table .static-row-actions {
  min-width: 0;
}

.static-owned-table th:nth-child(7),
.static-owned-table td:nth-child(7) {
  width: 178px;
  min-width: 178px;
  max-width: 190px;
}

.static-owned-table th:last-child,
.static-owned-table td:last-child {
  width: 118px;
  min-width: 118px;
  max-width: 126px;
  box-shadow: none;
}

.static-owned-table tbody tr:hover td:last-child,
.static-owned-table tbody tr.selected-row td:last-child,
.static-owned-table tbody tr.row-processing td:last-child {
  box-shadow: none;
}

.static-owned-table td:nth-child(7),
.static-owned-table td:last-child {
  vertical-align: middle;
}

.static-owned-table td:nth-child(7) {
  padding-inline: 10px;
}

.static-owned-table td:last-child {
  padding-inline: 8px;
}

.static-owned-table .remark-edit-cell {
  width: 100%;
  min-width: 0;
}

.static-owned-table .remark-edit-cell input {
  min-height: 34px;
  border-color: #cfe0f3;
  background: #fbfdff;
  padding-inline: 11px 34px;
  font-size: 12px;
  font-weight: 700;
}

.static-owned-table .remark-edit-cell.is-empty input {
  border-style: dashed;
  background: #f8fbff;
  color: #6f7f96;
}

.static-owned-table .remark-edit-cell.has-value input {
  border-color: #b9d2f1;
  background: #f3f8ff;
  color: #10213b;
}

.static-owned-table .remark-edit-cell svg {
  right: 11px;
  color: #5f789b;
}

.static-owned-table .static-row-actions {
  display: flex;
  justify-content: center;
}

.static-owned-table .static-row-actions .small {
  width: auto;
  min-width: 92px;
  min-height: 34px;
  border-color: #cfe0f3;
  border-radius: 8px;
  background: #fbfdff;
  font-size: 12px;
  font-weight: 850;
}

.static-owned-table .renew-btn {
  color: #143a66;
}

.static-owned-table .renew-btn:hover:not(:disabled),
.static-owned-table .remark-edit-cell input:hover:not(:disabled) {
  border-color: #9fc4f2;
  background: #f4f9ff;
}

.row-action-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.batch-menu button:disabled,
.relay-owned-btn:disabled,
.renew-btn:disabled,
.renew-state:disabled,
.batch-actions > button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.proxy-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.38);
  padding: 20px;
}

.proxy-modal {
  width: min(640px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  padding: 20px;
}

.proxy-modal-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.theme-confirm-backdrop {
  z-index: 120;
}

.theme-confirm-modal {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
}

.theme-confirm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.theme-confirm-head h3 {
  margin: 4px 0 0;
}

.theme-confirm-icon {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #cfe1f6;
  border-radius: 8px;
  background: #f4f8ff;
  color: var(--blue);
}

.theme-confirm-icon svg {
  width: 20px;
  height: 20px;
}

.theme-confirm-modal.danger .theme-confirm-icon {
  border-color: #f2c1c1;
  background: var(--red-soft);
  color: var(--red);
}

.theme-confirm-copy {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.theme-confirm-copy p {
  margin: 0;
}

.theme-confirm-copy strong {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
  color: var(--text);
}

.theme-prompt-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.theme-prompt-field input {
  width: 100%;
}

.qr-art {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 3px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.qr-art span {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #edf2f8;
}

.qr-art span.active {
  background: #111827;
}

.qr-art.real-qr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 10px;
}

.qr-art.real-qr img {
  display: block;
  width: 100%;
  height: auto;
}

.relay-qr-modal {
  width: min(760px, 100%);
}

.relay-qr-svg svg {
  display: block;
  width: 100%;
  height: auto;
}

.relay-qr-link {
  display: block;
  max-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.qr-detail {
  display: grid;
  gap: 12px;
}

.qr-detail code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.renew-modal {
  width: min(560px, 100%);
}

.credential-renew-modal {
  width: min(720px, 100%);
}

.credential-renew-field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.credential-renew-field textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #f8fbff;
  color: #10213b;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  outline: none;
}

.credential-renew-field textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 110, 234, 0.12);
}

.credential-renew-summary {
  margin-top: 0;
}

.credential-renew-error {
  margin: 12px 0 0;
}

.credential-renew-preview {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.credential-renew-preview > div {
  display: grid;
  gap: 6px;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.credential-renew-preview strong {
  color: #10213b;
  font-size: 13px;
}

.credential-renew-preview span,
.credential-renew-preview em {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.credential-renew-bad {
  border-color: #f3cccc !important;
  background: #fff8f8 !important;
}

.credential-renew-bad strong,
.credential-renew-bad span {
  color: #b42318;
}

.renew-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.renew-summary div {
  display: grid;
  gap: 6px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

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

.renew-summary strong {
  font-size: 18px;
}

.renew-options h4 {
  margin: 0 0 10px;
}

.renew-day-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.renew-day-grid button {
  display: grid;
  gap: 2px;
  min-height: 58px;
  border-color: var(--border-strong);
  background: #fff;
  color: #30415c;
}

.renew-day-grid button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.renew-day-grid strong {
  font-size: 18px;
}

.renew-day-grid span {
  font-size: 12px;
}

.renew-list {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.renew-list span,
.renew-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.affiliate-page {
  display: grid;
  gap: 18px;
}

.affiliate-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

.affiliate-hero h2 {
  margin: 4px 0 8px;
  color: #10213b;
  font-size: 24px;
}

.affiliate-hero p {
  max-width: 720px;
  margin: 0;
  color: #60708a;
}

.affiliate-discount-card {
  display: grid;
  gap: 6px;
  align-content: center;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  background: #f7fbff;
  padding: 16px;
}

.affiliate-discount-card span,
.affiliate-discount-card em,
.affiliate-kpis span,
.affiliate-rules {
  color: #60708a;
}

.affiliate-discount-card strong {
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.affiliate-discount-card em {
  font-size: 12px;
  font-style: normal;
}

.affiliate-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.affiliate-kpis article {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 116px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.affiliate-kpis i {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.affiliate-kpis strong {
  color: #10213b;
  font-size: 28px;
  line-height: 1;
}

.affiliate-kpis button {
  position: absolute;
  right: 14px;
  bottom: 14px;
}

.affiliate-kpis .affiliate-withdraw-pending {
  background: #edf4ff;
  color: #2f68d8;
  box-shadow: none;
}

.affiliate-kpis .affiliate-withdraw-pending:hover {
  background: #dfeaff;
}

.affiliate-panel {
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.affiliate-share-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(220px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.affiliate-copy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
}

.affiliate-copy-box span {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: #60708a;
  font-size: 12px;
  font-weight: 800;
}

.affiliate-copy-box input {
  min-height: 42px;
  border: 1px solid #d7e2f1;
  border-radius: 7px 0 0 7px;
  background: #f8fbff;
  color: #1e2d44;
  padding: 0 12px;
  outline: none;
}

.affiliate-copy-box input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.affiliate-copy-box button {
  min-height: 42px;
  border-radius: 0 7px 7px 0;
}

.affiliate-code-save {
  min-height: 42px;
}

.affiliate-withdraw-method {
  margin-top: 18px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
}

.affiliate-withdraw-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.affiliate-withdraw-head h3 {
  margin: 0 0 4px;
  color: #10213b;
  font-size: 16px;
}

.affiliate-withdraw-head p,
.affiliate-withdraw-note {
  margin: 0;
  color: #60708a;
  font-size: 12px;
  line-height: 1.6;
}

.affiliate-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #cfe0f8;
  border-radius: 999px;
  background: #fff;
  color: #1f5ed7;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.affiliate-method-badge i {
  width: 14px;
  height: 14px;
}

.affiliate-withdraw-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.affiliate-withdraw-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  min-height: 78px;
  border: 1px solid #d7e2f1;
  border-radius: 8px;
  background: #fff;
  color: #1e2d44;
  padding: 14px;
  text-align: left;
  box-shadow: none;
}

.affiliate-withdraw-option:hover,
.affiliate-withdraw-option.active {
  border-color: #6ea1ff;
  background: #f5f9ff;
}

.affiliate-withdraw-option.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.affiliate-withdraw-option i {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.affiliate-withdraw-option span {
  font-size: 14px;
  font-weight: 900;
}

.affiliate-withdraw-option em {
  color: #60708a;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.affiliate-balance-hint {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.affiliate-balance-hint i {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.affiliate-balance-hint strong {
  display: block;
  margin-bottom: 4px;
  color: #10213b;
  font-size: 14px;
}

.affiliate-balance-hint p {
  margin: 0;
  color: #60708a;
  font-size: 12px;
  line-height: 1.6;
}

.affiliate-usdt-fields {
  display: grid;
  grid-template-columns: minmax(150px, 0.5fr) minmax(280px, 1.5fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.affiliate-usdt-fields label {
  display: grid;
  gap: 7px;
}

.affiliate-usdt-fields span {
  color: #60708a;
  font-size: 12px;
  font-weight: 800;
}

.affiliate-usdt-fields input,
.affiliate-usdt-fields select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7e2f1;
  border-radius: 7px;
  background: #fff;
  color: #1e2d44;
  padding: 0 12px;
  outline: none;
}

.affiliate-usdt-fields input:focus,
.affiliate-usdt-fields select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.affiliate-withdraw-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.affiliate-withdraw-actions button {
  min-height: 42px;
}

.affiliate-withdraw-modal {
  max-width: 660px;
}

.affiliate-withdraw-amount-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px 16px;
  margin: 14px 0;
}

.affiliate-withdraw-amount-card span {
  color: #60708a;
  font-size: 13px;
  font-weight: 800;
}

.affiliate-withdraw-amount-card strong {
  color: #10213b;
  font-size: 26px;
}

.affiliate-withdraw-input-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  margin-bottom: 14px;
}

.affiliate-withdraw-input-card > div:first-child {
  display: grid;
  gap: 4px;
}

.affiliate-withdraw-input-card label {
  color: #17243a;
  font-size: 14px;
  font-weight: 900;
}

.affiliate-withdraw-input-card p {
  margin: 0;
  color: #687790;
  font-size: 12px;
  line-height: 1.6;
}

.affiliate-withdraw-input-wrap {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid #d7e2f1;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.affiliate-withdraw-input-wrap span {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 14px;
  border-right: 1px solid #d7e2f1;
  color: #536882;
  font-weight: 900;
}

.affiliate-withdraw-input-wrap input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  color: #10213b;
  font-size: 24px;
  font-weight: 900;
  outline: none;
  padding: 0 14px;
}

.affiliate-withdraw-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.affiliate-withdraw-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.affiliate-withdraw-amount-message {
  color: #536882;
  font-size: 13px;
  font-weight: 800;
}

.affiliate-withdraw-amount-message.danger {
  color: #dc2626;
}

.affiliate-withdraw-modal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.affiliate-withdraw-modal-options .affiliate-withdraw-option {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px 12px;
  min-height: 92px;
  padding: 16px;
}

.affiliate-withdraw-modal-options .affiliate-withdraw-option i {
  grid-row: 1 / span 2;
  align-self: start;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.affiliate-withdraw-modal-options .affiliate-withdraw-option span,
.affiliate-withdraw-modal-options .affiliate-withdraw-option em {
  min-width: 0;
}

.affiliate-withdraw-modal-options .affiliate-withdraw-option em {
  word-break: break-word;
}

.affiliate-withdraw-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #f8fbff;
  color: #31425e;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.affiliate-withdraw-warning.danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: #9f1239;
}

.affiliate-withdraw-warning i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--blue);
}

.affiliate-withdraw-warning.danger i {
  color: #e11d48;
}

.affiliate-withdraw-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(140px, 0.65fr) minmax(260px, 1.5fr) auto;
  gap: 12px;
  align-items: end;
}

.affiliate-withdraw-grid label {
  display: grid;
  gap: 7px;
}

.affiliate-withdraw-grid span {
  color: #60708a;
  font-size: 12px;
  font-weight: 800;
}

.affiliate-withdraw-grid input,
.affiliate-withdraw-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7e2f1;
  border-radius: 7px;
  background: #fff;
  color: #1e2d44;
  padding: 0 12px;
  outline: none;
}

.affiliate-withdraw-grid input:focus,
.affiliate-withdraw-grid select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.affiliate-withdraw-grid button {
  min-height: 42px;
}

.affiliate-withdraw-note {
  margin-top: 12px;
}

.affiliate-rules {
  margin: 22px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

.affiliate-detail-tabs-panel {
  padding: 12px;
}

.affiliate-detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.affiliate-detail-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #f8fbff;
  color: #43546e;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.affiliate-detail-tabs button:hover {
  border-color: #adc3e2;
  background: #ffffff;
}

.affiliate-detail-tabs button.active {
  border-color: rgba(37, 99, 235, 0.42);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.affiliate-detail-tabs svg {
  width: 17px;
  height: 17px;
}

.affiliate-detail-tabs em {
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #53657f;
  font-size: 12px;
  font-style: normal;
  line-height: 22px;
  text-align: center;
}

.affiliate-detail-tabs button.active em {
  background: #dbeafe;
  color: #1d4ed8;
}

.affiliate-detail-panel {
  display: grid;
  gap: 16px;
}

.affiliate-detail-panel .panel-header {
  align-items: flex-start;
  gap: 14px;
}

.affiliate-detail-panel .panel-header .badge {
  flex: 0 0 auto;
  margin-top: 2px;
}

.affiliate-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.affiliate-detail-summary > div {
  display: grid;
  gap: 6px;
  min-height: 92px;
  border: 1px solid #dce8f6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.affiliate-detail-summary span,
.affiliate-detail-summary em {
  color: #60708a;
  font-size: 12px;
  font-style: normal;
}

.affiliate-detail-summary strong {
  overflow: hidden;
  color: #10213b;
  font-size: 22px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-detail-table {
  border-color: #dbe6f4;
}

.affiliate-detail-table table {
  min-width: 1060px;
  table-layout: fixed;
}

.affiliate-detail-table th {
  background: #f6f9fd;
}

.affiliate-detail-table th:nth-child(1),
.affiliate-detail-table td:nth-child(1) {
  width: 240px;
}

.affiliate-detail-table th:nth-child(2),
.affiliate-detail-table td:nth-child(2) {
  width: 120px;
}

.affiliate-detail-table th:nth-child(3),
.affiliate-detail-table td:nth-child(3) {
  width: 110px;
}

.affiliate-detail-table th:nth-child(4),
.affiliate-detail-table td:nth-child(4),
.affiliate-detail-table th:nth-child(5),
.affiliate-detail-table td:nth-child(5) {
  width: 140px;
}

.affiliate-detail-table th:nth-child(6),
.affiliate-detail-table td:nth-child(6) {
  width: 210px;
}

.affiliate-detail-table th:nth-child(7),
.affiliate-detail-table td:nth-child(7) {
  width: 120px;
}

.affiliate-withdrawal-table table {
  min-width: 920px;
}

.affiliate-withdrawal-table th:nth-child(1),
.affiliate-withdrawal-table td:nth-child(1) {
  width: 180px;
}

.affiliate-withdrawal-table th:nth-child(2),
.affiliate-withdrawal-table td:nth-child(2),
.affiliate-withdrawal-table th:nth-child(4),
.affiliate-withdrawal-table td:nth-child(4),
.affiliate-withdrawal-table th:nth-child(5),
.affiliate-withdrawal-table td:nth-child(5) {
  width: 130px;
}

.affiliate-withdrawal-table th:nth-child(3),
.affiliate-withdrawal-table td:nth-child(3) {
  width: 210px;
}

.withdrawal-address-cell em {
  word-break: break-all;
}

.affiliate-user-cell,
.affiliate-order-count,
.affiliate-commission-cell,
.affiliate-order-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.affiliate-user-cell strong,
.affiliate-order-cell strong {
  overflow: hidden;
  color: #17243a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-user-cell em,
.affiliate-order-count em,
.affiliate-commission-cell em,
.affiliate-order-cell em {
  overflow: hidden;
  color: #6b7b92;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-order-count strong,
.affiliate-commission-cell strong {
  color: #17243a;
  font-size: 15px;
}

.affiliate-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.affiliate-status svg {
  width: 14px;
  height: 14px;
}

.affiliate-status.success {
  background: var(--green-soft);
  color: var(--green);
}

.affiliate-status.warn {
  background: var(--orange-soft);
  color: var(--orange);
}

.affiliate-status.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.affiliate-status.muted {
  background: #eef2f7;
  color: #60708a;
}

.affiliate-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px dashed #cfdced;
  border-radius: 8px;
  background: #f8fbff;
  padding: 34px 18px;
  text-align: center;
}

.affiliate-empty svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.affiliate-empty strong {
  color: #14223a;
  font-size: 16px;
}

.affiliate-empty span {
  max-width: 420px;
  color: #60708a;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  background: #f8fbff;
  margin-top: 14px;
  padding: 10px 12px;
}

.admin-pagination-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.admin-pagination-info strong {
  color: #14223a;
  font-size: 15px;
}

.admin-pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-pagination-actions label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-pagination-actions select {
  width: auto;
  min-width: 90px;
  min-height: 32px;
  padding: 5px 8px;
}

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

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.pagination-row select {
  width: 130px;
}

.code-box {
  min-height: 138px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111827;
  color: #d5e7ff;
  line-height: 1.6;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 44px));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  color: var(--text);
}

.admin-shell .metric-value {
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
}

.inline-edit {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-edit input,
.inline-edit select {
  min-width: 110px;
}

@media (max-width: 1180px) {
  .user-auth-screen {
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
    padding: 28px;
  }

  .user-auth-art,
  .user-auth-panel {
    min-height: min(720px, calc(100vh - 56px));
    padding: 36px;
  }

  .auth-board-list,
  .auth-country-strip,
  .auth-ops-layout,
  .auth-board-footer {
    grid-template-columns: 1fr;
  }

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

  .content-grid,
  .admin-overview-grid,
  .overview-command,
  .overview-command-layout,
  .admin-order-hero,
  .admin-plan-hero,
  .provider-isp-hero,
  .admin-plan-grid,
  .admin-plan-layout,
  .admin-user-hero,
  .admin-audit-hero,
  .admin-user-detail-grid,
  .admin-user-activity-grid,
  .admin-provider-hero,
  .admin-settings-hero,
  .admin-provider-card-head,
  .admin-provider-binding,
  .admin-provider-sync-row,
  .provider-isp-adapter-brief,
  .overview-layout,
  .overview-hero,
  .split-pane,
  .static-buy-grid,
  .payment-checkout-grid,
  .account-grid,
  .affiliate-hero,
  .affiliate-share-grid,
  .affiliate-withdraw-grid,
  .affiliate-usdt-fields {
    grid-template-columns: 1fr;
  }

  .admin-plan-label-panel {
    position: static;
  }

  .order-sidebar {
    position: static;
  }

  .metric-grid,
  .overview-kpi-grid,
  .overview-card-grid,
  .overview-business-grid,
  .balance-record-summary,
  .recharge-record-summary,
  .four-col,
  .admin-summary-row.four,
  .admin-order-hero-stats,
  .admin-order-modal-summary,
  .admin-order-detail-grid,
  .admin-order-flow-steps,
  .admin-user-status-strip,
  .account-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .overview-layout,
  .overview-hero {
    grid-template-columns: 1fr;
  }

  .overview-command-score {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .history-date-range {
    width: min(350px, 100%);
  }

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

  .admin-plan-import-config {
    grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.5fr) minmax(130px, 0.8fr);
  }

  .admin-plan-import-card-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .admin-provider-head-right {
    justify-items: start;
  }

  .admin-provider-head-right p {
    text-align: left;
  }

  .admin-settings-price-card {
    text-align: left;
  }

  .admin-user-profile-hero {
    grid-template-columns: 1fr;
  }

  .admin-user-profile-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .login-screen {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    min-height: auto;
    border-left: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
  }

  .user-auth-panel {
    min-height: auto;
  }

  .login-art-metrics {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .country-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .country-search {
    min-width: 0;
  }

  .admin-plan-supplier-head {
    display: grid;
  }

  .admin-plan-supplier-grid {
    grid-template-columns: 1fr;
  }

  .admin-plan-edit-metrics,
  .admin-plan-move-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-plan-advanced summary {
    grid-template-columns: 1fr;
  }

  .admin-plan-advanced summary em {
    max-width: 100%;
  }

  .admin-plan-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-plan-import-head,
  .admin-plan-import-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-plan-import-bulkbar {
    grid-template-columns: 1fr 1fr;
  }

  .admin-plan-import-bulkbar .primary-btn,
  .admin-plan-import-bulkbar > em {
    grid-column: 1 / -1;
  }

  .admin-plan-import-tools > span {
    text-align: left;
  }

  .admin-plan-import-config {
    grid-template-columns: 1fr;
  }

  .smtp-account-summary,
  .smtp-account-grid,
  .smtp-test-grid {
    grid-template-columns: 1fr 1fr;
  }

  .smtp-account-summary .primary-btn,
  .smtp-test-actions {
    grid-column: 1 / -1;
  }

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

  .smtp-account-actions {
    justify-content: flex-start;
  }

  .admin-plan-import-card-main {
    grid-template-columns: 1fr;
  }

  .feature-tabs {
    overflow-x: auto;
  }

  .admin-pagination,
  .history-pagination,
  .static-owned-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-pagination-actions,
  .history-pagination-actions,
  .static-owned-pagination .history-pagination-actions {
    justify-content: flex-start;
  }

  .admin-order-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-order-tab {
    min-width: 138px;
  }

  .feature-tabs button {
    flex: 0 0 auto;
    margin-right: 26px;
  }

  .static-picker-panel,
  .order-sidebar,
  .static-owned-panel {
    padding: 16px;
  }

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

  .payment-list {
    grid-template-columns: 1fr;
  }

  .proxy-modal-body {
    grid-template-columns: 1fr;
  }

  .qr-art {
    width: min(210px, 100%);
    margin: 0 auto;
  }

  .renew-summary,
  .renew-day-grid {
    grid-template-columns: 1fr;
  }

  .static-filterbar input,
  .static-filterbar select {
    width: min(100%, 220px);
  }

  .history-filterbar {
    align-items: stretch;
  }

  .history-filterbar input,
  .history-filterbar select,
  .history-filterbar .order-field,
  .history-filterbar .keyword-field,
  .history-date-range {
    width: 100%;
  }

  .page-root {
    padding: 16px;
  }

  .two-col,
  .three-col,
  .metric-grid,
  .overview-command,
  .overview-command-title,
  .overview-command-score,
  .overview-kpi-grid,
  .overview-work-list,
  .overview-metrics,
  .overview-card-grid,
  .overview-chart-summary,
  .admin-settings-email-grid,
  .smtp-test-grid,
  .balance-record-summary,
  .order-record-summary,
  .recharge-record-summary,
  .admin-summary-row.three,
  .admin-summary-row.four,
  .admin-user-hero-stats,
  .admin-order-hero-stats,
  .admin-order-modal-summary,
  .admin-order-detail-grid,
  .admin-order-flow-steps,
  .admin-proxy-hero,
  .provider-isp-tabs,
  .provider-isp-adapter-traits,
  .provider-isp-adapter-summary,
  .admin-provider-kpi-grid,
  .admin-provider-config,
  .admin-provider-body-grid,
  .admin-settings-preview,
  .admin-provider-card-head,
  .admin-provider-plan-strip,
  .admin-provider-sync-kpis,
  .admin-provider-sync-item,
  .admin-plan-hero-stats,
  .admin-plan-form-grid,
  .admin-plan-tag-form,
  .admin-provider-ipcook-fields,
  .admin-user-status-strip,
  .admin-user-actions,
  .stat-row,
  .static-summary,
  .account-metric-grid,
  .form-grid,
  .form-grid.two,
  .four-col {
    grid-template-columns: 1fr;
  }

  .admin-profile-lines div,
  .admin-mini-row {
    grid-template-columns: 1fr;
  }

  .chart {
    gap: 8px;
  }

  .overview-health-body,
  .overview-country-row,
  .overview-order-row,
  .overview-service-row {
    grid-template-columns: 1fr;
  }

  .admin-provider-card-actions,
  .admin-provider-sync-metrics,
  .admin-provider-sync-item p {
    justify-content: flex-start;
  }

  .admin-provider-title > div {
    flex-wrap: wrap;
  }

  .overview-order-row,
  .overview-service-row {
    align-items: start;
  }

  .overview-chart {
    gap: 8px;
  }
}

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

  .affiliate-withdraw-options {
    grid-template-columns: 1fr;
  }

  .affiliate-withdraw-modal-options {
    grid-template-columns: 1fr;
  }

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

  .affiliate-detail-tabs {
    grid-template-columns: 1fr;
  }

  .affiliate-detail-panel .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-detail-panel .panel-header .badge {
    width: fit-content;
  }

  .affiliate-detail-summary {
    grid-template-columns: 1fr;
  }

  .affiliate-copy-box {
    grid-template-columns: 1fr;
  }

  .affiliate-copy-box input,
  .affiliate-copy-box button {
    border-radius: 7px;
  }

  .top-actions,
  .row-actions,
  .toolbar {
    width: 100%;
  }

  .top-actions > *,
  .toolbar > * {
    flex: 1 1 auto;
  }

  .top-divider {
    display: none;
  }

  .top-menu,
  .top-recharge,
  .top-balance,
  .top-service {
    flex: 1 1 140px;
  }

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .security-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .security-row .ghost-btn,
  .security-row .status {
    grid-column: 2;
    width: fit-content;
  }

  .top-menu-trigger,
  .avatar-btn {
    width: 100%;
  }

  .top-dropdown {
    left: 0;
    right: auto;
  }

  button,
  .primary-btn,
  .ghost-btn,
  .link-btn,
  .danger-btn {
    white-space: normal;
  }

  .login-panel {
    padding: 22px;
  }
}

/* Final override: every relay expanded user table must render as a real grid. */
.relay-client-detail-row .relay-user-detail-panel .relay-client-grid-wrap,
.relay-client-panel .relay-client-grid-wrap {
  overflow: auto;
  border: 1px solid #dbe5f2 !important;
  border-radius: 8px;
  background: #fff;
}

.relay-client-detail-row .relay-user-detail-table,
.relay-client-panel .relay-user-detail-table {
  width: 100%;
  min-width: 980px !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  background: #fff;
}

.relay-client-detail-row .relay-user-detail-table th,
.relay-client-detail-row .relay-user-detail-table td,
.relay-client-panel .relay-user-detail-table th,
.relay-client-panel .relay-user-detail-table td {
  border-right: 1px solid #e1e8f2 !important;
  border-bottom: 1px solid #e1e8f2 !important;
  padding: 11px 12px !important;
  text-align: center;
  vertical-align: middle;
}

.relay-client-detail-row .relay-user-detail-table th:last-child,
.relay-client-detail-row .relay-user-detail-table td:last-child,
.relay-client-panel .relay-user-detail-table th:last-child,
.relay-client-panel .relay-user-detail-table td:last-child {
  border-right: 0 !important;
}

.relay-client-detail-row .relay-user-detail-table tbody tr:last-child td,
.relay-client-panel .relay-user-detail-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.relay-client-detail-row .relay-user-detail-table td:nth-child(3),
.relay-client-panel .relay-user-detail-table td:nth-child(3) {
  text-align: left;
}

/* Premium user auth entry */
.user-auth-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(660px, 1.16fr) minmax(420px, 500px);
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 28px 36px;
  overflow: auto;
  background:
    linear-gradient(135deg, #eef3f8 0%, #f8fafc 52%, #eef7f1 100%),
    repeating-linear-gradient(90deg, transparent, transparent 72px, rgba(21, 37, 64, 0.035) 73px);
}

.user-auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 110, 234, 0.05), transparent 36%, rgba(22, 138, 90, 0.06)),
    repeating-linear-gradient(0deg, transparent, transparent 94px, rgba(21, 37, 64, 0.025) 95px);
  pointer-events: none;
}

.user-auth-art,
.user-auth-panel {
  position: relative;
  z-index: 1;
  min-height: min(720px, calc(100vh - 56px));
}

.user-auth-art {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 30, 48, 0.32);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background:
    linear-gradient(135deg, rgba(8, 20, 34, 0.99) 0%, rgba(15, 45, 70, 0.98) 54%, rgba(19, 78, 80, 0.96) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 78px, rgba(255, 255, 255, 0.045) 79px);
  box-shadow: 0 30px 82px rgba(15, 23, 42, 0.22);
  color: #fff;
  padding: clamp(34px, 3.4vw, 44px);
}

.user-auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), transparent 34%),
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(255, 255, 255, 0.047) 61px);
  pointer-events: none;
}

.user-auth-art > * {
  position: relative;
  z-index: 1;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-brand-row .brand-line {
  gap: 13px;
  color: #fff;
  font-size: 21px;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #f5c84c, #d9a21b);
  color: #10213b;
  font-size: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.auth-brand-row > .auth-console-pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(239, 247, 255, 0.88);
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 900;
}

.auth-hero-copy {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.auth-hero-copy .eyebrow,
.user-auth-panel .eyebrow {
  color: #2f8ff2;
  font-weight: 900;
}

.auth-hero-copy .eyebrow {
  color: #86ead2;
}

.user-auth-art h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 4vw, 56px);
  line-height: 1.06;
  font-weight: 900;
}

.auth-hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 0;
  color: rgba(237, 246, 255, 0.82);
  font-size: 16px;
  line-height: 1.72;
}

.auth-signal-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-signal-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(244, 250, 255, 0.86);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.auth-signal-strip svg {
  width: 15px;
  height: 15px;
  color: #8ae7cd;
}

.auth-command-board {
  display: grid;
  gap: 12px;
  max-width: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(6, 18, 32, 0.64);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.auth-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 12px;
}

.auth-board-head > div {
  display: grid;
  gap: 5px;
}

.auth-board-head span,
.auth-flow-head span {
  color: rgba(237, 246, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.auth-board-head strong {
  color: #fff;
  font-size: 15px;
}

.auth-board-head > em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(67, 211, 145, 0.2);
  border-radius: 999px;
  background: rgba(67, 211, 145, 0.09);
  color: #a6f2cb;
  padding: 6px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.auth-board-head > em i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #43d391;
  box-shadow: 0 0 0 5px rgba(67, 211, 145, 0.12);
}

.auth-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-board-grid div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  align-items: center;
  min-height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  padding: 12px;
}

.auth-board-grid svg {
  grid-row: span 3;
  width: 20px;
  height: 20px;
  color: #8ae7cd;
}

.auth-board-grid span,
.auth-board-grid em {
  color: rgba(237, 246, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.auth-board-grid strong {
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.auth-ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: 12px;
}

.auth-route-panel,
.auth-flow-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

.auth-route-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.auth-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(237, 246, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.auth-route-head strong {
  color: #ffd978;
}

.auth-route-list {
  display: grid;
  gap: 8px;
}

.auth-route-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
}

.auth-route-list span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.auth-route-list b {
  font-size: 19px;
  line-height: 1;
}

.auth-route-list em {
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.auth-route-list strong {
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.auth-route-list small {
  border: 1px solid rgba(67, 211, 145, 0.22);
  border-radius: 999px;
  color: #95e5bf;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.auth-flow-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.auth-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-flow-head strong {
  color: #ffd978;
  font-size: 12px;
}

.auth-flow-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-flow-panel li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  padding: 8px;
}

.auth-flow-panel li::before {
  content: none;
}

.auth-flow-panel li span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(138, 231, 205, 0.12);
  color: #8ae7cd;
  font-size: 12px;
  font-weight: 900;
}

.auth-flow-panel li strong {
  color: #fff;
  font-size: 14px;
}

.auth-flow-panel li em {
  overflow: hidden;
  color: rgba(237, 246, 255, 0.62);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-board-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-board-footer span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 250, 255, 0.78);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.auth-board-footer svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: #ffd978;
}

.user-auth-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  border: 1px solid #cbd7e6;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 76px rgba(21, 37, 64, 0.16);
  padding: 42px;
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e2eaf4;
  padding-bottom: 18px;
}

.auth-panel-top > div {
  display: grid;
  gap: 5px;
}

.auth-panel-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-panel-top strong {
  color: #10213b;
  font-size: 20px;
}

.auth-panel-top > svg {
  width: 38px;
  height: 38px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--blue);
  padding: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid #e2eaf4;
  border-radius: 8px;
  background: #f2f6fb;
  padding: 5px;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4a5c75;
  cursor: pointer;
  font-weight: 900;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(21, 37, 64, 0.1);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-head {
  display: grid;
  gap: 7px;
}

.auth-head h2 {
  margin: 0;
  color: #10213b;
  font-size: 28px;
  line-height: 1.2;
}

.auth-head span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: #2d3d54;
  font-weight: 900;
}

.auth-input {
  position: relative;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: stretch;
}

.auth-code-row .ghost-btn {
  min-height: 48px;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.auth-code-row .ghost-btn[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.auth-input svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #8da0b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.user-auth-panel input {
  min-height: 48px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #fbfdff;
  color: #10213b;
  padding: 12px 14px 12px 46px;
  font-weight: 700;
}

.user-auth-panel input:focus {
  border-color: #73aaf0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(17, 110, 234, 0.1);
}

.user-auth-panel .primary-btn {
  min-height: 48px;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(17, 110, 234, 0.22);
  font-size: 15px;
  font-weight: 900;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.auth-footer .link-btn {
  min-height: 30px;
  padding: 0;
  color: var(--blue);
  font-weight: 900;
}

.auth-security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid #e2eaf4;
  padding-top: 16px;
  color: #66758d;
  font-size: 12px;
  line-height: 1.7;
}

.auth-security-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--green);
  margin-top: 2px;
}

.auth-form .form-status {
  min-height: 22px;
  border-radius: 8px;
  background: #f4f7fb;
  padding: 8px 10px;
}

.auth-form .form-status.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .user-auth-screen {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .user-auth-art {
    min-height: auto;
    border-right: 1px solid rgba(18, 44, 72, 0.24);
    border-radius: 8px 8px 0 0;
    padding: 38px;
  }

  .user-auth-panel {
    min-height: auto;
    border-left: 1px solid #cbd7e6;
    border-radius: 0 0 8px 8px;
    padding: 38px;
  }

  .user-auth-art h1 {
    font-size: 46px;
  }
}

@media (max-width: 860px) {
  .user-auth-screen {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    padding: 16px;
  }

  .user-auth-art {
    display: none;
  }

  .user-auth-panel {
    min-height: calc(100vh - 32px);
    border: 1px solid #cbd7e6;
    border-radius: 8px;
    padding: 30px;
  }
}

@media (max-width: 560px) {
  .user-auth-screen {
    padding: 10px;
  }

  .user-auth-panel {
    min-height: calc(100vh - 20px);
    gap: 18px;
    padding: 20px 22px;
  }

  .auth-panel-top strong {
    font-size: 18px;
  }

  .auth-panel-top {
    padding-bottom: 14px;
  }

  .auth-form {
    gap: 14px;
  }

  .auth-head h2 {
    font-size: 25px;
  }

  .auth-tabs button,
  .user-auth-panel .primary-btn,
  .user-auth-panel input {
    min-height: 46px;
  }

  .auth-security-note {
    padding-top: 12px;
  }
}

/* User auth button and form polish */
.user-auth-screen {
  min-height: 100dvh;
  align-items: center;
  padding-block: clamp(16px, 2.5vh, 24px);
}

.user-auth-panel {
  max-width: 500px;
}

.user-auth-art,
.user-auth-panel {
  min-height: min(720px, calc(100dvh - 56px));
}

.user-auth-art {
  gap: 22px;
  padding: clamp(34px, 3.4vw, 44px);
}

.auth-command-board {
  gap: 12px;
  padding: 16px;
}

.auth-board-grid div {
  min-height: 84px;
}

.auth-tabs {
  position: relative;
  gap: 6px;
  border-color: #dce6f2;
  background: #eef3f9;
  padding: 5px;
}

.auth-tabs button {
  gap: 8px;
  min-width: 0;
  border: 1px solid transparent;
  color: #40516b;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.auth-tabs button svg {
  width: 16px;
  height: 16px;
}

.auth-tabs button:hover {
  border-color: #d7e3f1;
  background: rgba(255, 255, 255, 0.72);
  color: #10213b;
}

.auth-tabs button.active {
  border-color: #dbe7f5;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 10px 22px rgba(21, 37, 64, 0.12);
}

.auth-tabs button.active svg {
  color: var(--blue);
}

.auth-field > span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
}

.auth-input {
  border-radius: 8px;
}

.user-auth-panel input {
  width: 100%;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.auth-input:focus-within svg {
  color: var(--blue);
}

.user-auth-panel .primary-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(135deg, var(--blue), #0b63dc);
  letter-spacing: 0;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.user-auth-panel .primary-btn:hover {
  background: linear-gradient(135deg, #0b63dc, var(--blue-strong));
  box-shadow: 0 16px 32px rgba(17, 110, 234, 0.26);
  transform: translateY(-1px);
}

.user-auth-panel .primary-btn:active {
  transform: translateY(0);
}

.auth-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-footer > span {
  align-self: center;
  color: var(--muted);
  font-weight: 700;
}

.auth-footer .link-btn {
  justify-content: center;
  min-height: 32px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  padding: 0 12px;
  box-shadow: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.auth-footer .link-btn svg {
  width: 15px;
  height: 15px;
}

.auth-footer .link-btn:hover {
  border-color: #bcd4f3;
  background: var(--blue-soft);
  box-shadow: 0 8px 18px rgba(17, 110, 234, 0.1);
  color: var(--blue-strong);
}

.auth-footer .link-btn:focus-visible,
.auth-tabs button:focus-visible,
.user-auth-panel .primary-btn:focus-visible {
  outline: 3px solid rgba(17, 110, 234, 0.18);
  outline-offset: 2px;
}

#registerForm .auth-footer {
  grid-template-columns: minmax(0, 1fr) auto;
}

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

#forgotPasswordForm .auth-footer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.user-auth-panel:has(#registerForm:not(.hidden)) {
  align-content: start;
  gap: 14px;
  padding-block: 26px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-panel-top {
  padding-bottom: 12px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-tabs button {
  min-height: 38px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-form {
  gap: 9px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-head {
  gap: 5px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-head h2 {
  font-size: 25px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-field {
  gap: 6px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) input,
.user-auth-panel:has(#registerForm:not(.hidden)) .primary-btn,
.user-auth-panel:has(#registerForm:not(.hidden)) .auth-code-row .ghost-btn {
  min-height: 44px;
}

.user-auth-panel:has(#registerForm:not(.hidden)) .auth-security-note {
  padding-top: 12px;
}

.auth-security-note {
  border-top-color: #dfe8f3;
}

@media (max-width: 560px) {
  .auth-footer,
  #loginForm .auth-footer,
  #registerForm .auth-footer,
  #forgotPasswordForm .auth-footer {
    grid-template-columns: 1fr;
  }

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

  .auth-footer > span {
    text-align: center;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) {
    gap: 10px;
    padding: 14px 18px;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-panel-top {
    padding-bottom: 8px;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-panel-top > svg {
    display: none;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-tabs button,
  .user-auth-panel:has(#registerForm:not(.hidden)) input,
  .user-auth-panel:has(#registerForm:not(.hidden)) .primary-btn,
  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-code-row .ghost-btn {
    min-height: 42px;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-head span {
    display: none;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-field {
    gap: 4px;
  }

  .user-auth-panel:has(#registerForm:not(.hidden)) .auth-security-note {
    font-size: 11px;
    line-height: 1.45;
  }
}

