/* ============================================================================
 * gxpt-rebrand.css · 复刻模块公服化换肤层 [REBRAND 20261118]
 * ----------------------------------------------------------------------------
 * 溪哥令：字体 UI 贴 ECS1 公服设计（贸通边海），全本地化，清除 kjdex/NOTHING 元素。
 * 设计基因（取自门户 maotong.css 官方令牌）：
 *   深海军蓝 #0E2742/#16395C · 贸通金 #C29A52/#D8B46A · 米白纸底 #FAF8F3/#FBF8F1
 *   标题 Noto Serif SC（宋体感）· 正文 Noto Sans SC · 品牌名"贸通边海"
 * 用法：各复刻页 <head> 内、原样式表之后引入，CSS 变量+选择器双层覆盖。
 * ==========================================================================*/

/* ── 1. 变量层：把 kjdex 深黑终端系整体翻成公服蓝金纸感 ────────────────── */
:root {
  --bg: #FAF8F3;
  --bg2: #FBF8F1;
  --paper: #FFFFFF;
  --ink: #27231B;
  --ink2: #5C5548;
  --ink3: #8A8272;
  --line: #E3DCCB;
  --line2: #E8E2D2;
  --indigo: #16395C;
  --indigo2: #1B4570;
  --indigo-d: #0E2742;
  --gold: #C29A52;
  --gold-d: #A8843F;
  --gold-l: #E8C98A;
  --ac: #C29A52;
  --ac2: #A8843F;
  --acl: #E8C98A;
  --disp: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
}

/* ── 2. 字体层：全站字体统一到公服体系 ────────────────────────────────── */
body, .sw, input, select, textarea, button, .btn {
  font-family: var(--sans) !important;
}
h1, h2, h3, h4, h5, .h, .sec-hd h3, .mt-head h2, .hero h2,
.brand b, .rp-brand b, .brand .main, .card h3, .kpi b, .step .num,
.tab, .tabs, .sect h3, h3.title, .panel h3, .dcard h4, .dcard b {
  font-family: var(--disp) !important;
}
code, pre, kbd, .mono, .num, .code {
  font-family: var(--mono) !important;
}

