/* ======================================================================
   用户中心设计系统 · Member Console（v3）
   说明：本文件自包含，不依赖 base/css/app.css；登录 / 注册 / 用户中心统一引入。
         主题覆盖路径：themes/default/static/member/css/app.css
   风格基准：浅色企业级控制台（白底侧栏 + 细分隔线 + 极轻阴影 + 中性色 + 单一品牌色）
   ====================================================================== */

/* ===================== 设计令牌 ===================== */
:root {
    /* ===== enterprise-ui 设计令牌：低饱和商务蓝 / 细分割线 / 小圆角 ===== */
    --bg: #f5f7fa;          /* 页面底色 */
    --card: #ffffff;        /* 卡片底色 */
    --line: #e9edf4;        /* 主分割线 */
    --line-soft: #f1f4f9;   /* 弱分割线（表格行） */
    --line-strong: #dfe4ed; /* 强分割线（控件描边） */
    --t1: #1d2939;          /* 一级文字 */
    --t2: #5b6577;          /* 二级文字 */
    --t3: #8b95a7;          /* 三级文字 / 说明 */
    --primary: #2f62d8;     /* 品牌主色 */
    --primary-d: #2a58c4;   /* 主色 hover / 深 */
    --primary-w: #eef3fd;   /* 主色浅底 */
    --success: #1f8a5b;
    --success-w: #edf7f1;
    --warn: #b7791f;
    --warn-w: #fdf6ec;
    --danger: #c0562b;
    --danger-w: #fdf3ef;
    --radius: 4px;          /* 统一小圆角基值 */

    /* ===== 兼容映射层：原 --m-* 令牌全部重映射到 enterprise 令牌 =====
       50+ 模板仍在引用 --m-* 名称，此处统一转发，避免逐页改动导致的兼容风险 */
    --m-bg: var(--bg);
    --m-surface: var(--card);
    --m-border: var(--line);
    --m-border-strong: var(--line-strong);
    --m-text: var(--t1);
    --m-text-2: var(--t2);
    --m-text-3: var(--t3);
    --m-brand: var(--primary);
    --m-brand-hover: var(--primary-d);
    --m-brand-weak: var(--primary-w);
    --m-brand-text: var(--primary-d);
    --m-ok: var(--success);
    --m-ok-bg: var(--success-w);
    --m-warn: var(--warn);
    --m-warn-bg: var(--warn-w);
    --m-danger: var(--danger);
    --m-danger-bg: var(--danger-w);
    --m-info-bg: var(--primary-w);
    --m-radius-sm: var(--radius);
    --m-radius: 6px;
    --m-radius-lg: 6px;
    --m-radius-xl: 6px;
    --m-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --m-shadow-pop: 0 9px 24px rgba(16, 24, 40, .10);
    --m-side-w: 228px;
}

/* ===================== 基础重置（仅作用于用户中心页面） ===================== */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--m-bg);
    color: var(--m-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { vertical-align: middle; }
input, select, textarea, button { font-size: inherit; }
::selection { background: rgba(47, 98, 216, .16); }

/* ===================== 控制台外壳 ===================== */
.app-shell { display: flex; min-height: 100vh; }

.app-side {
    width: var(--m-side-w);
    flex: none;
    background: var(--m-surface);
    border-right: 1px solid var(--m-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}
.app-brand {
    height: 52px;
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid var(--m-border);
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -.01em;
}
.app-logo {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 4px;
    background: var(--m-brand);
    position: relative;
}
.app-logo::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 2px;
    background: #fff;
}
/* 品牌 Logo 图片（替代原圆点占位）：侧栏品牌区与登录页顶部统一使用 */
.app-logo-img { display: block; height: 28px; width: auto; max-width: 160px; object-fit: contain; flex: none; }
.auth-logo { display: inline-flex; align-items: center; }
.auth-top .app-logo-img { height: 30px; max-width: 180px; }

/* 侧边菜单配色（enterprise-ui 低饱和商务蓝，仅作用于侧栏导航，颜色全部走变量） */
:root {
    --nav-text: #5b6577;        /* 菜单常规文字（对应 --t2） */
    --nav-text-strong: #1d2939; /* hover / 分区标题强文字（对应 --t1） */
    --nav-icon: #8b95a7;        /* 菜单图标（对应 --t3） */
    --nav-hover-bg: #f2f5fa;    /* hover 浅底 */
    --nav-active-bg: #eef3fd;   /* 选中态背景（--primary-w） */
    --nav-active: #2f62d8;      /* 选中态文字 / 图标（--primary） */
    --nav-radius: 4px;          /* 小圆角 */
}

/* 侧栏菜单：扁平节点按 depth 缩进，含下级的节点可逐级折叠 */
.app-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    /* 隐藏滚动条（仍可滚动），避免侧栏出现突兀的滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.app-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }

.nav-node { position: relative; padding-left: calc(var(--d, 0) * 13px); }
.nav-node.is-hidden { display: none; }
.nav-node[data-depth="0"] { margin-bottom: 2px; }
.nav-node[data-depth="0"] + .nav-node[data-depth="0"] { margin-top: 6px; }

/* 带下级的节点行：链接 + 折叠按钮并排 */
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > .nav-link { flex: 1; min-width: 0; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--nav-radius);
    color: var(--nav-text);
    font-size: 13.5px;
    line-height: 20px;
    transition: background .15s ease, color .15s ease;
}
.nav-link svg { width: 16px; height: 16px; flex: none; color: var(--nav-icon); }
.nav-link:hover { background: var(--nav-hover-bg); color: var(--nav-text-strong); }
.nav-link:hover svg { color: var(--nav-text); }
.nav-link.is-active {
    background: var(--nav-active-bg);
    color: var(--nav-active);
    font-weight: 600;
}
.nav-link.is-active svg { color: var(--nav-active); }
/* 一级节点（顶级直链）字号略大，与分组标题拉开层次 */
.nav-node[data-depth="0"] > .nav-link,
.nav-node[data-depth="0"] > .nav-row > .nav-link { font-size: 14px; }

