:root{
  --bg:#F5F5F7;
  --card:#FFFFFF;
  --text:#111827;
  --muted:#6B7280;
  --border:rgba(0,0,0,.08);
  --primary:#0A84FF;
  --primary-weak:rgba(10,132,255,.12);
  --success:#34C759;
  --danger:#FF3B30;
  --warning:#FF9F0A;
  --radius-sm:10px;
  --radius-md:14px;
  --radius-lg:18px;
  --shadow-sm:0 6px 18px rgba(0,0,0,.06);
  --shadow-md:0 10px 30px rgba(0,0,0,.08);
  --space-1:8px;
  --space-2:12px;
  --space-3:16px;
  --space-4:24px;
  --space-5:32px;
  --space-6:40px;
  --content-max:1280px;
  --content-pad-x:24px;
  --content-pad-y:24px;
  --section-gap:24px;
  --card-gap:16px;
  --card-padding:24px;
  --admin-canvas:#F4F6F8;
  --admin-surface:#F7F8FA;
  --admin-surface-muted:#F2F4F7;
  --admin-panel-border:rgba(15,23,42,.06);
  --admin-panel-shadow:0 14px 32px rgba(15,23,42,.05);
  --glass-surface:rgba(255,255,255,.64);
  --glass-surface-strong:rgba(255,255,255,.76);
  --glass-border:rgba(255,255,255,.52);
  --glass-shadow:0 18px 42px rgba(15,23,42,.08);
  --app-bg-image-desktop:none;
  --app-bg-image-mobile:none;
  --topbar-height:62px;
  --font:ui-sans-serif,system-ui,-apple-system,"SF Pro Text","PingFang SC","Helvetica Neue",Arial;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: var(--app-bg-image-desktop);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
body.mobile::before {
  background-image: var(--app-bg-image-mobile);
}

.hidden { display: none !important; }
.app-shell {
  min-height: 100vh;
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(15,23,42,.03);
}

body:not(.mobile) .app-shell {
  background:
    radial-gradient(1120px 460px at -8% -10%, rgba(10,132,255,.16), transparent 60%),
    radial-gradient(880px 420px at 102% -8%, rgba(56,189,248,.13), transparent 62%),
    radial-gradient(920px 460px at 50% 110%, rgba(15,23,42,.08), transparent 68%),
    linear-gradient(160deg, rgba(242,246,253,.76) 0%, rgba(234,241,251,.74) 42%, rgba(237,242,248,.78) 100%);
  background-size: auto, auto, auto, auto;
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
}

body:not(.mobile) .topbar {
  padding: 14px 20px;
  border-bottom-color: rgba(255,255,255,.56);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(138%);
  box-shadow:
    0 14px 34px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.68);
}

.topbar-title {
  font-size: 15px;
  color: #1F2937;
  font-weight: 600;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#topLocaleBtn {
  min-width: 58px;
  padding: 0 12px;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  font-size: 18px;
  line-height: 1;
}

.nav-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  z-index: 18;
}

.user-chip {
  max-width: 220px;
  display: inline-block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
  color: #1F2937;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 11px;
}

.layout {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: calc(100dvh - var(--topbar-height));
}

.app-shell.auth-mode .topbar,
.app-shell.auth-mode .sidebar,
.app-shell.auth-mode .title,
.app-shell.auth-mode .page-head,
html.auth-route .app-shell .topbar,
html.auth-route .app-shell .sidebar,
html.auth-route .app-shell .title,
html.auth-route .app-shell .page-head {
  display: none;
}

.app-shell.auth-mode .layout,
html.auth-route .app-shell .layout {
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.app-shell.auth-mode .content,
html.auth-route .app-shell .content {
  padding: 0;
}

.app-shell.auth-mode .container,
html.auth-route .app-shell .container {
  max-width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
  background:
    radial-gradient(1000px 360px at 8% 4%, rgba(10,132,255,.12), transparent 58%),
    radial-gradient(860px 320px at 92% 12%, rgba(10,132,255,.08), transparent 60%),
    radial-gradient(520px 300px at 50% 48%, rgba(255,255,255,.28), transparent 72%),
    radial-gradient(680px 260px at 48% 102%, rgba(56,189,248,.06), transparent 62%),
    linear-gradient(180deg, rgba(247,249,252,.78) 0%, rgba(241,244,248,.82) 100%);
  background-size: auto, auto, auto, auto, auto;
  background-position: center, center, center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

body:not(.mobile) .app-shell.auth-mode .container,
html.auth-route body:not(.mobile) .app-shell .container {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 340px at 8% -4%, rgba(10,132,255,.07), transparent 60%),
    radial-gradient(680px 260px at 92% 8%, rgba(56,189,248,.04), transparent 64%),
    linear-gradient(180deg, rgba(248,250,253,.30) 0%, rgba(241,244,249,.34) 100%),
    var(--app-bg-image-desktop);
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
}

body:not(.mobile) .app-shell.auth-mode .container::before,
html.auth-route body:not(.mobile) .app-shell .container::before {
  content: none;
}

body:not(.mobile) .app-shell:not(.auth-mode) {
  zoom: .9;
  min-height: calc(100vh / .9 + 48px);
  padding-bottom: 48px;
}

body:not(.mobile) .app-shell:not(.auth-mode) .layout {
  min-height: calc((100dvh - var(--topbar-height) + 48px) / .9);
}

body:not(.mobile) .app-shell:not(.auth-mode) .sidebar {
  height: calc((100dvh - var(--topbar-height) + 48px) / .9);
  max-height: calc((100dvh - var(--topbar-height) + 48px) / .9);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(247,248,250,.96) 100%);
  border-right: 1px solid var(--border);
  padding: 12px 10px;
}

body:not(.mobile) .sidebar {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  height: calc(100dvh - var(--topbar-height));
  max-height: calc(100dvh - var(--topbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.60) 0%, rgba(246,248,250,.74) 100%);
  border-right-color: rgba(255,255,255,.48);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,.38),
    10px 0 24px rgba(15,23,42,.04);
}

body:not(.mobile) .sidebar::before {
  content: none;
}

body:not(.mobile) .menu {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 10px 8px 14px;
  margin-top: 8px;
}

body:not(.mobile) .menu::before {
  content: "";
  padding: 0 12px 8px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94A3B8;
  font-weight: 700;
}

.menu a {
  display: block;
  margin-bottom: 0;
  padding: 11px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #1F2937;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all .16s ease;
}

.menu-locale-box {
  display: grid;
  gap: 8px;
  padding: 6px 10px 14px;
  margin-bottom: 4px;
}

.menu-locale-label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94A3B8;
  font-weight: 700;
}

.menu-locale-btn {
  width: 100%;
}

.menu a:hover {
  background: rgba(10,132,255,.10);
  color: #0A84FF;
}

.menu a.active {
  color: #0A84FF;
  background: rgba(10,132,255,.16);
  border: 1px solid rgba(10,132,255,.30);
  box-shadow:
    0 8px 18px rgba(10,132,255,.14),
    inset 0 1px 0 rgba(255,255,255,.62);
}

.menu .danger-link {
  color: #7F1D1D;
  margin-top: 8px;
  background: rgba(255,59,48,.08);
  border: 1px solid rgba(255,59,48,.2);
}

.content {
  padding: var(--content-pad-y) var(--content-pad-x);
}
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}
.container > * + * {
  margin-top: var(--section-gap);
}
.toolbar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: var(--space-3);
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}

.title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: #111827;
  font-weight: 700;
}

body:not(.mobile) .content {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(980px 440px at 8% 0%, rgba(10,132,255,.13), transparent 64%),
    radial-gradient(780px 360px at 100% 8%, rgba(56,189,248,.10), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,.62) 0%, rgba(241,246,253,.56) 38%, rgba(236,242,250,.44) 72%, rgba(235,241,249,.18) 100%);
}

body:not(.mobile) .container {
  position: relative;
}

body:not(.mobile) .container::before {
  content: none;
}

body:not(.mobile) .page-head {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
  padding: 20px 14px 14px;
}

body:not(.mobile) .page-head::before {
  content: "";
  position: absolute;
  inset: 2px -8px 2px;
  border-radius: 20px;
  background:
    radial-gradient(560px 220px at 0% 0%, rgba(10,132,255,.08), transparent 74%),
    linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(248,252,255,.24) 100%);
  border: 1px solid rgba(255,255,255,.42);
  backdrop-filter: blur(8px) saturate(118%);
  -webkit-backdrop-filter: blur(8px) saturate(118%);
  box-shadow:
    0 6px 14px rgba(15,23,42,.05),
    inset 0 1px 0 rgba(255,255,255,.58);
  z-index: -1;
  pointer-events: none;
}

body:not(.mobile) .container > .title,
body:not(.mobile) .page-head > .title {
  position: relative;
  padding: 0;
  margin-bottom: 0;
  font-size: 33px;
  letter-spacing: -.02em;
}

body:not(.mobile) .page-intro {
  max-width: 760px;
  font-size: 15px;
  color: #6B7280;
}

body:not(.mobile)[data-route="home"] .page-head {
  display: none;
}

body[data-app="user"]:not(.mobile):not([data-route="auth"]) .page-head {
  display: none;
}

body[data-app="admin"]:not(.mobile) .page-head {
  display: none;
}

.desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.desc.inline { margin: 0; }
.title + .desc {
  margin-top: var(--space-2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--card-gap);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  box-shadow: var(--shadow-sm);
}

.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.card-body { display: block; }

.card h3, .card h4, .card h5 {
  margin: 0 0 var(--space-2);
  color: #111827;
  letter-spacing: 0;
}

.settings-card { box-shadow: var(--shadow-sm); border-color: var(--border); }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.table thead th {
  background: #F8FAFC;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.table th, .table td {
  padding: 11px 10px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #F9FBFF; }

.form {
  display: grid;
  gap: var(--space-3);
  max-width: 100%;
}

.form label, .label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: -2px;
}