/* ── 3. 品牌层：顶栏换成公服样式（深蓝底+金字+会员工作台）──────────────── */
header.top, .top, .topbar, header.hd, .site-head,
.topwrap header, body > header {
  background: linear-gradient(120deg, #081B30, #16395C) !important;
  border-bottom: 1px solid rgba(194, 154, 82, .4) !important;
  color: #F3EEE0 !important;
}
.top a, .top .brand, .top .brand b, .topbar a, .topbar b,
header.top a, header.top b, header.top .bt .main {
  color: #F3EEE0 !important;
}
.top .sub, .topbar .sub, header.top .bt .sub {
  color: #D8B46A !important;
}
/* 顶栏 kjdex logo 图标弱化（alt 文本已换，图保留为占位徽记） */
.top img, .topbar img, header.top img { opacity: .92; }

/* ── 4. 页面底色：kjdex 深黑 → 公服米白纸感 ───────────────────────────── */
body {
  background: #FAF8F3 !important;
  color: var(--ink) !important;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background: url('/gxpt/mt-img/texture-wave.png') 0 0/440px repeat;
  opacity: .035; pointer-events: none;
}
main, .main, #app, .app, .wrap, .content { position: relative; z-index: 1; }

/* 卡片与面板：白卡+米线+金 hover */
.card, .panel, .dcard, .box, .kpi, .stat,
.mod, .item, .rowcard, .tcard, .sect, .block {
  background: #FFFFFF !important;
  border: 1px solid #E3DCCB !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px -6px rgba(22, 57, 92, .12) !important;
  color: var(--ink) !important;
  transition: border-color .25s, box-shadow .25s, transform .25s !important;
}
.card:hover, .panel:hover, .dcard:hover, .kpi:hover,
.mod:hover, .item:hover, .tcard:hover {
  border-color: #C29A52 !important;
  box-shadow: 0 10px 26px -12px rgba(194, 154, 82, .38) !important;
  transform: translateY(-2px);
}

/* 标题色：kjdex 青紫 → 公服藏蓝 */
h1, h2, h3, h4, .h, .card h3, .sect h3, .panel h3, .mt-head h2 { color: #16395C !important; }
h1 b, h2 b, .h b { color: #16395C !important; }
p, li, td, th, .sub, .desc, .tip, small { color: var(--ink2) !important; }
b, strong { color: var(--ink) !important; }

/* ── 5. 按钮层：公服金按钮 + 描边幽灵键 ───────────────────────────────── */
.btn, button.btn, .btn-ac, button.primary, .go, .run, .cta,
button[type=submit], .btn-ghost {
  font-family: var(--sans) !important;
  border-radius: 999px !important;
  transition: all .25s !important;
}
.btn-ac, button.primary, .go, .run, .cta, button[type=submit] {
  background: #C29A52 !important;
  color: #0E2742 !important;
  border: none !important;
  box-shadow: 0 10px 24px -10px rgba(194, 154, 82, .55) !important;
}
.btn-ac:hover, button.primary:hover, .go:hover, .run:hover, .cta:hover {
  background: #D8B46A !important;
  transform: translateY(-2px);
}
.btn-ghost, .btn.ghost {
  background: rgba(255, 255, 255, .6) !important;
  color: #16395C !important;
  border: 1px solid rgba(194, 154, 82, .5) !important;
}
.btn-ghost:hover { background: #FFF !important; border-color: #C29A52 !important; }

/* ── 6. 表格与徽章：公服米线 + 藏蓝表头 ─────────────────────────────── */
table, .data { border-color: #E3DCCB !important; }
th { background: #16395C !important; color: #F3EEE0 !important; font-family: var(--sans) !important; }
td { border-color: #E3DCCB !important; color: var(--ink) !important; background: #FFF !important; }
tr:nth-child(even) td { background: #FBF8F1 !important; }
.tag, .badge, .chip, .pill {
  border-radius: 999px !important;
  font-family: var(--sans) !important;
}

/* ── 7. 输入控件：米白纸感输入区 ─────────────────────────────────────── */
input, select, textarea {
  background: #FFFFFF !important;
  border: 1px solid #E3DCCB !important;
  color: var(--ink) !important;
  border-radius: 10px !important;
  font-family: var(--sans) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: #C29A52 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(194, 154, 82, .18) !important;
}
input::placeholder, textarea::placeholder { color: #8A8272 !important; }

/* ── 8. 动效层：保留原版动画节奏，仅对齐公服色彩基调 ─────────────────── */
@keyframes gxRebrandPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.spin, .loading i, .spinner {
  border-top-color: #C29A52 !important;
  border-left-color: rgba(194, 154, 82, .35) !important;
  border-bottom-color: rgba(194, 154, 82, .35) !important;
  border-right-color: rgba(194, 154, 82, .35) !important;
}
::selection { background: rgba(194, 154, 82, .35); }

/* 滚动条：细金 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #C9BD9E; border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: #C29A52; }
::-webkit-scrollbar-track { background: transparent; }

/* ── 9. 弹窗与提示条 ──────────────────────────────────────────────────── */
.dialog, .modal, .pop, .toast, .notice, .alert {
  background: #FFF !important;
  border: 1px solid #E3DCCB !important;
  border-radius: 16px !important;
  color: var(--ink) !important;
  box-shadow: 0 24px 60px -24px rgba(14, 39, 66, .35) !important;
}
.notice.ok, .toast.ok, .alert.ok { border-left: 3px solid #C29A52 !important; }
.notice.err, .toast.err, .alert.err { border-left: 3px solid #A92E26 !important; }