/* 一级菜单统一观感：分组标题（有子项）与一级直链（无子项）的颜色 / 字号 / 字重保持一致，
   避免「有子项 = 深色加粗分组标题、无子项 = 浅灰普通链接」造成的颜色不一致；
   仅对一级（data-depth=0）生效，内部下级分组标题仍保持分区标题的加粗样式 */
.nav-node[data-depth="0"] > .nav-head {
    color: var(--nav-text);
    font-size: 14px;
    font-weight: 400;
}

/* 分组标题（type=group）：不可点击跳转，仅作分区标题 */
.nav-head {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: transparent;
    border-radius: var(--nav-radius);
    color: var(--nav-text-strong);
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.nav-head svg { width: 16px; height: 16px; flex: none; color: var(--nav-icon); }
.nav-head:hover { background: var(--nav-hover-bg); }
.nav-head-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 折叠箭头：普通项的小三角按钮 / 分组标题的右侧箭头 */
.nav-caret {
    width: 22px;
    height: 22px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--m-radius-sm);
    background: transparent;
    color: var(--nav-icon);
    cursor: pointer;
}
.nav-caret::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    /* 默认向下（展开态），收起时由 .is-collapsed 旋转向右 */
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .18s ease;
}
.nav-node.is-collapsed > .nav-head .nav-caret::before,
.nav-node.is-collapsed > .nav-row .nav-caret::before { transform: rotate(-45deg) translate(-1px, -1px); }
.nav-caret:hover { background: var(--nav-hover-bg); color: var(--nav-text-strong); }

/* 未读数角标 */
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.app-side-foot { flex: none; padding: 10px; border-top: 1px solid var(--m-border); }
.side-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--m-radius);
    background: transparent;
    color: var(--m-text-3);
    font-size: 13.5px;
    cursor: pointer;
}
.side-logout svg { width: 16px; height: 16px; }
.side-logout:hover { background: var(--m-danger-bg); color: var(--m-danger); }

/* 主区域 */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-top {
    height: 52px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    background: var(--m-surface);
    border-bottom: 1px solid var(--m-border);
    position: sticky;
    top: 0;
    z-index: 30;
}
.top-burger {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: #fff;
    cursor: pointer;
    padding: 8px 7px;
}
.top-burger i { display: block; height: 1.6px; background: var(--m-text-2); border-radius: 2px; }
.top-burger i + i { margin-top: 5px; }

.top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.top-lang {
    height: 32px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: #fff;
    color: var(--m-text-2);
    padding: 0 8px;
    font-size: 13px;
    cursor: pointer;
}
.top-lang:focus { outline: 2px solid rgba(47, 98, 216, .18); outline-offset: 1px; }

.top-user { position: relative; }
.top-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 8px 0 4px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}
.top-user-btn:hover { background: #f3f4f6; }
.top-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8ecf4;
    color: #3b4657;
    display: grid;
    place-items: center;
    font-size: 12.5px;
    font-weight: 600;
    flex: none;
}
.top-name { font-size: 13px; color: var(--m-text-2); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--m-text-3);
}
.top-drop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    background: #fff;
    box-shadow: var(--m-shadow-pop);
    display: none;
    z-index: 50;
}
.top-drop.is-open { display: block; }
.top-drop a, .top-drop button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--m-radius-sm);
    background: transparent;
    color: var(--m-text-2);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.top-drop a:hover, .top-drop button:hover { background: #f3f4f6; color: var(--m-text); }

/* 面包屑 */
.app-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px 0;
    font-size: 12.5px;
    color: var(--m-text-3);
}
.app-crumb a:hover { color: var(--m-text); }
.crumb-sep { color: #c6ccd6; }
.crumb-cur { color: var(--m-text-2); }

.app-content { flex: 1; padding: 14px 24px 40px; }

/* 移动端遮罩 */
.app-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .38);
    z-index: 35;
}
.app-mask.is-show { display: block; }