.help { color: var(--muted); font-size: 12px; }
.error { color: #DC2626; font-size: 12px; }

.input,
.btn,
.link {
  height: 42px;
  border-radius: var(--radius-sm);
}

.input {
  width: 100%;
  min-width: 120px;
  border: 1px solid #D1D5DB;
  background: #fff;
  color: #111827;
  padding: 0 12px;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea.input {
  height: auto;
  min-height: 108px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.55;
}

.input::placeholder { color: #9CA3AF; }
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-weak);
  background: #fff;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, #9CA3AF 50%),
    linear-gradient(135deg, #9CA3AF 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.btn {
  border: none;
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
  background: var(--primary);
  box-shadow: none;
  transition: all .18s ease;
}
.btn:hover { transform: translateY(-1px); background: #0B72DB; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost {
  color: #1F2937;
  background: #fff;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #F3F4F6; }

.btn-lite {
  color: #1F2937;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-lite:hover { box-shadow: var(--shadow-sm); background: #F9FAFB; }

.btn-danger {
  background: var(--danger);
  box-shadow: none;
}
.btn-danger:hover { box-shadow: var(--shadow-sm); background: #EB3228; }
.btn-success {
  background: #34C759;
  border-color: #34C759;
  color: #fff;
}
.btn-success:hover {
  background: #2FB151;
  border-color: #2FB151;
  box-shadow: var(--shadow-sm);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
  transform: none;
}

.btn.is-busy {
  position: relative;
  color: #F9FBFF;
  filter: saturate(.9);
}
.btn.btn-lite.is-busy {
  color: #111827;
  background: #E5E7EB;
  border-color: #E5E7EB;
  box-shadow: none;
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #0A84FF;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.link:hover { background: #F8FAFC; color: #0A84FF; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.row .input { min-width: 150px; }
.row .btn, .row .link { white-space: nowrap; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.pager { color: var(--muted); font-size: 13px; }
.pager { margin-top: var(--space-2); }

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.filter-toggle {
  display: none;
  margin-bottom: 10px;
}

.kpi {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .1px;
}

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

.inline-cut {
  display: inline-block;
  max-width: 260px;
  vertical-align: bottom;
}

.user-primary {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.user-secondary { margin-top: 4px; }

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

.file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-panel {
  border: 1px dashed #CBD5E1;
  background: #FAFBFF;
  border-radius: 12px;
  padding: var(--space-3);
}
.upload-panel .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--border);
  box-shadow: none;
}
.upload-panel .btn:hover {
  background: #F8FAFC;
}

.ticket-form textarea.input { min-height: 128px; }

.status-tag, .tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.tag-lite {
  font-weight: 500;
  padding: 2px 8px;
}

.status-tag.active, .tag-success { background: rgba(52,199,89,.12); color: #15803D; }
.status-tag.disabled, .tag-muted { background: #F3F4F6; color: #4B5563; }
.status-tag.expired, .tag-warning { background: rgba(255,159,10,.16); color: #9A3412; }
.status-tag.exhausted, .tag-danger { background: rgba(255,59,48,.14); color: #991B1B; }
.tag-info { background: rgba(59,130,246,.12); color: #1D4ED8; }
.risk-muted-text { color: #6b7280; }
.btn-info-outline {
  color: #1D4ED8;
  background: #fff;
  border: 1px solid rgba(59,130,246,.4);
}
.btn-info-outline:hover {
  background: rgba(59,130,246,.08);
  box-shadow: var(--shadow-sm);
}
.btn-danger-outline {
  color: #B91C1C;
  background: #fff;
  border: 1px solid rgba(239,68,68,.4);
}
.btn-danger-outline:hover {
  background: rgba(239,68,68,.08);
  box-shadow: var(--shadow-sm);
}
.tag-orange { background: rgba(245, 158, 11, .16); color: #92400E; }

.sub-order-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.sub-order-badge.success { background: rgba(52,199,89,.12); color: #15803D; }
.sub-order-badge.warning { background: rgba(255,159,10,.16); color: #9A3412; }
.sub-order-badge.muted { background: #F3F4F6; color: #4B5563; }
.sub-order-badge.danger { background: rgba(255,59,48,.14); color: #991B1B; }

.sub-admin-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-2);
}
.admin-subtle-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: #F1F5F9;
  border: 1px solid rgba(15,23,42,.08);
}
.admin-subtle-chip.success {
  color: #15803D;
  background: rgba(52,199,89,.12);
  border-color: rgba(52,199,89,.25);
}
.admin-subtle-chip.warning {
  color: #9A3412;
  background: rgba(255,159,10,.16);
  border-color: rgba(255,159,10,.25);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #F3F4F6;
  color: #4B5563;
}
.admin-badge.success { background: rgba(52,199,89,.12); color: #15803D; }
.admin-badge.warning { background: rgba(255,159,10,.16); color: #9A3412; }
.admin-badge.danger { background: rgba(255,59,48,.14); color: #991B1B; }
.admin-badge.muted { background: #F3F4F6; color: #4B5563; }

.status-tag.status-active {
  background: rgba(52,199,89,.12);
  color: #15803D;
}
.status-tag.status-off {
  background: #F3F4F6;
  color: #4B5563;
}
.page-nodes-admin .node-workbench-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: start;
}
.page-nodes-admin .node-workbench-copy h4 { margin: 0 0 var(--space-2); }
.page-nodes-admin .node-workbench-copy .desc { max-width: 520px; }
.page-nodes-admin .node-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
  margin-top: var(--space-3);
}
.page-nodes-admin .node-overview-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: var(--space-3);
  display: grid;
  gap: 6px;
}
.page-nodes-admin .node-overview-card.is-primary {
  border-color: rgba(10,132,255,.28);
  background: linear-gradient(180deg, rgba(10,132,255,.08), rgba(10,132,255,.02));
}
.page-nodes-admin .node-overview-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
}
.page-nodes-admin .node-primary-meta {
  margin-top: 2px;
}

.page-nodes-admin .node-status-stack {
  display: grid;
  gap: var(--section-gap);
}

.page-nodes-admin .settings-sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
  margin: var(--space-2) 0;
}
.page-nodes-admin .settings-sync-item {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 4px;
}
.page-nodes-admin .settings-sync-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
}
.page-nodes-admin .settings-sync-value,
.page-nodes-admin .settings-sync-status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #F1F5F9;
  color: #475569;
  width: fit-content;
  justify-self: start;
}
.page-nodes-admin .settings-sync-status.is-success {
  background: rgba(52,199,89,.12);
  color: #15803D;
}
.page-nodes-admin .settings-sync-status.is-failed {
  background: rgba(255,59,48,.14);
  color: #991B1B;
}
.page-nodes-admin .settings-sync-status.is-idle {
  background: #F3F4F6;
  color: #4B5563;
}
.page-nodes-admin .settings-sync-detail {
  display: grid;
  gap: 6px;
  margin-top: var(--space-2);
}
.page-nodes-admin .settings-sync-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
}
.page-nodes-admin .admin-settings-actions {
  margin-top: var(--space-2);
}

.page-nodes-admin .node-list-card .table {
  border-radius: 12px;
}

@media (max-width: 980px) {
  .page-nodes-admin .node-workbench-shell {
    grid-template-columns: 1fr;
  }
  .page-nodes-admin .node-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-nodes-admin .settings-sync-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-nodes-admin .node-overview-grid,
  .page-nodes-admin .settings-sync-grid {
    grid-template-columns: 1fr;
  }
}
.pay-review-workbench {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--card-gap);
}
.pay-review-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: var(--card-padding);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-2);
}
.pay-review-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.pay-review-panel-head h5 {
  margin: 0;
  font-size: 15px;
}
.pay-proof-wrap {
  display: grid;
  place-items: center;
  padding: var(--space-2);
  border: 1px dashed rgba(15,23,42,.12);
  border-radius: 12px;
  background: #F8FAFC;
}
.pay-proof-img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px;
  object-fit: contain;
}
.pay-proof-empty {
  color: #6B7280;
  font-size: 13px;
}
.pay-review-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
  font-size: 13px;
}
.pay-review-kv-grid .k {
  color: #6B7280;
  margin-right: 6px;
}
.pay-review-kv-grid .v {
  color: #0f172a;
  font-weight: 600;
}
.pay-review-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #F1F5F9;
  color: #475569;
}
.pay-review-badge.pending { background: rgba(255,159,10,.16); color: #9A3412; }
.pay-review-badge.approved { background: rgba(52,199,89,.12); color: #15803D; }
.pay-review-badge.rejected { background: rgba(255,59,48,.14); color: #991B1B; }

@media (max-width: 980px) {
  .page-admin-dashboard .admin-overview-body,
  .page-admin-dashboard .admin-dashboard-primary-grid,
  .page-admin-dashboard .admin-dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }

  .page-admin-dashboard .admin-kpi-extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-admin-dashboard .admin-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-admin-dashboard .admin-workbench-list-main {
    grid-template-columns: 1fr;
  }

  .pay-review-workbench { grid-template-columns: 1fr; }
}
.sub-floating-menu {
  position: fixed;
  z-index: 9999;
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.sub-floating-menu .btn {
  width: 100%;
  justify-content: center;
}
.page-home,
.page-subscription,
.page-profile,
.page-nodes,
.page-help,
.page-tickets {
  display: grid;
  gap: var(--section-gap);
}

body:not(.mobile) .page-home,
body:not(.mobile) .page-subscription,
body:not(.mobile) .page-help,
body:not(.mobile) .page-plans,
body:not(.mobile) .page-pay,
body:not(.mobile) .page-profile,
body:not(.mobile) .page-nodes {
  position: relative;
  padding: 24px 24px 28px;
  border-radius: 22px;
  background:
    radial-gradient(760px 260px at 0% 0%, rgba(10,132,255,.12), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(247,252,255,.66) 100%);
  border: 1px solid rgba(255,255,255,.76);
  backdrop-filter: blur(18px) saturate(134%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 16px 38px rgba(15,23,42,.10);
}

body:not(.mobile) .page-home::before,
body:not(.mobile) .page-subscription::before,
body:not(.mobile) .page-help::before,
body:not(.mobile) .page-plans::before,
body:not(.mobile) .page-pay::before,
body:not(.mobile) .page-profile::before,
body:not(.mobile) .page-nodes::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 124px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.page-admin-dashboard,
.page-admin-stack {
  display: grid;
  gap: var(--section-gap);
}

body:not(.mobile) .page-admin-dashboard,
body:not(.mobile) .page-pay-review,
body:not(.mobile) .page-pay-review-detail,
body:not(.mobile) .page-orders,
body:not(.mobile) .page-users,
body:not(.mobile) .page-risk,
body:not(.mobile) .page-risk-ip,
body:not(.mobile) .page-subscriptions-admin,
body:not(.mobile) .page-packages,
body:not(.mobile) .page-invite-codes,
body:not(.mobile) .page-tickets,
body:not(.mobile) .page-nodes-admin,
body:not(.mobile) .page-settings,
body:not(.mobile) .page-settings-versions,
body:not(.mobile) .page-announcements,
body:not(.mobile) .page-oplogs {
  position: relative;
  padding: 20px 22px 26px;
  border-radius: 22px;
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(10,132,255,.10), transparent 74%),
    linear-gradient(180deg, rgba(255,255,255,.80) 0%, rgba(245,249,254,.68) 100%);
  border: 1px solid rgba(255,255,255,.74);
  backdrop-filter: blur(18px) saturate(132%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.74),
    0 16px 38px rgba(15,23,42,.10);
}

body:not(.mobile) .page-admin-dashboard::before,
body:not(.mobile) .page-pay-review::before,
body:not(.mobile) .page-pay-review-detail::before,
body:not(.mobile) .page-orders::before,
body:not(.mobile) .page-users::before,
body:not(.mobile) .page-risk::before,
body:not(.mobile) .page-risk-ip::before,
body:not(.mobile) .page-subscriptions-admin::before,
body:not(.mobile) .page-packages::before,
body:not(.mobile) .page-invite-codes::before,
body:not(.mobile) .page-tickets::before,
body:not(.mobile) .page-nodes-admin::before,
body:not(.mobile) .page-settings::before,
body:not(.mobile) .page-settings-versions::before,
body:not(.mobile) .page-announcements::before,
body:not(.mobile) .page-oplogs::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,.04) 42%, transparent 76%);
  pointer-events: none;
  z-index: 0;
}

/* Non-auth glass material for non-login pages */
body:not(.mobile) .app-shell:not(.auth-mode) .card,
body:not(.mobile) .app-shell:not(.auth-mode) .toolbar-card,
body:not(.mobile) .app-shell:not(.auth-mode) .admin-toolbar-card,
body:not(.mobile) .app-shell:not(.auth-mode) .admin-table-card,
body:not(.mobile) .app-shell:not(.auth-mode) .admin-form-card,
body:not(.mobile) .app-shell:not(.auth-mode) .pay-review-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(250,253,255,.86) 100%);
  border-color: rgba(255,255,255,.72);
  backdrop-filter: blur(14px) saturate(128%);
  box-shadow:
    0 14px 30px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.70);
}

body:not(.mobile) .page-admin-dashboard > *,
body:not(.mobile) .page-pay-review > *,
body:not(.mobile) .page-pay-review-detail > *,
body:not(.mobile) .page-orders > *,
body:not(.mobile) .page-users > *,
body:not(.mobile) .page-risk > *,
body:not(.mobile) .page-risk-ip > *,
body:not(.mobile) .page-subscriptions-admin > *,
body:not(.mobile) .page-packages > *,
body:not(.mobile) .page-invite-codes > *,
body:not(.mobile) .page-tickets > *,
body:not(.mobile) .page-nodes-admin > *,
body:not(.mobile) .page-settings > *,
body:not(.mobile) .page-settings-versions > *,
body:not(.mobile) .page-announcements > *,
body:not(.mobile) .page-oplogs > * {
  position: relative;
  z-index: 1;
}

.page-profile .profile-section-head,
.page-tickets .ticket-panel-head,
.page-subscription .sub-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.page-profile .profile-section-head h4,
.page-tickets .ticket-panel-head h4,
.page-subscription .sub-orders-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.page-help {
  grid-template-columns: 1fr;
}
.page-help .help-card {
  display: grid;
  gap: var(--space-3);
}
.page-help .help-card-side {
  justify-items: start;
  text-align: left;
}
.page-help,
.page-help .help-card,
.page-help .help-card h4,
.page-help .help-faq-list,
.page-help .help-faq-item,
.page-help .help-faq-item .k,
.page-help .help-faq-item .v {
  text-align: left;
}
.page-help .help-card-side h4,
.page-help .help-card-side .help-faq-list,
.page-help .help-card-side .help-faq-item,
.page-help .help-card-side .help-faq-item .k,
.page-help .help-card-side .help-faq-item .v {
  text-align: left;
}
.page-help .help-card-side .help-faq-item {
  width: 100%;
  max-width: 520px;
  text-align: left;
}

.page-hero-card {
  position: relative;
  overflow: hidden;
}

.page-hero-copy {
  display: grid;
  gap: 10px;
}

.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(10,132,255,.18);
  background: rgba(255,255,255,.74);
  color: #0A84FF;
  font-size: 12px;
  font-weight: 700;
}

.page-hero-copy h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.025em;
}

body:not(.mobile) .page-home .home-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: var(--card-gap);
}

body:not(.mobile) .page-home .home-hero-card {
  padding: 28px;
  display: grid;
  gap: 22px;
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(10,132,255,.12), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  border-color: rgba(10,132,255,.12);
  box-shadow: 0 20px 42px rgba(15,23,42,.06);
}

body:not(.mobile) .page-home .home-hero-copy {
  max-width: 760px;
}

