/* 主题「墨金 · 夜读书房」—— 由 index.html 抽出, index.html 与 org.html 共用。
   原样搬运, 未改任何规则。改这里会同时影响两个页面。 */
    /* ============================================================
       主题「墨金 · 夜读书房」 2026-09
       暖墨炭底 / 香槟金主色 / 玉石绿·朱砂·铜 辅色 / 宋体衬线大标题
       金箔渐变只出现在品牌标题 —— 唯一华彩, 其余克制
       ============================================================ */
    #rgWrap:fullscreen { border-radius: 0; border: none; }
    :root {
      --bg-card: rgba(30, 28, 24, 0.60);
      --bg-card-strong: rgba(30, 28, 24, 0.82);
      --border-subtle: rgba(201, 168, 106, 0.10);
      --border-medium: rgba(201, 168, 106, 0.20);
      --accent: #c9a86a;           /* 香槟金 */
      --accent-deep: #a37f3e;
      --accent-cyan: #5eb894;      /* 玉石绿 (变量名保留兼容) */
      --ink-bright: #ece7db;       /* 暖纸白 */
      --ink-body: #cfc9bc;
      --ink-dim: #9d988e;
      --jade: #5eb894;
      --cinnabar: #df7265;
      --copper: #c98f70;
    }
    html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
    * { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; -webkit-tap-highlight-color: transparent; }
    code, pre, .mono { font-family: 'Menlo', 'SF Mono', 'Consolas', monospace; }
    .serif, .hero-title, .brand-text { font-family: 'Songti SC', 'Noto Serif SC', 'SimSun', Georgia, serif; }
    body {
      background:
        radial-gradient(ellipse 70% 42% at 50% 0%, rgba(201, 168, 106, 0.07), transparent 65%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(94, 184, 148, 0.04), transparent 60%),
        linear-gradient(180deg, #16140f 0%, #121110 55%, #100f0e 100%);
      min-height: 100dvh;
      color: var(--ink-body);
      -webkit-font-smoothing: antialiased;
    }
    main, header, footer { position: relative; z-index: 1; }
    body.login-state > header, body.login-state > footer { display: none; }
    html.pre-guest > body > header, html.pre-guest > body > footer { display: none !important; }
    html.pre-auth #loginSection { display: none !important; }
    html.pre-auth #dashboard   { display: block !important; }

    .glass { background: var(--bg-card); backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%); border: 1px solid var(--border-subtle); }
    .glass-strong { background: var(--bg-card-strong); backdrop-filter: blur(20px) saturate(130%); -webkit-backdrop-filter: blur(20px) saturate(130%); border: 1px solid var(--border-medium); }

    /* 金箔渐变 —— 全站唯一华彩, 用于品牌名/关键标题 */
    .gradient-text {
      font-family: 'Songti SC', 'Noto Serif SC', 'SimSun', Georgia, serif;
      background: linear-gradient(160deg, #f0e6c8 0%, #d9bc80 38%, #b08f52 62%, #e4d3a4 100%);
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .accent-bar { background: linear-gradient(90deg, transparent, rgba(201,168,106,0.55), transparent); height: 1px; }

    @keyframes pulse-dot {
      0%, 100% { box-shadow: 0 0 0 0 currentColor, 0 0 8px 1px currentColor; }
      50%      { box-shadow: 0 0 0 4px transparent, 0 0 12px 3px currentColor; }
    }
    .status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; position: relative; }
    .status-dot::after {
      content: ''; position: absolute; top: 18%; left: 22%;
      width: 30%; height: 30%; border-radius: 50%;
      background: rgba(255,255,255,0.65); filter: blur(0.5px);
    }
    /* 引擎心跳: 朱砂心 + 金色扫描线 */
    @keyframes heart-pump { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
    @keyframes ecg-run { to { stroke-dashoffset: 0; } }
    .hb-on  [data-f="nhbHeart"] { color: #df7265; animation: heart-pump 1.6s ease-in-out infinite; filter: drop-shadow(0 0 3px rgba(223,114,101,0.5)); }
    .hb-off [data-f="nhbHeart"] { color: #5f5b53; }
    .ecg-track { fill: none; stroke: #c9a86a; stroke-width: 1.5; opacity: 0.16; }
    .ecg-line  { fill: none; stroke: #c9a86a; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
                 stroke-dasharray: 14 90; stroke-dashoffset: 104; animation: ecg-run 1.6s linear infinite; }
    .ecg-flat  { stroke: #5f5b53; stroke-width: 1.5; opacity: 0.6; }
    .hb-on  .ecg-flat { display: none; }
    .hb-off .ecg-track, .hb-off .ecg-line { display: none; }
    .status-running { background: #d0b273; color: rgba(201,168,106,0.7); animation: pulse-dot 1.8s ease-in-out infinite; }
    .status-stopped { background: #d9973f; color: rgba(217,151,63,0.6); box-shadow: 0 0 8px 1px rgba(217,151,63,0.5); }
    .status-error   { background: #df7265; color: rgba(223,114,101,0.6); box-shadow: 0 0 8px 1px rgba(223,114,101,0.5); }
    .status-pending { background: #7d786e; }
    .status-missing { background: #5f5b53; }
    .status-pending::after, .status-missing::after { display: none; }
    @media (max-width: 640px) { .mobile-hide { display: none !important; } }
    @media (min-width: 641px) { .mobile-only { display: none !important; } }

    .btn { transition: all 0.18s ease; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 500; min-height: 44px; user-select: none; }
    /* 主按钮: 香槟金实色 + 墨字 (金底深字 = 高端印刷感) */
    .btn-primary {
      background: linear-gradient(180deg, #d6b87e 0%, #c19a55 100%);
      color: #221c10; border: 0; font-weight: 600;
      box-shadow: 0 2px 10px rgba(193,154,85,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
    }
    .btn-primary:hover { background: linear-gradient(180deg, #e0c48e 0%, #cda660 100%); box-shadow: 0 4px 16px rgba(193,154,85,0.38); transform: translateY(-1px); }
    .btn-primary:active { transform: translateY(0); }
    .btn-cyan    { background: linear-gradient(180deg, #3d9c78 0%, #2d7d5f 100%); color: #eafff5; border: 0; box-shadow: 0 2px 10px rgba(61,156,120,0.25); }
    .btn-cyan:hover { box-shadow: 0 4px 16px rgba(61,156,120,0.4); transform: translateY(-1px); }
    .btn-violet  { background: linear-gradient(180deg, #b17552 0%, #92583b 100%); color: #fff4ec; border: 0; box-shadow: 0 2px 10px rgba(177,117,82,0.25); }
    .btn-violet:hover { box-shadow: 0 4px 16px rgba(177,117,82,0.4); transform: translateY(-1px); }
    .btn-amber   { background: linear-gradient(180deg, #d9973f 0%, #b87a28 100%); color: #241804; border: 0; box-shadow: 0 2px 10px rgba(217,151,63,0.25); }
    .btn-amber:hover { box-shadow: 0 4px 16px rgba(217,151,63,0.4); transform: translateY(-1px); }
    .btn-danger  { background: linear-gradient(180deg, #c94f43 0%, #a83a30 100%); color: #fff1ef; border: 0; box-shadow: 0 2px 10px rgba(201,79,67,0.28); }
    .btn-emerald { background: linear-gradient(180deg, #3da266 0%, #2e8451 100%); color: #edfff4; border: 0; box-shadow: 0 2px 10px rgba(61,162,102,0.25); }
    .btn-danger:hover { box-shadow: 0 4px 16px rgba(201,79,67,0.45); transform: translateY(-1px); }
    .btn-ghost { background: rgba(201,168,106,0.06); border: 1px solid rgba(201,168,106,0.18); color: var(--ink-body); }
    .btn-ghost:hover { background: rgba(201,168,106,0.12); border-color: rgba(201,168,106,0.32); color: var(--ink-bright); }

    .input-modern {
      background: rgba(20, 19, 16, 0.62);
      border: 1px solid rgba(201, 168, 106, 0.14);
      color: var(--ink-bright);
      transition: all 0.18s;
      min-height: 44px; font-size: 16px;
    }
    .input-modern::placeholder { color: rgba(157, 152, 142, 0.5); }
    .input-modern:focus {
      outline: none;
      background: rgba(20, 19, 16, 0.85);
      border-color: rgba(201, 168, 106, 0.5);
      box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.12);
    }

    .stat-card { transition: transform 0.2s, border-color 0.2s; }
    @media (hover: hover) { .stat-card:hover { transform: translateY(-2px); border-color: rgba(201, 168, 106, 0.35); } }

    .logo-mark { filter: drop-shadow(0 0 12px rgba(201, 168, 106, 0.4)); }

    /* ===== 顶栏 brand 区 ===== */
    .brand-block { padding: 2px 0; }
    .brand-logo-wrap { position: relative; isolation: isolate; }
    .brand-logo-wrap::before {
      content: ''; position: absolute; inset: -10px;
      background: radial-gradient(60% 60% at 50% 50%, rgba(201,168,106,0.35), rgba(94,184,148,0.10) 55%, transparent 75%);
      filter: blur(13px); z-index: -1;
      opacity: 0.55; transition: opacity 0.5s, transform 0.5s;
      pointer-events: none;
    }
    .brand-logo { transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1); }
    @media (hover: hover) {
      .brand-block:hover .brand-logo-wrap::before { opacity: 0.85; transform: scale(1.08); }
      .brand-block:hover .brand-logo { transform: scale(1.05) rotate(-3deg); }
    }
    .brand-text {
      font-size: 18px; font-weight: 700;
      letter-spacing: 0.12em; line-height: 1.18;
    }
    @media (min-width: 640px) { .brand-text { font-size: 23px; } }
    .brand-sub-row { display: flex; align-items: center; gap: 7px; margin-top: 8px; min-width: 0; }
    @media (min-width: 640px) { .brand-sub-row { margin-top: 10px; } }
    .brand-sub-accent { display: none; flex-shrink: 0; width: 14px; height: 1px; background: linear-gradient(90deg, rgba(220,196,138,0.9), rgba(94,184,148,0.3), transparent); }
    @media (min-width: 640px) { .brand-sub-accent { display: inline-block; } }
    .brand-sub { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.02em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    @media (min-width: 640px) { .brand-sub { font-size: 13px; } }

    @keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
    .fade-up { animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
    .fade-up-2 { animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both; }
    .fade-up-3 { animation: fade-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both; }

    .user-table th { font-weight: 500; color: var(--ink-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
    .user-table tr.user-row { transition: background 0.15s; }
    @media (hover: hover) { .user-table tr.user-row:hover { background: rgba(201, 168, 106, 0.05); } }

    .chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; background: rgba(20,19,16,0.6); border: 1px solid rgba(201,168,106,0.12); white-space: nowrap; }
    .chip-running { background: rgba(201,168,106,0.10); border-color: rgba(201,168,106,0.34); color: #dcc48a; }
    .chip-stopped { background: rgba(217,151,63,0.10); border-color: rgba(217,151,63,0.3); color: #eebe72; }
    .chip-error   { background: rgba(223,114,101,0.10); border-color: rgba(223,114,101,0.3); color: #f0a89e; }
    .chip-pending { background: rgba(125,120,110,0.14); border-color: rgba(125,120,110,0.3); color: #c2beb5; }
    .chip-missing { background: rgba(95,91,83,0.14); border-color: rgba(95,91,83,0.3); color: #9d988e; }
    .chip-destroyed { background: rgba(201,79,67,0.09); border-color: rgba(201,79,67,0.24); color: #f0a89e; }

    .hidden { display: none !important; }
    .scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
    .scrollbar::-webkit-scrollbar-thumb { background: rgba(201,168,106,0.22); border-radius: 4px; }

    /* ===== 响应式布局规则 (原样保留) ===== */
    @media (max-width: 1023.98px) { .partner-table .col-pct { display: none; } }
    @media (min-width: 641px) and (max-width: 900px) {
      .user-table .col-ref { display: none; }
      .user-table .mem-quota { display: none; }
      .user-table .cpu-quota { display: none; }
      .user-table .col-mem, .user-table .col-cname { white-space: nowrap; }
      .user-table .meter-mem { max-width: 56px; }
    }
    @media (max-width: 640px) {
      .user-table .col-cname { display: none; }
      .user-table .col-ref   { display: none; }
      .user-table .col-time  { display: none; }
      .user-table .status-label { display: none; }
      .user-table .chip { background: transparent; border-color: transparent; padding: 0; gap: 0; }
      .user-table .mem-quota { display: none; }
      .user-table .cpu-quota { display: none; }
      .user-table .col-mem { white-space: nowrap; }
      .user-table .meter-mem { max-width: 40px; }
      .user-table th, .user-table td { padding-left: 0; padding-right: 8px; }
    }
    @media (max-width: 360px) {
      .brand-text { font-size: 15px; letter-spacing: 0.06em; }
      .brand-sub  { display: none; }
    }

    /* ===== 资源进度条 ===== */
    .meter { width: 100%; height: 6px; border-radius: 999px; background: rgba(201,168,106,0.10); overflow: hidden; }
    .meter-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8ad1b2, #c9a86a); transition: width 0.4s ease; }
    .meter-bar.warn { background: linear-gradient(90deg, #eebe72, #d9973f); }
    .meter-bar.crit { background: linear-gradient(90deg, #ec9a8f, #c94f43); }

    /* ===== 数字 ===== */
    .num-lg { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
    .num-md { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

    /* ===== Admin 徽章: 铜印 ===== */
    .admin-badge {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 2px 9px; border-radius: 999px;
      font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
      background: rgba(177,117,82,0.16);
      border: 1px solid rgba(201,143,112,0.4);
      color: #e9c8b3;
    }

    /* ===== Modal/Drawer ===== */
    .modal-mask {
      position: fixed; inset: 0; background: rgba(12, 11, 9, 0.78);
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      z-index: 50; display: flex; align-items: center; justify-content: center;
      padding: 16px; animation: fade-up 0.25s ease-out;
    }
    .modal-card {
      width: 100%; max-width: 560px;
      background: rgba(26, 24, 20, 0.94);
      border: 1px solid rgba(201,168,106,0.18);
      border-radius: 18px; padding: 22px 22px 18px;
      backdrop-filter: blur(20px);
      box-shadow: 0 20px 60px rgba(0,0,0,0.65);
      max-height: 88vh; overflow-y: auto;
    }
    .modal-card-flush { padding: 0 !important; max-width: 680px; max-height: 92dvh; }
    @media (max-width: 640px) { .modal-card-flush { max-height: 94dvh; border-radius: 16px; } }
    .destroy-card {
      max-width: 460px; position: relative; overflow: hidden;
      border: 1px solid rgba(223,114,101,0.32);
      box-shadow: 0 24px 70px rgba(168,58,48,0.16), 0 0 0 1px rgba(223,114,101,0.08);
    }
    .destroy-glow {
      position: absolute; top: -120px; right: -120px;
      width: 260px; height: 260px; border-radius: 50%;
      background: radial-gradient(circle, rgba(201,79,67,0.20) 0%, transparent 70%);
      pointer-events: none;
    }
    .destroy-icon-wrap {
      width: 44px; height: 44px; border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      background: rgba(201,79,67,0.18);
      color: #f0a89e;
      border: 1px solid rgba(223,114,101,0.35);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    }
    .destroy-bullet { color: #ec9a8f; font-size: 8px; line-height: 1; }

    /* 订阅天数行内微调 */
    .sub-adj { display: inline-flex; align-items: center; gap: 5px; margin-left: 7px; vertical-align: middle; }
    .sub-adj-seg {
      display: inline-flex; align-items: stretch; height: 20px; border-radius: 999px; overflow: hidden;
      border: 1px solid rgba(201,168,106,0.26); background: rgba(20,19,16,0.6);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 4px rgba(0,0,0,0.3);
      transition: border-color .15s, box-shadow .15s;
    }
    .sub-adj-seg:hover { border-color: rgba(201,168,106,0.45); }
    .sub-adj-btn {
      width: 24px; display: inline-flex; align-items: center; justify-content: center;
      color: #a89e8a; transition: background .13s, color .13s; user-select: none; cursor: pointer;
    }
    .sub-adj-btn + .sub-adj-btn { border-left: 1px solid rgba(201,168,106,0.16); }
    .sub-adj-btn svg { width: 10px; height: 10px; transition: transform .1s; }
    .sub-adj-btn:active svg { transform: scale(0.75); }
    .sub-adj-btn.is-minus:hover { background: rgba(201,79,67,0.20); color: #f0a89e; }
    .sub-adj-btn.is-plus:hover  { background: rgba(94,184,148,0.20); color: #8fd4a8; }
    @keyframes sub-adj-flash { 0% { background: rgba(94,184,148,0.22); } 100% { background: transparent; } }
    .sub-adj-flash { animation: sub-adj-flash 0.9s ease-out; border-radius: 8px; }
    .sub-adj-btn.sub-adj-pulse.is-plus  { animation: sub-adj-pulse-plus 0.38s ease-out; }
    .sub-adj-btn.sub-adj-pulse.is-minus { animation: sub-adj-pulse-minus 0.38s ease-out; }
    @keyframes sub-adj-pulse-plus {
      0%   { background: rgba(94,184,148,0.45); color: #bce6ca; box-shadow: 0 0 0 0 rgba(94,184,148,0.5); }
      100% { box-shadow: 0 0 0 8px rgba(94,184,148,0); }
    }
    @keyframes sub-adj-pulse-minus {
      0%   { background: rgba(201,79,67,0.40); color: #f5c0b8; box-shadow: 0 0 0 0 rgba(201,79,67,0.45); }
      100% { box-shadow: 0 0 0 8px rgba(201,79,67,0); }
    }

    .confirm-card { max-width: 440px; position: relative; overflow: hidden; }
    .confirm-glow { position: absolute; top: -110px; right: -110px; width: 240px; height: 240px; border-radius: 50%; pointer-events: none; }
    .confirm-icon-wrap { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }

    /* ===== 用户详情 ===== */
    .ud-hero { position: relative; overflow: hidden; }
    .ud-hero::before, .ud-hero::after {
      content: ''; position: absolute; width: 220px; height: 220px;
      border-radius: 50%; filter: blur(60px); pointer-events: none; opacity: 0.4;
    }
    .ud-hero::before { background: rgba(201,168,106,0.28); top: -120px; right: -90px; }
    .ud-hero::after  { background: rgba(94,184,148,0.18);  bottom: -140px; left: -100px; }
    .ud-hero > * { position: relative; }
    .ud-avatar {
      width: 52px; height: 52px; border-radius: 16px;
      background: linear-gradient(135deg, #d0b273, #5eb894);
      padding: 1.5px; flex-shrink: 0;
    }
    .ud-avatar > div {
      width: 100%; height: 100%; border-radius: 14px;
      background: #17150f;
      display: flex; align-items: center; justify-content: center;
      font-size: 22px; font-weight: 700;
      font-family: 'Songti SC', 'Noto Serif SC', 'SimSun', Georgia, serif;
      color: #e8d9b0;
    }
    @media (min-width: 640px) {
      .ud-avatar { width: 58px; height: 58px; }
      .ud-avatar > div { font-size: 24px; }
    }
    .ud-avatar-dot {
      position: absolute; bottom: -3px; right: -3px;
      width: 14px; height: 14px; border-radius: 50%;
      background: #7d786e; box-shadow: 0 0 0 2.5px #17150f;
    }
    .ud-avatar-dot.is-on  { background: #d0b273; box-shadow: 0 0 0 2.5px #17150f, 0 0 8px rgba(201,168,106,0.6); }
    .ud-avatar-dot.is-off { background: #d9973f; box-shadow: 0 0 0 2.5px #17150f; }
    .ud-avatar-dot.is-err { background: #df7265; box-shadow: 0 0 0 2.5px #17150f; }

    .ud-act {
      display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      min-height: 38px; padding: 0 10px;
      border-radius: 10px;
      font-size: 12px; font-weight: 500;
      border: 0; color: white; cursor: pointer; user-select: none;
      transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
    }
    .ud-act:hover { transform: translateY(-1px); }
    .ud-act:active { transform: translateY(0); }
    .ud-act.is-primary { background: linear-gradient(180deg, #d6b87e 0%, #c19a55 100%); color: #221c10; font-weight: 600; box-shadow: 0 2px 10px rgba(193,154,85,0.25), inset 0 1px 0 rgba(255,255,255,0.22); }
    .ud-act.is-primary:hover { box-shadow: 0 4px 16px rgba(193,154,85,0.4); }
    .ud-act.is-amber   { background: linear-gradient(180deg, #d9973f 0%, #b87a28 100%); color: #241804; box-shadow: 0 2px 10px rgba(217,151,63,0.25); }
    .ud-act.is-amber:hover { box-shadow: 0 4px 16px rgba(217,151,63,0.4); }
    .ud-act.is-cyan    { background: linear-gradient(180deg, #3d9c78 0%, #2d7d5f 100%); box-shadow: 0 2px 10px rgba(61,156,120,0.25); }
    .ud-act.is-cyan:hover { box-shadow: 0 4px 16px rgba(61,156,120,0.4); }
    .ud-act.is-emerald { background: linear-gradient(180deg, #3da266 0%, #2e8451 100%); box-shadow: 0 2px 10px rgba(61,162,102,0.25); }
    .ud-act.is-emerald:hover { box-shadow: 0 4px 16px rgba(61,162,102,0.4); }
    .gw-btn {
      display: inline-flex; align-items: center; justify-content: center;
      padding: 4px 12px; border-radius: 8px; font-size: 11px;
      cursor: pointer; border: 1px solid transparent;
      transition: all 0.15s; font-weight: 500; line-height: 1.5;
    }
    .gw-btn-start { background: rgba(94,184,148,0.10); color: #8fd4a8; border-color: rgba(94,184,148,0.28); }
    .gw-btn-start:hover { background: rgba(94,184,148,0.18); }
    .gw-btn-stop  { background: rgba(157,152,142,0.10); color: #c2beb5; border-color: rgba(157,152,142,0.22); }
    .gw-btn-stop:hover  { background: rgba(157,152,142,0.18); }
    .gw-btn-restart { background: rgba(116,164,168,0.10); color: #9fc3c5; border-color: rgba(116,164,168,0.28); }
    .gw-btn-restart:hover { background: rgba(116,164,168,0.18); }
    .gw-btn:disabled { opacity: 0.5; cursor: wait; }
    .gw-icon-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 22px; height: 22px; padding: 0; margin-left: 6px;
      border-radius: 5px; border: 1px solid transparent; cursor: pointer;
      transition: all 0.15s; vertical-align: middle;
    }
    .gw-icon-btn svg { width: 11px; height: 11px; }
    .gw-icon-btn.is-start { background: rgba(94,184,148,0.14); color: #8fd4a8; border-color: rgba(94,184,148,0.4); }
    .gw-icon-btn.is-start:hover { background: rgba(94,184,148,0.24); }
    .gw-icon-btn.is-stop  { background: rgba(217,151,63,0.14); color: #eebe72; border-color: rgba(217,151,63,0.4); }
    .gw-icon-btn.is-stop:hover  { background: rgba(217,151,63,0.24); }
    .gw-icon-btn:disabled { opacity: 0.5; cursor: wait; }
    .ud-act.is-danger {
      background: linear-gradient(180deg, #c94f43 0%, #a83a30 100%);
      box-shadow: 0 2px 10px rgba(201,79,67,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
      color: #fff1ef;
    }
    .ud-act.is-danger:hover { box-shadow: 0 4px 16px rgba(201,79,67,0.5); }

    .ud-metabar {
      display: grid; gap: 14px 18px;
      grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
      background: rgba(20, 19, 16, 0.5);
      border: 1px solid rgba(201, 168, 106, 0.08);
      border-radius: 12px;
      padding: 11px 14px;
    }
    @media (max-width: 540px) {
      .ud-metabar { grid-template-columns: 1fr 1fr; }
      .ud-metabar > :nth-child(1) { grid-column: 1 / -1; }
    }
    .ud-meta-label { font-size: 9px; color: #7d786e; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 4px; }
    .ud-meta-value { font-size: 12px; color: #c2beb5; line-height: 1.3; }
    .ud-meta-value .mono { font-family: 'Menlo', 'SF Mono', 'Consolas', monospace; font-size: 11px; }

    .ud-toolbar { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; justify-content: space-between; }
    .ud-toolbar .group { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 100%; }
    .ud-toolbar .group .ud-act { flex: 1; min-width: 80px; }
    @media (max-width: 540px) { .ud-toolbar { gap: 8px; } }

    .ud-stat {
      position: relative; overflow: hidden;
      background: rgba(24, 22, 18, 0.55);
      border: 1px solid rgba(201,168,106,0.10);
      border-radius: 14px;
      padding: 14px;
      transition: transform 0.2s, border-color 0.2s;
    }
    @media (hover: hover) { .ud-stat:hover { transform: translateY(-1px); border-color: rgba(201,168,106,0.32); } }
    .ud-stat-label { font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; }
    .ud-stat-num   { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; word-break: keep-all; margin-top: 6px; color: var(--ink-bright); }
    @media (min-width: 640px) { .ud-stat-num { font-size: 21px; } }
    .ud-stat-sub   { font-size: 10px; color: #7d786e; margin-top: 8px; }

    .ud-section-title {
      font-size: 10px; font-weight: 600;
      color: #c2beb5;
      text-transform: uppercase; letter-spacing: 0.18em;
      display: inline-flex; align-items: center; gap: 6px;
    }
    .ud-section-title svg { width: 13px; height: 13px; color: #dcc48a; }

    /* ===== Hero 入口 ===== */
    .enter-stage {
      min-height: calc(100dvh - 200px);
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
    }
    .hero-eyebrow {
      font-size: 11px;
      color: #a37f3e;
      letter-spacing: 0.5em;
      text-transform: uppercase;
      margin-bottom: 1.5rem;
    }
    .hero-title {
      font-size: clamp(44px, 9vw, 78px);
      font-weight: 700;
      letter-spacing: 0.18em;
      line-height: 1.05;
      padding-left: 0.18em;
      margin-bottom: 1rem;
    }
    .hero-subline {
      display: inline-flex; align-items: center; gap: 14px;
      color: #9d988e;
      letter-spacing: 0.22em;
      font-size: 13px;
      margin-bottom: 3rem;
    }
    .hero-subline::before, .hero-subline::after {
      content: ''; width: 36px; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(201,168,106,0.5), transparent);
    }
    .login-beian {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
      display: none; text-align: center;
      padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
      font-size: 11px; color: #5f5b53; letter-spacing: 0.12em;
    }
    body.login-state .login-beian { display: block; }
    .login-beian a { color: inherit; text-decoration: none; white-space: nowrap; transition: color .15s; }
    .login-beian a:hover { color: #9d988e; }
    .login-beian .sep { margin: 0 0.6em; opacity: 0.5; }
    @media (max-width: 480px) {
      .login-beian { font-size: 10px; letter-spacing: 0.06em; padding-top: 10px; }
      .login-beian .sep { display: none; }
      .login-beian a { display: block; line-height: 1.9; }
    }

    /* 入口按钮: 香槟金 + 墨字 */
    .btn-enter {
      position: relative;
      background: linear-gradient(170deg, #e0c48e 0%, #c9a86a 45%, #b08f52 100%);
      background-size: 160% 160%;
      color: #221c10;
      padding: 19px 64px;
      border-radius: 999px;
      font-size: 19px;
      font-weight: 600;
      letter-spacing: 0.32em;
      padding-right: calc(64px + 0.32em);
      border: 0;
      cursor: pointer;
      box-shadow: 0 8px 32px rgba(193, 154, 85, 0.32), inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.12);
      transition: transform 0.25s, box-shadow 0.25s;
      animation: btnShimmer 9s ease-in-out infinite;
    }
    @keyframes btnShimmer {
      0%, 100% { background-position: 0% 50%; }
      50%      { background-position: 100% 50%; }
    }
    .btn-enter::before {
      content: '';
      position: absolute;
      inset: -8px;
      border-radius: 999px;
      background: linear-gradient(135deg, #d0b273, #c9a86a, #8ad1b2);
      filter: blur(24px);
      opacity: 0.28;
      z-index: -1;
      animation: glowPulse 5s ease-in-out infinite;
    }
    @keyframes glowPulse {
      0%, 100% { opacity: 0.22; transform: scale(1); }
      50%      { opacity: 0.42; transform: scale(1.05); }
    }
    .btn-enter:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 44px rgba(193, 154, 85, 0.45), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.12);
    }
    .btn-enter:active { transform: translateY(0); }
    @media (max-width: 480px) {
      .btn-enter { padding: 16px 48px; padding-right: calc(48px + 0.28em); font-size: 17px; letter-spacing: 0.28em; }
      .hero-subline { font-size: 11px; letter-spacing: 0.15em; gap: 10px; margin-bottom: 2.4rem; }
      .hero-subline::before, .hero-subline::after { width: 24px; }
    }
    /* 超管标签页 */
    .admin-tab { color: #9d988e; white-space: nowrap; transition: color .15s, background .15s, box-shadow .15s; }
    .admin-tab:hover { color: var(--ink-bright); background: rgba(255,255,255,0.04); }
    .admin-tab.active { color: #221c10; background: linear-gradient(180deg, #d6b87e, #c19a55); box-shadow: 0 3px 12px rgba(193,154,85,0.35); font-weight: 600; }
    .admin-tab.active:hover { color: #221c10; }
    .codex-subtab { color: #9d988e; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); white-space: nowrap; transition: color .15s, background .15s; }
    .codex-subtab:hover { color: #c2beb5; }
    .codex-subtab.active { color: #f0faf5; background: linear-gradient(180deg, rgba(61,156,120,0.9), rgba(45,125,95,0.9)); border-color: transparent; }
    /* ---- 引擎凭据页 (电池模块/机架) ---- */
    .ecard { position: relative; border-radius: 12px; background: linear-gradient(180deg, rgba(255,252,245,0.028), rgba(255,252,245,0.012)); border: 1px solid rgba(201,168,106,0.10); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
    .ecard:hover { border-color: rgba(201,168,106,0.24); transform: translateY(-1px); box-shadow: 0 6px 22px -8px rgba(0,0,0,0.5); }
    .epool.ecard { background: linear-gradient(180deg, rgba(94,184,148,0.05), rgba(255,252,245,0.012)); border-color: rgba(138,209,178,0.14); }
    .epool.ecard:hover { border-color: rgba(138,209,178,0.32); }
    .ecard-edge { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; }
    .edge-ok   { background: linear-gradient(180deg, #8fd4a8, #3da266); box-shadow: 0 0 8px rgba(94,184,148,0.4); }
    .edge-warn { background: linear-gradient(180deg, #eebe72, #d9973f); box-shadow: 0 0 8px rgba(217,151,63,0.4); }
    .edge-bad  { background: linear-gradient(180deg, #ec9a8f, #c94f43); box-shadow: 0 0 8px rgba(223,114,101,0.4); }
    .erack { border-radius: 14px; border: 1px solid rgba(201,143,112,0.16); background: linear-gradient(180deg, rgba(177,117,82,0.05), rgba(255,252,245,0.012)); transition: border-color .18s ease; }
    .erack-head { border-bottom: 1px solid rgba(255,252,245,0.05); }
    .egauge-track { height: 4px; border-radius: 99px; background: rgba(255,252,245,0.07); overflow: hidden; }
    .egauge-fill { height: 100%; border-radius: 99px; transition: width .55s cubic-bezier(.22,1,.36,1); }
    .egauge-emerald { background: linear-gradient(90deg, #3da266, #8fd4a8); }
    .egauge-amber   { background: linear-gradient(90deg, #d9973f, #eebe72); }
    .egauge-rose    { background: linear-gradient(90deg, #c94f43, #ec9a8f); }
    .echip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 10px; padding: 0.25rem 0.55rem; border-radius: 0.5rem; background: rgba(255,252,245,0.045); border: 1px solid rgba(255,252,245,0.09); color: #c2beb5; transition: background .15s, color .15s; white-space: nowrap; cursor: pointer; }
    .echip:hover { background: rgba(255,252,245,0.10); color: var(--ink-bright); }
    .echip-accent { background: rgba(177,117,82,0.14); border-color: rgba(201,143,112,0.3); color: #e9c8b3; }
    .echip-accent:hover { background: rgba(177,117,82,0.28); color: #f5e4d8; }
    .echip-danger { background: rgba(201,79,67,0.09); border-color: rgba(236,154,143,0.22); color: rgba(236,154,143,0.85); }
    .echip-danger:hover { background: rgba(201,79,67,0.22); color: #f5c0b8; }
    @media (prefers-reduced-motion: reduce) { .ecard, .egauge-fill { transition: none; } .ecard:hover { transform: none; } .btn-enter, .btn-enter::before { animation: none; } }
    @keyframes cred-breathe { 0%, 100% { border-color: rgba(94,184,148,0.35); box-shadow: 0 0 0 0 rgba(94,184,148,0); } 50% { border-color: rgba(94,184,148,0.95); box-shadow: 0 0 12px 1px rgba(94,184,148,0.32); } }
    .cred-balancing { animation: cred-breathe 2.6s ease-in-out infinite; }
    .cmf-node-active { background: linear-gradient(135deg, rgba(94,184,148,0.26), rgba(94,184,148,0.10)); border-color: rgba(138,209,178,0.55) !important; color: #b5e4cf; }

    /* 组织成员 · 手机竖屏「工牌」(index.html #mBadge, renderMemberBadge 给 #hdrCard 加 .org-badge) */
    #mBadge { display: none; }
    @media (max-width: 640px) {
      .org-badge #mBadge { display: block; }
      .org-badge #hdrRow { display: none; }
    }
    .mb-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--ink-dim); transition: background-color .15s, color .15s; }
    .mb-icon:active { background: rgba(255, 252, 245, 0.07); color: var(--ink-bright); }
    .mb-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .mb-avatar { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center;
      font-family: 'Songti SC', 'Noto Serif SC', 'SimSun', serif; font-size: 22px; font-weight: 600; color: #f1e2bd;
      background: linear-gradient(155deg, rgba(201, 168, 106, 0.30), rgba(110, 82, 36, 0.16)); border: 1px solid rgba(201, 168, 106, 0.38); }
    .mb-tag { padding: 3px 7px; border-radius: 6px; font-size: 11px; line-height: 1; white-space: nowrap; color: var(--ink-dim); border: 1px solid rgba(255, 252, 245, 0.12); }
    .mb-cta { min-height: 0; height: 28px; padding: 0 14px; display: inline-flex; align-items: center; }