/* ===================== 页面标题区 ===================== */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 16px;
}
.page-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.3;
}
.page-sub { margin-top: 4px; font-size: 13px; color: var(--m-text-3); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===================== 按钮 ===================== */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--m-border-strong);
    border-radius: var(--m-radius);
    background: #fff;
    color: var(--m-text-2);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ui-btn:hover { background: #f7f9fc; border-color: var(--line-strong); color: var(--m-text); }
.ui-btn:focus-visible { outline: 2px solid rgba(47, 98, 216, .3); outline-offset: 1px; }
.ui-btn:disabled, .ui-btn.is-disabled { opacity: .55; cursor: not-allowed; }
.ui-btn.is-primary { background: var(--m-brand); border-color: var(--m-brand); color: #fff; }
.ui-btn.is-primary:hover { background: var(--m-brand-hover); border-color: var(--m-brand-hover); color: #fff; }
.ui-btn.is-danger { color: var(--m-danger); border-color: #f0d2c2; background: #fff; }
.ui-btn.is-danger:hover { background: var(--m-danger-bg); border-color: #e6b89e; color: var(--m-danger); }
.ui-btn.is-ghost { border-color: transparent; background: transparent; color: var(--m-text-2); }
.ui-btn.is-ghost:hover { background: #f2f5fa; }
.ui-btn.is-sm { height: 26px; padding: 0 10px; font-size: 12px; border-radius: var(--m-radius-sm); }
.ui-btn.is-lg { height: 34px; padding: 0 16px; font-size: 13.5px; }
.ui-btn.is-block { width: 100%; }
.ui-btn svg { width: 15px; height: 15px; }

/* ===================== 卡片 ===================== */
.ui-card {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    box-shadow: var(--m-shadow);
    overflow: hidden;
}
.ui-card + .ui-card { margin-top: 16px; }
.ui-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--m-border);
}
.ui-card-title { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.ui-card-title small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--m-text-3); }
.ui-card-sub { font-size: 12px; color: var(--m-text-3); }
.ui-card-body { padding: 16px; }
.ui-card-body.is-flush { padding: 0; }
.ui-card-foot { padding: 12px 16px; border-top: 1px solid var(--m-border); background: #fafbfd; }
.ui-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ui-card-grid > .ui-card { display: flex; flex-direction: column; }
.ui-card-grid > .ui-card + .ui-card { margin-top: 0; }
.ui-card-grid > .ui-card > .ui-card-foot { margin-top: auto; }
/* 自适应卡片网格：按可用宽度自动换列（实例列表等紧凑卡片场景） */
.ui-grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ui-grid-auto.is-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
/* 通用弱化文字（不限表格内）：原 .is-muted 仅在表格内生效，此处补齐卡片等场景 */
.is-muted { color: var(--m-text-3); }
/* 卡片内信息行：标签（弱化）+ 值 两端对齐 */
.ui-kv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.ui-kv-row > .is-muted { flex: none; }
.ui-kv-col { display: flex; flex-direction: column; gap: 10px; }
.ui-row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
/* 单行省略：标题等超长文本收尾省略，避免撑破卡片 */
.ui-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ===================== 统计卡 ===================== */
.ui-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ui-stat {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
    padding: 16px;
    box-shadow: var(--m-shadow);
}
.ui-stat-ico {
    width: 32px;
    height: 32px;
    border-radius: var(--m-radius);
    background: #f3f4f6;
    color: #4b5563;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
}
.ui-stat-ico svg { width: 16px; height: 16px; }
.ui-stat-label { font-size: 12.5px; color: var(--m-text-3); }
.ui-stat-value { margin-top: 4px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ===================== 表格 ===================== */
.ui-table-wrap { width: 100%; overflow-x: auto; }
.ui-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ui-table th {
    padding: 9px 16px;
    background: #fafbfd;
    border-bottom: 1px solid var(--m-border);
    color: var(--m-text-3);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}
.ui-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--m-text);
    vertical-align: middle;
}
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table tbody tr:hover { background: #fafbfd; }
.ui-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.ui-table .col-actions { text-align: right; white-space: nowrap; }
.ui-table .is-muted { color: var(--m-text-3); white-space: nowrap; }
.ui-table th.num { text-align: right; }
.actions { display: inline-flex; align-items: center; gap: 6px; }

/* 电源操作：合并下拉菜单 */
.ui-dropdown { position: relative; display: inline-block; }
.ui-dropdown .ui-caret { display: inline-block; margin-left: 6px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; vertical-align: middle; }
.ui-dropdown-menu { display: none; position: absolute; left: 0; top: calc(100% + 6px); min-width: 132px; padding: 4px; background: #fff; border: 1px solid var(--m-border, #e5e7eb); border-radius: var(--m-radius-sm, 8px); box-shadow: 0 8px 24px rgba(15, 23, 42, .12); z-index: 40; }
.ui-dropdown.is-open .ui-dropdown-menu { display: block; }
.ui-dropdown-item { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: transparent; color: var(--m-text, #1f2937); font-size: 13px; line-height: 1.4; border-radius: 6px; cursor: pointer; }
.ui-dropdown-item:hover { background: #f3f4f6; }
.ui-dropdown-item:focus-visible { outline: 2px solid rgba(47, 98, 216, .3); outline-offset: 1px; }

/* 详情顶部操作区：肉丸菜单（救援系统 / 续费 / 升降配 / 同步状态） */
.srv-hero-more-btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; line-height: 0; }
.srv-hero-more-btn svg { display: block; }
/* 提高特异性，确保下拉右对齐生效（对齐到按钮右边缘，避免伸出屏幕右侧） */
.srv-hero-actions .ui-dropdown-menu.srv-hero-more-menu { left: auto; right: 0; min-width: 160px; z-index: 60; }
.srv-hero-actions .ui-dropdown-menu.srv-hero-more-menu .ui-dropdown-item { white-space: nowrap; }

/* 通用模态框（enterprise-ui：细线 + 6px 小圆角 + 分区块标题/正文/底栏，弱化阴影） */
.ui-modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.ui-modal.is-open { display: flex; align-items: center; justify-content: center; padding: 16px; }
/* 遮罩：纯半透明，不用 backdrop-filter（全屏模糊会强制整页重绘，低配机器很卡） */
.ui-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.ui-modal-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(420px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--m-border, #e9edf4);
    border-radius: 6px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
    overflow: hidden;
    animation: uiModalFade .16s ease-out;
}
/* 进场仅做透明度淡入，避免 transform 缩放触发重绘/卡顿 */
@keyframes uiModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ui-modal-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--m-text, #111827);
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--m-border, #e9edf4);
}
.ui-modal-body {
    padding: 16px 18px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--m-text-2, #4b5563);
    margin: 0;
    overflow-y: auto;
}
.ui-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--m-border, #e9edf4);
    background: #fbfcfe;
}
/* 模态框表单字段（重装系统等） */
.ui-modal-row { display: flex; gap: 12px; }
.ui-modal-row .ui-field { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.ui-field { margin-bottom: 14px; }
.ui-field:last-child { margin-bottom: 0; }
.ui-label { display: block; font-size: 13px; color: var(--m-text-3, #6b7280); margin-bottom: 6px; }
.ui-modal .ui-select { width: 100%; }
.ui-modal-tip { font-size: 12.5px; color: var(--m-text-3, #6b7280); line-height: 1.6; margin: 4px 0 0; }
.ui-modal-strong { font-size: 14px; font-weight: 600; color: var(--m-text, #111827); margin: 0 0 8px; }

/* ===================== 徽标 ===================== */
.ui-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--m-radius-sm);
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.ui-badge.is-ok { background: var(--m-ok-bg); color: var(--m-ok); }
.ui-badge.is-warn { background: var(--m-warn-bg); color: var(--m-warn); }
.ui-badge.is-danger { background: var(--m-danger-bg); color: var(--m-danger); }
.ui-badge.is-info { background: var(--m-info-bg); color: var(--m-brand-text); }
.ui-badge.is-violet { background: #f5f3ff; color: #6d28d9; }
.ui-badge.is-orange { background: #fff7ed; color: #c2410c; }
.ui-badge.is-muted { background: #f3f4f6; color: var(--m-text-3); }
.ui-tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 7px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-sm);
    font-size: 12px;
    color: var(--m-text-2);
    background: #fff;
}

/* ===================== 表单 ===================== */
.ui-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ui-form-grid .is-full { grid-column: 1 / -1; }
.ui-field { margin-bottom: 16px; }
.ui-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--m-text);
}
.ui-label .req { color: var(--m-danger); margin-left: 2px; }
.ui-input, .ui-select, .ui-textarea {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--m-border-strong);
    border-radius: var(--m-radius);
    background: #fff;
    color: var(--m-text);
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ui-textarea { height: auto; min-height: 88px; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.ui-input::placeholder, .ui-textarea::placeholder { color: var(--m-text-3); }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus {
    outline: none;
    border-color: var(--m-brand);
    box-shadow: 0 0 0 3px rgba(47, 98, 216, .12);
}
.ui-input:disabled, .ui-select:disabled, .ui-textarea:disabled { background: #f7f9fc; color: var(--m-text-3); }
.ui-help { margin-top: 6px; font-size: 12px; color: var(--m-text-3); }
.ui-error { margin-top: 6px; font-size: 12px; color: var(--m-danger); }
.ui-inline { display: flex; align-items: center; gap: 8px; }
.ui-inline .ui-input, .ui-inline .ui-select { flex: 1; min-width: 0; }
.ui-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ui-divider { height: 1px; background: var(--m-border); margin: 18px 0; border: 0; }

/* 单选卡（注册方式、发票类型等） */
.ui-radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ui-radio-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--m-border-strong);
    border-radius: var(--m-radius);
    background: #fff;
    font-size: 13.5px;
    color: var(--m-text-2);
    cursor: pointer;
}
.ui-radio-item input { accent-color: var(--m-brand); margin: 0; }
.ui-radio-item.is-checked, .ui-radio-item:has(input:checked) {
    border-color: var(--m-brand);
    background: var(--m-brand-weak);
    color: var(--m-brand-text);
}

/* 开关列表（通知设置等） */
.ui-switch-list { border-top: 1px solid var(--m-border); }
.ui-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--m-border);
}
.ui-switch-row:last-child { border-bottom: 0; }
.ui-switch-label { font-size: 13.5px; font-weight: 500; }
.ui-switch-desc { margin-top: 3px; font-size: 12.5px; color: var(--m-text-3); }
.ui-switch { position: relative; flex: none; width: 40px; height: 22px; }
.ui-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ui-switch-ui {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d7dbe3;
    transition: background .18s ease;
    pointer-events: none;
}
.ui-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .18);
    transition: transform .18s ease;
}
.ui-switch input:checked + .ui-switch-ui { background: var(--m-brand); }
.ui-switch input:checked + .ui-switch-ui::after { transform: translateX(18px); }
.ui-switch input:focus-visible + .ui-switch-ui { outline: 2px solid rgba(47, 98, 216, .3); outline-offset: 2px; }

/* 通知设置：每个事件行内联「站内信 / 邮件 / 短信」三个开关（开关列右侧对齐） */
.ui-channel-head,
.ui-switch-row.is-channel {
    display: grid;
    grid-template-columns: 1fr 60px 60px 60px;
    align-items: center;
    gap: 8px;
}
.ui-channel-head {
    padding: 0 0 10px;
    font-size: 12px;
    color: var(--m-text-3);
}
.ui-channel-head span { text-align: center; }
.ui-channel-head span:first-child { text-align: left; }
.ui-channel-cell { display: flex; justify-content: center; }

/* ===================== 空状态 / 提示 ===================== */
.ui-empty { padding: 52px 20px; text-align: center; color: var(--m-text-3); }
.ui-empty-ico {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: var(--m-radius-lg);
    background: #f3f4f6;
    color: #9ca3af;
    display: grid;
    place-items: center;
}
.ui-empty-ico svg { width: 20px; height: 20px; }
.ui-empty p { font-size: 13.5px; }
.ui-empty .ui-btn { margin-top: 16px; }

.ui-alert {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: #f9fafb;
    font-size: 13.5px;
    color: var(--m-text-2);
    margin-bottom: 16px;
}
.ui-alert.is-error { border-color: #f3c9c9; background: var(--m-danger-bg); color: var(--m-danger); }
.ui-alert.is-ok { border-color: #bfe6d4; background: var(--m-ok-bg); color: var(--m-ok); }
.ui-alert.is-warn { border-color: #f0dcb4; background: var(--m-warn-bg); color: var(--m-warn); }
.ui-alert.is-info { border-color: #cfdcf7; background: var(--m-info-bg); color: var(--m-brand-text); }
.ui-alert strong { font-weight: 600; }

/* ===================== 场景化消息 Message ===================== */
/* 四种语义：success / warning / info / error，左侧图标 + 语义色 + 细边框，enterprise-ui 风格 */
.ui-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #fff;
    border: 1px solid var(--m-border);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--m-text);
    margin: 0;
}
/* 左侧图标：内联 SVG，随语义色 */
.ui-message::before {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}
/* 图标：勾 / 叹号 / 信息 / 叉（图标与文字同步语义色，随场景变化） */
.ui-message.is-success::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 12.5l2.4 2.4L15.5 9.5'/%3E%3C/svg%3E"); }
.ui-message.is-warning::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9 15.5H3z'/%3E%3Cpath d='M12 9.5v4'/%3E%3Cpath d='M12 16.5h.01'/%3E%3C/svg%3E"); }
.ui-message.is-info::before    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f62d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5'/%3E%3Cpath d='M12 7.5h.01'/%3E%3C/svg%3E"); }
.ui-message.is-error::before   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15 9l-6 6'/%3E%3Cpath d='M9 9l6 6'/%3E%3C/svg%3E"); }

/* 场景配色：按语义切换浅色底 + 边框 + 文字色（浮层形态不变） */
.ui-message.is-success { background: var(--m-ok-bg); border-color: #bfe6d4; color: var(--m-ok); }
.ui-message.is-warning { background: var(--m-warn-bg); border-color: #f0dcb4; color: var(--m-warn); }
.ui-message.is-info    { background: var(--m-info-bg); border-color: #cfdcf7; color: var(--m-brand-text); }
.ui-message.is-error   { background: var(--m-danger-bg); border-color: #f3c9c9; color: var(--m-danger); }

/* 浮动消息堆栈（JS 动态创建，固定顶部居中，多条纵向堆叠，几秒后自动淡出） */
.ui-msgstack {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100% - 32px);
    pointer-events: none;
}
.ui-msgstack .ui-message {
    margin: 0;
    pointer-events: auto;
    opacity: 1;
    transition: opacity .2s ease;
}
.ui-msgstack .ui-message.is-enter { opacity: 0; }
.ui-msgstack .ui-message.is-leave { opacity: 0; }

/* ===================== 键值列表 ===================== */
.ui-kv { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px 16px; font-size: 13.5px; }
.ui-kv dt { color: var(--m-text-3); }
.ui-kv dd { color: var(--m-text); word-break: break-word; }
/* 登录信息里的公网 IP 由远程块异步回填：回填前是空的占位 div，默认会抢占网格首格，
   导致后面的 dt/dd 整体错位（标题跑到数值右侧）；让空占位不参与布局即可，回填替换为 dt/dd 后自然对齐 */
.ui-kv > div:empty { display: contents; }
/* 实例详情页签：电脑端两列排布（每行两组「标签:值」），窄屏自动回退单列（0.2.326） */
@media (min-width: 992px) {
    .ui-kv.srv-info-kv { grid-template-columns: 128px minmax(0, 1fr) 128px minmax(0, 1fr); }
}

/* ===================== 页签 ===================== */
.ui-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--m-border); margin-bottom: 16px; overflow-x: auto; }
.ui-tab {
    padding: 9px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--m-text-2);
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
}
.ui-tab:hover { color: var(--m-text); }
.ui-tab.is-active { color: var(--m-brand-text); border-bottom-color: var(--m-brand); font-weight: 600; }

/* ===================== 分页 ===================== */
.ui-pager-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--m-border);
    font-size: 12.5px;
    color: var(--m-text-3);
}
.ui-pager { display: flex; align-items: center; gap: 4px; }
.ui-pager-info { font-variant-numeric: tabular-nums; }
.ui-pager a, .ui-pager span {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-sm);
    background: #fff;
    color: var(--m-text-2);
    font-size: 12.5px;
}
.ui-pager a:hover { border-color: var(--m-border-strong); background: #f9fafb; color: var(--m-text); }
.ui-pager .is-current { background: var(--m-brand); border-color: var(--m-brand); color: #fff; font-weight: 600; }
.ui-pager .is-disabled { color: #c3c9d3; background: #fbfcfd; }
.ui-gap { border: 0 !important; background: transparent !important; color: var(--m-text-3) !important; }

/* ===================== 业务块：步骤流（工单 / 服务器流程） ===================== */
.ui-flow { display: flex; align-items: flex-start; gap: 0; padding: 6px 0; overflow-x: auto; }
.ui-flow-step { position: relative; flex: 1; min-width: 132px; padding-right: 12px; }
.ui-flow-step::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 18px;
    right: 0;
    height: 1px;
    background: var(--m-border);
}
.ui-flow-step:last-child::before { display: none; }
.ui-flow-dot {
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--m-border-strong);
    background: #fff;
    z-index: 1;
}
.ui-flow-step.is-done .ui-flow-dot { border-color: var(--m-brand); background: var(--m-brand); }
.ui-flow-step.is-current .ui-flow-dot { border-color: var(--m-brand); box-shadow: 0 0 0 4px rgba(47, 98, 216, .12); }
.ui-flow-name { margin-top: 10px; font-size: 13px; font-weight: 500; }
.ui-flow-hint { margin-top: 2px; font-size: 12px; color: var(--m-text-3); }
.ui-flow-legend { display: flex; gap: 16px; font-size: 12px; color: var(--m-text-3); }

/* ===================== 业务块：监控栅格 ===================== */
.ui-monitor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ui-monitor-item { border: 1px solid var(--m-border); border-radius: var(--m-radius); padding: 12px 14px; background: #fcfcfd; }
.ui-monitor-label { font-size: 12px; color: var(--m-text-3); }
.ui-monitor-value { margin-top: 4px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ui-monitor-bar { margin-top: 8px; height: 4px; border-radius: 2px; background: #eceff4; overflow: hidden; }
.ui-monitor-bar > i { display: block; height: 100%; background: var(--m-brand); border-radius: 2px; }

/* ===================== 业务块：VNC 控制台 ===================== */
.ui-vnc-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--m-border);
    background: #fbfcfd;
    font-size: 12.5px;
    color: var(--m-text-3);
}
.ui-vnc-title { font-weight: 600; color: var(--m-text-2); margin-right: auto; }
.ui-vnc-status { display: inline-flex; align-items: center; gap: 6px; }
.ui-vnc-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #9ca3af; }
.ui-vnc-status.is-on::before { background: #10b981; }
.ui-vnc-btn {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--m-border-strong);
    border-radius: var(--m-radius-sm);
    background: #fff;
    color: var(--m-text-2);
    font-size: 12px;
    cursor: pointer;
}
.ui-vnc-btn:hover { background: #f3f4f6; }
.ui-vnc-btn.is-primary { background: var(--m-brand); border-color: var(--m-brand); color: #fff; }
.ui-vnc-screen { background: #0b0f17; min-height: 380px; display: grid; place-items: center; color: #7b8494; }
.ui-vnc-error { padding: 12px 14px; background: var(--m-danger-bg); color: var(--m-danger); font-size: 13px; }
.ui-vnc-spacer { flex: 1; }

/* ===================== 业务块：消息 / 文章正文 ===================== */
.ui-msg-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px; color: var(--m-text-3); margin-bottom: 16px; }
.ui-msg-content { font-size: 14px; line-height: 1.8; color: #374151; word-break: break-word; }
.ui-msg-content p { margin: 0 0 12px; }
.ui-msg-content img { max-width: 100%; height: auto; border-radius: var(--m-radius); }
.ui-msg-content pre { background: #f6f7f9; padding: 12px 14px; border-radius: var(--m-radius); overflow: auto; font-size: 13px; }
.ui-msg-content code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.ui-msg-content a { color: var(--m-brand); }

/* ===================== 业务块：充值面额 ===================== */
.ui-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.ui-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 12px 8px;
    border: 1px solid var(--m-border-strong);
    border-radius: var(--m-radius);
    background: #fff;
    cursor: pointer;
}
.ui-preset:hover { border-color: #b9c3d6; }
.ui-preset.is-active { border-color: var(--m-brand); background: var(--m-brand-weak); }
.ui-preset-amount { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ui-preset-note { font-size: 11.5px; color: var(--m-text-3); }

/* ===================== 登录 / 注册（居中卡片） ===================== */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--m-bg); }
.auth-top { padding: 36px 24px 8px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-top .app-logo { width: 28px; height: 28px; }
.auth-top-name { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.auth-lang { position: absolute; top: 20px; right: 24px; }
.auth-lang .top-lang { height: 30px; }
.auth-box { width: 100%; max-width: 432px; margin: auto; padding: 12px 20px 32px; }
.auth-card {
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-xl);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .05);
    padding: 30px 28px;
}
.auth-title { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.auth-sub { margin-top: 6px; font-size: 13.5px; color: var(--m-text-3); }
.auth-body { margin-top: 22px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--m-text-3); }
.auth-foot a { color: var(--m-brand); font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }
.auth-feats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
    font-size: 12.5px;
    color: var(--m-text-3);
}
.auth-feats li { display: flex; align-items: center; gap: 6px; }
.auth-feats li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c3c9d3;
}
.auth-terms { margin-top: 16px; font-size: 12px; color: var(--m-text-3); line-height: 1.6; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--m-text-3); }
.auth-back:hover { color: var(--m-text); }

/* ===================== 用户中心首页 · 仪表盘 ===================== */
/* 欢迎横幅：enterprise 浅色卡（低饱和主色浅底 + 白色余额卡） */
.dash-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    margin: 4px 0 16px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    color: var(--m-text);
    background: var(--primary-w);
    box-shadow: var(--m-shadow);
    overflow: hidden;
}
/* 两个装饰圆（纯装饰，不参与交互） */
.dash-hero::before {
    content: "";
    position: absolute;
    right: -40px; top: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(47, 98, 216, .06);
}
.dash-hero::after {
    content: "";
    position: absolute;
    right: 80px; bottom: -90px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(47, 98, 216, .04);
}
.dash-hero-main { position: relative; z-index: 1; min-width: 0; }
.dash-hero-eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--m-brand-text); }
.dash-hero-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.dash-hero-sub { margin: 8px 0 0; font-size: 13px; color: var(--m-text-2); }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dash-hero-balance {
    position: relative; z-index: 1;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 176px;
    padding: 14px 18px;
    border-radius: var(--m-radius);
    background: var(--m-surface);
    border: 1px solid var(--m-border);
}
.dash-hero-balance-label { font-size: 12px; color: var(--m-text-3); }
.dash-hero-balance-value { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--m-text); }
.dash-hero-balance-link { margin-top: 2px; font-size: 12.5px; color: var(--m-brand); }
.dash-hero-balance-link:hover { color: var(--m-brand-hover); }

/* 横幅内浅色按钮（主色描边按钮） */
.ui-btn.is-light { background: #fff; color: var(--m-brand); border: 1px solid var(--m-border-strong); }
.ui-btn.is-light:hover { background: var(--primary-w); border-color: var(--m-brand); color: var(--m-brand); }
.ui-btn.is-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .55); }
.ui-btn.is-outline-light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }

/* 快捷入口：六宫格 */
.dash-quick {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.dash-quick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--m-radius);
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    box-shadow: var(--m-shadow);
    transition: border-color .15s ease, color .15s ease;
}
.dash-quick-item:hover { border-color: var(--m-brand); }
.dash-quick-ico { display: inline-flex; flex: none; width: 34px; height: 34px; border-radius: var(--m-radius-sm); align-items: center; justify-content: center; background: var(--m-brand-weak); color: var(--m-brand); }
.dash-quick-ico svg { width: 18px; height: 18px; }
.dash-quick-text { font-size: 13.5px; font-weight: 550; color: var(--m-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 概览底部两栏：公告 + 推广（窄屏自动单列，单卡片时铺满整行） */
.dash-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin: 16px 0;
    align-items: stretch;
}
/* 卡片撑满行高，内部纵向排布 */
.dash-two > .ui-card { display: flex; flex-direction: column; height: 100%; }
.dash-two > .ui-card > .ui-card-body { flex: 1; }
/* 网格内相邻卡片不需要纵向外边距，避免第二张顶部错位 */
.dash-two > .ui-card + .ui-card { margin-top: 0; }

/* 推广返利宣传卡片：低饱和品牌渐变 + 图标 + 说明 + 行动按钮 */
.dash-promo {
    border: 1px solid var(--m-border);
    background: var(--primary-w);
}
.dash-promo-body { display: flex; align-items: center; gap: 16px; }
.dash-promo-ico {
    flex: none; width: 46px; height: 46px; border-radius: var(--m-radius);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--m-brand); color: #fff;
}
.dash-promo-ico svg { width: 24px; height: 24px; }
.dash-promo-main { flex: 1; min-width: 0; }
.dash-promo-title { font-size: 15px; font-weight: 600; color: var(--m-text); }
.dash-promo-desc { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--m-text-2); }
.dash-promo-desc strong { color: var(--m-brand); font-weight: 600; }