body:not(.mobile) .page-home .home-kpi-grid {
  grid-template-columns: minmax(280px, 1.25fr) repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

body:not(.mobile) .page-home .home-kpi-grid .card,
body:not(.mobile) .page-home .home-kpi-card {
  min-height: 150px;
}

body:not(.mobile) .page-home .home-kpi-main {
  min-height: 164px;
  padding: 24px;
  box-shadow: 0 18px 36px rgba(10,132,255,.12);
}

body:not(.mobile) .page-home .home-stage-card,
body:not(.mobile) .page-home .home-quick-card {
  height: 100%;
}

body:not(.mobile) .page-home .home-stage-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,251,253,.95) 100%);
}

body:not(.mobile) .page-home .home-stage-card .home-stage-ann,
body:not(.mobile) .page-home .home-quick-card {
  min-height: 100%;
}

body:not(.mobile) .page-home .home-quick-card {
  display: grid;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(247,250,254,.98) 0%, rgba(255,255,255,.96) 100%);
}

body:not(.mobile) .page-home .home-quick-priority {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(.mobile) .page-subscription .sub-hero-card {
  padding: 28px;
  display: grid;
  gap: 20px;
  background:
    radial-gradient(460px 220px at 0% 0%, rgba(10,132,255,.10), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  border-color: rgba(10,132,255,.12);
  box-shadow: 0 18px 38px rgba(15,23,42,.06);
}

body:not(.mobile) .page-subscription .sub-focus-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body:not(.mobile) .page-subscription .sub-focus-main {
  gap: 16px;
}

body:not(.mobile) .page-subscription .sub-entry-col.sub-entry-actions {
  padding: 18px 18px 16px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}

body:not(.mobile) .page-subscription .sub-kpi-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
}

body:not(.mobile) .page-subscription .sub-kpi-grid .sub-info-card,
body:not(.mobile) .page-subscription .sub-kpi-grid .card {
  min-height: 168px;
  padding: 18px 18px 16px;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

body:not(.mobile) .page-subscription .sub-orders-card {
  padding-top: 22px;
}

body:not(.mobile) .page-help .docs-hero-card {
  padding: 28px;
  display: grid;
  gap: 22px;
  background:
    radial-gradient(500px 220px at 0% 0%, rgba(10,132,255,.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  border-color: rgba(10,132,255,.12);
  box-shadow: 0 18px 38px rgba(15,23,42,.06);
}

body:not(.mobile) .page-help .docs-hero-copy {
  max-width: 760px;
}

body:not(.mobile) .page-help .docs-hero-card .help-os-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.mobile) .page-help .help-card-faq,
body:not(.mobile) .page-help .help-card-support {
  padding-top: 22px;
}

body:not(.mobile) .auth-shell {
  min-height: min(820px, calc(100vh - 96px));
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0 18px;
}

body:not(.mobile) .auth-card {
  width: min(520px, 100%);
  padding: 42px 40px;
  box-shadow:
    0 24px 54px rgba(15,23,42,.09),
    0 0 0 1px rgba(255,255,255,.7) inset;
}
.help-faq-list {
  display: grid;
  gap: var(--space-2);
}
.help-faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
.help-faq-item .k {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
}
.help-faq-item .v {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.6;
  margin: 0;
}
.help-link-btn {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  align-self: flex-start;
  margin-left: 8px;
}
.help-download-list {
  display: grid;
  gap: var(--space-2);
}
.help-download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.help-download-row .os {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
}
.help-download-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.help-os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
}
.help-os-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.help-os-card:hover {
  border-color: #cfe0ff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.help-os-card .t {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.help-os-card .d {
  font-size: 12px;
  color: #64748b;
}

.sub-url {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.ops-col { min-width: 280px; }
.ops-group { display: flex; flex-wrap: wrap; gap: 6px; }

.node-card .node-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.node-card .node-name {
  margin: 0 0 4px;
  font-size: 16px;
}

.node-card .node-latency {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #0A84FF;
}

.log-summary-cell {
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-note { font-size: 12px; color: var(--muted); }

.empty {
  border: 1px dashed #D1D5DB;
  border-radius: 12px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  background: #FAFAFC;
}

.ui-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: #fff;
  background: #1F2937;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all .2s ease;
}

.ui-toast.show { opacity: 1; transform: translateY(0); }
.ui-toast.success { background: #166534; }
.ui-toast.error { background: #B42318; }

.ui-modal, .modal-mask {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17,24,39,.42);
}

.ui-modal.hidden { display: none; }

.ui-modal-card, .modal {
  width: 100%;
  max-width: 980px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  box-shadow: var(--shadow-md);
}

.ui-modal-card h4 { margin: 0 0 12px; }

.ui-modal-actions, .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.preview-wrap {
  text-align: center;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.preview-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 8px;
}

.log-detail-pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin: 0;
  max-height: 70vh;
  overflow: auto;
}

.risk-ua-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}
.risk-time-cell,
.risk-code-cell {
  white-space: nowrap;
}

.auth-shell {
  min-height: auto;
  display: grid;
  place-items: center;
}

body:not(.mobile) .auth-shell {
  position: relative;
  min-height: min(840px, calc(100vh - 40px));
  width: 100%;
  display: grid;
  place-items: center;
  padding-top: 0;
  z-index: 1;
}

body:not(.mobile) .auth-shell::after {
  content: none;
}

.auth-card {
  width: clamp(320px, 46vw, 760px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.56);
  background:
    linear-gradient(180deg, rgba(255,255,255,.38) 0%, rgba(243,248,255,.24) 100%);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow:
    0 30px 68px rgba(15,23,42,.16),
    inset 0 1px 0 rgba(255,255,255,.74);
  padding: clamp(28px, 3.4vw, 56px) clamp(22px, 4vw, 68px);
  position: relative;
  z-index: 2;
}

body:not(.mobile) .auth-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(243,248,255,.18) 100%);
  border-color: rgba(255,255,255,.46);
  box-shadow:
    0 16px 34px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.76);
}

body:not(.mobile) .auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 92px;
  border-radius: inherit;
  background: radial-gradient(220px 90px at 0% 0%, rgba(10,132,255,.10), transparent 76%);
  pointer-events: none;
}

.user-auth-card,
.admin-auth-card { background: transparent; }

body:not(.mobile) .user-auth-card {
  width: clamp(420px, 34vw, 560px);
  padding: clamp(32px, 2.7vw, 46px) clamp(28px, 3vw, 50px);
}

body:not(.mobile) .admin-auth-card {
  width: clamp(400px, 32vw, 540px);
  padding: clamp(30px, 2.5vw, 44px) clamp(26px, 2.8vw, 46px);
}

body:not(.mobile) .admin-auth-card {
  box-shadow:
    0 30px 66px rgba(15,23,42,.13),
    0 0 0 1px rgba(10,132,255,.08) inset;
}

.auth-head { margin-bottom: 14px; }

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0A84FF 0%, #59A8FF 100%);
  box-shadow: 0 6px 12px rgba(10,132,255,.25);
}

.auth-brand-name {
  font-size: 13px;
  color: #4B5563;
  font-weight: 500;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0A84FF;
  background: rgba(10,132,255,.12);
  border: 1px solid rgba(10,132,255,.2);
}

.auth-head h3 {
  margin: 0 0 4px;
  font-size: 34px;
  color: #111827;
  font-weight: 600;
  letter-spacing: .2px;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.auth-points { display: none; }

.auth-card .input,
.auth-card .btn,
.auth-card .link {
  height: 52px;
  border-radius: 12px;
}

.auth-card .btn { width: 100%; }

.auth-card .btn {
  background: linear-gradient(180deg, #2A96FF 0%, #0A84FF 100%);
  box-shadow: 0 8px 18px rgba(10,132,255,.28);
}

.auth-card .btn:hover {
  background: linear-gradient(180deg, #1F8DF6 0%, #067AEF 100%);
}

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

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

.auth-secondary-actions > *:only-child {
  grid-column: 1 / -1;
}

.auth-secondary-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.verify-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6B7280;
  font-size: 13px;
  user-select: none;
}

.verify-inline input {
  width: 16px;
  height: 16px;
  accent-color: #0A84FF;
}

.home-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.home-quick a {
  text-decoration: none;
  color: #0A84FF;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.home-quick a:hover { background: #F8FAFC; }

.page-lead {
  max-width: 820px;
}

.page-home .home-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
  margin-bottom: 0;
}

.page-home .home-kpi-grid .card,
.page-home .home-kpi-card {
  min-height: 126px;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 18px;
}

.page-home .home-kpi-main {
  grid-column: span 1;
  min-height: 132px;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(10,132,255,.18), transparent 70%),
    linear-gradient(160deg, rgba(10,132,255,.14) 0%, rgba(10,132,255,.03) 90%),
    #fff;
  border-color: rgba(10,132,255,.32);
  box-shadow: var(--shadow-md);
}

body.mobile .page-home .home-kpi-card,
body.mobile .page-home .home-kpi-main {
  min-height: 76px !important;
  padding: 12px !important;
}
body.mobile .page-home .home-kpi-grid .card .kpi {
  font-size: 22px;
}

.page-home .home-kpi-grid .card .kpi {
  font-size: 34px;
}

.page-home .home-stage-card {
  padding: var(--card-padding);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

body:not(.mobile) .page-home .home-kpi-grid .card,
body:not(.mobile) .page-home .home-quick-card,
body:not(.mobile) .page-home .home-stage-card {
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

body:not(.mobile) .page-home .home-kpi-grid .card:not(.home-kpi-main) {
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.92) 100%);
}

body:not(.mobile) .page-home .home-kpi-main {
  box-shadow: 0 14px 30px rgba(10,132,255,.10);
}

body:not(.mobile) .page-home .home-kpi-card p,
body:not(.mobile) .page-home .home-kpi-card .kpi {
  align-self: end;
}

.page-home .home-stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.page-home .home-stage-head h4 {
  margin: 0;
  font-size: 18px;
}

.page-home .home-stage-grid {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: var(--card-gap);
}

.page-home .home-stage-ann,
.page-home .home-stage-quick {
  background: #F9FAFC;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 14px;
  padding: var(--space-3);
  min-height: 186px;
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

.page-home .home-stage-ann h5,
.page-home .home-stage-quick h5 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #4B5563;
  text-transform: none;
}

.page-home .home-stage-ann #latestAnn {
  display: grid;
  gap: var(--space-2);
  line-height: 1.6;
}

.page-home .home-quick {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.page-home .home-quick a {
  height: 44px;
  display: grid;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  background: #fff;
  transition: all .16s ease;
}

.page-home .home-quick a:hover {
  transform: translateY(-1px);
  border-color: rgba(10,132,255,.28);
  box-shadow: var(--shadow-sm);
}

.page-home .home-page-lead,
.page-subscription .sub-page-lead,
.page-help .docs-page-lead {
  max-width: 760px;
}

.page-home .home-quick-card {
  padding: var(--card-padding);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.page-home .home-quick-card .home-stage-head {
  margin-bottom: var(--space-3);
}

.page-home .home-quick-priority {
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-home .home-stage-card .home-stage-ann {
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

body:not(.mobile) .page-home .home-stage-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,251,253,.96) 100%);
}

body:not(.mobile) .page-home .home-quick-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(247,249,252,.94) 100%);
}

body:not(.mobile) .page-home {
  gap: 18px;
}

body:not(.mobile) .page-home .home-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.mobile) .page-home .home-hero-copy h3 {
  font-size: 26px;
  line-height: 1.14;
}

body:not(.mobile) .page-home .home-kpi-card h4 {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

body:not(.mobile) .page-home .home-kpi-grid .card .kpi {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f172a;
}

body:not(.mobile) .page-home .home-kpi-card p:not(.kpi) {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f172a;
}

body:not(.mobile) .page-home .home-kpi-expire p:not(.kpi) {
  font-size: 22px;
  line-height: 1.18;
}

body:not(.mobile) .page-home .home-kpi-expire-value {
  display: grid;
  gap: 4px;
}

body:not(.mobile) .page-home .home-kpi-expire-date {
  display: block;
}

body:not(.mobile) .page-home .home-kpi-expire-time {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  color: #475569;
}

body:not(.mobile) .page-home .home-kpi-next p:not(.kpi) {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  color: #334155;
}

body:not(.mobile) .page-home .home-stage-card,
body:not(.mobile) .page-home .home-quick-card {
  padding: 24px 26px;
}

body:not(.mobile) .page-home .home-stage-head {
  margin-bottom: 14px;
}

body:not(.mobile) .page-home .home-stage-ann #latestAnn {
  min-height: 220px;
  gap: 10px;
}

body:not(.mobile) .page-home .home-ann-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.38;
  color: #0f172a;
}

body:not(.mobile) .page-home .home-ann-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}

body:not(.mobile) .page-home .home-ann-time {
  margin-top: auto;
}

body:not(.mobile) .page-home .home-ann-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

body:not(.mobile) .page-home .home-ann-counter {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

body:not(.mobile) .page-home .home-ann-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body:not(.mobile) .page-home .home-ann-nav {
  min-width: 72px;
  height: 36px;
  padding: 0 12px;
}

body:not(.mobile) .page-home .home-quick-priority {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(.mobile) .page-home .home-quick a {
  height: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.92) 100%);
}

