:root {
  /* 精致商务蓝 —— 配色令牌 */
  --ink: #16233b;
  --muted: #647089;
  --line: #e6ebf3;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --nav: #131c2e;
  --nav-active: #23324c;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #e9f0fe;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .05);
  --shadow-card: 0 1px 2px rgba(20, 30, 60, .05), 0 12px 30px -20px rgba(20, 30, 60, .28);
  --ring: 0 0 0 3px rgba(37, 99, 235, .14);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }

/* 左：蓝色动效面板；右：登录表单 */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  background: var(--surface);
}
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 56px 64px; }
.login-context {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 64px 72px;
  color: #fff;
  background: linear-gradient(150deg, #11b8ed 0%, #0879f8 48%, #123ee8 100%);
}
.login-context::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 55% at 76% 12%, rgba(255, 255, 255, .18), transparent 70%);
  pointer-events: none;
}
.login-context-copy { position: relative; z-index: 2; max-width: 620px; }
.lc-badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 30px;
  padding: 11px 22px; border-radius: 999px; font-size: 15px; font-weight: 650;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px);
}
.login-context h2 { margin: 0 0 18px; font-size: clamp(26px, 2.9vw, 40px); line-height: 1.22; font-weight: 850; letter-spacing: -.02em; }
.login-context p { max-width: 46ch; margin: 0; color: #dbe9ff; line-height: 1.8; font-size: 16px; }

/* 左侧动效：网络链路 + 流动数据包 + 漂浮光晕 */
.login-deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.lorb { position: absolute; border-radius: 50%; filter: blur(60px); }
.lo1 { width: 420px; height: 420px; left: -160px; top: -60px; background: radial-gradient(circle, rgba(255,255,255,.26), transparent 70%); animation: lorbDrift 22s ease-in-out infinite; }
.lo2 { width: 460px; height: 460px; right: -180px; bottom: -80px; background: radial-gradient(circle, rgba(120,190,255,.32), transparent 70%); animation: lorbDrift 28s ease-in-out infinite reverse; }
@keyframes lorbDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -36px); } }
.lgrid { position: absolute; inset: 0; width: 100%; height: 100%; }
.lln { fill: none; stroke: rgba(255,255,255,.26); stroke-width: 1.2; stroke-dasharray: 6 10; animation: llnFlow 20s linear infinite; }
.lln.l2 { stroke: rgba(255,255,255,.22); animation-duration: 26s; animation-direction: reverse; }
@keyframes llnFlow { to { stroke-dashoffset: -260; } }
.ldot { fill: #fff; opacity: .9; }
.lpulse { fill: #fff; opacity: .2; transform-box: fill-box; transform-origin: center; animation: lPulse 3.2s ease-out infinite; }
.lnode.n2 .lpulse { animation-delay: 1.1s; }
.lnode.n3 .lpulse { animation-delay: 2.1s; }
.lnode.n4 .lpulse { animation-delay: 1.6s; }
@keyframes lPulse { 0% { transform: scale(.5); opacity: .42; } 75% { transform: scale(2); opacity: 0; } 100% { transform: scale(2); opacity: 0; } }
.lspark { fill: #fff; filter: drop-shadow(0 0 7px rgba(255,255,255,.9)); }
.lspark.s { fill: #bfe3ff; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  color: #fff; background: var(--primary); border-radius: 7px; font-weight: 800; font-size: 20px;
}
.brand-name { font-size: 20px; font-weight: 750; }
.brand-subtitle { margin-top: 2px; color: var(--muted); font-size: 13px; }
.login-panel h1 { margin: 44px 0 8px; font-size: 27px; }
.login-panel > p { margin: 0 0 28px; color: var(--muted); }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-weight: 650; font-size: 14px; color: #43516a; }
.input, .select {
  width: 100%; height: 42px; padding: 0 12px; color: var(--ink); background: #fff;
  border: 1px solid #c8d5e6; border-radius: 6px; outline: none;
}
.input:focus, .select:focus { border-color: var(--primary); box-shadow: var(--ring); }
.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.btn {
  min-height: 38px; padding: 0 15px; border: 1px solid #c5d2e3; border-radius: 6px;
  color: var(--ink); background: #fff; font-weight: 650;
}
.btn:hover { border-color: #91a7c2; background: #f8fafc; }
.btn-primary { color: #fff; border-color: var(--primary); background: var(--primary); }
.btn-primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.btn-block { width: 100%; min-height: 44px; margin-top: 8px; }
.btn-danger { color: var(--danger); }
.btn-small { min-height: 34px; padding: 0 11px; font-size: 13px; }
.icon-button { width: 38px; height: 38px; padding: 0; font-size: 23px; line-height: 1; }

.alert { padding: 12px 14px; border: 1px solid; border-radius: 6px; font-size: 14px; }
.alert-error { color: #b52e2e; background: #fff3f3; border-color: #ffcaca; }
.alert-success { color: #087b56; background: #edfbf6; border-color: #afe8d2; }
.hidden { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; padding: 20px 14px; overflow-y: auto; color: #dce6f4; background: var(--nav); }
.sidebar .brand { padding: 0 6px 24px; }
.sidebar .brand-subtitle { color: #8798b1; }
.purchase-entry {
  min-height: 46px; display: grid; place-items: center; margin: 4px 4px 22px; color: #fff;
  text-decoration: none; border: 1px solid #2e84f5; border-radius: 6px; background: #1677ff; font-weight: 700;
}
.purchase-entry:hover, .purchase-entry.active { border-color: #66a9ff; background: #075fcc; }
.nav { display: grid; gap: 8px; margin-top: 0; }
.nav-link {
  display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px;
  color: #b8c6d9; text-decoration: none; border-radius: 6px; font-weight: 600;
}
.nav-link:hover, .nav-link.active { color: #fff; background: var(--nav-active); }
.nav-icon { width: 21px; color: #89a0bd; text-align: center; font-size: 16px; }
.nav-group { padding-top: 10px; }
.nav-group-title { min-height: 34px; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; color: #899ab3; font-size: 12px; font-weight: 700; }
.nav-submenu { display: grid; gap: 3px; }
.nav-sub-link { min-height: 38px; display: flex; align-items: center; padding: 0 12px 0 44px; color: #aebdd1; text-decoration: none; border-radius: 6px; font-size: 14px; }
.nav-sub-link:hover, .nav-sub-link.active { color: #fff; background: var(--nav-active); }
.main { grid-column: 2; min-width: 0; padding: 18px 28px 40px; }
.topbar { min-height: 48px; display: flex; justify-content: flex-end; align-items: flex-start; }
.account-menu { position: relative; }
.account-trigger {
  width: 260px; min-height: 48px; display: grid; grid-template-columns: 34px 1fr 16px;
  align-items: center; gap: 10px; padding: 6px 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--primary); font-weight: 750; }
.account-name { overflow: hidden; text-overflow: ellipsis; font-weight: 700; white-space: nowrap; }
.account-role { margin-top: 2px; color: var(--muted); font-size: 12px; }
.account-trigger > span:nth-child(2), .account-name, .account-role { display: block; min-width: 0; }
.account-dropdown {
  position: absolute; z-index: 30; right: 0; top: 54px; width: 260px; padding: 7px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 12px 35px rgba(28, 43, 68, .14);
}
.account-dropdown button, .account-dropdown a {
  width: 100%; min-height: 38px; display: flex; align-items: center; padding: 0 10px;
  color: var(--ink); text-decoration: none; border: 0; border-radius: 5px; background: transparent;
}
.account-dropdown button:hover, .account-dropdown a:hover { background: #f1f5fa; }

.page-header { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin: 4px 0 22px; }
.page-header h1 { margin: 0; font-size: 26px; }
.page-header p { margin: 7px 0 0; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.metric { min-height: 112px; padding: 20px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-label { color: var(--muted); font-size: 14px; }
.metric-value { margin-top: 12px; font-size: 26px; font-weight: 760; }
.metric-note { margin-top: 5px; color: var(--muted); font-size: 12px; }

.section { margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.toolbar .field { width: 190px; }
.toolbar .search-field { width: min(420px, 100%); margin-right: auto; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { height: 46px; padding: 0 15px; color: #52617a; background: #f8fafd; text-align: left; font-size: 13px; font-weight: 700; }
td { height: 58px; padding: 10px 15px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
td.wrap { white-space: normal; min-width: 180px; }
.primary-cell { font-weight: 700; }
.secondary-cell { margin-top: 4px; color: var(--muted); font-size: 12px; }
/* 列表时间两排:年月日 / 时分秒(时区在表头) */
.dt-stack { display: grid; gap: 2px; }
.dt-stack strong { font-weight: 700; }
.dt-stack small { color: var(--muted); font-size: 12px; }

/* 代理资源表:11 列,压缩字号和内边距,尽量不横向滚动 */
.resources-compact th { height: 42px; padding: 0 10px; font-size: 12px; }
.resources-compact td { height: 54px; padding: 8px 10px; font-size: 13px; }
.resources-compact .res-order { font-size: 12px; }
.resources-compact .copy-value { font-size: 12px; }
.resources-compact .btn-small { padding: 3px 8px; font-size: 12px; }
.resources-compact .res-check-cell { width: 34px; text-align: center; padding-right: 4px; padding-left: 12px; }
.res-check, #res-check-all { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
/* 导出下拉 */
.export-menu { position: relative; }
.export-menu .caret { font-size: 10px; margin-left: 2px; }
.export-dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(24,32,51,.12); overflow: hidden; z-index: 30; }
.export-dropdown button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: #fff; cursor: pointer; font-size: 13px; color: var(--ink); }
.export-dropdown button:hover { background: #eef2fb; color: var(--primary); }
/* 备注行内编辑 */
.note-cell { display: flex; align-items: center; gap: 6px; min-width: 84px; }
.note-text { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-empty { color: var(--muted); }
.note-edit { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 5px; border-radius: 4px; line-height: 1; }
.note-edit:hover { color: var(--primary); background: #eef2fb; }
.note-input { width: 108px; padding: 5px 7px; border: 1px solid var(--primary); border-radius: 6px; font-family: inherit; font-size: 12px; }
.note-save, .note-cancel { border: 0; background: transparent; cursor: pointer; font-size: 14px; padding: 2px 5px; border-radius: 4px; line-height: 1; }
.note-save { color: var(--success); }
.note-save:hover { background: #e8f7ee; }
.note-cancel { color: var(--muted); }
.note-cancel:hover { background: #f1f3f7; }
.money-positive { color: var(--success); font-weight: 700; }
.money-negative { color: var(--danger); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8797ad; }
.status-success { color: var(--success); }
.status-success::before { background: var(--success); }
.status-danger { color: var(--danger); }
.status-danger::before { background: var(--danger); }
.status-warning { color: var(--warning); }
.status-warning::before { background: var(--warning); }
.table-empty { padding: 58px 20px; color: var(--muted); text-align: center; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.pagination-size { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pagination-size .select { width: 82px; height: 36px; }
.pagination-pages { display: flex; align-items: center; gap: 7px; }
.page-button { min-width: 36px; height: 36px; border: 1px solid #c5d2e3; border-radius: 6px; background: #fff; color: var(--ink); }
.page-button.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.page-button:disabled { cursor: not-allowed; opacity: .45; }
.pagination-info { margin-right: 4px; color: var(--muted); font-size: 13px; }

.panel { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel h2 { margin: 0 0 18px; font-size: 18px; }
.purchase-layout { display: grid; grid-template-columns: minmax(580px, 1fr) 300px; gap: 18px; align-items: start; }
.purchase-main { min-width: 0; }
.purchase-page-heading { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.purchase-page-heading p { margin: 0 0 7px; color: #8a99ad; font-size: 12px; }
.purchase-page-heading h1 { margin: 0; font-size: 22px; }
.purchase-page-heading span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.purchase-selector { padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.selector-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 10px; }
.selector-heading h2 { margin: 0; font-size: 16px; }
.selector-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.continent-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.continent-tab { min-height: 34px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; }
.continent-tab:hover, .continent-tab.selected { color: var(--primary); border-bottom-color: var(--primary); }
.location-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 368px; overflow-y: auto; padding-right: 5px; }
.location-option { min-height: 78px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 8px; align-items: center; padding: 11px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.location-option:hover { border-color: #8ab4f5; }
.location-option.selected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #f6f9ff; }
.location-primary { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 750; }
.location-secondary { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.location-price { color: var(--primary); font-size: 12px; font-weight: 750; white-space: nowrap; }
.purchase-empty { grid-column: 1 / -1; padding: 44px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 7px; }
.purchase-config { display: grid; grid-template-columns: minmax(140px, .9fr) auto auto minmax(130px, .55fr); gap: 16px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.config-field { display: grid; gap: 7px; min-width: 0; color: #465570; font-size: 12px; font-weight: 700; }
.config-field small { margin-left: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.config-field .select { height: 38px; }
.quantity-control { display: grid; grid-template-columns: 38px minmax(70px, 1fr) 38px; align-items: center; }
.quantity-control .input { height: 38px; border-radius: 0; text-align: center; }
.quantity-button { width: 38px; height: 38px; border: 1px solid #c5d2e3; background: #f8fafd; font-size: 18px; }
.quantity-button:first-child { border-radius: 6px 0 0 6px; border-right: 0; }
.quantity-button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.quantity-button:hover { color: var(--primary); border-color: var(--primary); }
.config-total { min-height: 58px; display: grid; align-content: center; justify-items: end; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafd; }
.config-total span, .config-total small { color: var(--muted); font-size: 10px; }
.config-total strong { margin: 2px 0; color: var(--primary); font-size: 19px; }
.purchase-assurances { display: flex; gap: 26px; margin-top: 12px; padding: 12px 15px; color: #63728a; background: #eef3f8; font-size: 11px; }
.package-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; }
.package-option { min-height: 98px; display: grid; padding: 13px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.package-option:hover { border-color: #8ab4f5; }
.package-option.selected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #f6f9ff; }
.package-volume { font-size: 16px; font-weight: 760; }
.package-price { margin-top: 7px; color: var(--primary); font-size: 15px; font-weight: 750; }
.package-days { margin-top: 4px; color: var(--muted); font-size: 11px; }
.purchase-config-dynamic { grid-template-columns: 1fr 200px; }
.purchase-notice { margin-top: 14px; color: #785b13; border-color: #ead9a1; background: #fffaf0; }
.order-summary { position: sticky; top: 18px; min-height: 590px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 8px 24px rgba(31, 53, 82, .06); }
.order-summary-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.order-summary-heading h2 { margin: 0; font-size: 16px; }
.order-summary-heading span { color: var(--success); font-size: 11px; font-weight: 700; }
.summary-product { display: grid; gap: 5px; margin-top: 15px; padding: 14px; border: 1px solid #d5e4f7; border-radius: 6px; background: #f6f9ff; }
.summary-product strong { font-size: 15px; }
.summary-product span { color: var(--muted); font-size: 11px; }
.summary-list { display: grid; grid-template-columns: 1fr auto; gap: 0 14px; margin: 12px 0; font-size: 12px; }
.summary-list dt, .summary-list dd { min-height: 42px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--muted); }
.summary-list dd { max-width: 165px; justify-content: flex-end; margin: 0; text-align: right; font-weight: 700; }
.summary-total { display: flex; justify-content: space-between; align-items: end; padding: 15px 0 10px; }
.summary-total span { color: var(--primary); }
.summary-total strong { color: var(--primary); font-size: 27px; }
.agreement { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 10px; color: #52617a; font-size: 11px; line-height: 1.5; }
.agreement input { margin-top: 2px; }
.summary-warning { margin: 10px 0 0; padding: 8px; color: #a85b00; text-align: center; border-radius: 5px; background: #fff5e9; font-size: 11px; }
.summary-footnote { margin: 12px 0 0; color: #94a0b2; text-align: center; font-size: 10px; line-height: 1.5; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.detail-list { display: grid; grid-template-columns: 140px 1fr; margin: 0; }
.detail-list dt, .detail-list dd { min-height: 46px; display: flex; align-items: center; margin: 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { font-weight: 600; }
.security-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.security-row { display: grid; grid-template-columns: 170px 1fr 150px; gap: 14px; align-items: center; min-height: 58px; padding: 8px 14px; border-top: 1px solid var(--line); }
.security-row:first-child { border-top: 0; }
.security-time, .security-ip { color: var(--muted); font-size: 13px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(10, 19, 34, .52); }
.modal { width: min(880px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .22); }
.modal-small { width: min(560px, 100%); }
.modal-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 21px; }
.modal-header p { margin: 5px 0 0; color: var(--muted); }
.modal-body { padding-top: 20px; }
.modal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.modal-item { min-height: 88px; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal-item:nth-child(3n) { border-right: 0; }
.modal-label { color: var(--muted); font-size: 13px; }
.modal-value { margin-top: 9px; font-weight: 700; word-break: break-word; }
.copy-group { display: flex; align-items: center; gap: 8px; }
.copy-value { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

.loading { min-height: 280px; display: grid; place-items: center; color: var(--muted); }
.toast { position: fixed; z-index: 200; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 16px; color: #fff; border-radius: 6px; background: #26354c; box-shadow: 0 10px 32px rgba(0, 0, 0, .18); }
.toast.success { background: #087c59; }
.toast.error { background: #ba3737; }

@media (max-width: 1250px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .account-grid { grid-template-columns: 1fr; }
  .purchase-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; min-height: 0; }
  .location-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-panel { padding: 38px 24px; }
  .login-context { display: none; }
  .shell { display: block; }
  .sidebar { position: static; width: auto; max-height: none; padding: 14px; }
  .sidebar .brand { padding-bottom: 10px; }
  .purchase-entry { margin: 4px 0 10px; }
  .nav { display: block; }
  .nav-link { justify-content: center; padding: 0 7px; font-size: 13px; }
  .nav-icon { display: none; }
  .nav-group { padding-top: 6px; }
  .nav-group-title { display: none; }
  .nav-submenu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .nav-sub-link { justify-content: center; padding: 0 7px; text-align: center; font-size: 12px; }
  .main { padding: 14px 14px 30px; }
  .topbar { min-height: 54px; }
  .account-trigger { width: 210px; }
  .page-header { align-items: start; }
  .page-header h1 { font-size: 23px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 96px; padding: 15px; }
  .metric-value { font-size: 21px; }
  .form-grid, .modal-grid { grid-template-columns: 1fr; }
  .modal-item, .modal-item:nth-child(3n) { border-right: 0; }
  .pagination { align-items: flex-start; }
  .pagination-pages { flex-wrap: wrap; justify-content: flex-end; }
  .pagination-info { width: 100%; text-align: right; }
  .security-row { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .purchase-page-heading { align-items: flex-start; }
  .purchase-selector { padding: 14px; }
  .selector-heading { align-items: flex-start; }
  .location-grid, .package-grid { grid-template-columns: 1fr; }
  .location-grid { max-height: none; }
  .purchase-config, .purchase-config-dynamic { grid-template-columns: 1fr; }
  .config-total { justify-items: start; }
  .purchase-assurances { flex-direction: column; gap: 7px; }
  .order-summary { padding: 17px; }
}

/* Customer portal visual system */
:root {
  --ink: #182033;
  --muted: #6f7c90;
  --line: #dce3ec;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --nav: #181d27;
  --nav-active: #2a3140;
  --primary: #2563eb;
  --primary-dark: #184ec4;
  --success: #0b9868;
  --danger: #d14343;
  --warning: #b76d00;
  --radius: 8px;
  color: var(--ink);
  background: var(--canvas);
}

body { background: var(--canvas); color: var(--ink); }
button, input, select { color: inherit; }

.brand-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--primary);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .2); font-size: 18px;
}
.brand-name { font-size: 19px; font-weight: 800; }
.brand-subtitle { color: #7d899b; font-size: 12px; }

/* 左：蓝色动效面板（约 55%）；右：表单（约 45%） */
.login-page { display: grid; grid-template-columns: 1fr; place-items: center; min-height: 100vh; padding: 3vh 3vw;
  background: #fff; }
.login-panel { display: grid; place-items: center; padding: 78px 34px 40px; overflow-y: auto; }
.login-panel-inner { width: min(360px, 100%); }
.login-heading { margin: 26px 0 24px; }
.login-heading > span, .page-eyebrow, .login-context-copy > span {
  display: block; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 0;
}
.login-heading h1 { margin: 10px 0 9px; font-size: 34px; line-height: 1.2; }
.login-heading p { margin: 0; color: var(--muted); line-height: 1.7; }
.login-panel .field { gap: 9px; }
.login-panel .field label { color: #3e495c; font-size: 13px; }
.login-panel .input { height: 48px; padding: 0 15px; }
.login-panel .btn-block { min-height: 48px; margin-top: 3px; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; color: #8994a6; font-size: 11px; }
.login-security span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(11, 152, 104, .1); }
/* 纯品牌蓝渐变 + 动效，不再用机房照片 */
.login-context {
  isolation: isolate; flex-direction: column; align-items: center; justify-content: center;
  gap: 34px; padding: 60px clamp(28px, 3vw, 56px) 90px;
  background: linear-gradient(150deg, #11b8ed 0%, #0879f8 48%, #123ee8 100%);
}
.login-context::before {
  content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: radial-gradient(58% 55% at 76% 12%, rgba(255, 255, 255, .18), transparent 70%);
}
.login-context-copy { position: relative; z-index: 2; max-width: 88%; text-align: center; margin: 0 auto; }
.login-context h2 { margin: 0 auto 16px; max-width: none; white-space: nowrap; font-size: clamp(19px, 1.9vw, 33px); line-height: 1.2; font-weight: 850; letter-spacing: -.025em; }
.login-context p { max-width: none; white-space: nowrap; margin: 0 auto; color: #dbe9ff; font-size: clamp(12px, .9vw, 15px); line-height: 1.8; }
.login-points { position: absolute; left: 50%; transform: translateX(-50%);
  bottom: clamp(18px, 2.6vh, 30px); z-index: 2;
  display: flex; flex-wrap: nowrap; justify-content: center; gap: 7px; max-width: 96%; font-size: 12px; }
.login-points b { padding: 7px clamp(8px, .9vw, 13px); border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(6px);
  font-size: clamp(10px, .82vw, 12px); font-weight: 650; white-space: nowrap; }

.shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { width: 248px; padding: 24px 16px 18px; background: var(--nav); }
.sidebar-brand { padding: 0 8px 28px !important; }
.sidebar .brand-name { color: #fff; }
.sidebar .brand-subtitle { color: #8c98aa; }
.purchase-entry {
  min-height: 48px; display: flex; justify-content: center; gap: 9px; margin: 0 0 22px;
  border: 0; border-radius: 7px; background: var(--primary); box-shadow: 0 8px 20px rgba(20, 67, 169, .22);
}
.purchase-entry span { font-size: 20px; font-weight: 400; }
.purchase-entry:hover, .purchase-entry.active { background: #1f57cf; }
.nav { gap: 6px; }
.nav-link { min-height: 44px; padding: 0 13px; color: #c2cad7; border-radius: 7px; font-size: 14px; }
.nav-indicator { width: 8px; height: 8px; flex: 0 0 auto; border: 1px solid #7d899b; border-radius: 2px; }
.nav-link.active .nav-indicator { border-color: #7ca7ff; background: #7ca7ff; }
.nav-link:hover, .nav-link.active { background: var(--nav-active); }
.nav-group { padding-top: 12px; }
.nav-group-title { min-height: 32px; padding: 0 13px; color: #747f90; font-size: 11px; text-transform: uppercase; }
.nav-submenu { gap: 2px; }
.nav-sub-link { min-height: 39px; padding: 0 13px 0 38px; color: #aab4c4; border-radius: 7px; font-size: 13px; }
.nav-sub-link:hover { background: #222936; }
.nav-sub-link.active { position: relative; color: #fff; background: var(--nav-active); font-weight: 700; }
.nav-sub-link.active::before { content: ""; position: absolute; left: 16px; width: 5px; height: 5px; border-radius: 50%; background: #72d4be; }
.sidebar-status { margin-top: 28px; padding: 14px; border-top: 1px solid #303745; color: #c8d0db; }
.sidebar-status span { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.sidebar-status i { width: 7px; height: 7px; border-radius: 50%; background: #42c99b; box-shadow: 0 0 0 4px rgba(66, 201, 155, .1); }
.sidebar-status small { display: block; margin-top: 6px; color: #727e8f; font-size: 10px; }
.mobile-nav-trigger, .mobile-nav-close, .sidebar-scrim { display: none; }

.main { grid-column: 2; padding: 0; }
.topbar {
  position: sticky; z-index: 20; top: 0; min-height: 72px; align-items: center; padding: 0 32px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.topbar-context { display: grid; gap: 3px; margin-right: auto; }
.topbar-context span { color: #8a95a5; font-size: 10px; font-weight: 700; }
.topbar-context strong { font-size: 15px; }
.account-trigger { width: 250px; min-height: 46px; border-color: #d7dee8; box-shadow: none; }
.account-trigger:hover { border-color: #b6c2d1; background: #fafbfc; }
.account-avatar { background: #202735; }
.account-name { font-size: 13px; }
.account-role { font-size: 10px; }
.account-dropdown { top: 51px; border-color: #d7dee8; box-shadow: 0 16px 40px rgba(24, 32, 51, .13); }
#page-content { padding: 30px 32px 48px; }

.page-header { align-items: center; margin: 0 0 24px; }
.page-header h1 { margin: 8px 0 0; font-size: 28px; line-height: 1.2; }
.page-header p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.page-eyebrow { color: #8b96a7; font-size: 10px; }

.btn { min-height: 40px; padding: 0 16px; border-color: #ccd5e1; border-radius: 7px; font-size: 13px; }
.btn:hover { border-color: #a7b5c7; background: #f7f9fb; }
.btn-primary { border-color: var(--primary); background: var(--primary); box-shadow: 0 5px 14px rgba(37, 99, 235, .14); }
.btn-primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.btn-small { min-height: 34px; padding: 0 12px; }
.input, .select { height: 42px; border-color: #ccd5e1; border-radius: 7px; background: #fff; }
.input::placeholder { color: #9aa5b4; }
.input:focus, .select:focus { border-color: #7ca5f7; box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }
.field label { color: #596579; font-size: 12px; }

.metrics { gap: 12px; border: 0; background: transparent; }
.metric { position: relative; min-height: 128px; padding: 21px; overflow: hidden; border: 1px solid var(--line) !important; border-radius: 8px; background: #fff; }
.metric::after { content: ""; position: absolute; right: 18px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: #8da2c0; box-shadow: 0 0 0 6px rgba(141, 162, 192, .1); }
.metric-balance::after { background: var(--success); box-shadow: 0 0 0 6px rgba(11, 152, 104, .1); }
.metric-frozen::after { background: #e59a32; box-shadow: 0 0 0 6px rgba(229, 154, 50, .11); }
.metric-orders::after { background: var(--primary); box-shadow: 0 0 0 6px rgba(37, 99, 235, .1); }
.metric-resources::after { background: #36a6a0; box-shadow: 0 0 0 6px rgba(54, 166, 160, .1); }
.metric-label { color: #6b778a; font-size: 12px; font-weight: 650; }
.metric-value { margin-top: 16px; font-size: 29px; line-height: 1; }
.metric-note { margin-top: 10px; color: #909aaa; font-size: 11px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.quick-actions a { min-height: 72px; display: grid; align-content: center; gap: 5px; padding: 0 18px; color: var(--ink); text-decoration: none; background: #fff; }
.quick-actions a:hover { background: #f9fafc; }
.quick-actions strong { font-size: 13px; }
.quick-actions span { color: var(--muted); font-size: 11px; }

.section { margin-top: 28px; }
.section-heading { margin-bottom: 14px; }
.section-heading h2 { font-size: 18px; }
.section-heading p { color: #8691a2; }
.toolbar { gap: 12px; margin-bottom: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.toolbar .search-field { width: min(480px, 100%); }
.table-wrap { border-color: var(--line); border-radius: 8px; box-shadow: 0 2px 4px rgba(24, 32, 51, .02); }
th { height: 48px; padding: 0 17px; color: #647084; background: #f7f8fa; font-size: 12px; }
td { height: 62px; padding: 11px 17px; border-color: #e5e9ef; font-size: 13px; }
tbody tr:hover { background: #fafbfd; }
.primary-cell { color: #253047; }
.secondary-cell { color: #8b96a7; }
.status { padding: 5px 9px; border-radius: 5px; background: #f1f4f7; font-size: 11px; }
.status-success { color: #087a56; background: #eaf8f2; }
.status-danger { color: #bb3434; background: #fff0f0; }
.status-warning { color: #986000; background: #fff6e8; }
.pagination { margin-top: 14px; }
.page-button { border-radius: 6px; }

.panel { padding: 24px; border-color: var(--line); box-shadow: 0 2px 4px rgba(24, 32, 51, .02); }
.panel h2 { padding-bottom: 15px; border-bottom: 1px solid #e7ebf0; }
.account-grid { gap: 16px; }
.detail-list dt, .detail-list dd { min-height: 50px; border-color: #e7ebf0; }
.detail-list dt { color: #798598; font-size: 12px; }
.detail-list dd { color: #29344a; font-size: 13px; }
.security-list { border-color: var(--line); background: #fff; }
.security-row { min-height: 62px; padding: 10px 17px; border-color: #e5e9ef; background: #fff; }

.purchase-layout { grid-template-columns: minmax(620px, 1fr) 320px; gap: 20px; }
.purchase-page-heading { min-height: 84px; margin-bottom: 16px; }
.purchase-page-heading h1 { font-size: 25px; }
.purchase-page-heading p { color: #8b96a7; }
.purchase-selector { padding: 20px; border-color: var(--line); box-shadow: 0 2px 4px rgba(24, 32, 51, .02); }
.selector-heading h2 { font-size: 17px; }
.continent-tabs { margin-top: 4px; }
.continent-tab { min-height: 38px; font-size: 12px; }
.location-grid { gap: 9px; max-height: 390px; }
.location-option { min-height: 82px; border-color: #dce3ec; }
.location-option:hover { border-color: #9ab7ed; background: #fbfcff; }
.location-option.selected { border-color: var(--primary); background: #f4f7ff; }
.location-primary { font-size: 13px; }
.location-secondary { font-size: 11px; }
.purchase-config { margin-top: 16px; padding-top: 16px; }
.config-total { min-height: 62px; border-color: #dce3ec; background: #f7f9fc; }
.purchase-assurances { border-radius: 6px; background: #eef2f5; }
.order-summary { min-height: 610px; padding: 21px; border-color: var(--line); box-shadow: 0 10px 30px rgba(24, 32, 51, .07); }
.order-summary-heading h2 { font-size: 17px; }
.summary-product { border-color: #d6e0f2; background: #f6f8fc; }
.summary-total strong { font-size: 30px; }
.summary-footnote { color: #919cac; }

.modal-backdrop { background: rgba(19, 25, 36, .62); }
.modal { padding: 26px; border-radius: 8px; box-shadow: 0 28px 80px rgba(0,0,0,.25); }
.modal-header h2 { font-size: 22px; }
.modal-grid, .modal-item { border-color: #e0e6ee; }
.toast { border-radius: 7px; }

@media (max-width: 1280px) {
  .purchase-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; min-height: 0; }
  .location-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-panel { min-height: 100vh; padding: 36px 24px; }
  .login-heading { margin-top: 54px; }
  .login-context { display: none; }
  .shell { display: block; }
  .sidebar {
    position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(320px, 86vw); max-height: none;
    padding: 18px 15px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 45px rgba(12, 16, 24, .2);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 55; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(12, 16, 24, .5); }
  .sidebar-scrim.visible { display: block; }
  .sidebar-brand { padding-bottom: 14px !important; }
  .mobile-nav-close { width: 38px; height: 38px; display: grid; place-items: center; margin-left: auto; padding: 0; color: #cbd3df; border: 0; background: transparent; font-size: 24px; }
  .purchase-entry { margin-bottom: 10px; }
  .nav { display: block; }
  .nav-link { justify-content: center; }
  .nav-indicator, .sidebar-status { display: none; }
  .nav-group { padding-top: 5px; }
  .nav-group-title { display: none; }
  .nav-submenu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .nav-sub-link { justify-content: center; padding: 0 8px; text-align: center; }
  .nav-sub-link.active::before { display: none; }
  .main { padding: 0; }
  .topbar { min-height: 64px; padding: 0 15px; }
  .mobile-nav-trigger { width: 40px; height: 40px; display: grid; place-items: center; margin-right: auto; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 19px; }
  .topbar-context { display: none; }
  .account-trigger { width: 215px; }
  #page-content { padding: 22px 15px 36px; }
  .page-header { align-items: flex-end; }
  .page-header h1 { font-size: 24px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 116px; padding: 17px; }
  .metric-value { font-size: 23px; }
  .quick-actions { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .toolbar .field, .toolbar .search-field { width: 100%; }
  .toolbar .btn { width: 100%; }
  .form-grid, .modal-grid { grid-template-columns: 1fr; }
  .modal-item, .modal-item:nth-child(3n) { border-right: 0; }
  .account-grid { grid-template-columns: 1fr; }
  .pagination { align-items: flex-start; }
  .pagination-pages { flex-wrap: wrap; justify-content: flex-end; }
  .pagination-info { width: 100%; text-align: right; }
  .security-row { grid-template-columns: 1fr; gap: 4px; }
  .purchase-page-heading { align-items: flex-start; }
  .purchase-selector { padding: 15px; }
  .location-grid, .package-grid { grid-template-columns: 1fr; max-height: none; }
  .purchase-config, .purchase-config-dynamic { grid-template-columns: 1fr; }
  .config-total { justify-items: start; }
  .purchase-assurances { flex-direction: column; gap: 7px; }
  .order-summary { padding: 18px; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr; }
  .page-header { align-items: flex-start; }
  .page-header .btn { min-width: 110px; }
  .login-heading h1 { font-size: 30px; }
}

/* Light customer workspace based on the approved portal direction. */
:root {
  --ink: #10203b;
  --muted: #647594;
  --line: #dce7f6;
  --surface: #ffffff;
  --canvas: #f7faff;
  --nav: #ffffff;
  --nav-active: #eaf2ff;
  --primary: #0867f5;
  --primary-dark: #0757d1;
  --success: #0aaa70;
}

body { background: var(--canvas); }
.shell { grid-template-columns: 255px minmax(0, 1fr); background: var(--canvas); }
.sidebar {
  position: fixed; z-index: 50; inset: 0 auto 0 0; width: 255px; padding: 20px 14px;
  overflow: hidden auto; color: var(--ink); border-right: 1px solid var(--line); background: #fff;
  box-shadow: 4px 0 22px rgba(38, 91, 170, .035);
}
.sidebar::after {
  content: ""; position: absolute; z-index: 0; inset: auto 0 0; height: 46%; pointer-events: none;
  background: url('/assets/sidebar-network.png') 50% 100% / 116% auto no-repeat; opacity: .7;
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar-brand { padding: 0 10px 28px !important; }
.sidebar .brand-mark { width: 43px; height: 43px; border-radius: 7px; background: var(--primary); box-shadow: 0 8px 18px rgba(8, 103, 245, .18); }
.sidebar .brand-name { color: var(--ink); font-size: 18px; }
.sidebar .brand-subtitle { color: var(--muted); }
.purchase-entry {
  min-height: 44px; justify-content: center; gap: 9px; margin: 0 0 18px; color: #fff;
  border: 1px solid var(--primary); border-radius: 7px; background: var(--primary);
  box-shadow: 0 8px 18px rgba(8, 103, 245, .16);
}
.purchase-entry svg { width: 18px; height: 18px; }
.purchase-entry:hover, .purchase-entry.active { color: #fff; border-color: var(--primary-dark); background: var(--primary-dark); }
.nav { gap: 3px; }
.nav-link, .nav-sub-link { color: #3d4d69; border-radius: 7px; font-weight: 650; }
.nav-link { min-height: 43px; padding: 0 13px; }
.nav-sub-link { min-height: 39px; gap: 11px; padding: 0 13px; font-size: 13px; }
.nav-icon { width: 19px; height: 19px; flex: 0 0 auto; color: #5478ae; }
.nav-link:hover, .nav-link.active, .nav-sub-link:hover, .nav-sub-link.active {
  color: #075ccf; background: var(--nav-active);
}
.nav-link.active .nav-icon, .nav-sub-link.active .nav-icon { color: var(--primary); }
.nav-sub-link.active::before { display: none; }
.nav-group { padding-top: 13px; }
.nav-group-title { min-height: 31px; padding: 0 13px; color: #7686a0; font-size: 11px; text-transform: none; }
.nav-submenu { gap: 2px; }
.sidebar-status { display: none; }

.main { grid-column: 2; min-width: 0; padding: 0; }
.topbar {
  min-height: 68px; padding: 0 22px 0 30px; align-items: center; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97); box-shadow: 0 3px 14px rgba(40, 91, 163, .025);
}
.topbar-context { display: flex; align-items: center; gap: 16px; margin-right: auto; }
.topbar-context span, .topbar-context strong { font-size: 13px; font-weight: 700; }
.topbar-context span { color: #6480aa; }
.topbar-context i { color: #9bacc3; font-style: normal; }
.topbar-context strong { color: var(--ink); }
.account-trigger { width: 260px; min-height: 48px; border-color: #d4e1f2; border-radius: 8px; background: #fff; }
.account-trigger:hover { border-color: #aac5eb; background: #fff; }
.account-avatar { background: var(--primary); }
.account-chevron { width: 16px; height: 16px; color: #5f7392; }
.account-dropdown { top: 52px; border-color: #d4e1f2; }
#page-content { padding: 24px 30px 42px; }

.page-header { margin-bottom: 22px; }
.page-header h1 { margin-top: 5px; color: var(--ink); font-size: 27px; }
.page-header p { color: var(--muted); }
.page-eyebrow { color: #6884ad; }
.panel, .table-wrap, .toolbar, .metric, .quick-actions, .security-list { border-color: var(--line); }
.btn, .input, .select { border-color: #c9d8ec; }
.btn-primary { border-color: var(--primary); background: var(--primary); }

.purchase-layout { grid-template-columns: minmax(650px, 1fr) 300px; gap: 26px; }
.purchase-page-heading { min-height: 72px; margin-bottom: 14px; padding: 0 6px 14px; }
.purchase-page-heading h1 { margin: 0; color: var(--ink); font-size: 25px; }
.purchase-page-heading span { margin-top: 7px; color: var(--muted); }
.purchase-selector { padding: 20px; border-color: var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(41, 89, 160, .035); }
.selector-heading { margin-bottom: 11px; }
.selector-heading h2 { color: var(--ink); font-size: 17px; }
.selector-heading p { color: var(--muted); }
.continent-tabs { gap: 10px; margin-bottom: 15px; }
.continent-tab { padding: 0 6px; color: #617390; }
.continent-tab:hover, .continent-tab.selected { color: var(--primary); border-bottom-color: var(--primary); }
.location-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-height: 404px; }
.location-option {
  position: relative; min-height: 92px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
  gap: 8px; padding: 14px; border-color: #d8e4f3; border-radius: 7px; background: #fff;
}
.location-option:hover { border-color: #81aff3; background: #fbfdff; }
.location-option.selected { border-color: var(--primary); background: #f7faff; box-shadow: inset 0 0 0 1px var(--primary); }
.location-title { grid-column: 1 / -1; display: flex; min-width: 0; align-items: center; gap: 9px; }
.location-flag { flex: 0 0 auto; font-size: 19px; line-height: 1; }
.location-primary { min-width: 0; overflow: hidden; color: #182844; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.location-secondary { color: #6b7e9d; font-size: 11px; }
.location-price { color: var(--primary); font-size: 12px; }
.location-selected { position: absolute; top: 7px; right: 7px; display: none; color: var(--primary); }
.location-selected svg { width: 18px; height: 18px; fill: var(--primary); color: #fff; }
.location-option.selected .location-selected { display: block; }
.purchase-config { gap: 18px; margin-top: 17px; padding-top: 17px; }
.select-with-icon { position: relative; display: block; }
.select-with-icon > svg { position: absolute; z-index: 1; left: 12px; top: 10px; width: 17px; height: 17px; color: var(--primary); pointer-events: none; }
.select-with-icon .select { width: 100%; padding-left: 39px; }
.quantity-button { display: grid; place-items: center; color: var(--primary); }
.quantity-button svg { width: 16px; height: 16px; }
.config-total { border-color: #d8e4f3; background: #f8fbff; }
.purchase-assurances {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding: 14px 18px;
  border: 1px solid #e1eaf7; border-radius: 7px; color: #526b91; background: #fff;
}
.purchase-assurances span { display: flex; align-items: center; justify-content: center; gap: 8px; }
.purchase-assurances svg { width: 18px; height: 18px; color: var(--primary); }
.purchase-assurances b { font-size: 11px; font-weight: 650; }
.order-summary { top: 88px; min-height: 606px; border-color: var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(41, 89, 160, .07); }
.order-summary-heading h2 { color: var(--ink); }
.summary-product { border-color: #d5e3f6; background: #f4f8ff; }
.summary-list dt, .summary-list dd { border-color: #e1e9f4; }
.summary-total strong { color: var(--primary); }

@media (max-width: 1320px) {
  .purchase-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; min-height: 0; }
  .location-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { width: min(300px, 86vw); padding: 18px 14px; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand-name { color: var(--ink); }
  .mobile-nav-close { color: #536887; }
  .nav { display: grid; }
  .nav-link { justify-content: flex-start; }
  .nav-group-title { display: flex; }
  .nav-submenu { display: grid; grid-template-columns: 1fr; }
  .nav-sub-link { justify-content: flex-start; padding: 0 13px; text-align: left; }
  .nav-icon { display: block; }
  .main { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .topbar-context { display: none; }
  .mobile-nav-trigger { color: var(--ink); }
  .mobile-nav-trigger svg { width: 19px; height: 19px; }
  .account-trigger { width: min(230px, calc(100vw - 72px)); }
  #page-content { padding: 20px 14px 34px; }
  .location-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-assurances { grid-template-columns: 1fr 1fr; }
  .purchase-assurances span { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .account-trigger { grid-template-columns: 34px 1fr 15px; }
  .account-name { font-size: 11px; }
  .location-grid { grid-template-columns: 1fr; }
  .purchase-assurances { grid-template-columns: 1fr; }
}

.brand-mark,
.sidebar .brand-mark {
  width: 58px;
  height: 44px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-panel .brand-mark { width: 64px; height: 49px; }
.sidebar .brand-name { font-size: 21px; line-height: 1.05; }
.sidebar .brand-subtitle { margin-top: 5px; color: #64748b; font-size: 10px; white-space: nowrap; }
.brand-isp { color: #1688ff; }

/* Customer portal detail refinement. */
.purchase-entry {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 4px 16px;
  border-radius: 6px;
  box-shadow: 0 5px 14px rgba(8, 103, 245, .13);
}
.purchase-entry svg { width: 15px; height: 15px; }
.purchase-entry span { font-size: 14px; font-weight: 700; }

.account-menu { display: flex; align-items: center; }
.account-trigger {
  width: auto;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  grid-template-columns: 34px minmax(0, auto) 14px;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}
.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
  border-color: transparent;
  background: #f1f5fb;
}
.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(8, 103, 245, .17);
}
.account-trigger > span:nth-child(2) { max-width: 170px; }
.account-name { color: #17243b; font-size: 12px; line-height: 1.25; }
.account-role { margin-top: 2px; color: #77849a; font-size: 10px; line-height: 1.2; }
.account-chevron {
  width: 13px;
  height: 13px;
  color: #7a879b;
  transition: transform .18s ease;
}
.account-trigger[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-dropdown {
  top: calc(100% + 7px);
  width: 174px;
  padding: 5px;
  border-color: #dce4ee;
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(26, 42, 68, .12);
}
.account-dropdown::before {
  content: "";
  position: absolute;
  right: 16px;
  top: -5px;
  width: 9px;
  height: 9px;
  border-left: 1px solid #dce4ee;
  border-top: 1px solid #dce4ee;
  background: #fff;
  transform: rotate(45deg);
}
.account-dropdown button,
.account-dropdown a {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: #33425a;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}
.account-dropdown button { color: #c43d3d; }
.account-dropdown a:hover { background: #f1f5fb; }
.account-dropdown button:hover { color: #b72f2f; background: #fff1f1; }

.field { gap: 6px; }
.field label { color: #59677c; font-size: 12px; font-weight: 650; line-height: 1.25; }
.input,
.select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d5dde8;
  border-radius: 6px;
  color: #26344b;
  background-color: #fff;
  box-shadow: inset 0 1px 1px rgba(20, 38, 65, .025);
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.input:hover,
.select:hover { border-color: #b8c6d9; }
.input:focus,
.select:focus {
  border-color: #6f9df0;
  box-shadow: 0 0 0 3px rgba(8, 103, 245, .09);
}
.input::placeholder { color: #9aa6b6; font-size: 13px; }
.input:disabled,
.input[readonly],
.select:disabled { color: #7d8999; background: #f5f7fa; cursor: not-allowed; }
.login-panel .input { height: 46px; }

.toolbar {
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border-color: #e0e6ee;
  border-radius: 7px;
  box-shadow: 0 2px 7px rgba(29, 52, 84, .025);
}
.toolbar .field { width: 180px; }
.toolbar .search-field { width: min(500px, 100%); }
.toolbar .btn { min-height: 40px; }

.section-heading { min-height: 44px; align-items: center; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  color: #64748b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}
.section-link svg { width: 14px; height: 14px; transition: transform .16s ease; }
.section-link:hover { color: var(--primary); }
.section-link:hover svg { transform: translateX(2px); }

th {
  height: 44px;
  padding: 0 15px;
  color: #5f6e83;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: middle;
}
td {
  height: 58px;
  padding: 10px 15px;
  color: #334158;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: middle;
}
.table-empty { height: 150px; padding: 36px 20px; }
.pagination-size { gap: 7px; }
.pagination-size .select { width: 76px; height: 34px; }
.page-button { min-width: 34px; height: 34px; font-size: 12px; }

@media (max-width: 820px) {
  .purchase-entry { min-height: 40px; margin-bottom: 15px; }
  .account-trigger { width: auto; max-width: calc(100vw - 72px); }
  .account-trigger > span:nth-child(2) { max-width: 135px; }
  .toolbar { padding: 12px; }
  .toolbar .btn { width: auto; min-width: 88px; }
}

@media (max-width: 520px) {
  .account-trigger { grid-template-columns: 32px minmax(0, auto) 13px; height: 42px; min-height: 42px; }
  .account-avatar { width: 32px; height: 32px; }
  .account-trigger > span:nth-child(2) { max-width: 110px; }
  .account-name { font-size: 11px; }
  .section-heading { align-items: center; }
  .pagination-pages { width: 100%; justify-content: flex-start; }
  .pagination-info { text-align: left; }
}

/* Persistent customer wallet summary in the top bar. */
.topbar-wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px solid #e4e9f0;
  white-space: nowrap;
}
.topbar-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}
.topbar-balance strong {
  color: #13213a;
  font-size: 16px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.topbar-recharge {
  min-width: 54px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  box-shadow: 0 4px 11px rgba(8, 103, 245, .14);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.topbar-recharge:hover { border-color: var(--primary-dark); background: var(--primary-dark); }

/* ===== 站内信铃铛 ===== */
.notif-bell { position: relative; margin-right: 14px; }
.notif-trigger { position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #5b6a86; cursor: pointer; transition: background .16s ease, color .16s ease; }
.notif-trigger:hover { background: #eef4fc; color: var(--primary); }
.notif-trigger:active { background: #e3ecfa; }
.notif-trigger i { width: 20px; height: 20px; }
.notif-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #f5405b; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px #fff; }
/* 有未读时铃铛点亮 + 轻微摆动一次 */
.notif-trigger.has-unread { color: var(--primary); }
.notif-trigger.has-unread i { animation: notif-swing .6s ease; transform-origin: top center; }
@keyframes notif-swing { 0%,100%{transform:rotate(0)} 20%{transform:rotate(12deg)} 40%{transform:rotate(-10deg)} 60%{transform:rotate(6deg)} 80%{transform:rotate(-4deg)} }
.notif-dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(24,32,51,.16); z-index: 60; overflow: hidden; }
.notif-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.notif-tab { min-height: 36px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.notif-tab:hover { color: var(--ink); }
.notif-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid #eef2f7; background: #fff; cursor: pointer; }
.notif-item:hover { background: #f7faff; }
.notif-item.unread { background: #f2f7ff; }
.notif-ic { flex-shrink: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #eef2fb; color: var(--primary); }
.notif-ic i { width: 16px; height: 16px; }
.notif-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 640; color: var(--ink); }
.notif-text { font-size: 12px; color: #566582; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--muted); }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 20px; color: var(--muted); font-size: 13px; }
.notif-empty-ic { width: 34px; height: 34px; color: #c2ccdd; }
.notif-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: #fbfcfe; }
.notif-foot button, .notif-foot a { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: none; }
.notif-foot button:hover, .notif-foot a:hover { color: var(--primary); }
/* 通知中心整页 */
.notif-page-toolbar { justify-content: space-between; }
.notif-page-list { padding: 0; }
.notif-page-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #eef2f7; cursor: pointer; }
.notif-page-item:last-child { border-bottom: 0; }
.notif-page-item:hover { background: #f7faff; }
.notif-page-item.unread { background: #f2f7ff; }
.notif-page-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.notif-page-title { font-size: 14px; font-weight: 640; color: var(--ink); }
.notif-page-text { font-size: 13px; color: #566582; line-height: 1.6; }
.notif-go { flex-shrink: 0; }

/* 登录/注册切换 + 推广横幅 */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #3c4043; border: 1px solid var(--line); font-weight: 600; }
.btn-google:hover { background: #f7f9fc; border-color: #c7d2e0; }
.btn-google svg { flex-shrink: 0; }
.auth-switch { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.auth-forgot { text-align: right; margin-top: -4px; }
.auth-forgot .link-button { font-size: 13px; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .input { flex: 1; min-width: 0; }
.btn-outline { flex-shrink: 0; white-space: nowrap; padding: 0 14px; background: #fff; color: var(--primary); border: 1px solid var(--primary); font-weight: 600; font-size: 13px; }
.btn-outline:hover:not(:disabled) { background: #eef4fc; }
.btn-outline:disabled { color: var(--muted); border-color: var(--line); background: #f7f9fc; cursor: default; }
.field-hint { color: var(--muted); font-size: 12px; margin-top: -6px; }
.ref-banner { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 14px; border-radius: 8px; background: #eef4fc; color: var(--primary); font-size: 13px; }
.ref-banner i { width: 16px; height: 16px; flex-shrink: 0; }
/* 推广返佣页 */
.affiliate-hero { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.affiliate-intro { flex: 1; min-width: 260px; }
.affiliate-intro h2 { margin: 0 0 8px; }
.affiliate-intro p { color: var(--muted); line-height: 1.7; max-width: 520px; }
.affiliate-intro strong { color: var(--primary); }
.affiliate-link-box { flex: 1; min-width: 300px; }
.affiliate-link-box label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.affiliate-link-row { display: flex; gap: 8px; }
.affiliate-link-row .input { flex: 1; min-width: 0; }
.affiliate-code-row { margin-top: 10px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.affiliate-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 16px 0; }

@media (max-width: 820px) {
  .topbar-wallet { gap: 7px; margin: 0 8px 0 auto; padding-right: 8px; }
  .topbar-context + .topbar-wallet { margin-left: auto; }
  .topbar-balance { gap: 3px; }
  .topbar-balance strong { font-size: 14px; }
  .topbar-recharge { min-width: 48px; height: 32px; padding: 0 10px; }
}

@media (max-width: 520px) {
  .topbar { gap: 6px; }
  .topbar-wallet { gap: 6px; margin-right: 0; padding-right: 0; border-right: 0; }
  .topbar-balance-label { display: none; }
  .topbar-recharge { min-width: 44px; padding: 0 8px; }
  .account-trigger { padding-right: 5px; }
  .account-trigger > span:nth-child(2) { max-width: 72px; }
}

/* ---------- 在线充值 ---------- */
/* button 不继承字体，改成按钮元素后要补回来 */
.topbar-recharge { font-family: inherit; cursor: pointer; }

/* 钱包页：左侧余额，右侧充值面板；窄屏时充值面板落到下方 */
.wallet-layout { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.wallet-layout > * { min-width: 0; }
.recharge-panel { padding: 20px; }

/* 余额直接显示在充值卡片顶部 */
.wallet-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.wallet-balance-label { color: var(--muted); font-size: 13px; }
.wallet-balance-value { margin-top: 6px; font-size: 22px; font-weight: 760; }

/* 右侧充值说明 */
.guide-panel { padding: 20px 22px; }
.guide-head h2 { margin: 0; font-size: 17px; }
.guide-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.guide-steps { margin: 18px 0 0; padding-left: 20px; display: grid; gap: 14px; }
.guide-steps li { line-height: 1.7; }
.guide-steps strong { display: block; font-size: 14px; }
.guide-steps span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.guide-note { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fc; color: var(--muted); font-size: 13px; line-height: 1.7; }
.guide-note strong { color: var(--ink); }
.guide-note-warn { border-color: #ffe0b0; background: #fff9ef; color: #8a5a10; }

/* 金额尾数说明 */
.recharge-explain { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.recharge-explain strong { color: var(--ink); }

.recharge-section-label { margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.recharge-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.recharge-chip { padding: 11px 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-family: inherit; font-size: 14px; font-weight: 640; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.recharge-chip:hover { border-color: var(--primary); }
.recharge-chip.active { border-color: var(--primary); background: #eff4ff; color: var(--primary); }
.recharge-form { display: block; margin-top: 12px; }
.recharge-input { width: 100%; margin-bottom: 18px; }

.recharge-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 18px; }
.recharge-method { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-family: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.recharge-method:hover:not(.disabled) { border-color: var(--primary); }
.recharge-method.active { border-color: var(--primary); background: #eff4ff; }
.recharge-method.disabled { opacity: .55; cursor: not-allowed; }
.recharge-method-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.recharge-method-note { color: var(--muted); font-size: 12px; }
.recharge-submit { margin-top: 2px; }

/* 付款步骤 */
.recharge-alert { padding: 11px 13px; border: 1px solid #ffe0b0; border-radius: 6px; background: #fff9ef; color: #8a5a10; font-size: 13px; line-height: 1.7; }
.recharge-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.recharge-qr svg { display: block; width: 168px; height: auto; max-width: 100%; }
.recharge-qr-note { color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.recharge-field { margin-top: 18px; }
.recharge-label { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.recharge-amount { font-size: 24px; font-weight: 760; letter-spacing: .3px; }
.recharge-address { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.recharge-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.recharge-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.recharge-status .spin { animation: recharge-spin 1s linear infinite; }
@keyframes recharge-spin { to { transform: rotate(360deg); } }
.recharge-done { color: var(--success); font-weight: 640; }
.recharge-expired { color: var(--danger); font-weight: 640; }
.recharge-tips { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.recharge-back { margin-top: 14px; }

/* 待支付的充值记录行可以点回付款界面 */
.recharge-row-resumable { cursor: pointer; }
.recharge-row-resumable:hover { background: #f3f7ff; }
.recharge-resume-hint { margin-left: 8px; color: var(--primary); font-size: 12px; font-weight: 600; }

.link-button { padding: 0; border: 0; background: none; font-family: inherit; font-size: inherit; color: var(--primary); font-weight: 600; text-decoration: underline; cursor: pointer; }

@media (max-width: 1080px) {
  .wallet-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .wallet-balances { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .recharge-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recharge-methods { grid-template-columns: minmax(0, 1fr); }
}

/* 地址前后 6 位高亮，便于和钱包里的地址核对 */
.address-edge { color: var(--primary); font-weight: 700; }
.recharge-qr-address { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; text-align: center; line-height: 1.6; }

/* 到账成功界面 */
.recharge-success { padding: 12px 0 4px; text-align: center; }
.recharge-success-icon { display: flex; justify-content: center; color: var(--success); }
.recharge-success-icon svg { width: 52px; height: 52px; }
.recharge-success-title { margin-top: 12px; font-size: 19px; font-weight: 760; }
.recharge-success-amount { margin-top: 6px; color: var(--success); font-size: 30px; font-weight: 780; }
.recharge-success-note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.recharge-success-redirect { margin: 18px 0 14px; color: var(--muted); font-size: 13px; }
.recharge-success-redirect strong { color: var(--ink); }

/* ---------- 地区卡片内的分区切换 ---------- */
/* 同地区多个供应商供货时合并成一张卡片，卡片内切换 A 区/B 区 */
.location-card { display: flex; flex-direction: column; }
.location-card .location-option { width: 100%; height: 100%; }
.location-card:has(.zone-switch) .location-option { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.zone-switch { display: flex; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: #fbfcfe; }
.zone-chip { flex: 1; padding: 6px 4px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-family: inherit; font-size: 12px; font-weight: 640; color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.zone-chip:hover { border-color: var(--primary); color: var(--primary); }
.zone-chip.active { border-color: var(--primary); background: #eff4ff; color: var(--primary); }
.location-option.selected + .zone-switch { border-color: var(--primary); }

.config-field > span > small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }

/* 滑动开关：购买选项与自动续费共用 */
.option-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.option-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-switch > i { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background .18s; }
.option-switch > i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.option-switch input:checked + i { background: var(--success); }
.option-switch input:checked + i::after { transform: translateX(18px); }
.option-switch input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.option-switch input:disabled + i { opacity: .5; cursor: not-allowed; }
.option-label { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 640; }
.option-label small { color: var(--muted); font-size: 12px; font-weight: 400; }
.option-switch.compact { gap: 0; }

/* 购买页选项行 */
.purchase-options { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 17px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }

.auto-renew-error { max-width: 190px; margin-top: 5px; color: var(--danger); font-size: 11px; line-height: 1.5; }
.udp-badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: 11px; font-weight: 700; }
.expiry-danger { color: var(--danger); font-weight: 640; }
.expiry-warn { color: #b76d00; font-weight: 640; }
.expiry-days { color: var(--muted); }

/* 订单明细里的自动续费开关 */
.summary-autorenew { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }
.summary-autorenew > span { font-size: 14px; font-weight: 640; }

/* 侧边栏时钟：侧边栏是白底，用深色文字 */
.sidebar-clock { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 2px 0 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; }
.sidebar-clock .clock-date { color: var(--muted); font-size: 11px; letter-spacing: .2px; }
.sidebar-clock .clock-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.sidebar-clock .clock-zone { color: var(--muted); font-size: 10px; }

/* 时区不一致提示：固定在底部，不打断操作 */
.tz-banner { position: fixed; z-index: 90; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; width: min(720px, calc(100vw - 32px)); padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 40px rgba(16, 32, 59, .16); }
.tz-banner-text { flex: 1 1 320px; font-size: 13px; line-height: 1.6; }
.tz-banner-text small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.tz-banner-actions { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 620px) { .tz-banner-actions { width: 100%; } .tz-banner-actions .btn { flex: 1; } }
/* 时区下拉分组 */
.field select optgroup { font-weight: 700; color: var(--muted); }
.field select option { font-weight: 400; color: var(--ink); }


/* ---------- 账户页：时区选择器 ---------- */
.tz-picker { position: relative; }
.tz-trigger { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-family: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.tz-trigger:hover { border-color: var(--primary); }
.tz-trigger-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-trigger-offset { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.tz-trigger svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--muted); }
.tz-dropdown { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 16px 44px rgba(16, 32, 59, .16); }
.tz-dropdown.hidden { display: none; }
.tz-search { width: 100%; margin-bottom: 8px; }
.tz-list { max-height: 300px; overflow-y: auto; }
.tz-group { position: sticky; top: 0; padding: 6px 8px 4px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; }
.tz-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.tz-option:hover { background: #f2f6fd; }
.tz-option.selected { background: #eff4ff; color: var(--primary); font-weight: 640; }
.tz-option-name small { margin-left: 5px; color: var(--muted); font-weight: 400; }
.tz-option.selected .tz-option-name small { color: var(--primary); opacity: .75; }
.tz-option-meta { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.tz-option-meta em { margin-left: 6px; color: var(--primary); font-style: normal; }
.tz-empty { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* ---------- 账户页：安全概览 ---------- */
.security-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.security-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }
.security-card.alert { border-color: #ffd7d7; background: #fff7f7; }
.security-card-label { color: var(--muted); font-size: 12px; }
.security-card strong { font-size: 17px; font-weight: 760; }
.security-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.security-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.security-actions strong { display: block; font-size: 14px; }
.security-actions small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

/* ---------- 账户页：安全记录 ---------- */
.activity-list { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.activity-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 130px 210px; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: #fafcff; }
.activity-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #f1f5fb; color: var(--muted); }
.activity-icon svg { width: 16px; height: 16px; }
.activity-icon.ok { background: #eaf7f1; color: var(--success); }
.activity-icon.danger { background: #fdeeee; color: var(--danger); }
.activity-icon.warn { background: #fff5e6; color: #b76d00; }
.activity-title { font-size: 14px; font-weight: 640; }
.activity-sub { margin-top: 2px; color: var(--muted); font-size: 12px; }
.activity-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
.activity-time { color: var(--muted); font-size: 12px; text-align: right; }
@media (max-width: 780px) {
  .activity-row { grid-template-columns: 30px minmax(0, 1fr); }
  .activity-ip, .activity-time { grid-column: 2; text-align: left; }
}

/* ---------- 多地区选购 ---------- */
/* 卡片是 div 而非 button：内部有步进器按钮，button 嵌套 button 是非法 HTML，
   浏览器会把内层按钮解析到卡片外面。role/tabindex 保留可访问性。 */
.location-option { cursor: pointer; }
.location-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 选中后：左边单价，右边加减，同一行 */
.location-stepper { display: inline-flex; align-items: center; gap: 1px; justify-self: end; padding: 2px; border: 1px solid var(--primary); border-radius: 7px; background: #fff; }
.stepper-btn { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: #eff4ff; color: var(--primary); cursor: pointer; }
.stepper-btn:hover { background: #dbe7ff; }
.stepper-btn svg { width: 13px; height: 13px; }
.stepper-input { width: 38px; height: 24px; padding: 0; border: 0; background: none; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink); text-align: center; -moz-appearance: textfield; }
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-input:focus { outline: none; }
/* 选中后第二行变成「单价 | 加减」：
   地区代码（Atlanta 这类）让位给步进器，卡片高度保持不变，不会跳动 */

.location-option.selected .location-price { grid-column: 1; justify-self: start; font-size: 13px; font-weight: 700; }
.location-card.selected .location-option { border-color: var(--primary); background: #f7faff; }

/* 订单明细里的地区清单 */
.summary-regions { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.summary-regions-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 13px; background: #f7f9fc; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.summary-regions-head em { color: var(--primary); font-style: normal; font-weight: 700; }
.summary-region-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 4px; padding: 9px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
.summary-region-row:last-child { border-bottom: 0; }
/* 只有名称列会截断；分区、数量、金额各自独立成列且不收缩，
   这样长地区名不会把分区标签一起吃掉 */
.region-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-zone { padding: 1px 6px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: 10px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.summary-region-qty { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-region-amount { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-region-empty { padding: 16px 13px; color: var(--muted); font-size: 13px; text-align: center; }

/* 批量下单结果 */
.batch-result { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.batch-row { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-bottom: 1px solid #eef2f7; }
.batch-row:last-child { border-bottom: 0; }
.batch-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; }
.batch-icon svg { width: 16px; height: 16px; }
.batch-row.ok .batch-icon { background: #eaf7f1; color: var(--success); }
.batch-row.failed .batch-icon { background: #fdeeee; color: var(--danger); }
.batch-name { font-size: 14px; font-weight: 640; }
.batch-note { margin-top: 2px; color: var(--muted); font-size: 12px; }
.batch-row.failed .batch-note { color: var(--danger); }

/* 大金额防溢出：买 100 个高价 IP 时总额可能到 4~5 位数，
   固定字号会顶破侧栏宽度，用 clamp 让字号随可用宽度收缩 */
.summary-total { gap: 10px; }
.summary-total span { flex: 0 0 auto; }
.summary-total strong { min-width: 0; font-size: clamp(20px, 5.5vw, 30px); line-height: 1.15; text-align: right; word-break: break-all; font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) { .summary-total strong { font-size: clamp(20px, 2.2vw, 30px); } }


/* 总价框收窄一些，给左侧信息让位 */
.config-total { min-height: 52px; padding: 6px 10px; }
.config-total strong { font-size: 17px; }

/* 地区代码跟在中文名右边：选中后第二行让给价格和步进器，
   放第二行会导致选中时看不到 Atlanta / AU 这类信息 */
.location-title { padding-right: 20px; }
.location-title .location-primary { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-title .location-secondary { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-option.selected .location-price { grid-column: 1; justify-self: start; }

/* ---------- 数量折扣进度条 ---------- */
.qty-discount-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 11px 14px; border: 1px solid #e3ebfa; border-radius: var(--radius); background: linear-gradient(90deg, #f6f9ff, #fbfcff); }
.qty-discount-info strong { display: block; font-size: 13px; }
.qty-discount-info small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.qty-tiers { display: flex; gap: 6px; flex-wrap: wrap; }
.qty-tier { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; white-space: nowrap; }
.qty-tier b { margin-left: 3px; font-weight: 700; }
.qty-tier.active { border-color: var(--primary); background: #eff4ff; color: var(--primary); }

/* 订单明细里的周期下拉：独立一行铺满 */
.summary-period-row { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.summary-period-row > span:first-child { color: var(--muted); font-size: 12px; }
.summary-period-row .summary-period { width: 100%; }
.summary-period-row .summary-period select { width: 100%; padding: 9px 12px 9px 34px; font-size: 13px; }

/* ---------- 动态代理资源卡片 ---------- */
.dyn-card { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.dyn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.dyn-head strong { font-size: 15px; }
.dyn-sub { margin-left: 8px; color: var(--muted); font-size: 12px; }
.dyn-status { display: flex; align-items: center; gap: 10px; }
.dyn-expiry { color: var(--muted); font-size: 12px; }
.dyn-body { padding: 16px; }
.dyn-cred { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dyn-field { display: flex; flex-direction: column; gap: 4px; }
.dyn-field > span { color: var(--muted); font-size: 12px; }
.dyn-field b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.dyn-traffic { color: var(--primary); }
.dyn-gen { padding-top: 14px; border-top: 1px solid var(--line); }
.dyn-gen-title { margin-bottom: 10px; font-size: 13px; font-weight: 640; }
.dyn-gen-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.dyn-gen-form label { display: flex; flex-direction: column; gap: 4px; }
.dyn-gen-form label > span { color: var(--muted); font-size: 12px; }
.dyn-gen-form select, .dyn-gen-form input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 13px; background: #fff; }
.dyn-gen-form button { grid-column: 1 / -1; }
.dyn-result { margin-top: 14px; }
.dyn-result:empty { display: none; }
.dyn-result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.dyn-conn { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fafcff; }
.dyn-conn code { flex: 1; min-width: 0; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: nowrap; }
@media (min-width: 720px) { .dyn-gen-form button { grid-column: auto; } }

/* 动态代理页子标签 */
.dyn-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.dyn-tab { min-height: 40px; padding: 0 18px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
.dyn-tab:hover { color: var(--primary); }
.dyn-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* 提取代理布局 */
.dyn-extract { display: grid; gap: 16px; }
.dyn-account-panel { padding: 18px 20px; }
.dyn-account-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dyn-account-pick { display: flex; flex-direction: column; gap: 6px; min-width: 260px; flex: 1; }
.dyn-account-pick > span { color: var(--muted); font-size: 12px; }
.dyn-account-pick select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; background: #fff; }
.dyn-account-meta { display: flex; gap: 26px; }
.dyn-account-meta > div { display: flex; flex-direction: column; gap: 4px; }
.dyn-account-meta span { color: var(--muted); font-size: 12px; }
.dyn-account-meta b { font-size: 14px; font-variant-numeric: tabular-nums; }
.dyn-account-cred { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.dyn-gen-tip { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.dyn-gen-tip code { padding: 1px 5px; border-radius: 4px; background: #eef2fb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dyn-result-panel .dyn-result { margin-top: 0; }
.dyn-empty { padding: 46px 20px; }

/* 服务协议弹窗 */
.terms-modal { width: min(680px, calc(100vw - 32px)); }
.terms-content { max-height: 62vh; overflow-y: auto; padding-right: 8px; font-size: 13px; line-height: 1.8; color: var(--ink); }
.terms-content h4 { margin: 18px 0 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.terms-content h4:first-child { margin-top: 0; }
.terms-content p { margin: 6px 0; color: #3a475e; }
.terms-content .terms-closing { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.tos-link { padding: 0; font-size: inherit; vertical-align: baseline; text-decoration: none; }
.tos-link:hover { text-decoration: none; }

/* 登录页合规提示 */
.login-compliance { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); text-align: center; }

/* ===== 精致商务蓝 · 组件精修 ===== */
.metrics { overflow: hidden; }
.metrics, .table-wrap, .panel, .purchase-selector { box-shadow: var(--shadow-card); }
.order-summary { box-shadow: var(--shadow-card); }
.btn-primary { box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .6); }
.btn-primary:hover { box-shadow: 0 9px 22px -8px rgba(37, 99, 235, .72); }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link.active:hover { background: var(--primary-dark); }
.account-avatar, .brand-mark { border-radius: 9px; }
.summary-product { border-color: #cfe0fb; background: var(--primary-soft); }
.location-option.selected, .package-option.selected { background: var(--primary-soft); }
.input, .select { border-color: #d3dded; }

/* ===== 图标升级 · 特色条 / 小插画 ===== */
/* 侧边栏图标 —— 干净线条(参考 proxy-cheap，去掉彩色磁贴) */
.sidebar .nav-link, .sidebar .nav-sub-link { gap: 11px; }
.sidebar .nav-icon {
  width: 19px; height: 19px; min-width: 19px;
  padding: 0; border-radius: 0; background: none; box-shadow: none;
  color: #8ea3c1; stroke-width: 1.9; transition: color .15s;
}
.sidebar .nav-link:hover .nav-icon, .sidebar .nav-sub-link:hover .nav-icon { color: #cfdcef; }
.sidebar .nav-link.active .nav-icon, .sidebar .nav-sub-link.active .nav-icon { color: #7fb0ff; }
/* 选中项 —— 统一为柔和蓝色高亮(参考 proxy-cheap，不用实心蓝条) */
.sidebar .nav-link.active, .sidebar .nav-sub-link.active { background: rgba(59, 130, 246, .20); color: #fff; }
.sidebar .nav-link.active:hover, .sidebar .nav-sub-link.active:hover { background: rgba(59, 130, 246, .27); }

/* 底部特色条 —— 双色调彩色图标 */
.purchase-assurances { gap: 14px; }
.purchase-assurances .pa { display: flex; align-items: center; gap: 10px; }
.purchase-assurances .pa svg { width: 40px; height: 40px; padding: 10px; border-radius: 11px; box-sizing: border-box; }
.purchase-assurances .pa b { font-size: 12px; }
.pa-b svg { background: #eaf1fe; color: #2563eb; }
.pa-g svg { background: #e7f6ee; color: #16a34a; }
.pa-a svg { background: #fdf1e1; color: #d97706; }
.pa-v svg { background: #efeafe; color: #7c3aed; }

/* 订单明细空状态小插画 */
.summary-region-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px 8px; line-height: 1.6; }
.summary-region-empty .empty-illus { margin-bottom: 6px; }
.summary-region-empty .empty-title { font-size: 14px; color: var(--ink); }
.summary-region-empty span { font-size: 12px; color: var(--muted); }

/* 订单「处理中/待处理」状态 —— 脉冲雷达点动画 */
.status-live::before { animation: statusPing 1.3s ease-out infinite; }
@keyframes statusPing {
  0%   { box-shadow: 0 0 0 0 rgba(217,119,6,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(217,119,6,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,119,6,0); }
}
@media (prefers-reduced-motion: reduce) { .status-live::before { animation: none; } }

/* 我的代理 · 主机列 IP/域名 切换 */
.host-toggle { display: inline-flex; margin-left: 6px; vertical-align: middle; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.host-mode-btn { border: 0; background: #fff; color: var(--muted); font-size: 11px; font-weight: 600; padding: 3px 9px; cursor: pointer; line-height: 1.4; font-family: inherit; }
.host-mode-btn.active { background: var(--primary); color: #fff; }
.host-mode-btn:not(.active):hover { background: var(--primary-soft); color: var(--primary); }
.host-mode-btn + .host-mode-btn { border-left: 1px solid var(--line); }

/* 推荐码「选填」标记 */
.label-optional { margin-left: 7px; padding: 1px 7px; border-radius: 5px; background: var(--soft, #f2f5fa);
  border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; vertical-align: middle; }

@media (max-width: 820px) {
  .login-points { position: static; transform: none; justify-content: center; max-width: 100%; margin-top: 26px; }
  .login-context-copy { text-align: center; }
}

/* ===== 登录页：整页装在横放平板里 ===== */
.ipad {
  position: relative;
  width: min(96vw, 1460px); height: min(90vh, 940px);
  padding: 16px 20px; border-radius: 34px;
  background: linear-gradient(160deg, #2a374d, #141d2e 58%, #0c1320);
  box-shadow: 0 0 0 1px rgba(255,255,255,.16) inset, 0 2px 0 rgba(255,255,255,.12) inset,
    0 50px 90px -34px rgba(10, 25, 60, .5), 0 14px 30px -14px rgba(10, 25, 60, .34);
}
.ipad-cam { position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #4b5972; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.ipad-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 18px;
  display: grid; grid-template-columns: 1.4fr minmax(330px, 1fr);
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3);
}
.ipad-screen::after {   /* 屏幕反光（不挡点击） */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(118deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.03) 24%, transparent 44%);
}
/* 屏幕内蓝色区的网络动效 */
.scr-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.sln { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 1.3; stroke-dasharray: 5 8; animation: llnFlow 16s linear infinite; }
.sln.s2 { stroke: rgba(255,255,255,.2); animation-duration: 21s; animation-direction: reverse; }
.sdot { fill: rgba(255,255,255,.8); }
.sspark { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.sspark.s { fill: #c8e8ff; }
/* 窄屏不套平板外壳：直接全屏显示表单（蓝色区隐藏，避免被裁切） */
@media (max-width: 1024px) {
  .login-page { padding: 0; background: #fff; place-items: stretch; }
  .ipad { width: 100%; height: 100vh; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .ipad-cam, .ipad-screen::after { display: none; }
  .ipad-screen { border-radius: 0; box-shadow: none; grid-template-columns: 1fr; overflow: auto; }
  .login-context { display: none; }
}

/* 登录表单：服务协议勾选与忘记密码同一行 */
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 2px; flex-wrap: wrap; }
.agree-row { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #5b6577; cursor: pointer; }
.agree-row input { width: 15px; height: 15px; flex: 0 0 auto; cursor: pointer; }
.agree-row .link-button { font-size: 12.5px; padding: 0; vertical-align: baseline; text-decoration: none; }
.auth-forgot-link { font-size: 13px; white-space: nowrap; }
.login-panel .btn-block:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* 登录表单区：右上角语言切换（按钮只显示国旗） */
.login-panel { position: relative; }
.auth-lang { position: absolute; top: clamp(16px, 2.4vh, 26px); right: clamp(18px, 2vw, 30px); z-index: 6; }
.auth-lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: #8a97ab; cursor: pointer; font-family: inherit; }
.auth-lang-btn:hover { border-color: #c7d3e6; color: var(--primary); }
.auth-lang-chev { transition: transform .2s; }
.auth-lang-btn[aria-expanded="true"] .auth-lang-chev { transform: rotate(180deg); }
.auth-lang .flag { width: 24px; height: 17px; border-radius: 3px; display: block; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(10, 25, 70, .1); }
.auth-lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 20px 44px -26px rgba(10, 25, 70, .45); }
.auth-lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0;
  background: none; border-radius: 8px; font-family: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; text-align: left; }
.auth-lang-menu button:hover:not(:disabled) { background: var(--soft, #f4f7fb); color: var(--primary); }
.auth-lang-menu button.active { color: var(--primary); font-weight: 700; }
.auth-lang-menu button:disabled { color: #aab3c2; cursor: not-allowed; }

/* 忘记密码：去掉下划线 */
.auth-forgot-link, .auth-forgot-link:hover { text-decoration: none; }

/* 登录表单区：左上角返回主页 */
.auth-home { position: absolute; top: clamp(16px, 2.4vh, 26px); left: clamp(18px, 2vw, 30px); z-index: 6;
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: #5b6577; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: border-color .15s, color .15s; }
.auth-home:hover { border-color: #c7d3e6; color: var(--primary); }

/* 登录页 logo 扫光（与官网一致） */
.brand-shine { position: relative; display: inline-block; overflow: hidden; border-radius: 10px; flex: 0 0 auto; }
.brand-shine .brand-mark { display: block; }
.brand-shine::after { content: ""; position: absolute; top: -60%; left: -130%; width: 55%; height: 220%;
  pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,.9), transparent);
  transform: skewX(-22deg); animation: brandShine 4.5s ease-in-out infinite; }
@keyframes brandShine { 0%, 70% { left: -130%; } 100% { left: 150%; } }

/* 空状态插画：尺寸由 CSS 控制，等比不失真 */
.empty-illus { width: 108px; height: auto; flex: 0 0 auto; display: block; }
.empty-illus.lg { width: 190px; }
/* 我的代理：空状态（表格高度限制在这里要放开） */
.table-empty.res-empty { height: auto; display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 64px 20px 72px; }
.table-empty.res-empty .empty-title { margin-top: 12px; font-size: 17px; color: var(--ink); font-weight: 750; }
.table-empty.res-empty span { font-size: 13.5px; color: var(--muted); }
.table-empty.res-empty .btn { display: inline-flex; align-items: center; justify-content: center;
  margin-top: 22px; min-height: 46px; padding: 0 32px; border-radius: 10px;
  font-size: 15px; font-weight: 700; line-height: 1; }

/* 空状态按钮：去掉链接下划线 */
.table-empty.res-empty .btn, .table-empty.res-empty .btn:hover { text-decoration: none; }
/* 侧边栏 logo 扫光容器不影响原有尺寸 */
.sidebar .brand-shine { border-radius: 7px; }

/* ===================== 概览页美化（沿用官网视觉语言） ===================== */
:root { --grad-brand: linear-gradient(120deg, #11b8ed, #0879f8 48%, #123ee8); }

/* 余额主卡 */
.ov-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap; padding: 30px 34px; border-radius: 20px; color: #fff;
  background: var(--grad-brand); box-shadow: 0 20px 44px -24px rgba(8, 121, 248, .6); }
.ov-hero-deco { position: absolute; inset: 0; pointer-events: none; }
.ovh-orb { position: absolute; width: 260px; height: 260px; border-radius: 50%; filter: blur(60px);
  background: radial-gradient(circle, rgba(255,255,255,.34), transparent 70%); right: -60px; top: -120px; }
.ovh-orb.o2 { left: -80px; bottom: -150px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(120,190,255,.4), transparent 70%); }
.ov-hero-main { position: relative; z-index: 1; }
.ov-hello { display: block; font-size: 13px; color: #d6e7ff; font-weight: 550; }
.ov-bal-label { margin-top: 12px; font-size: 13px; color: #cfe1ff; }
.ov-bal { font-size: clamp(32px, 3.6vw, 46px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.ov-bal-sub { margin-top: 8px; font-size: 12.5px; color: #cfe1ff; }
.ov-hero-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.ov-hero-actions .btn { display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 26px; border-radius: 11px; font-size: 15px; font-weight: 700; text-decoration: none; }
.ov-btn-primary { background: #fff; color: var(--primary); border: 0; box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); }
.ov-btn-primary:hover { background: #f2f7ff; }
.ov-btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.34); }
.ov-btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }

/* 指标卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.stat-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s, border-color .16s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: #d6e1f3; }
.stat-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; color: #fff;
  box-shadow: 0 8px 18px -8px rgba(20, 40, 90, .5); }
.stat-ic svg { width: 22px; height: 22px; }
.g-blue { background: linear-gradient(135deg, #38bdf8, #0879f8); }
.g-teal { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.g-amber { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.g-violet { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.stat-body { min-width: 0; }
.stat-label { display: block; font-size: 12.5px; color: var(--muted); }
.stat-value { display: block; margin-top: 3px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat-value.stat-link { font-size: 19px; color: var(--primary); }
.stat-note { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.stat-cover { position: absolute; inset: 0; border-radius: 16px; }

/* 快捷入口 */
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.quick-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform .16s, box-shadow .16s, border-color .16s; }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: #cfdcf3; }
.quick-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.quick-ic svg { width: 21px; height: 21px; }
.q1 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.q2 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.q3 { background: linear-gradient(135deg, #34d399, #059669); }
.quick-txt { flex: 1; min-width: 0; }
.quick-txt b { display: block; font-size: 15px; font-weight: 750; color: var(--ink); }
.quick-txt small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.quick-arrow { color: #b9c4d6; display: flex; transition: transform .16s, color .16s; }
.quick-arrow svg { width: 18px; height: 18px; }
.quick-card:hover .quick-arrow { color: var(--primary); transform: translateX(3px); }

@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr; } .ov-hero { padding: 24px; } }

/* ============================================================
   客户后台整体美化 —— 与官网首页统一的视觉语言
   （放在文件最后，覆盖前面几轮的基础样式）
   ============================================================ */

/* 画布：淡蓝光晕网格，替代原来的纯色平底 */
body {
  background:
    radial-gradient(760px 420px at 88% -6%, rgba(17, 184, 237, .09), transparent 62%),
    radial-gradient(680px 460px at -6% 8%, rgba(8, 121, 248, .07), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
}

/* ---------- 侧边栏 ---------- */
.sidebar { border-right: 1px solid rgba(214, 229, 250, .9); box-shadow: 4px 0 26px rgba(38, 91, 170, .045); }
.sidebar .nav-link, .sidebar .nav-sub-link { position: relative; transition: background .16s, color .16s, box-shadow .16s; }
/* 选中项：实心品牌渐变 + 白字，一眼能看出当前在哪一页 */
.sidebar .nav-link.active, .sidebar .nav-sub-link.active,
.sidebar .nav-link.active:hover, .sidebar .nav-sub-link.active:hover {
  color: #fff; font-weight: 700;
  background: var(--grad-brand);
  box-shadow: 0 10px 20px -12px rgba(8, 121, 248, .85);
}
.sidebar .nav-link.active .nav-icon, .sidebar .nav-sub-link.active .nav-icon { color: #fff; }
.sidebar .nav-link.active::before, .sidebar .nav-sub-link.active::before,
.sidebar .nav-link.active::after, .sidebar .nav-sub-link.active::after { display: none; }
/* 未选中项悬停：淡蓝底 + 蓝字，和选中态明显区分 */
.sidebar .nav-link:hover:not(.active), .sidebar .nav-sub-link:hover:not(.active) { background: #eef5ff; color: #0757d1; }
.sidebar .nav-link:hover:not(.active) .nav-icon, .sidebar .nav-sub-link:hover:not(.active) .nav-icon { color: var(--primary); }
.nav-group-title { letter-spacing: .04em; }
.sidebar-clock {
  border-color: rgba(200, 222, 250, .9);
  background: linear-gradient(160deg, #f4f9ff, #eef5ff);
  box-shadow: inset 0 1px 0 #fff;
}
.sidebar-clock .clock-time { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.purchase-entry { background: var(--grad-brand); border: 0; box-shadow: 0 12px 24px -12px rgba(8, 121, 248, .7); transition: transform .16s, box-shadow .16s; }
.purchase-entry:hover, .purchase-entry.active { background: var(--grad-brand); transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(8, 121, 248, .8); }

/* ---------- 顶栏：毛玻璃 ---------- */
.topbar {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(214, 229, 250, .9);
  box-shadow: 0 4px 18px rgba(40, 91, 163, .04);
}
.topbar-recharge { border: 0; background: var(--grad-brand); box-shadow: 0 10px 20px -10px rgba(8, 121, 248, .8); transition: transform .16s, box-shadow .16s; }
.topbar-recharge:hover { background: var(--grad-brand); transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(8, 121, 248, .9); }
.account-avatar { background: var(--grad-brand); box-shadow: 0 8px 16px -8px rgba(8, 121, 248, .6); }
.account-trigger { border-radius: 10px; transition: border-color .16s, box-shadow .16s; }
.account-trigger:hover { border-color: #9dc0f2; box-shadow: 0 6px 18px -10px rgba(8, 121, 248, .5); }

/* ---------- 页头 ---------- */
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: #4a76bd; font-size: 11px; font-weight: 800; letter-spacing: .12em;
}
.page-eyebrow::before { content: ""; width: 16px; height: 3px; border-radius: 2px; background: var(--grad-brand); }
.page-header h1 { letter-spacing: -.025em; font-weight: 850; }

/* ---------- 区块标题 ---------- */
.section-heading h2, .panel > h2, .guide-head h2 {
  position: relative; padding-left: 13px; font-weight: 800; letter-spacing: -.015em;
}
.section-heading h2::before, .panel > h2::before, .guide-head h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 15px; border-radius: 3px; background: var(--grad-brand);
}
.section-link { font-weight: 700; }

/* ---------- 卡片 / 表格容器 ---------- */
.panel, .table-wrap, .purchase-selector, .order-summary, .toolbar-card {
  border-radius: 16px;
  border-color: rgba(219, 232, 249, .95);
  box-shadow: 0 1px 2px rgba(20, 40, 90, .04), 0 16px 34px -26px rgba(20, 50, 110, .34);
}
th {
  background: linear-gradient(180deg, #f5f9ff, #eef4fd);
  color: #46587a; border-bottom: 1px solid rgba(214, 229, 250, .9); letter-spacing: .01em;
}
tbody tr { transition: background .14s; }
tbody tr:hover { background: #f6faff; }
td { border-top-color: rgba(226, 236, 249, .95); }

/* ---------- 按钮 ---------- */
.btn { border-radius: 9px; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; }
.btn-primary, .page-button.active {
  border: 0; background: var(--grad-brand); color: #fff;
  box-shadow: 0 10px 20px -12px rgba(8, 121, 248, .85);
}
.btn-primary:hover { background: var(--grad-brand); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(8, 121, 248, .95); }
.btn:not(.btn-primary):hover { border-color: #9dc0f2; background: #f5f9ff; }
.page-button { border-radius: 9px; }

/* ---------- 状态：改成柔和胶囊 ---------- */
.status {
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: #56657f; background: #eef2f8;
}
.status::before { width: 6px; height: 6px; }
.status-success { color: #06855a; background: #e6f8f1; }
.status-danger { color: #c0261f; background: #fdeceb; }
.status-warning { color: #a65f04; background: #fff5e6; }

/* ---------- 钱包 ---------- */
.wallet-balances { border-bottom: 0; gap: 14px; }
.wallet-balance {
  position: relative; overflow: hidden; padding: 16px 18px; border-radius: 14px;
  border: 1px solid rgba(214, 229, 250, .9); background: linear-gradient(160deg, #f7fbff, #eef5ff);
}
.wallet-balance:first-child { color: #fff; border: 0; background: var(--grad-brand); box-shadow: 0 14px 28px -18px rgba(8, 121, 248, .8); }
.wallet-balance:first-child .wallet-balance-label { color: #d3e5ff; }
.wallet-balance-value { letter-spacing: -.02em; }
.guide-note { border-radius: 12px; }

/* ---------- 推广返佣的指标条 ---------- */
.metrics { border: 0; background: transparent; gap: 16px; }
.metric {
  border: 1px solid rgba(219, 232, 249, .95); border-radius: 16px; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 40, 90, .04), 0 16px 34px -26px rgba(20, 50, 110, .34);
  transition: transform .16s, box-shadow .16s;
}
.metric:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(20, 40, 90, .05), 0 20px 40px -24px rgba(20, 50, 110, .45); }
.metric-value { letter-spacing: -.02em; }

/* ---------- 购买页选项 ---------- */
.location-option, .package-option { border-radius: 11px; transition: transform .14s, border-color .14s, box-shadow .14s; }
.location-option:hover, .package-option:hover { transform: translateY(-2px); border-color: #9dc0f2; box-shadow: 0 10px 22px -16px rgba(8, 121, 248, .8); }
.location-option.selected, .package-option.selected {
  border-color: var(--primary); background: linear-gradient(160deg, #f4f9ff, #ecf3ff);
  box-shadow: inset 0 0 0 1px var(--primary), 0 10px 22px -16px rgba(8, 121, 248, .8);
}
.continent-tab { border-radius: 8px 8px 0 0; font-weight: 650; }
.config-total { border-radius: 11px; background: linear-gradient(160deg, #f6faff, #eef5ff); border-color: rgba(214, 229, 250, .9); }
.config-total strong { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 订单摘要：顶部品牌渐变细条 */
.order-summary { position: sticky; overflow: hidden; }
.order-summary::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad-brand); }
.summary-total strong { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.summary-product { border-radius: 12px; border-color: #d3e4fa; background: linear-gradient(160deg, #f6faff, #eef5ff); }

/* ---------- 输入 ---------- */
.input, .select { border-radius: 9px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8, 121, 248, .13); }

/* ---------- 进场动效：内容区淡入上移 ---------- */
/* fill-mode 用 backwards 而不是 both：both 会让动画结束后仍处于"填充"状态，
   Chrome 会一直保留因 opacity/transform 产生的层叠上下文，于是每个区块自成一层，
   后面的区块整体盖住前面区块里的下拉框（时区选择器被"安全记录"压住就是这么来的）。
   backwards 只在延迟期间生效，结束后不再填充，层叠上下文随之消失。 */
#page-content > * { animation: pcRise .34s cubic-bezier(.22, .9, .3, 1) backwards; }
#page-content > *:nth-child(2) { animation-delay: .04s; }
#page-content > *:nth-child(3) { animation-delay: .08s; }
#page-content > *:nth-child(4) { animation-delay: .12s; }
#page-content > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes pcRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #page-content > * { animation: none; }
  .btn, .metric, .stat-card, .quick-card, .location-option, .package-option { transition: none; }
}
/* .metric:last-child 早前把右边框去掉了(拼接式布局)，改成独立卡片后要补回来 */
.metrics .metric:last-child { border-right: 1px solid rgba(219, 232, 249, .95); }

/* 顶栏的语言切换：复用登录页那套，只是改成随流布局(登录页那份是绝对定位) */
.auth-lang.topbar-lang { position: relative; top: auto; right: auto; z-index: 25; margin-right: 4px; }
.auth-lang.topbar-lang .auth-lang-btn { height: 36px; border-radius: 9px; background: #fff; }
.auth-lang.topbar-lang .flag { width: 22px; height: 15px; }

/* 概览主卡只剩一个按钮，改成白底实心的主按钮 */
.ov-hero-actions .ov-btn-primary { min-width: 132px; }

/* 钱包页内嵌区的「待支付」占位卡片 —— 付款细节在弹窗里，这里只做状态提示 */
.recharge-pending { display: grid; gap: 12px; padding: 18px; border: 1px solid #cfe0fb; border-radius: 14px;
  background: linear-gradient(160deg, #f6faff, #eef5ff); }
.recharge-pending-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.recharge-pending-badge { padding: 3px 10px; border-radius: 999px; color: #a65f04; background: #fff5e6;
  font-size: 12px; font-weight: 700; }
.recharge-pending-no { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.recharge-pending-amount { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.recharge-pending-amount span { color: var(--muted); font-size: 13px; }
.recharge-pending-amount strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.recharge-pending-meta { color: var(--muted); font-size: 13px; }
.recharge-pending-meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.recharge-pending .recharge-status { margin-top: 0; font-size: 13px; }
.recharge-pending .btn-block { margin-top: 0; }

/* 弹窗关闭按钮 / 返回按钮 —— 原来是白底描边，在白色弹窗上几乎看不出是按钮 */
.modal-close.icon-button {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  color: #5b6a86; border: 1px solid #dbe6f5; border-radius: 10px; background: #eef3fa;
  font-size: 20px; line-height: 1; transition: background .15s, color .15s, border-color .15s;
}
.modal-close.icon-button:hover { color: var(--danger); border-color: #f7c6c3; background: #fdeceb; }
.recharge-back {
  color: #3a4a66; border: 1px solid #d6e2f2; background: #eef3fa; font-weight: 700;
}
.recharge-back:hover { color: var(--primary); border-color: #a9c8f3; background: #e3edfb; }

/* ===== 购买页背景动效层 ===== */
/* fixed 定位铺满可视区：内容再短，底部留白也不会是一片死白。
   z-index 0 + 后面兄弟节点抬到 1，保证它永远压在卡片下面。 */
.page-deco { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-image: radial-gradient(rgba(8, 121, 248, .075) 1px, transparent 1px);
  background-size: 26px 26px; }
#page-content > .page-deco { animation: none; }
#page-content > .page-deco ~ * { position: relative; z-index: 1; }

.pd-orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.pd-orb.o1 { width: 460px; height: 460px; right: 6%; top: -170px;
  background: radial-gradient(circle, rgba(17, 184, 237, .30), transparent 70%);
  animation: pdDrift 26s ease-in-out infinite; }
.pd-orb.o2 { width: 520px; height: 520px; left: -140px; bottom: -180px;
  background: radial-gradient(circle, rgba(8, 121, 248, .24), transparent 70%);
  animation: pdDrift 32s ease-in-out infinite reverse; }
.pd-orb.o3 { width: 420px; height: 420px; right: -110px; bottom: -120px;
  background: radial-gradient(circle, rgba(18, 62, 232, .20), transparent 70%);
  animation: pdDrift 38s ease-in-out infinite; }
@keyframes pdDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(38px, -44px); } }

.pd-net { position: absolute; inset: 0; width: 100%; height: 100%; }
.pd-link { stroke: rgba(8, 121, 248, .30); stroke-width: 1.4; stroke-dasharray: 7 11;
  animation: pdFlow 22s linear infinite; }
@keyframes pdFlow { to { stroke-dashoffset: -288; } }
.pd-dot { fill: #0879f8; opacity: .5; }
.pd-ring { fill: none; stroke: rgba(8, 121, 248, .4); stroke-width: 1.4;
  transform-box: fill-box; transform-origin: center; animation: pdPulse 3.4s ease-out infinite; }
@keyframes pdPulse { 0% { transform: scale(.5); opacity: .55; } 78% { transform: scale(2.1); opacity: 0; } 100% { transform: scale(2.1); opacity: 0; } }
.pd-packet { fill: #11b8ed; opacity: .8; filter: drop-shadow(0 0 6px rgba(17, 184, 237, .75)); }
.pd-radar circle { fill: none; stroke: rgba(8, 121, 248, .16); stroke-width: 1.2; stroke-dasharray: 3 9; }

@media (max-width: 900px) { .page-deco { background-size: 20px 20px; } .pd-orb { filter: blur(52px); } }
@media (prefers-reduced-motion: reduce) {
  .pd-orb, .pd-link, .pd-ring { animation: none; }
  .pd-packet { display: none; }
}

/* 表单两列并排时，短的那一列（只有 label+控件）会被拉伸到和带说明文字的那一列
   等高，grid 的 align-content:stretch 把多出来的高度平摊进各行，控件就被顶下去了。
   固定按内容排列，两列的输入框才会对齐。 */
.field { align-content: start; }

/* ===================== 工单 ===================== */
/* 侧边栏未读红点 */
.nav-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); flex: 0 0 auto; }
.sidebar .nav-sub-link.active .nav-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }

.tk-tabs { margin-bottom: 14px; }
.tk-row { cursor: pointer; }
.tk-new { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* 对话流和每条消息都是 grid：消息少的时候容器还有大片空高度，
   grid 默认的 align-content:stretch 会把仅有的那一行撑满，
   于是一句话的气泡被拉成好几行高。两层都固定按内容排列。 */
.tk-thread { display: grid; gap: 18px; align-content: start; }
.tk-msg { display: grid; gap: 6px; max-width: 78%; align-content: start; }
.tk-msg.tk-me { margin-left: auto; justify-items: end; }
.tk-msg.tk-sys { max-width: 100%; justify-items: center; }
.tk-msg-head { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: var(--muted); }
.tk-msg-head b { color: var(--ink); font-size: 13px; font-weight: 700; }
.tk-bubble { padding: 12px 15px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.tk-me .tk-bubble { color: #fff; border: 0; background: var(--grad-brand);
  box-shadow: 0 10px 22px -16px rgba(8, 121, 248, .9); }
.tk-cs .tk-bubble { background: linear-gradient(160deg, #f7fbff, #eef5ff); border-color: #d7e6fa; }
.tk-sys .tk-bubble { padding: 8px 14px; border-radius: 999px; border-style: dashed;
  background: #f6f8fc; color: var(--muted); font-size: 12.5px; text-align: center; }
.tk-sys .tk-msg-head { display: none; }
.tk-text { white-space: pre-wrap; word-break: break-word; line-height: 1.75; font-size: 14px; }
.tk-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tk-img { display: block; width: 108px; height: 108px; border-radius: 9px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5); background: #fff; }
.tk-cs .tk-img, .tk-sys .tk-img { border-color: var(--line); }
.tk-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-img:hover img { opacity: .9; }

.tk-textarea { height: auto; min-height: 96px; padding: 11px 13px; line-height: 1.7; resize: vertical; font-family: inherit; }

/* 对话弹窗：头/尾固定，中间的对话流单独滚动 */
/* 固定高度而不是贴着内容：聊天窗口每次打开大小一致，
   消息多的时候也不会一路撑到屏幕边缘 */
.tk-modal { width: min(880px, 100%); height: min(760px, calc(100vh - 40px));
  display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tk-modal .modal-header { padding: 22px 24px 16px; }
.tk-modal .modal-header p { font-size: 12.5px; }
.tk-modal-head-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.tk-modal .tk-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px;
  background: #f7f9fd; border-bottom: 1px solid var(--line); }
.tk-modal .tk-reply { display: grid; gap: 11px; padding: 16px 24px 20px; }
.tk-modal .tk-textarea { min-height: 76px; }
.tk-reply-actions { display: flex; justify-content: flex-end; gap: 10px; }
.tk-closed-note { padding: 18px 24px 22px; color: var(--muted); font-size: 13px; }
.tk-modal .tk-msg { max-width: 82%; }

/* 图片选择器 */
.tk-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tk-upload-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border: 1px dashed #b9cdec; border-radius: 9px; color: var(--primary); background: #f5f9ff;
  font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .15s, background .15s; }
.tk-upload-btn:hover { border-color: var(--primary); background: #eaf2ff; }
.tk-upload-btn svg { width: 16px; height: 16px; }
.tk-upload-hint { color: var(--muted); font-size: 12px; }
.tk-thumbs { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.tk-thumb { position: relative; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.tk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-thumb-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(15, 25, 45, .62); color: #fff; font-size: 14px; line-height: 1; }
.tk-thumb-x:hover { background: rgba(200, 30, 30, .85); }

@media (max-width: 700px) { .tk-msg { max-width: 92%; } }

/* ===================== 推广收益 ===================== */
.aff-earnings { margin-top: 18px; }
.aff-earnings > h2 { margin: 0 0 18px; font-size: 18px; }
/* 三列两排，和参考稿一致；窄屏退到两列再到一列 */
.aff-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 32px; }
.aff-metric { min-width: 0; }
.aff-metric-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.aff-metric-value { display: flex; align-items: center; gap: 10px; margin-top: 6px;
  font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* 口径说明的小问号：佣金最容易被误解成"钱已经在钱包里了" */
.aff-tip { display: inline-flex; color: #a9b6ca; cursor: help; position: relative; }
.aff-tip svg { width: 14px; height: 14px; }
.aff-tip:hover, .aff-tip:focus-visible { color: var(--primary); outline: none; }
.aff-tip::after {
  content: attr(data-tip); position: absolute; z-index: 40; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%); width: max-content; max-width: 240px; padding: 8px 11px;
  border-radius: 8px; background: #16233b; color: #fff; font-size: 12px; font-weight: 500;
  line-height: 1.6; text-align: left; letter-spacing: 0; white-space: normal;
  opacity: 0; visibility: hidden; transition: opacity .15s; box-shadow: 0 10px 26px -12px rgba(10, 20, 40, .7);
}
.aff-tip:hover::after, .aff-tip:focus-visible::after { opacity: 1; visibility: visible; }

.aff-withdraw-btn { min-height: 28px; padding: 0 13px; font-size: 12.5px; font-weight: 700; }
.aff-withdraw-btn:disabled { opacity: .5; cursor: not-allowed; }
.aff-withdraw-hint { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.aff-ticket-link { color: var(--primary); font-weight: 650; text-decoration: none; }
.aff-ticket-link:hover { text-decoration: underline; }
.wd-note-box { color: var(--muted); background: #f5f9ff; border-color: #d5e4f7; font-size: 12.5px; line-height: 1.7; }

@media (max-width: 1000px) { .aff-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .aff-metrics { grid-template-columns: 1fr; } }

/* 页面内确认框 */
.confirm-text { margin: 0 0 20px; color: var(--ink); font-size: 14.5px; line-height: 1.75; }
.btn-danger-solid { color: #fff; border: 0; background: linear-gradient(120deg, #f0645c, #dc2626);
  box-shadow: 0 10px 20px -12px rgba(220, 38, 38, .85); }
.btn-danger-solid:hover { filter: brightness(1.06); background: linear-gradient(120deg, #f0645c, #dc2626); }

/* 国旗从 emoji 换成内联 SVG（Windows 不渲染 emoji 国旗），
   容器不再靠 font-size 撑大小，改为给 svg 定尺寸 */
.location-flag { display: inline-flex; line-height: 0; flex: 0 0 auto; font-size: 0; }
.cflag { width: 24px; height: 16px; border-radius: 2.5px; display: block;
  box-shadow: 0 0 0 1px rgba(20, 40, 80, .12); }

/* 行内链接按钮统一不带下划线（蓝色加粗已经足够区分），
   悬停时才出现下划线做可点提示 —— 之前只有协议勾选那一处单独去掉了 */
.link-button { text-decoration: none; }
.link-button:hover { text-decoration: underline; }

/* 时区下拉要压过同页其它区块：抬高层级，并在展开时给容器也加一层，
   避免将来别处再引入层叠上下文时又被盖住 */
.tz-dropdown { z-index: 80; }
.tz-picker.open { position: relative; z-index: 80; }

/* 批量转移弹窗里显示的接收方 —— 必须显眼，客户要靠它确认没输错 UID */
.transfer-target {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(8, 121, 248, .08);
  border: 1px solid rgba(8, 121, 248, .22);
  color: var(--text-strong, #17202e);
  font-size: 14px;
}
.transfer-target b { color: #0879f8; }

/* 动态套餐已过期的提示 —— 客户要一眼看到「下一步该去买套餐」 */
.dyn-expired-tip {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(220, 38, 38, .07);
  border: 1px solid rgba(220, 38, 38, .22);
  color: #b91c1c;
  font-size: 13.5px;
  line-height: 1.6;
}