/* 关键指标：图标 + 数值的横向卡片 */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.dash-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--m-radius);
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    box-shadow: var(--m-shadow);
}
.dash-stat-ico { display: inline-flex; flex: none; width: 42px; height: 42px; border-radius: var(--m-radius-sm); align-items: center; justify-content: center; }
.dash-stat-ico svg { width: 20px; height: 20px; }
.dash-stat-ico.is-blue { background: #eff6ff; color: #2563eb; }
.dash-stat-ico.is-amber { background: #fffbeb; color: #d97706; }
.dash-stat-ico.is-indigo { background: #eef2ff; color: #4f46e5; }
.dash-stat-ico.is-rose { background: #fef2f2; color: #e11d48; }
.dash-stat-ico.is-teal { background: #ecfdf5; color: #0d9488; }
.dash-stat-body { min-width: 0; }
.dash-stat-label { font-size: 12.5px; color: var(--m-text-3); }
.dash-stat-value { margin-top: 2px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dash-stat-unit { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--m-text-3); }
.is-warn-text { color: #d97706; }

/* 两栏（服务器 / 账单） */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}
.dash-grid > .ui-card { min-width: 0; display: flex; flex-direction: column; }
.dash-grid > .ui-card > .ui-card-body { flex: 1; }
/* 网格内相邻卡片不需要纵向外边距，否则第二张会比第一张矮一截、顶部错位 */
.dash-grid > .ui-card + .ui-card { margin-top: 0; }
/* 首页仪表盘统一使用小圆角，避免大圆角观感 */
.dash .ui-card { border-radius: var(--m-radius); }

/* 紧凑列表项 */
.dash-list { display: flex; flex-direction: column; gap: 4px; margin: -4px 0; }
.dash-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: var(--m-radius);
    transition: background .15s ease;
}
.dash-list-item:hover { background: #f8f9fb; }
.dash-list-ico { display: inline-flex; flex: none; width: 36px; height: 36px; border-radius: var(--m-radius-sm); align-items: center; justify-content: center; background: #f3f4f6; color: var(--m-text-2); }
.dash-list-ico.is-amber { background: #fffbeb; color: #d97706; }
.dash-list-ico.is-blue { background: #eff6ff; color: #2563eb; }
.dash-list-ico svg { width: 18px; height: 18px; }
.dash-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-list-title { font-size: 13.5px; font-weight: 550; color: var(--m-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-list-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--m-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-dot { flex: none; width: 3px; height: 3px; border-radius: 50%; background: #c3c9d3; }
.dash-list-side { flex: none; display: flex; align-items: center; }
.dash-list-amount { font-size: 14px; font-weight: 650; color: var(--m-text); font-variant-numeric: tabular-nums; }

/* 待办提醒：横向胶囊列表，仅展示有待办数量的项 */
.dash-todo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin: 0 0 16px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: var(--m-surface);
    box-shadow: var(--m-shadow);
}
.dash-todo-head { flex: none; font-size: 13px; font-weight: 600; color: var(--m-text-2); }
.dash-todo-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-todo-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 550;
    border: 1px solid transparent;
    transition: border-color .15s ease;
}
.dash-todo-item:hover { border-color: currentColor; }
.dash-todo-count { font-variant-numeric: tabular-nums; }
.dash-todo-item.is-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.dash-todo-item.is-rose { background: #fef2f2; color: #be123c; border-color: #fecdd3; }
.dash-todo-item.is-indigo { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.dash-todo-item.is-teal { background: #ecfdf5; color: #0f766e; border-color: #99f6e4; }

/* 未付账单提醒：金额 + 笔数摘要 + 直达按钮 */
.dash-bill { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dash-bill-main { min-width: 0; }
.dash-bill-amount { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--m-danger); }
.dash-bill-desc { margin-top: 4px; font-size: 12.5px; color: var(--m-text-3); }

/* 卡片内紧凑空状态（比整页 .ui-empty 更省空间） */
.dash-empty { padding: 28px 0; text-align: center; color: var(--m-text-3); font-size: 13px; }

/* ===================== 服务器详情（概览 + 双栏） ===================== */
/* 概览卡：实例标识与关键时间，右侧放登录面板 / 续费 / 升降配 */
.srv-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px 22px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
}
/* 详情页卡片统一使用小圆角，避免大圆角观感 */
.srv-layout .ui-card { border-radius: var(--m-radius); }
.srv-hero-main { min-width: 0; }
.srv-hero-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.srv-hero-title h1 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.015em;
    word-break: break-all;
}
.srv-hero-meta { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 16px; }
.srv-meta { display: flex; flex-direction: column; gap: 3px; min-width: 92px; }
.srv-meta-label { font-size: 12px; color: var(--m-text-3); }
.srv-meta-value {
    font-size: 13.5px;
    font-weight: 550;
    color: var(--m-text);
    word-break: break-all;
}
.srv-meta-value .ui-badge { margin-left: 6px; vertical-align: middle; }
.srv-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: none; }
/* 详情功能区 Tab 栏整页宽度置顶：分隔线铺满整页（100%） */
.srv-tabs { width: 100%; margin-bottom: 16px; }
.srv-tabs .ui-tabs { width: 100%; box-sizing: border-box; }
/* 双栏：左主区放面板，右栏放登录信息 / 配置 / 续费；两栏等高（顶部对齐、底部对齐） */
.srv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.srv-main,
.srv-side { min-width: 0; }

/* 详情功能区 Tab：资源监控 / 安全组 / 快照备份 / NAT / 建站 / 操作日志 */
/* 未激活面板隐藏，激活面板恢复为块级，卡片间距沿用 .ui-card + .ui-card */
.srv-panel { display: none; }
.srv-panel.is-active { display: block; }

/* ===================== 概览页新布局（账户卡 + 余额卡并排 / 小型指标 / 资金流水） ===================== */
.dash-portal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 4px 0 16px; }
.dash-portal-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
}
.dash-avatar {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 21px;
    font-weight: 650;
    color: #fff;
    background: var(--m-brand);
}
.dash-avatar.is-teal { background: var(--success); }
.dash-avatar svg { width: 22px; height: 22px; }
.dash-portal-main { flex: 1; min-width: 0; }
.dash-portal-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.dash-portal-label { font-size: 13px; color: var(--m-text-3); }
.dash-portal-sub { margin-top: 5px; font-size: 13px; color: var(--m-text-3); }
.dash-portal-aside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.dash-portal-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--m-text); }

/* 概览区块内的小型指标（服务器概览用） */
.dash-mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dash-mini-stat { padding: 12px 14px; border: 1px solid var(--m-border); border-radius: var(--m-radius); background: #fbfcfe; }
.dash-mini-stat-label { display: block; font-size: 12px; color: var(--m-text-3); }
.dash-mini-stat-value { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--m-text); }

/* 资金流水列表（财务概览用） */
.dash-flow-head { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--m-text); }
.dash-flow { display: flex; flex-direction: column; }
.dash-flow-item { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--m-border); }
.dash-flow-item:first-child { border-top: 0; }
.dash-flow-item:hover { background: #f7f8fb; }
.dash-flow-sign {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 700;
    background: #f3f4f6;
    color: var(--m-text-2);
}
.dash-flow-sign.is-in { background: var(--m-ok-bg); color: var(--m-ok); }
.dash-flow-main { flex: 1; min-width: 0; }
.dash-flow-title { display: block; font-size: 13.5px; color: var(--m-text); }
.dash-flow-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--m-text-3); }
.dash-flow-amount { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--m-text); }
.dash-flow-amount.is-in { color: var(--m-ok); }

/* ===================== 响应式 ===================== */
@media (max-width: 1160px) {
    .ui-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ui-monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .srv-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
    /* 详情页在平板及以下收为单列，概览操作区换行 */
    .srv-layout { grid-template-columns: minmax(0, 1fr); }
    .srv-hero { flex-direction: column; }
    .srv-hero-actions { width: 100%; }
    .app-side {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: var(--m-shadow-pop);
    }
    .app-side.is-open { transform: none; }
    /* 汉堡固定在左侧，语言/用户区依靠 margin-left:auto 靠右 */
    .top-burger { display: block; order: 0; margin-right: 8px; }
    .top-right { order: 1; }
    .app-top, .app-crumb, .app-content { padding-left: 16px; padding-right: 16px; }
    /* 首页仪表盘在窄屏下横幅纵向排布、两栏收为单列 */
    .dash-hero { flex-direction: column; align-items: flex-start; }
    .dash-hero-balance { width: 100%; }
    .dash-grid { grid-template-columns: minmax(0, 1fr); }
    .dash-portal { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .ui-card-grid { grid-template-columns: minmax(0, 1fr); }
    .ui-form-grid { grid-template-columns: minmax(0, 1fr); }
    .ui-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-head { flex-direction: column; align-items: flex-start; }
    .ui-kv { grid-template-columns: 104px minmax(0, 1fr); }
    .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .ui-stats { grid-template-columns: minmax(0, 1fr); }
    .ui-monitor-grid { grid-template-columns: minmax(0, 1fr); }
    .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-stats { grid-template-columns: minmax(0, 1fr); }
    .dash-hero { padding: 20px; }
    /* 手机端：账户卡 / 余额卡允许内部换行，避免头像 + 文字 + 按钮被挤压在同一行 */
    .dash-portal-card { flex-wrap: wrap; padding: 18px 20px; }
    .dash-portal-aside { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
    /* 推广卡在窄屏下按钮换行铺满整行 */
    .dash-promo-body { flex-wrap: wrap; }
    .dash-promo-cta { width: 100%; justify-content: center; }
    .dash-todo { flex-direction: column; align-items: flex-start; }
    .app-crumb { display: none; }
    /* 移动端顶部导航隐藏客户名称，避免拥挤 */
    .top-name { display: none; }
    .app-content { padding-top: 16px; }
    .auth-card { padding: 24px 20px; }
    .ui-table th, .ui-table td { padding: 11px 12px; }
    .ui-pager-bar { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