body:not(.mobile) .page-home .home-quick a:nth-child(-n+2) {
  background: linear-gradient(180deg, rgba(10,132,255,.10) 0%, rgba(255,255,255,.98) 100%);
  border-color: rgba(10,132,255,.18);
  color: #0A84FF;
}

.page-subscription .sub-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
  margin-top: 0;
}

.page-subscription .sub-kpi-grid .card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  box-shadow: none;
}

.page-plans,
.page-pay,
.page-tickets,
.page-profile,
.page-nodes {
  display: grid;
  gap: var(--section-gap);
}

body:not(.mobile) .page-plans .plans-hero-card,
body:not(.mobile) .page-pay .pay-hero-card,
body:not(.mobile) .page-tickets .ticket-hero-card,
body:not(.mobile) .page-profile .profile-hero-card,
body:not(.mobile) .page-nodes .node-hero-card {
  padding: 26px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(420px 200px at 0% 0%, rgba(10,132,255,.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  border-color: rgba(10,132,255,.12);
  box-shadow: 0 16px 32px rgba(15,23,42,.06);
}

body:not(.mobile) .page-plans .plans-list-card,
body:not(.mobile) .page-pay .pay-main-card,
body:not(.mobile) .page-pay .pay-history-card,
body:not(.mobile) .page-tickets .ticket-compose-card,
body:not(.mobile) .page-tickets .ticket-list-card,
body:not(.mobile) .page-profile .profile-summary-card,
body:not(.mobile) .page-profile .profile-form-card,
body:not(.mobile) .page-nodes .node-top-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.95) 100%);
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 12px 26px rgba(15,23,42,.05);
}

body:not(.mobile) .page-plans .plans-list-head,
body:not(.mobile) .page-pay .pay-main-card h4,
body:not(.mobile) .page-pay .pay-history-card h4,
body:not(.mobile) .page-tickets .ticket-compose-card h4,
body:not(.mobile) .page-tickets .ticket-list-card h4,
body:not(.mobile) .page-profile .profile-section-head h4,
body:not(.mobile) .page-nodes .node-top-card h4 {
  margin-bottom: 12px;
}

body:not(.mobile) .page-pay .pay-step {
  margin-bottom: 10px;
}

body:not(.mobile) .page-pay .pay-layout {
  gap: 16px;
}

body:not(.mobile) .page-pay .pay-history-card {
  margin-top: 0;
}

body:not(.mobile) .page-plans .plan-card {
  padding: 18px;
}

body:not(.mobile) .page-plans .plan-card h3 {
  margin-bottom: 8px;
}

body:not(.mobile) .page-plans .plan-card .plan-price {
  margin-bottom: 10px;
}

body:not(.mobile) .page-tickets .ticket-filter-row {
  gap: 10px;
  margin-bottom: 12px;
}

body:not(.mobile) .page-profile .profile-settings-grid {
  gap: 16px;
}

body:not(.mobile) .page-profile .profile-form .input + .input,
body:not(.mobile) .page-profile .profile-form .input + .row,
body:not(.mobile) .page-profile .profile-form .row + .btn {
  margin-top: 8px;
}

body:not(.mobile) .page-nodes .node-top-card {
  padding-bottom: 20px;
}

body:not(.mobile) .page-nodes .node-tools-row {
  gap: 10px;
}

.page-subscription .sub-kpi-grid .card:first-child {
  grid-column: span 1;
  border-color: var(--border);
}

.page-subscription .sub-kpi-highlight {
  min-height: 86px;
  box-shadow: none;
}

.page-subscription .sub-focus-card {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: var(--space-4);
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  margin: 0;
}

.page-subscription .sub-focus-main {
  display: grid;
  gap: 14px;
}

.page-subscription .sub-focus-main h4 {
  margin: 0 0 var(--space-2);
}

.page-subscription .sub-focus-main .desc {
  margin-bottom: var(--space-3);
}

.page-subscription .sub-url-row {
  align-items: stretch;
  gap: var(--space-2);
}

.page-subscription .sub-url-input {
  min-width: 0;
  flex: 1 1 auto;
}

.page-subscription .sub-focus-qr {
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
  background: #F8FAFC;
  border: 1px dashed rgba(15, 23, 42, .12);
  border-radius: 14px;
  padding: var(--space-3);
  align-self: stretch;
}

.page-subscription .sub-focus-qr h5 {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  color: #4B5563;
}

.page-subscription .sub-qr-img {
  max-width: 180px;
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.page-subscription .sub-orders-card {
  margin-top: 0;
}

body:not(.mobile) .page-subscription .sub-focus-card {
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--card-padding);
  border-color: rgba(10,132,255,.12);
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(10,132,255,.08), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
}

body:not(.mobile) .page-subscription .sub-entry-col.sub-entry-actions {
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(249,251,253,.95) 100%);
  border-color: rgba(15,23,42,.07);
}

body:not(.mobile) .page-subscription .sub-tabs {
  margin-bottom: 2px;
}

body:not(.mobile) .page-subscription .sub-panel {
  max-width: 100%;
}

body:not(.mobile) .page-subscription .sub-url-bar .sub-url-input {
  display: block;
}

body:not(.mobile) .page-subscription .sub-orders-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,250,252,.94) 100%);
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

body:not(.mobile) .page-subscription .sub-kpi-grid .sub-info-card,
body:not(.mobile) .page-subscription .sub-kpi-grid .card {
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,250,252,.92) 100%);
  border-color: rgba(15,23,42,.06);
}

.sub-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  margin-bottom: 0;
}
.sub-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s ease;
  height: 28px;
}
.sub-tab.active {
  background: #0A84FF;
  color: #fff;
  border-color: #0A84FF;
  box-shadow: none;
}
.sub-entry-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.sub-panel { display: none; }
.sub-panel.active {
  display: block;
  padding-top: 6px;
  margin-top: 0;
}
.sub-entry-head h4 { margin: 0 0 2px; font-size: 16px; }
.sub-entry-note { margin: 0 0 2px; color: var(--muted); font-size: 13px; }
.sub-entry-eyebrow { font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 6px; }
.sub-entry-hint-line { margin: 0 0 6px; font-size: 13px; color: #6B7280; }
.sub-url-bar { display: grid; gap: var(--space-2); }
.sub-action-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sub-url-input { font-size: 13px; }
.sub-entry-visual,
.sub-entry-hint {
  text-align: left;
}
.sub-entry-visual {
  text-align: left;
  justify-items: start;
}
.sub-entry-visual .sub-entry-eyebrow { display: none; }
.sub-qr-wrap { display: grid; justify-items: start; }
.sub-panel-mobile .sub-qr-wrap { justify-items: center; }
.sub-entry-hint .sub-entry-eyebrow { text-align: left; }
.page-subscription .kpi { font-size: 22px; }

/* unify mobile/desktop panel block style */
.sub-entry-col.sub-entry-actions {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  box-shadow: var(--shadow-sm);
  align-content: start;
  width: 100%;
  max-width: 100%;
}

.sub-status-line {
  margin-top: 0;
  padding-top: 0;
  min-height: 0;
}
.sub-entry-col.sub-entry-visual,
.sub-entry-col.sub-entry-hint {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.sub-entry-col.sub-entry-visual {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}
.sub-panel-mobile .sub-entry-visual {
  display: grid;
  align-content: center;
  justify-items: center;
}

body:not(.mobile) .sub-panel-desktop .sub-entry-visual {
  display: none;
}
body:not(.mobile) .sub-panel-desktop .sub-entry-shell {
  grid-template-columns: 350px;
}
body:not(.mobile) .sub-panel-desktop .sub-entry-col.sub-entry-actions {
  width: 350px;
  max-width: 350px;
}
body.mobile .sub-panel-mobile .sub-entry-shell {
  grid-template-columns: 1fr;
  gap: 8px;
}
body.mobile .sub-panel-mobile .sub-entry-col.sub-entry-actions,
body.mobile .sub-panel-mobile .sub-entry-visual {
  width: 100%;
  max-width: 100%;
}
body.mobile .sub-panel-mobile .sub-entry-visual {
  justify-items: center;
}
body.mobile .sub-panel-mobile .sub-qr-wrap {
  width: 100%;
  justify-items: center;
}
body.mobile .page-subscription .sub-url-bar .sub-url-input {
  display: none;
}
body.mobile .sub-panel-mobile .sub-action-row {
  flex-direction: column;
  align-items: stretch;
}
body.mobile .sub-panel-mobile .sub-action-row .btn {
  width: 100%;
}
body.mobile .page-subscription .sub-qr-img {
  max-width: 180px;
  max-height: 180px;
}

body:not(.mobile) .sub-panel-mobile .sub-entry-shell {
  grid-template-columns: 350px 150px;
  gap: 8px;
}
body:not(.mobile) .sub-panel-mobile .sub-entry-col.sub-entry-actions {
  width: 350px;
  max-width: 350px;
}
body:not(.mobile) .sub-panel-mobile .sub-entry-visual {
  width: 150px;
  max-width: 150px;
  justify-items: center;
}
body:not(.mobile) .sub-panel-mobile .sub-qr-wrap {
  width: 150px;
  justify-items: center;
}
body:not(.mobile) .sub-panel-mobile .sub-qr-img {
  max-width: 150px;
  max-height: 150px;
}
.sub-entry-hint-line {
  margin: 0;
  font-size: 13px;
  color: #6B7280;
  line-height: 1.15;
}
.sub-entry-hint-line + .sub-entry-hint-line { margin-top: 0; }
.sub-entry-note {
  color: #6B7280;
}
.sub-action-row {
  margin-top: 0;
  gap: 8px;
}
.page-subscription .sub-qr-img {
  max-width: 220px;
  width: 100%;
  border-radius: 8px;
  max-height: 220px;
  object-fit: contain;
}

/* Subscription device split (default via JS, tabs visible) */

/* Traffic usage bar */
.sub-traffic-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #EEF2F7;
  overflow: visible;
  margin-top: 8px;
}
.sub-traffic-bar > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0A84FF, #4F9DFF);
}
.sub-traffic-bar.warn > span {
  background: linear-gradient(90deg, #FFB020, #FF8A00);
}
.sub-traffic-bar.danger > span {
  background: linear-gradient(90deg, #FF5A52, #FF3B30);
}
.sub-traffic-bar > em {
  position: absolute;
  right: 0;
  top: -20px;
  font-style: normal;
  font-size: 12px;
  color: #64748b;
}
.sub-traffic-bar.ok > em {
  color: #1D4ED8;
}
.sub-traffic-bar.warn > em {
  color: #B45309;
}
.sub-traffic-bar.danger > em {
  color: #B91C1C;
}

.sub-info-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.sub-info-label {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
}
.sub-info-main {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.sub-info-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6B7280;
}
.sub-info-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
}
.sub-traffic-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sub-traffic-foot-top {
  color: #0A84FF;
  font-weight: 600;
}
.sub-traffic-hero {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.sub-traffic-hero-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
}
.sub-traffic-hero strong {
  font-size: 20px;
}
.sub-traffic-summary {
  font-size: 12px;
  color: #6B7280;
}

.page-subscription .sub-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
}

.page-subscription .sub-kpi-grid .card,
.page-subscription .sub-kpi-grid .sub-info-card {
  min-height: auto;
}

.page-subscription .sub-info-plan .sub-info-meta {
  gap: 10px;
}

.page-subscription .sub-traffic-hero strong {
  font-size: 20px;
}

.page-subscription .sub-traffic-bar {
  margin-top: 6px;
}

/* Docs stack */
.page-help-stack {
  grid-template-columns: 1fr;
}
.help-link-btn {
  height: 36px;
  font-size: 13px;
  border-radius: 10px;
}

body:not(.mobile) .page-help .help-card-entry,
body:not(.mobile) .page-help .help-card-faq,
body:not(.mobile) .page-help .help-card-support {
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

body:not(.mobile) .page-help .help-card-entry .help-os-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.mobile) .page-help .help-card-entry {
  background:
    radial-gradient(360px 140px at 0% 0%, rgba(10,132,255,.06), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(249,251,253,.95) 100%);
}

body:not(.mobile) .page-help .help-card-faq,
body:not(.mobile) .page-help .help-card-support {
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,250,252,.93) 100%);
}

body:not(.mobile) .page-help .help-os-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,250,252,.92) 100%);
  border-color: rgba(15,23,42,.07);
}

body:not(.mobile) .page-help .help-card-support {
  justify-items: start;
  gap: var(--space-2);
}

body:not(.mobile) .page-help .help-card-support .desc {
  margin: 0;
}

body:not(.mobile) .page-help .help-link-btn {
  margin-left: 0;
}

/* Profile layout */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.profile-info-item .k {
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
}
.profile-info-item .v {
  font-size: 14px;
  color: #111827;
  font-weight: 600;
}
.profile-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

/* Ticket detail back */
.ticket-detail-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.page-help .ticket-detail-page-head {
  margin-bottom: 0 !important;
}

.page-help .ticket-detail-page-head + .card {
  margin-top: 0 !important;
}
.page-risk-ip .ticket-detail-page-head {
  margin-bottom: 10px;
}
.ticket-back-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #cfe0ff;
  background: #edf4ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}
.ticket-back-entry:hover {
  border-color: #bcd6ff;
  background: #e0ecff;
  color: #1e40af;
  box-shadow: var(--shadow-sm);
}

.ticket-upload-preview {
  margin-top: 10px;
}
.ticket-upload-preview-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.ticket-upload-preview-image {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}
.ticket-upload-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.ticket-detail-image {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 10px;
}

.page-admin-dashboard .admin-overview-shell {
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.96) 100%);
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 12px 28px rgba(15,23,42,.04);
}

.page-admin-dashboard .admin-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 16px;
}

.page-admin-dashboard .admin-overview-copy h4 {
  margin: 0 0 4px;
  font-size: 18px;
}

.page-admin-dashboard .admin-overview-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.page-admin-dashboard .admin-overview-body {
  display: block;
}

.page-admin-dashboard .admin-overview-focus {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(249,250,252,.98) 0%, rgba(255,255,255,.99) 100%);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.page-admin-dashboard .admin-overview-focus-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}

.page-admin-dashboard .admin-overview-focus strong {
  font-size: 15px;
  line-height: 1.45;
  color: #0f172a;
}

.page-admin-dashboard .admin-dashboard-primary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--card-gap);
}

.page-admin-dashboard .admin-dashboard-secondary-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr .88fr;
  gap: var(--card-gap);
}

.page-admin-dashboard .admin-dashboard-side-stack {
  display: grid;
  gap: var(--card-gap);
  align-content: start;
}

.page-admin-dashboard .admin-dashboard-stage {
  padding-top: 18px;
  background: linear-gradient(180deg, rgba(247,248,250,.97) 0%, rgba(255,255,255,.99) 100%);
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 12px 28px rgba(15,23,42,.04);
}

.page-admin-dashboard .admin-dashboard-links,
.page-admin-dashboard .admin-dashboard-status {
  background: linear-gradient(180deg, rgba(249,250,252,.98) 0%, rgba(255,255,255,.99) 100%);
}

.page-admin-dashboard .admin-dashboard-stage-primary {
  background: linear-gradient(180deg, rgba(247,248,250,.98) 0%, rgba(255,255,255,.99) 100%);
}

.page-admin-dashboard .admin-dashboard-stage-secondary {
  background:
    linear-gradient(180deg, rgba(247,248,250,.98) 0%, rgba(255,255,255,.99) 100%);
}

.page-admin-dashboard .admin-dashboard-workbench-main {
  min-height: 100%;
}

.page-admin-dashboard .admin-stage-head {
  margin-bottom: 18px;
}

.page-admin-dashboard .admin-stats-note {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

.page-admin-dashboard .admin-kpi-extra-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
}

.page-admin-dashboard .admin-kpi-card {
  min-height: 88px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,251,253,.94) 100%);
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
  padding: 16px 16px 14px;
}

.page-admin-dashboard .admin-kpi-card .kpi {
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}

.page-admin-dashboard .admin-kpi-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.page-admin-dashboard .admin-workbench-list {
  display: grid;
  gap: 10px;
}

.page-admin-dashboard .admin-workbench-list-main {
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-admin-dashboard .admin-workbench-item {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(249,250,252,.96) 100%);
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.page-admin-dashboard .admin-workbench-item:hover,
.page-admin-dashboard .admin-quick-link:hover {
  border-color: rgba(10,132,255,.22);
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
  transform: translateY(-1px);
}

.page-admin-dashboard .admin-workbench-item.is-warning {
  background: linear-gradient(180deg, rgba(255,159,10,.08) 0%, rgba(255,255,255,.99) 100%);
}

.page-admin-dashboard .admin-workbench-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.page-admin-dashboard .admin-workbench-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.page-admin-dashboard .admin-workbench-main strong {
  font-size: 24px;
  line-height: 1;
  color: #0f172a;
}

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

.page-admin-dashboard .admin-quick-link {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(249,250,252,.96) 100%);
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.page-admin-dashboard .admin-quick-link strong {
  font-size: 14px;
  color: #0f172a;
}

.page-admin-dashboard .admin-quick-link span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.page-admin-dashboard .admin-system-status {
  display: grid;
  gap: 8px;
  align-content: start;
}

.page-admin-dashboard .admin-system-item {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,23,42,.06);
}

.page-admin-dashboard .admin-system-item .label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.page-admin-dashboard .admin-system-item strong {
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
}

.page-admin-dashboard .admin-orders-card {
  padding-top: var(--card-padding);
  box-shadow: var(--shadow-md);
  margin-top: 0;
}

.page-admin-dashboard .admin-dash-filter-row {
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
  align-items: end;
}

.page-admin-dashboard .admin-dash-filter-row .input {
  min-width: 180px;
  flex: 1 1 200px;
}

.page-admin-dashboard #dashSize.input {
  min-width: 100px;
  max-width: 120px;
  flex: 0 0 110px;
}

.page-users .users-toolbar-card {
  background:
    linear-gradient(180deg, rgba(10,132,255,.06) 0%, rgba(10,132,255,.01) 100%),
    #fff;
  border-color: rgba(15,23,42,.08);
}

.page-users .users-toolbar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.page-users .users-toolbar-head h4 {
  margin: 0;
  font-size: 18px;
}

.page-users .users-filter-row {
  gap: var(--space-2);
  align-items: end;
}

.page-users .users-filter-row .input {
  min-width: 160px;
  flex: 1 1 180px;
}

.page-users #userSize.input {
  min-width: 96px;
  max-width: 110px;
  flex: 0 0 100px;
}

.page-users .users-table-card {
  margin-top: 0;
  box-shadow: var(--shadow-md);
}

.page-admin-stack {
  gap: 14px;
}

.admin-toolbar-card,
.admin-form-card,
.page-settings .settings-card {
  background:
    linear-gradient(180deg, rgba(247,248,250,.96) 0%, rgba(255,255,255,.99) 100%);
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 12px 28px rgba(15,23,42,.04);
}

.admin-table-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(250,251,253,.98) 100%);
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 14px 30px rgba(15,23,42,.045);
}

/* Admin common spacing */
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.admin-card-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.admin-toolbar-card .admin-card-head,
.admin-table-card .admin-card-head,
.admin-form-card .admin-card-head,
.page-settings .settings-card .admin-card-head {
  margin-bottom: 14px;
}

.admin-toolbar-card .admin-card-head,
.admin-table-card .admin-card-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15,23,42,.05);
}

.admin-toolbar-card .admin-filter-row,
.admin-toolbar-card .users-filter-row,
.admin-toolbar-card .ticket-filter-row {
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(244,246,248,.96) 0%, rgba(255,255,255,.99) 100%);
  border: 1px solid rgba(15,23,42,.05);
}

.admin-table-card .table-wrap {
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px;
  background: #fff;
}

.admin-table-card .table-wrap + .desc[id$="Pager"],
.admin-table-card > .desc[id$="Pager"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.05);
  color: #64748b;
}

.admin-table-card .admin-card-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.05);
}

.page-pay-review .pay-review-filter-card,
.page-risk .risk-leaderboard-card,
.page-risk .risk-record-card,
.page-risk .risk-rule-card,
.page-risk-ip .risk-ip-profile-card,
.page-risk-ip .risk-ip-top-card,
.page-risk-ip .risk-ip-detail-card {
  background:
    linear-gradient(180deg, rgba(247,248,250,.95) 0%, rgba(255,255,255,.98) 100%);
  border-color: var(--admin-panel-border);
  box-shadow: 0 10px 26px rgba(15,23,42,.04);
}

.page-risk .risk-overview-card,
.page-pay-review .pay-review-overview-card {
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(10,132,255,.06), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.95) 100%);
  border-color: rgba(10,132,255,.12);
  box-shadow: 0 16px 34px rgba(15,23,42,.05);
}

.page-risk .risk-overview-head,
.page-pay-review .pay-review-overview-card .admin-card-head {
  margin-bottom: 18px;
}

.risk-overview-meta,
.pay-review-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-pay-review .pay-review-table-card,
.page-risk .risk-record-card .table-wrap,
.page-risk .risk-rule-card .table-wrap,
.page-risk-ip .risk-ip-detail-card .table-wrap {
  background: #fff;
  border-radius: 14px;
}

.page-pay-review .pay-review-filter-card {
  background:
    linear-gradient(180deg, rgba(10,132,255,.05) 0%, rgba(255,255,255,.98) 100%);
}

.page-pay-review .pay-review-table-card {
  border-color: rgba(15,23,42,.06);
  box-shadow: var(--admin-panel-shadow);
}

.page-pay-review .admin-filter-row {
  padding: 14px;
  border-radius: 14px;
  background: var(--admin-surface);
  border: 1px solid rgba(15,23,42,.05);
}

.page-pay-review .pay-review-filter-row {
  background:
    linear-gradient(180deg, rgba(244,246,248,.96) 0%, rgba(255,255,255,.98) 100%);
}
.admin-inline-actions,
.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.admin-filter-row .input {
  min-width: 160px;
  flex: 1 1 180px;
}

/* Risk controls */
.risk-toolbar {
  display: grid;
  gap: var(--space-2);
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(247,248,250,.98) 0%, rgba(243,245,247,.92) 100%);
  border: 1px solid rgba(15,23,42,.05);
}
.page-risk .risk-toolbar {
  gap: 8px;
}
.page-risk .input,
.page-risk-ip .input {
  height: 34px;
  font-size: 13px;
}
.page-risk .btn,
.page-risk-ip .btn {
  height: 34px;
  font-size: 13px;
}
.risk-filter-row,
.risk-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.risk-filter-row .input {
  min-width: 160px;
  flex: 1 1 180px;
}
.risk-actions-row {
  justify-content: space-between;
  gap: var(--space-2);
}
.risk-actions-left,
.risk-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.risk-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.risk-actions-batch .btn {
  font-size: 12px;
}
.risk-actions-batch .btn.btn-danger {
  font-weight: 600;
}
.risk-actions-row + .table-wrap {
  margin-top: var(--space-4);
}
.page-risk .risk-actions-row + .table-wrap {
  margin-top: 8px;
}
.page-risk .risk-toolbar + .table-wrap {
  margin-top: 8px;
}
.page-risk-ip .risk-toolbar + .table-wrap {
  margin-top: var(--space-3);
}
.page-risk-ip .ticket-detail-page-head + .card {
  margin-top: 0;
}
.page-risk-ip .ticket-detail-page-head + .risk-time-bar {
  margin-top: 0;
}
.page-risk-ip { margin-top: 0; }
.page-risk-ip { margin-top: 0; }
.page-risk-ip .risk-ip-detail-card { transform: none; }
.page-risk-ip.page-admin-stack { gap: 10px; }
.risk-time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 12px 14px;
  border: 1px solid var(--admin-panel-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(247,248,250,.95) 0%, rgba(255,255,255,.98) 100%);
  box-shadow: 0 8px 20px rgba(15,23,42,.03);
}
.risk-time-label {
  font-weight: 600;
  color: #0f172a;
}
.risk-time-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  margin-left: auto;
}
.risk-time-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.risk-time-note {
  color: #9ca3af;
  font-size: 12px;
}
.risk-time-advanced {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.risk-time-advanced .input {
  min-width: 160px;
  flex: 0 0 220px;
}
.page-risk .risk-filter-row { margin-bottom: 4px; }
.page-risk .risk-actions-row { margin-top: 0; }
.risk-rule-manual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.risk-rule-manual + .table-wrap {
  margin-top: var(--space-3);
}
.risk-rule-manual .input {
  min-width: 180px;
  flex: 1 1 220px;
}
.risk-rule-card {
  background:
    linear-gradient(180deg, rgba(247,248,250,.96) 0%, rgba(255,255,255,.99) 100%);
}
.risk-rule-card .table {
  background: #fff;
}
.risk-rule-toolbar {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.risk-rule-toolbar + .table-wrap {
  margin-top: 8px;
}
.risk-rule-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.risk-rule-group .input {
  min-width: 160px;
  flex: 1 1 180px;
}
.risk-rule-group-add .input {
  min-width: 180px;
  flex: 1 1 220px;
}
.risk-rule-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.risk-rule-filters .input {
  min-width: 160px;
  flex: 1 1 200px;
}
.risk-rule-card .ops-group .btn {
  font-size: 12px;
}
.page-risk .ops-group .btn.btn-danger {
  font-weight: 600;
}
.risk-leaderboard-card {
  background:
    linear-gradient(180deg, rgba(247,248,250,.96) 0%, rgba(255,255,255,.99) 100%);
}

.page-risk .risk-record-card {
  border-color: rgba(15,23,42,.07);
  box-shadow: 0 16px 32px rgba(15,23,42,.05);
}

.page-risk .risk-rule-card,
.page-pay-review .pay-review-filter-card,
.page-orders .admin-toolbar-card,
.page-orders .admin-table-card,
.page-users .users-toolbar-card,
.page-users .users-table-card,
.page-subscriptions-admin .admin-toolbar-card,
.page-subscriptions-admin .admin-table-card,
.page-tickets .admin-toolbar-card,
.page-tickets .admin-table-card,
.page-nodes-admin .admin-form-card,
.page-nodes-admin .admin-table-card,
.page-settings .settings-card,
.page-settings-versions .admin-toolbar-card,
.page-settings-versions .admin-table-card,
.page-announcements .admin-form-card,
.page-announcements .admin-toolbar-card,
.page-announcements .admin-table-card,
.page-oplogs .admin-toolbar-card,
.page-oplogs .admin-table-card {
  border-color: rgba(15,23,42,.06);
}

.page-risk .risk-section-copy p,
.page-pay-review .admin-card-head p {
  max-width: 42ch;
}

.page-orders .admin-card-head p,
.page-users .admin-card-head p,
.page-subscriptions-admin .admin-card-head p,
.page-tickets .admin-card-head p,
.page-announcements .admin-card-head p,
.page-settings-versions .admin-card-head p,
.page-oplogs .admin-card-head p {
  max-width: 38ch;
}
.risk-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.risk-board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.risk-board-tabs .btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.risk-board-tabs .btn.is-active {
  color: #0f172a;
  border-color: #0f172a;
  background: #f8fafc;
}
.risk-section-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.risk-section-actions .btn {
  white-space: nowrap;
}
.risk-section-actions .input-lite {
  height: 34px;
  font-size: 12px;
  padding: 0 10px;
}
.risk-leaderboard-panel {
  margin-top: var(--space-2);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: var(--space-3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.page-risk .table-wrap,
.page-pay-review .table-wrap,
.page-risk-ip .table-wrap,
.page-orders .table-wrap,
.page-users .table-wrap,
.page-subscriptions-admin .table-wrap,
.page-tickets .table-wrap,
.page-nodes-admin .table-wrap,
.page-settings-versions .table-wrap,
.page-announcements .table-wrap,
.page-oplogs .table-wrap {
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.risk-board-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.risk-board-unit {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}
.risk-bar-list {
  display: grid;
  gap: 10px;
}
.risk-bar-row {
  display: grid;
  grid-template-columns: 50px 1fr 2fr 80px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.risk-bar-row .rank {
  color: #64748b;
  font-weight: 600;
}
.risk-bar-row .ip {
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.risk-bar-row .bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.risk-bar-row .bar span {
  display: block;
  height: 100%;
  background: #0ea5e9;
  border-radius: 999px;
}
.risk-bar-row.is-top .bar span {
  background: #ef4444;
}
.risk-bar-row .value {
  text-align: right;
  font-weight: 600;
  color: #0f172a;
}
.risk-empty {
  color: #9ca3af;
  font-size: 12px;
}
.risk-detail-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.risk-ip-profile-card {
  margin-top: 0;
}
.risk-ip-top-card {
  background:
    linear-gradient(180deg, rgba(247,248,250,.96) 0%, rgba(255,255,255,.99) 100%);
}
.risk-profile-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: var(--space-3);
}
.risk-profile-card {
  padding: var(--space-3);
  border: 1px solid rgba(15,23,42,.05);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(242,244,247,.78) 0%, rgba(255,255,255,.98) 100%);
}
.risk-profile-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px 0;
}
.risk-profile-metrics {
  display: grid;
  gap: 6px;
}
.risk-profile-metrics .label {
  color: #6b7280;
  font-size: 12px;
}
.risk-profile-metrics .value {
  font-weight: 600;
  color: #0f172a;
  margin-left: 6px;
}
.risk-profile-codes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
  font-size: 12px;
  color: #6b7280;
}
.risk-code-chip {
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  gap: 2px;
}
.risk-code-chip strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}
.risk-code-chip.ok { background: rgba(34,197,94,.12); color: #166534; }
.risk-code-chip.warn { background: rgba(245,158,11,.14); color: #92400E; }
.risk-code-chip.bad { background: rgba(239,68,68,.14); color: #991B1B; }
.risk-profile-kpi {
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
}
.risk-profile-card h5 {
  margin: 0 0 6px 0;
  font-size: 14px;
}
.risk-profile-card p {
  margin: 4px 0;
}
.risk-profile-lists {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.risk-profile-block h5 {
  margin: 0 0 var(--space-2) 0;
  font-size: 14px;
}
.risk-profile-list {
  display: grid;
  gap: 6px;
}
.risk-profile-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.risk-profile-row .num {
  font-weight: 600;
}
.risk-item-main {
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.risk-item-meta {
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
}
.risk-item-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.risk-item-bar span {
  display: block;
  height: 100%;
  background: #60a5fa;
  border-radius: 999px;
}
.risk-item-main.is-risk {
  color: #b91c1c;
  font-weight: 600;
}
.risk-item-bar.is-risk span {
  background: #ef4444;
}
.subtle {
  color: #9ca3af;
}

@media (max-width: 1180px) {
  .page-risk .risk-console-grid,
  .page-pay-review .pay-review-console-grid {
    grid-template-columns: 1fr;
  }
  .page-admin-dashboard .admin-dashboard-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-admin-dashboard .admin-dashboard-status {
    grid-column: span 2;
  }
  .page-admin-dashboard .admin-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.page-risk .table th {
  background: #f8fafc;
  font-weight: 600;
}
.page-risk .table tbody tr:hover,
.page-risk-ip .table tbody tr:hover {
  background: #f8fafc;
}
.page-risk .table td,
.page-risk-ip .table td {
  padding: 12px 10px;
}
.page-risk .table th,
.page-risk-ip .table th {
  padding: 12px 10px;
}
.page-risk .table .risk-count {
  font-weight: 600;
  color: #0f172a;
}
.risk-code-ok { color: #16a34a; font-weight: 600; }
.risk-code-warn { color: #d97706; font-weight: 600; }
.risk-code-bad { color: #dc2626; font-weight: 600; }
.risk-code-neutral { color: #64748b; }
.page-risk .table th:first-child,
.page-risk .table td:first-child {
  width: 34px;
}
.risk-section-head { margin-bottom: var(--space-2); }
.risk-detail-cards {
  display: grid;
  gap: var(--space-2);
}

.risk-stat-card {
  padding: 16px 18px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(247,248,250,.96) 0%, rgba(255,255,255,1) 100%);
  border-color: rgba(15,23,42,.05);
  box-shadow: 0 8px 20px rgba(15,23,42,.03);
}
.risk-stat-card .label {
  margin: 0 0 6px 0;
  color: #6b7280;
  font-size: 12px;
}
.risk-stat-card .kpi {
  font-size: 28px;
  font-weight: 600;
  color: #0f172a;
}

.page-pay-review .ticket-detail-page-head,
.page-risk-ip .ticket-detail-page-head {
  padding: 2px 0 0;
}

.pay-review-ticket-card {
  border-color: rgba(15,23,42,.06);
  box-shadow: 0 10px 26px rgba(15,23,42,.04);
  background:
    linear-gradient(180deg, rgba(247,248,250,.96) 0%, rgba(255,255,255,.99) 100%);
}

.page-pay-review-detail .ticket-detail-page-head {
  margin-bottom: 4px;
}

.page-pay-review-detail .ticket-detail-card,
.page-pay-review-detail .ticket-action-card {
  margin-top: 0;
}

.plan-card {
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0A84FF 0%, #5AA8FF 100%);
}

.plan-price {
  font-size: 30px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 8px;
}

.plan-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  color: #4B5563;
  font-size: 13px;
}

.pay-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--card-gap);
}

.pay-step {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #374151;
  font-size: 13px;
  margin-bottom: 6px;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: #0A84FF;
}

.pay-qr-box {
  text-align: center;
  background: #fff;
}

.pay-qr-box img {
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.pay-order-brief {
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #374151;
  font-size: 13px;
}

.list { display: grid; gap: var(--space-3); }
.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

/* Ticket detail + reply (PC base) */
.ticket-detail-card,
.ticket-action-card {
  margin-top: 12px;
}
.ticket-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.ticket-panel-head h4 {
  margin-bottom: 0;
}
.ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.detail-kv-item {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}
.ticket-summary-item .k {
  color: #6B7280;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ticket-summary-item .v {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}
.detail-kv-full {
  grid-column: 1 / -1;
}

.ticket-reply-section .k {
  display: block;
  min-width: 0;
  margin-right: 0;
  margin-bottom: 10px;
}
.ticket-reply-list {
  display: grid;
  gap: 10px;
}
.ticket-reply-item {
  border: 1px solid rgba(15, 23, 42, .08);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.ticket-reply-item.reply-admin {
  border-left-color: rgba(10, 132, 255, .65);
  background: linear-gradient(180deg, rgba(10,132,255,.06) 0%, #fff 100%);
}
.ticket-reply-item.reply-user {
  border-left-color: rgba(15, 23, 42, .35);
  background: #fff;
}
.ticket-reply-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.ticket-reply-role {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
}
.reply-admin .ticket-reply-role {
  color: #0b5cad;
  background: rgba(10, 132, 255, .14);
}
.ticket-reply-time {
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
}
.ticket-reply-content {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}
.ticket-reply-image-wrap {
  display: block;
  margin-top: 10px;
  padding: 0;
  width: 100%;
  max-width: 280px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  cursor: pointer;
}
.ticket-reply-image-wrap:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}
.ticket-reply-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  background: #f8fafc;
}
.ticket-reply-image-missing {
  display: none;
  width: 100%;
  min-height: 90px;
  padding: 12px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
  background: #f8fafc;
}
.ticket-reply-image-wrap.is-missing .ticket-reply-image {
  display: none;
}
.ticket-reply-image-wrap.is-missing .ticket-reply-image-missing {
  display: block;
}
.ticket-reply-empty {
  border: 1px dashed rgba(15, 23, 42, .16);
  border-radius: 10px;
  padding: 14px;
  color: #6b7280;
  font-size: 13px;
  text-align: left;
  background: #fafafa;
}
.ticket-action-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed rgba(15, 23, 42, .14);
  border-radius: 12px;
  background: #fbfcff;
}
.ticket-reply-composer textarea.input,
.ticket-action-panel textarea.input {
  min-height: 86px;
}
.ticket-reply-actions .btn {
  width: auto;
  min-width: 96px;
}
.ticket-reply-actions .btn,
.ticket-reply-actions .btn.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  line-height: 1;
}

@media (max-width: 980px) {
  :root{
    --content-pad-x:16px;
    --content-pad-y:16px;
    --section-gap:16px;
    --card-gap:12px;
    --card-padding:16px;
  }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px;
  }
  .menu { display: flex; gap: 8px; overflow-x: auto; }
  .menu a { margin-bottom: 0; min-width: max-content; }
  .content { padding: var(--space-3); }
  .title { font-size: 24px; }
  .pay-layout { grid-template-columns: 1fr; }
  .page-home .home-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-home .home-stage-grid {
    grid-template-columns: 1fr;
  }
  .page-home .home-stage-ann,
  .page-home .home-stage-quick {
    min-height: 0;
  }
  .page-home .home-secondary-grid {
    grid-template-columns: 1fr;
  }
  .page-subscription .sub-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-subscription .sub-kpi-grid .card:first-child {
    grid-column: span 1;
  }
  .page-subscription .sub-focus-card {
    grid-template-columns: 1fr;
  }
  .page-help {
    grid-template-columns: 1fr;
  }
  .page-help .docs-hero-card .help-os-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sub-entry-shell {
    grid-template-columns: 1fr;
    gap: var(--card-gap);
  }
  .profile-info-grid {
    grid-template-columns: 1fr;
  }
  .page-admin-dashboard .admin-kpi-core-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--card-gap);
  }
  .page-admin-dashboard .admin-kpi-extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--card-gap);
  }
  .page-users .users-filter-row .input {
    flex: 1 1 220px;
  }
}

@media (max-width: 768px) {
  :root{
    --content-pad-x:14px;
    --content-pad-y:14px;
    --section-gap:14px;
    --card-gap:10px;
    --card-padding:14px;
  }
  body.mobile .app-shell {
    background:
      radial-gradient(460px 220px at 12% -4%, rgba(10,132,255,.10), transparent 64%),
      radial-gradient(340px 180px at 90% 0%, rgba(56,189,248,.06), transparent 66%),
      linear-gradient(180deg, rgba(244,248,253,.44) 0%, rgba(234,242,251,.46) 100%),
      var(--app-bg-image-mobile);
    background-size: auto, auto, auto, cover;
    background-position: center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  }
  body.mobile .app-shell:not(.auth-mode) {
    zoom: .9;
    min-height: calc(100dvh / .9);
  }
  body.mobile .app-shell:not(.auth-mode) .layout {
    min-height: calc((100dvh - max(var(--mobile-topbar-offset, 68px), 64px)) / .9);
  }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .layout { grid-template-columns: 1fr; }
  .nav-mask {
    background: rgba(15, 23, 42, .22);
    backdrop-filter: blur(8px);
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(286px, calc(100vw - 56px));
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 19;
    background:
      linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(246,248,251,.98) 100%);
    border-right: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 24px 48px rgba(15,23,42,.14);
    padding: calc(var(--mobile-topbar-offset, 68px) + 8px) 12px 18px;
    overflow-y: auto;
  }
  .sidebar::before {
    content: "";
    position: absolute;
    inset: 10px 10px 12px;
    border-radius: 22px;
    background:
      radial-gradient(200px 120px at 0% 0%, rgba(10,132,255,.08), transparent 70%),
      linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(247,249,252,.98) 100%);
    border: 1px solid rgba(15,23,42,.05);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.72),
      0 12px 28px rgba(15,23,42,.05);
    z-index: 0;
  }
  .menu {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    padding: 10px 8px 0;
    overflow: visible;
    white-space: normal;
  }
  .menu::before {
    content: attr(data-nav-label);
    padding: 0 10px 6px;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94A3B8;
    font-weight: 700;
  }
  .menu a {
    margin-bottom: 0;
    min-width: auto;
    min-height: 46px;
    display: grid;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.52);
  }
  .menu a.active {
    background:
      linear-gradient(180deg, rgba(10,132,255,.14) 0%, rgba(10,132,255,.10) 100%);
    border-color: rgba(10,132,255,.18);
    box-shadow:
      0 10px 20px rgba(10,132,255,.10),
      inset 0 1px 0 rgba(255,255,255,.65);
  }
  .menu .danger-link {
    margin-top: 8px;
    background: rgba(255,59,48,.08);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-mask { display: block; }
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom-color: rgba(15,23,42,.05);
    background: rgba(255,255,255,.68);
    backdrop-filter: blur(16px) saturate(135%);
    box-shadow:
      0 12px 28px rgba(15,23,42,.09),
      inset 0 1px 0 rgba(255,255,255,.72);
  }
  .topbar-right {
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 8px;
  }
  #topLocaleBtn,
  #topLogoutBtn {
    min-width: 48px;
    height: 36px;
    padding: 0 10px;
    line-height: 36px;
  }
  .brand {
    font-size: 16px;
    letter-spacing: -.01em;
  }
  .user-chip {
    max-width: 124px;
    padding: 6px 10px;
    background: rgba(255,255,255,.76);
    border-color: rgba(15,23,42,.06);
  }
  .row .btn, .row .link, .row .input { width: 100%; min-width: 100%; }
  .topbar-title { display: none; }
  .page-head {
    margin-bottom: 0;
    padding: 0;
  }
  .page-intro {
    display: none !important;
  }
  .content {
    padding: var(--space-3);
    background:
      radial-gradient(560px 240px at 12% 0%, rgba(10,132,255,.06), transparent 64%),
      radial-gradient(360px 180px at 90% 4%, rgba(56,189,248,.04), transparent 68%),
      linear-gradient(180deg, rgba(247,250,255,.60) 0%, rgba(238,245,253,.50) 100%);
  }
  .title {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 0;
  }
  .container > * + * {
    margin-top: var(--space-3);
  }
  .page-home,
  .page-subscription,
  .page-help,
  .page-plans,
  .page-pay,
  .page-tickets,
  .page-profile,
  .page-nodes {
    position: relative;
    padding: 12px 12px 4px;
    border-radius: 22px;
    background:
      radial-gradient(260px 140px at 0% 0%, rgba(10,132,255,.06), transparent 74%),
      linear-gradient(180deg, rgba(255,255,255,.58) 0%, rgba(247,251,255,.40) 100%);
    border: 1px solid rgba(255,255,255,.54);
    backdrop-filter: blur(8px) saturate(118%);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.52),
      0 8px 18px rgba(15,23,42,.05);
  }
  .page-home::before,
  .page-subscription::before,
  .page-help::before,
  .page-plans::before,
  .page-pay::before,
  .page-tickets::before,
  .page-profile::before,
  .page-nodes::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 124px;
    border-radius: inherit;
    background:
      radial-gradient(260px 140px at 0% 0%, rgba(10,132,255,.06), transparent 72%),
      linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
  }
  .page-home > *,
  .page-subscription > *,
  .page-help > *,
  .page-plans > *,
  .page-pay > *,
  .page-tickets > *,
  .page-profile > *,
  .page-nodes > * {
    position: relative;
    z-index: 1;
  }
  .page-lead {
    max-width: none;
    padding: 0 2px;
    font-size: 13px;
    line-height: 1.6;
  }
  .page-hero-copy h3 {
    font-size: 26px;
    line-height: 1.16;
    letter-spacing: -.03em;
  }
  .page-hero-card {
    padding: 18px 16px;
    border-radius: 18px;
    border-color: rgba(10,132,255,.10);
    background:
      radial-gradient(240px 120px at 0% 0%, rgba(10,132,255,.06), transparent 74%),
      linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(248,250,252,.74) 100%);
    box-shadow:
      0 14px 32px rgba(15,23,42,.06),
      inset 0 1px 0 rgba(255,255,255,.7);
  }
  .page-hero-copy {
    gap: 8px;
  }
  .page-hero-eyebrow {
    height: 24px;
    padding: 0 9px;
    background: rgba(255,255,255,.88);
    border-color: rgba(10,132,255,.16);
  }
  .grid {
    gap: var(--space-3);
  }
  .card {
    padding: var(--space-3);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.80) 0%, rgba(249,252,255,.60) 100%);
    border-color: rgba(255,255,255,.52);
    backdrop-filter: blur(7px) saturate(112%);
    box-shadow:
      0 8px 16px rgba(15,23,42,.06),
      inset 0 1px 0 rgba(255,255,255,.62);
  }
  .card-header {
    margin-bottom: var(--space-2);
  }
  .toolbar {
    gap: var(--space-2);
    margin-bottom: var(--space-2);
  }
  .app-shell.auth-mode .container,
  html.auth-route .app-shell .container {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding:
      max(env(safe-area-inset-top), 12px)
      0
      max(env(safe-area-inset-bottom), 16px);
    background:
      radial-gradient(460px 220px at 14% 0%, rgba(10,132,255,.10), transparent 62%),
      radial-gradient(320px 180px at 88% 10%, rgba(56,189,248,.06), transparent 64%),
      linear-gradient(180deg, rgba(247,249,252,.42) 0%, rgba(241,244,248,.48) 100%),
      var(--app-bg-image-mobile);
    background-size: auto, auto, auto, cover;
    background-position: center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  }
  .auth-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: calc(100dvh - max(env(safe-area-inset-top), 12px) - max(env(safe-area-inset-bottom), 16px));
    display: grid;
    place-items: center;
    padding: 0 !important;
  }
  .auth-shell::before { content: none; }
  .auth-card {
    width: min(420px, calc(100vw - 28px)) !important;
    max-width: min(420px, calc(100vw - 28px)) !important;
    min-width: min(420px, calc(100vw - 28px)) !important;
    margin: 0 auto;
    border-radius: 20px;
    padding: 24px 18px 18px;
    border-color: rgba(255,255,255,.52);
    background:
      radial-gradient(180px 92px at 0% 0%, rgba(10,132,255,.16), transparent 72%),
      linear-gradient(180deg, rgba(255,255,255,.44) 0%, rgba(242,248,255,.28) 100%);
    backdrop-filter: blur(18px) saturate(138%);
    -webkit-backdrop-filter: blur(18px) saturate(138%);
    box-shadow:
      0 6px 12px rgba(15,23,42,.10),
      inset 0 1px 0 rgba(255,255,255,.72);
    position: relative;
    z-index: 1;
  }
  .user-auth-card,
  .admin-auth-card {
    width: min(420px, calc(100vw - 28px)) !important;
    max-width: min(420px, calc(100vw - 28px)) !important;
    min-width: min(420px, calc(100vw - 28px)) !important;
  }
  .auth-head {
    margin-bottom: 16px;
  }
  .auth-head h3 {
    font-size: 24px;
    line-height: 1.14;
  }
  .auth-head p {
    font-size: 13px;
    line-height: 1.55;
  }
  .auth-brand {
    margin-bottom: 12px;
  }
  .auth-card .input,
  .auth-card .btn,
  .auth-card .link {
    height: 48px;
  }
  .auth-form {
    gap: 10px;
  }
  .auth-form .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .auth-form .row .input,
  .auth-form .row .btn,
  .auth-form .row .link {
    min-width: 0;
    width: 100%;
  }
  .auth-secondary-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .page-home .home-kpi-grid,
  .page-subscription .sub-kpi-grid,
  .page-admin-dashboard .admin-kpi-core-grid,
  .page-admin-dashboard .admin-kpi-extra-grid {
    grid-template-columns: 1fr;
  }
  .page-admin-dashboard .admin-workbench-list-main,
  .page-admin-dashboard .admin-dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
  .page-admin-dashboard .admin-dashboard-status {
    grid-column: auto;
  }
  .page-admin-dashboard .admin-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-home .home-hero-card,
  .page-subscription .sub-hero-card,
  .page-help .docs-hero-card,
  .page-plans .plans-hero-card,
  .page-pay .pay-hero-card,
  .page-tickets .ticket-hero-card,
  .page-profile .profile-hero-card,
  .page-nodes .node-hero-card {
    gap: 16px;
  }
  .page-home .home-secondary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .page-home .home-kpi-main,
  .page-subscription .sub-kpi-grid .card:first-child {
    grid-column: span 1;
  }
  .page-home .home-kpi-grid .card,
  .page-home .home-kpi-card,
  .page-home .home-kpi-main {
    min-height: 76px !important;
    padding: 12px !important;
  }
  .page-home .home-kpi-main {
    min-height: 0 !important;
    gap: 4px;
    padding: 8px 12px !important;
  }
  .page-home .home-kpi-main h4 {
    margin-bottom: 4px;
  }
  .page-home .home-kpi-status-value {
    font-size: 18px;
    line-height: 1.16;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
  }
  .page-home .home-hero-card .eyebrow {
    color: #1d4ed8;
    border-color: rgba(10,132,255,.18);
    background: rgba(255,255,255,.82);
    box-shadow: 0 4px 12px rgba(10,132,255,.08);
  }
  .page-home .home-hero-card h1 {
    color: #0f172a;
    letter-spacing: -0.02em;
  }
  .page-home .home-hero-card .muted,
  .page-home .home-page-lead,
  .page-home .home-stage-card .muted {
    color: #64748b;
  }
  .page-home .home-kpi-card h4,
  .page-home .home-kpi-main h4 {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
    color: #334155;
  }
  .page-home .home-kpi-card p:not(.kpi),
  .page-home .home-kpi-main p:not(.kpi) {
    margin: 0;
    color: #0f172a;
    line-height: 1.28;
    font-weight: 700;
  }
  .page-home .home-kpi-grid .card .kpi {
    font-size: 22px;
    color: #0f172a;
  }
  .page-home .home-kpi-expire-value {
    display: grid;
    gap: 2px;
    align-content: start;
  }
  .page-home .home-kpi-expire-date,
  .page-home .home-kpi-expire-time {
    display: block;
    word-break: normal;
  }
  .page-home .home-kpi-expire-date {
    color: #0f172a;
    font-size: 18px;
    line-height: 1.22;
    letter-spacing: -0.02em;
  }
  .page-home .home-kpi-expire-time {
    color: #64748b;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
  }
  .page-home .home-kpi-next p:not(.kpi) {
    color: #334155;
    font-size: 17px;
    line-height: 1.36;
  }
  .page-home .home-quick {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .page-home .home-quick-card {
    order: 3;
    border-color: rgba(10,132,255,.10);
    background:
      radial-gradient(220px 120px at 0% 0%, rgba(10,132,255,.07), transparent 74%),
      linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(248,250,252,.95) 100%);
    box-shadow: 0 14px 28px rgba(15,23,42,.06);
  }
  .page-home .home-stage-card {
    order: 2;
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(248,250,252,.93) 100%);
    box-shadow: 0 12px 24px rgba(15,23,42,.045);
  }
  .page-home .home-stage-head {
    margin-bottom: 10px;
  }
  .page-home .home-stage-ann {
    min-height: 0;
    padding: 12px 13px;
    border-radius: 12px;
  }
  .page-home .home-quick a {
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(247,250,252,.92) 100%);
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 8px 18px rgba(15,23,42,.045);
  }
  .page-plans .plans-list-card,
  .page-pay .pay-main-card,
  .page-pay .pay-history-card,
  .page-tickets .ticket-compose-card,
  .page-tickets .ticket-list-card,
  .page-profile .profile-summary-card,
  .page-profile .profile-form-card,
  .page-nodes .node-top-card {
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.94) 100%);
    box-shadow: 0 12px 26px rgba(15,23,42,.045);
  }
  .page-plans .plans-list-head,
  .page-pay .pay-main-card h4,
  .page-pay .pay-history-card h4,
  .page-tickets .ticket-compose-card h4,
  .page-tickets .ticket-list-card h4,
  .page-profile .profile-section-head h4,
  .page-nodes .node-top-card h4 {
    margin-bottom: 10px;
  }
  .page-plans .plan-card {
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(248,250,252,.95) 100%);
    box-shadow: 0 10px 22px rgba(15,23,42,.04);
  }
  .page-pay .pay-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .page-pay .pay-layout > .card {
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.94) 100%);
    box-shadow: 0 10px 22px rgba(15,23,42,.04);
  }
  .page-pay .pay-step {
    border-color: rgba(15,23,42,.07);
    background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(248,250,252,.86) 100%);
    box-shadow: 0 6px 14px rgba(15,23,42,.035);
  }
  .page-tickets .ticket-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .page-profile .profile-settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .page-profile .profile-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .page-profile .profile-info-item {
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.94) 100%);
    box-shadow: 0 8px 18px rgba(15,23,42,.035);
  }
  .page-subscription {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
  }
  .page-subscription .sub-kpi-grid {
    order: 1;
    margin-top: 0;
  }
  .page-subscription .sub-kpi-grid .sub-info-card,
  .page-subscription .sub-kpi-grid .card {
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(248,250,252,.93) 100%);
    box-shadow: 0 8px 22px rgba(15,23,42,.04);
  }
  .page-subscription .sub-focus-card {
    order: 2;
    gap: var(--card-gap);
    padding: 16px;
    border-color: rgba(10,132,255,.10);
    background:
      radial-gradient(220px 120px at 0% 0%, rgba(10,132,255,.09), transparent 74%),
      linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(248,250,252,.95) 100%);
    box-shadow: 0 14px 30px rgba(15,23,42,.055);
  }
  .page-subscription .sub-focus-main {
    padding-bottom: 0;
    border-bottom: none;
  }
  .page-subscription .sub-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .page-subscription .sub-tab {
    width: 100%;
    min-width: 0;
    height: 35px;
    padding: 0 8px;
    font-size: 15px;
    border-radius: 12px;
    white-space: nowrap;
  }
  .page-subscription .sub-status-line {
    font-size: 14px;
    line-height: 1.5;
    word-break: keep-all;
  }
  .page-subscription .sub-focus-main .sub-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .page-subscription .sub-panel.active {
    padding-top: 10px;
  }
  .page-subscription .sub-page-lead,
  .page-subscription .sub-entry-note,
  .page-help .docs-page-lead {
    display: none;
  }
  .page-subscription .sub-entry-col.sub-entry-actions {
    border-radius: 16px;
    padding: 16px 16px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(249,251,253,.96) 100%);
    box-shadow: 0 12px 24px rgba(15,23,42,.045);
  }
  .page-subscription .sub-panel-mobile .sub-entry-visual {
    padding: 12px;
    border: 1px solid rgba(15,23,42,.05);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(248,250,252,.92) 100%);
  }
  .page-subscription .sub-orders-card {
    order: 4;
    margin-top: 0;
    padding-top: 14px;
    border-color: rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(248,250,252,.93) 100%);
    box-shadow: 0 12px 24px rgba(15,23,42,.045);
  }
  body.mobile .sub-panel-mobile .sub-entry-col.sub-entry-actions {
    padding: 16px 14px;
    border-color: rgba(15,23,42,.07);
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(249,251,253,.95) 100%);
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
  }
  body.mobile .sub-panel-mobile .sub-entry-visual {
    padding: 14px;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,250,252,.92) 100%);
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
  }
  body.mobile .sub-panel-mobile .sub-qr-wrap {
    min-height: 188px;
    align-content: center;
  }
  .page-admin-dashboard .admin-dash-filter-row {
    margin-bottom: var(--space-2);
  }
  .page-admin-dashboard .admin-hero-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-admin-dashboard .admin-hero-right {
    width: 100%;
    justify-content: space-between;
  }
  .page-users .users-toolbar-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: var(--space-2);
  }
  .toolbar-card {
    max-height: 56px;
    overflow: hidden;
    transition: max-height .2s ease;
    margin-bottom: 0;
  }
  .toolbar-card.expanded { max-height: 480px; overflow: visible; }
  .filter-toggle { display: inline-flex; }
  .table { min-width: 0; border-radius: 12px; }
  .table thead { display: none; }
  .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table, .table tbody, .table tr, .table th, .table td { text-align: left !important; }
  .table tr {
    border-bottom: 1px solid #E5E7EB;
    padding: 8px 10px;
    background: #fff;
    align-items: flex-start;
  }
  .table tr:last-child { border-bottom: none; }
  .table td {
    border: none;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.5;
    text-align: left !important;
  }
  .table td::before {
    content: attr(data-label) "：";
    color: #6B7280;
    font-weight: 500;
    display: inline-block;
    min-width: 96px;
    text-align: left;
  }

  .mobile-record-table {
    border: none;
    background: transparent;
  }
  .mobile-record-table tbody {
    display: grid;
    gap: 10px;
  }
  .mobile-record-table tr {
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
  }
  .mobile-record-table td {
    padding: 5px 0 7px;
    border: none;
  }
  .mobile-record-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 78px;
    margin-right: 6px;
    margin-bottom: 0;
    color: #6B7280;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    vertical-align: top;
  }
  .mobile-record-table td[data-label="操作"] .btn {
    width: auto;
    min-width: 76px;
    margin-right: 8px;
    margin-top: 4px;
  }
  .mobile-record-table td[data-label="操作"] .btn:last-child {
    margin-right: 0;
  }
  .mobile-record-table.ticket-record-table td[data-label="操作"]::before {
    display: block;
    margin-bottom: 6px;
    min-width: 0;
  }
  .ticket-op-line {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }
  .ticket-op-line .ticket-op-btn {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .node-top-card {
    display: grid;
    gap: 10px;
  }
  .node-top-card h4 {
    margin-bottom: 0;
  }
  .node-tools-row {
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
  }
  .node-foot-note {
    padding: 0 2px;
  }
  #nodeCards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .node-card {
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
  }
  .node-card .node-name {
    font-size: 15px;
    margin-bottom: 0;
  }
  .node-card .node-latency {
    margin-top: 10px;
    font-size: 18px;
  }
  .page-help .help-card {
    border-color: rgba(15,23,42,.06);
    box-shadow: 0 12px 26px rgba(15,23,42,.045);
  }
  .page-help .help-card-entry {
    background:
      radial-gradient(220px 120px at 0% 0%, rgba(10,132,255,.08), transparent 74%),
      linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.95) 100%);
  }
  .page-help .help-card-faq,
  .page-help .help-card-support {
    background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(248,250,252,.93) 100%);
  }
  .page-help .help-os-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .page-help .help-os-card {
    min-height: 72px;
    padding: 16px 16px 15px;
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(248,250,252,.95) 100%);
    border-color: rgba(15,23,42,.06);
    box-shadow: 0 10px 20px rgba(15,23,42,.04);
  }
  .page-help .help-link-btn {
    width: 100%;
    margin-left: 0;
    height: 44px;
  }
  .page-nodes #nodeCards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .page-nodes .node-card {
    border-color: rgba(15,23,42,.07);
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,250,252,.94) 100%);
    box-shadow: 0 10px 22px rgba(15,23,42,.04);
  }

  .detail-kv-grid {
    display: grid;
    gap: 10px;
  }
  .detail-kv-item {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
  }
  .detail-kv-item .k {
    color: #6B7280;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    margin-right: 6px;
    line-height: 1.25;
    display: inline-block;
    min-width: 78px;
    vertical-align: top;
  }
  .detail-kv-item .v {
    color: #111827;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
    text-align: left;
    display: inline;
  }
  .detail-content-block {
    white-space: pre-wrap;
  }
  .ticket-detail-image {
    display: block;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px;
    cursor: zoom-in;
    margin-bottom: 6px;
  }
  .ticket-reply-list { gap: 10px; }
  .ticket-reply-item {
    border: 1px solid rgba(15, 23, 42, .1);
    border-left-width: 1px;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
  }
  .ticket-reply-item.reply-admin {
    border-color: rgba(10, 132, 255, .28);
    background: linear-gradient(180deg, rgba(10,132,255,.06) 0%, #fff 100%);
  }
  .ticket-reply-item.reply-user {
    border-color: rgba(15, 23, 42, .1);
    background: #fff;
  }
  .ticket-reply-meta { gap: 8px; margin-bottom: 6px; justify-content: space-between; }
  .ticket-reply-role {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f5f9;
  }
  .reply-admin .ticket-reply-role { background: rgba(10, 132, 255, .14); }
  .ticket-reply-content { font-size: 13px; line-height: 1.6; }
  .ticket-reply-image-wrap { max-width: min(100%, 320px); }
  .ticket-reply-image { max-height: 220px; }
  .ticket-reply-empty { padding: 12px; }
  .ticket-reply-composer .input { min-height: 78px; }
}

@media (min-width: 769px) {
  .ticket-op-line {
    width: auto;
    gap: 8px;
  }
  .ticket-op-line .ticket-op-btn {
    flex: 0 0 auto;
    width: auto;
    padding: 7px 10px;
    font-size: 13px;
  }
}
body.mobile .page-subscription .sub-url-bar .sub-url-input {
  display: none;
}
.page-subscription .sub-action-row {
  margin-top: 4px;
}
.page-subscription .sub-action-row .btn,
.page-subscription .sub-action-row a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

/* hide subscription raw URL in both desktop and mobile panels */
body:not(.mobile) .page-subscription .sub-url-bar .sub-url-input,
body.mobile .page-subscription .sub-url-bar .sub-url-input {
  display: none;
}

.page-direct-rules .direct-rule-add-row .input {
  min-width: 220px;
}

.page-direct-rules .card {
  overflow: hidden;
}

.page-direct-rules .direct-rule-filter-row,
.page-direct-rules .direct-version-row {
  margin-bottom: var(--space-3);
}

.page-direct-rules .admin-card-head {
  align-items: flex-start;
}

.page-direct-rules .admin-toolbar-card .admin-card-head p,
.page-direct-rules .admin-table-card .admin-card-head p {
  max-width: 40ch;
}

.page-direct-rules .direct-pipeline-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0.78) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.page-direct-rules .direct-pipeline-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.page-direct-rules .direct-pipeline-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-direct-rules .direct-pipeline-title {
  font-size: 20px;
  line-height: 1.3;
  color: #0f172a;
}

.page-direct-rules .direct-pipeline-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-direct-rules .direct-pipeline-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.page-direct-rules .direct-pipeline-code,
.page-direct-rules .direct-pipeline-note {
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.page-direct-rules .direct-pipeline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.page-direct-rules .direct-pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  padding-top: 2px;
}

.page-direct-rules .direct-obs-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.page-direct-rules .direct-obs-summary-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0.8) 0%, rgba(255, 255, 255, 0.94) 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.page-direct-rules .direct-obs-summary-card .desc {
  font-size: 12px;
  line-height: 1.2;
}

.page-direct-rules .direct-obs-summary-card strong {
  font-size: 24px;
  line-height: 1;
  color: #0f172a;
}

.page-direct-rules .direct-obs-action-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.page-direct-rules .direct-obs-table-card .admin-card-head {
  margin-bottom: 0;
  padding-bottom: 16px;
}

.page-direct-rules .direct-obs-filter-shell {
  margin-top: 24px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(244,246,248,.96) 0%, rgba(255,255,255,.99) 100%);
  border: 1px solid rgba(15,23,42,.05);
}

.page-direct-rules .direct-obs-table-card .direct-obs-filter-row {
  margin-top: 0;
  padding-top: 0;
}

.page-direct-rules .direct-preview-shell {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247,248,250,.7) 0%, rgba(255,255,255,.96) 100%);
  padding: 16px;
}

.page-direct-rules #directDomainsMsg {
  margin-top: 10px;
}

.page-direct-rules #directVersionPager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.05);
  color: #64748b;
}

.page-direct-rules .direct-version-row .input {
  min-width: 300px;
}

.page-direct-rules .table .badge.ok {
  border-color: rgba(16, 185, 129, .26);
  background: rgba(16, 185, 129, .12);
  color: #047857;
}

.page-direct-rules .admin-log-box {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.7;
  color: #1e293b;
}

@media (max-width: 980px) {
  .page-direct-rules .direct-pipeline-shell {
    grid-template-columns: 1fr;
  }

  .page-direct-rules .direct-pipeline-meta {
    grid-template-columns: 1fr;
  }

  .page-direct-rules .direct-obs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-direct-rules .direct-pipeline-actions {
    justify-content: flex-start;
  }

  .page-direct-rules .direct-rule-add-row .input,
  .page-direct-rules .direct-version-row .input {
    min-width: 100%;
  }
}
