/* ==========================================================================
   V2Board layuiadmin 主题 - 主样式
   基于开源 layui 2.x，布局与观感对齐 layuiadmin 演示后台
   ========================================================================== */

:root {
    --v2b-primary: #0665d0;
    --v2b-primary-dark: #0552a8;
    --v2b-sidebar-bg: #20222a;
    --v2b-sidebar-text: #a9b7c6;
    --v2b-sidebar-text-active: #ffffff;
    --v2b-sidebar-hover: rgba(255, 255, 255, .06);
    --v2b-sidebar-border: #2a2c35;
    --v2b-header-bg: #ffffff;
    --v2b-header-text: #333333;
    --v2b-body-bg: #f2f2f2;
    --v2b-card-bg: #ffffff;
    --v2b-border: #e6e6e6;
    --v2b-text: #333333;
    --v2b-text-light: #999999;
    --v2b-radius: 4px;
    --v2b-sidebar-width: 220px;
    --v2b-sidebar-mini-width: 60px;
    --v2b-header-height: 60px;
    --v2b-tabbar-height: 40px;
    --v2b-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    --v2b-ease: cubic-bezier(.4, 0, .2, 1);
}

/* 主题色 ------------------------------------------------------------------ */
/* soft = 行选中/悬停的浅色底，dim = 深色侧栏上的图标高亮色 */
body[data-color="default"] {
    --v2b-primary: #0665d0; --v2b-primary-dark: #0552a8;
    --v2b-primary-soft: rgba(6, 101, 208, .15); --v2b-primary-dim: #6aa9f5; --v2b-primary-fade: #f3f7fe;
}
body[data-color="green"] {
    --v2b-primary: #319795; --v2b-primary-dark: #276f6e;
    --v2b-primary-soft: rgba(49, 151, 149, .15); --v2b-primary-dim: #66c9c7; --v2b-primary-fade: #f1fafa;
}
body[data-color="black"] {
    --v2b-primary: #343a40; --v2b-primary-dark: #232629;
    --v2b-primary-soft: rgba(52, 58, 64, .13); --v2b-primary-dim: #9aa4af; --v2b-primary-fade: #f5f6f7;
}
body[data-color="darkblue"] {
    --v2b-primary: #3b5998; --v2b-primary-dark: #2d4474;
    --v2b-primary-soft: rgba(59, 89, 152, .15); --v2b-primary-dim: #8ba5dc; --v2b-primary-fade: #f4f6fb;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--v2b-text);
    background: var(--v2b-body-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--v2b-primary); text-decoration: none; }
a:hover { color: var(--v2b-primary-dark); }

.v2b-loading {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--v2b-text-light);
}

/* ==========================================================================
   框架布局
   ========================================================================== */

.v2b-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部 -------------------------------------------------------------------- */
.v2b-header {
    height: var(--v2b-header-height);
    background: var(--v2b-header-bg);
    color: var(--v2b-header-text);
    box-shadow: var(--v2b-shadow);
    display: flex;
    align-items: center;
    padding: 0 15px 0 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

body[data-header="dark"] .v2b-header {
    background: #20222a;
    color: #e8e8e8;
}

body[data-header="dark"] .v2b-header .v2b-header-item:hover { background: rgba(255, 255, 255, .08); }
body[data-header="dark"] .v2b-header .v2b-user-name { color: #e8e8e8; }

.v2b-logo-box {
    width: var(--v2b-sidebar-width);
    height: var(--v2b-header-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    flex-shrink: 0;
    color: #fff;
    background: var(--v2b-sidebar-bg);
    transition: width .2s;
    overflow: hidden;
}

.v2b-logo-box img { max-height: 32px; max-width: 32px; border-radius: 4px; }
.v2b-logo-box .v2b-logo-text {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.v2b-hamburger {
    width: 60px;
    height: var(--v2b-header-height);
    line-height: var(--v2b-header-height);
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s;
}
.v2b-hamburger:hover { background: rgba(0, 0, 0, .05); }
.v2b-hamburger i { font-size: 20px; }

.v2b-header-spacer { flex: 1; }

.v2b-header-item {
    height: var(--v2b-header-height);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.v2b-header-item:hover { background: rgba(0, 0, 0, .05); }
.v2b-header-item i { font-size: 18px; }

.v2b-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--v2b-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.v2b-user-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 侧栏 -------------------------------------------------------------------- */
.v2b-sidebar {
    position: fixed;
    top: var(--v2b-header-height);
    bottom: 0;
    left: 0;
    width: var(--v2b-sidebar-width);
    background: var(--v2b-sidebar-bg);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 999;
    transition: width .2s, transform .2s;
}

body[data-sidebar="light"] .v2b-sidebar {
    background: #ffffff;
    border-right: 1px solid var(--v2b-border);
}

.v2b-sidebar::-webkit-scrollbar { width: 6px; }
.v2b-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }

.v2b-menu { list-style: none; margin: 0; padding: 8px 0 30px; }

.v2b-menu-title {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    color: var(--v2b-sidebar-text);
    cursor: pointer;
    position: relative;
    transition: color .16s var(--v2b-ease), background .16s var(--v2b-ease), transform .12s var(--v2b-ease);
    white-space: nowrap;
    user-select: none;
}
.v2b-menu-title:hover { color: var(--v2b-sidebar-text-active); background: var(--v2b-sidebar-hover); }
.v2b-menu-title:active { background: rgba(255, 255, 255, .13); transform: scale(.985); }
.v2b-menu-title > i:first-child {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: color .16s var(--v2b-ease), transform .16s var(--v2b-ease);
}
.v2b-menu-title:hover > i:first-child { transform: scale(1.08); }
.v2b-menu-title .v2b-menu-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.v2b-menu-title .v2b-menu-arrow { font-size: 12px; transition: transform .22s var(--v2b-ease); }
.v2b-menu-item.open > .v2b-menu-title .v2b-menu-arrow { transform: rotate(90deg); }

/* 当前分组：父级用文字与图标高亮，避免只高亮子项时看不出归属 */
.v2b-menu-item.has-active > .v2b-menu-title { color: #fff; }
.v2b-menu-item.has-active > .v2b-menu-title > i:first-child { color: var(--v2b-primary-dim); }

/* 当前项 */
.v2b-menu-title.active {
    color: var(--v2b-sidebar-text-active);
    background: linear-gradient(90deg, var(--v2b-primary-soft), rgba(255, 255, 255, .02));
    font-weight: 500;
}
.v2b-menu-title.active > i:first-child { color: var(--v2b-primary-dim); }
.v2b-menu-title.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--v2b-primary-dim);
    border-radius: 0 2px 2px 0;
}

/* 亮色侧栏 */
body[data-sidebar="light"] .v2b-menu-title { color: #5f6266; }
body[data-sidebar="light"] .v2b-menu-title:hover { color: var(--v2b-primary); background: var(--v2b-primary-fade); }
body[data-sidebar="light"] .v2b-menu-title:active { background: var(--v2b-primary-soft); }
body[data-sidebar="light"] .v2b-menu-item.has-active > .v2b-menu-title { color: var(--v2b-primary); }
body[data-sidebar="light"] .v2b-menu-title.active {
    color: var(--v2b-primary);
    background: linear-gradient(90deg, var(--v2b-primary-soft), rgba(255, 255, 255, .3));
}
body[data-sidebar="light"] .v2b-menu-title.active > i:first-child,
body[data-sidebar="light"] .v2b-menu-item.has-active > .v2b-menu-title > i:first-child { color: var(--v2b-primary); }
body[data-sidebar="light"] .v2b-menu-title.active::before { background: var(--v2b-primary); }
body[data-sidebar="light"] .v2b-submenu::before { background: rgba(0, 0, 0, .07); }
body[data-sidebar="light"] .v2b-submenu .v2b-menu-title > i { color: rgba(0, 0, 0, .28); }
body[data-sidebar="light"] .v2b-submenu .v2b-menu-title.active > i { color: var(--v2b-primary); }

.v2b-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    position: relative;
    transition: max-height .26s var(--v2b-ease);
}
/* 子菜单树状引导线：对齐父级图标中心，让缩进关系一眼可见 */
.v2b-menu-item.open > .v2b-submenu::before {
    content: "";
    position: absolute;
    left: 28px;
    top: 4px;
    bottom: 8px;
    width: 1px;
    background: rgba(255, 255, 255, .1);
}
.v2b-submenu > li { opacity: 0; transform: translateY(-4px); transition: opacity .2s var(--v2b-ease), transform .2s var(--v2b-ease); }
.v2b-menu-item.open > .v2b-submenu > li { opacity: 1; transform: translateY(0); }
.v2b-menu-item.open > .v2b-submenu > li:nth-child(1) { transition-delay: .04s; }
.v2b-menu-item.open > .v2b-submenu > li:nth-child(2) { transition-delay: .08s; }
.v2b-menu-item.open > .v2b-submenu > li:nth-child(3) { transition-delay: .12s; }
.v2b-menu-item.open > .v2b-submenu > li:nth-child(4) { transition-delay: .16s; }
.v2b-menu-item.open > .v2b-submenu { max-height: 600px; }

.v2b-submenu .v2b-menu-title {
    padding-left: 40px;
    height: 40px;
    font-size: 13px;
}
.v2b-submenu .v2b-menu-title > i {
    font-size: 13px;
    width: 16px;
    color: rgba(255, 255, 255, .45);
    transition: color .16s var(--v2b-ease), transform .16s var(--v2b-ease);
}
.v2b-submenu .v2b-menu-title:hover > i { transform: scale(1.12); }
.v2b-submenu .v2b-menu-title.active > i { color: var(--v2b-primary-dim); }

.v2b-menu-badge {
    background: #ff5722;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 8px;
}

/* 折叠态 */
body.v2b-sidebar-mini .v2b-sidebar { width: var(--v2b-sidebar-mini-width); }
body.v2b-sidebar-mini .v2b-logo-box { width: var(--v2b-sidebar-mini-width); }
body.v2b-sidebar-mini .v2b-logo-box .v2b-logo-text { display: none; }
body.v2b-sidebar-mini .v2b-menu-title { padding: 0 0 0 20px; }
body.v2b-sidebar-mini .v2b-menu-text,
body.v2b-sidebar-mini .v2b-menu-arrow,
body.v2b-sidebar-mini .v2b-menu-badge { display: none; }
body.v2b-sidebar-mini .v2b-submenu { max-height: 0 !important; }
body.v2b-sidebar-mini .v2b-body { margin-left: var(--v2b-sidebar-mini-width); }

/* 主体区 ------------------------------------------------------------------ */
.v2b-body {
    margin-left: var(--v2b-sidebar-width);
    padding-top: var(--v2b-header-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .2s;
}

/* 标签页 ------------------------------------------------------------------ */
.v2b-tabbar {
    height: var(--v2b-tabbar-height);
    background: #fff;
    border-bottom: 1px solid var(--v2b-border);
    display: flex;
    align-items: stretch;
    position: sticky;
    top: var(--v2b-header-height);
    z-index: 900;
    overflow: hidden;
}

.v2b-tab-scroll {
    flex: 1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.v2b-tab-scroll::-webkit-scrollbar { display: none; }

.v2b-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    font-size: 13px;
    color: #666;
    border-right: 1px solid var(--v2b-border);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color .2s, background .2s;
    flex-shrink: 0;
}
.v2b-tab:hover { color: var(--v2b-primary); background: #fafafa; }
.v2b-tab.active { color: var(--v2b-primary); background: #f0f5ff; }
.v2b-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--v2b-primary);
}
.v2b-tab .v2b-tab-close {
    font-size: 12px;
    color: #bbb;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    transition: background .2s, color .2s;
}
.v2b-tab .v2b-tab-close:hover { background: #ff5722; color: #fff; }

.v2b-tab-tools {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--v2b-border);
}
.v2b-tab-tools .v2b-tab-tool {
    width: 40px;
    text-align: center;
    cursor: pointer;
    color: #999;
    line-height: var(--v2b-tabbar-height);
    height: var(--v2b-tabbar-height);
    transition: color .2s, background .2s;
}
.v2b-tab-tools .v2b-tab-tool:hover { color: var(--v2b-primary); background: #fafafa; }

/* iframe 容器 ------------------------------------------------------------- */
.v2b-content {
    flex: 1;
    position: relative;
    background: var(--v2b-body-bg);
}

.v2b-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: none;
    background: var(--v2b-body-bg);
}
.v2b-iframe.active { display: block; }

.v2b-content-inner {
    position: absolute;
    inset: 0;
}

/* ==========================================================================
   内容页通用组件
   ========================================================================== */

.v2b-page {
    padding: 15px;
    max-width: 1600px;
    margin: 0 auto;
}

.v2b-card {
    background: var(--v2b-card-bg);
    border-radius: var(--v2b-radius);
    box-shadow: var(--v2b-shadow);
    margin-bottom: 15px;
    overflow: hidden;
}

.v2b-card-head {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border-bottom: 1px solid var(--v2b-border);
    font-size: 15px;
    font-weight: 500;
}
.v2b-card-head .v2b-card-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.v2b-card-body { padding: 15px; }
.v2b-card-body.no-pad { padding: 0; }

.v2b-muted { color: var(--v2b-text-light); }
.v2b-text-sm { font-size: 12px; }
.v2b-text-lg { font-size: 16px; }
.v2b-text-center { text-align: center; }
.v2b-mt-0 { margin-top: 0; }
.v2b-mb-10 { margin-bottom: 10px; }
.v2b-mb-15 { margin-bottom: 15px; }
.v2b-mb-0 { margin-bottom: 0; }
.v2b-flex { display: flex; }
.v2b-flex-between { display: flex; align-items: center; justify-content: space-between; }
.v2b-flex-center { display: flex; align-items: center; }
.v2b-gap-10 { gap: 10px; }
.v2b-gap-15 { gap: 15px; }
.v2b-wrap { flex-wrap: wrap; }
.v2b-hidden { display: none !important; }
.v2b-break { word-break: break-all; }

/* 统计磁贴 ---------------------------------------------------------------- */
.v2b-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 15px; }
.v2b-tile {
    background: #fff;
    border-radius: var(--v2b-radius);
    box-shadow: var(--v2b-shadow);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}
.v2b-tile-label { color: var(--v2b-text-light); font-size: 13px; margin-bottom: 8px; }
.v2b-tile-value { font-size: 24px; font-weight: 600; line-height: 1.2; }
.v2b-tile-value small { font-size: 13px; font-weight: 400; color: var(--v2b-text-light); margin-left: 4px; }
.v2b-tile-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
    opacity: .12;
}
.v2b-tile-primary .v2b-tile-value { color: var(--v2b-primary); }
.v2b-tile-success .v2b-tile-value { color: #16b777; }
.v2b-tile-warn .v2b-tile-value { color: #ffb800; }
.v2b-tile-danger .v2b-tile-value { color: #ff5722; }

/* 进度条 ------------------------------------------------------------------ */
.v2b-progress {
    height: 10px;
    border-radius: 5px;
    background: #eef1f6;
    overflow: hidden;
}
.v2b-progress-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--v2b-primary), #4a9bff);
    transition: width .4s;
}
.v2b-progress-bar.is-warn { background: linear-gradient(90deg, #ffb800, #ffd666); }
.v2b-progress-bar.is-danger { background: linear-gradient(90deg, #ff5722, #ff8a65); }
.v2b-progress-bar.is-success { background: linear-gradient(90deg, #16b777, #52d19c); }
.v2b-progress-lg { height: 16px; border-radius: 8px; }
.v2b-progress-text { display: flex; justify-content: space-between; font-size: 12px; color: var(--v2b-text-light); margin-top: 6px; }

/* 套餐卡片 ---------------------------------------------------------------- */
.v2b-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 15px; }
.v2b-plan {
    background: #fff;
    border: 1px solid var(--v2b-border);
    border-radius: var(--v2b-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.v2b-plan:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .1); transform: translateY(-2px); }
.v2b-plan.is-active { border-color: var(--v2b-primary); box-shadow: 0 0 0 2px rgba(6, 101, 208, .12); }
.v2b-plan-name { font-size: 17px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.v2b-plan-price { font-size: 26px; color: #ff5722; font-weight: 600; }
.v2b-plan-price small { font-size: 13px; color: var(--v2b-text-light); font-weight: 400; }
.v2b-plan-meta { list-style: none; margin: 15px 0 0; padding: 0; font-size: 13px; color: #666; }
.v2b-plan-meta li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #f0f0f0; }
.v2b-plan-meta li:last-child { border-bottom: 0; }
.v2b-plan-foot { margin-top: 15px; padding-top: 15px; border-top: 1px solid #f5f5f5; }

.v2b-periods { display: flex; flex-wrap: wrap; gap: 10px; }
.v2b-period {
    border: 1px solid var(--v2b-border);
    border-radius: var(--v2b-radius);
    padding: 10px 16px;
    cursor: pointer;
    text-align: center;
    min-width: 110px;
    transition: all .2s;
    background: #fff;
}
.v2b-period:hover { border-color: var(--v2b-primary); }
.v2b-period.active { border-color: var(--v2b-primary); background: #f0f5ff; }
.v2b-period-name { font-size: 13px; color: #666; margin-bottom: 4px; }
.v2b-period-price { font-size: 16px; font-weight: 600; color: #ff5722; }
.v2b-period.disabled { opacity: .45; cursor: not-allowed; }
.v2b-period.disabled:hover { border-color: var(--v2b-border); }

/* 支付方式 ---------------------------------------------------------------- */
.v2b-payments { display: flex; flex-wrap: wrap; gap: 10px; }
.v2b-payment {
    border: 1px solid var(--v2b-border);
    border-radius: var(--v2b-radius);
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    transition: all .2s;
    background: #fff;
}
.v2b-payment:hover { border-color: var(--v2b-primary); }
.v2b-payment.active { border-color: var(--v2b-primary); background: #f0f5ff; }
.v2b-payment img { height: 24px; max-width: 80px; object-fit: contain; }

/* 节点 / 客户端列表 ------------------------------------------------------- */
.v2b-clients { display: flex; flex-wrap: wrap; gap: 10px; }
.v2b-client {
    border: 1px solid var(--v2b-border);
    border-radius: var(--v2b-radius);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 92px;
    cursor: pointer;
    background: #fff;
    transition: all .2s;
}
.v2b-client:hover { border-color: var(--v2b-primary); background: #f0f5ff; }
.v2b-client img { height: 26px; max-width: 62px; object-fit: contain; }
.v2b-client span { font-size: 12px; color: #666; }

.v2b-qr { text-align: center; padding: 10px; }
.v2b-qr img, .v2b-qr canvas { max-width: 200px; }

/* 订阅信息块 -------------------------------------------------------------- */
.v2b-subscribe-url {
    background: #f7f8fa;
    border: 1px solid var(--v2b-border);
    border-radius: var(--v2b-radius);
    padding: 12px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
    color: #555;
    position: relative;
}
.v2b-copy-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    background: #fff;
    border: 1px solid var(--v2b-border);
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
}
.v2b-copy-btn:hover { color: var(--v2b-primary); border-color: var(--v2b-primary); }

/* 状态与徽标 -------------------------------------------------------------- */
.v2b-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
    background: #f0f0f0;
    color: #666;
}
.v2b-badge-primary { background: #e8f1fd; color: var(--v2b-primary); }
.v2b-badge-success { background: #e7f8f0; color: #16b777; }
.v2b-badge-warn { background: #fff7e6; color: #d48806; }
.v2b-badge-danger { background: #ffefeb; color: #ff5722; }
.v2b-badge-info { background: #f0f5ff; color: #3b5998; }

.v2b-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.v2b-dot-online { background: #16b777; box-shadow: 0 0 0 3px rgba(22, 183, 119, .18); }
.v2b-dot-offline { background: #cccccc; }
.v2b-dot-warn { background: #ffb800; box-shadow: 0 0 0 3px rgba(255, 184, 0, .18); }

/* 空状态 ------------------------------------------------------------------ */
.v2b-empty { text-align: center; padding: 50px 20px; color: var(--v2b-text-light); }
.v2b-empty i { font-size: 52px; display: block; margin-bottom: 12px; opacity: .35; }

/* 列表项（公告 / 知识库 / 工单） ------------------------------------------ */
.v2b-list { list-style: none; margin: 0; padding: 0; }
.v2b-list-item {
    padding: 14px 15px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .2s;
}
.v2b-list-item:last-child { border-bottom: 0; }
.v2b-list-item:hover { background: #fafbfc; }
.v2b-list-item.clickable { cursor: pointer; }
.v2b-list-title { font-size: 14px; color: #333; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-list-item:hover .v2b-list-title { color: var(--v2b-primary); }
.v2b-list-meta { font-size: 12px; color: var(--v2b-text-light); white-space: nowrap; }

.v2b-article { line-height: 1.8; font-size: 14px; color: #444; }
.v2b-article img { max-width: 100%; height: auto; }
.v2b-article pre {
    background: #f7f8fa;
    border: 1px solid var(--v2b-border);
    border-radius: var(--v2b-radius);
    padding: 12px;
    overflow-x: auto;
}
.v2b-article code { background: #f7f8fa; padding: 1px 5px; border-radius: 3px; font-size: 13px; }

/* 工单对话 ---------------------------------------------------------------- */
.v2b-chat { padding: 15px; max-height: 520px; overflow-y: auto; background: #fafbfc; }
.v2b-chat-item { display: flex; gap: 10px; margin-bottom: 18px; }
.v2b-chat-item.me { flex-direction: row-reverse; }
.v2b-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dfe6ef;
    color: #5a6b80;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.v2b-chat-item.me .v2b-chat-avatar { background: var(--v2b-primary); color: #fff; }
.v2b-chat-bubble {
    background: #fff;
    border: 1px solid var(--v2b-border);
    border-radius: 8px;
    padding: 10px 14px;
    max-width: 70%;
    line-height: 1.7;
    word-break: break-word;
}
.v2b-chat-item.me .v2b-chat-bubble { background: #e8f1fd; border-color: #cfe0f8; }
.v2b-chat-time { font-size: 12px; color: var(--v2b-text-light); margin-top: 6px; }

/* 表单微调 ---------------------------------------------------------------- */
.v2b-form-tip { color: var(--v2b-text-light); font-size: 12px; margin-top: 6px; }
.v2b-inline-form .layui-form-item { margin-bottom: 12px; }
.v2b-required::after { content: " *"; color: #ff5722; }

.v2b-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}
.v2b-switch-row:last-child { border-bottom: 0; }
.v2b-switch-desc { font-size: 12px; color: var(--v2b-text-light); margin-top: 4px; }

/* 表格容器 ---------------------------------------------------------------- */
.v2b-table-wrap { padding: 15px; overflow-x: auto; }
.v2b-table-wrap .layui-table { margin: 0; }
.v2b-table-wrap .layui-table-view { border-radius: var(--v2b-radius); }

/* ==========================================================================
   登录 / 注册页
   ========================================================================== */

.v2b-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1f2a44 0%, #0665d0 100%);
    background-size: cover;
    background-position: center;
}
body[data-color="green"] .v2b-auth { background: linear-gradient(135deg, #1d3b3a 0%, #319795 100%); }
body[data-color="black"] .v2b-auth { background: linear-gradient(135deg, #1c1f23 0%, #343a40 100%); }
body[data-color="darkblue"] .v2b-auth { background: linear-gradient(135deg, #1e2b4a 0%, #3b5998 100%); }

.v2b-auth-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    overflow: hidden;
}
.v2b-auth-head { padding: 28px 30px 10px; text-align: center; }
.v2b-auth-head img { max-height: 48px; margin-bottom: 12px; }
.v2b-auth-head h1 { font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.v2b-auth-head p { margin: 0; font-size: 13px; color: var(--v2b-text-light); }
.v2b-auth-body { padding: 20px 30px 28px; }
.v2b-auth-foot { text-align: center; font-size: 13px; color: var(--v2b-text-light); padding-top: 6px; }
.v2b-auth-foot a { margin: 0 6px; }

.v2b-captcha-row { display: flex; gap: 10px; }
.v2b-captcha-row .layui-input { flex: 1; }

/* ==========================================================================
   交互反馈
   目标：任何可点击元素都要有「悬停可见、按下有回弹、切换有过渡」三层反馈
   ========================================================================== */

/* iframe 内容区加载遮罩：切换标签或首次打开时先给反馈 */
.v2b-frame-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--v2b-body-bg);
    color: var(--v2b-primary);
    transition: opacity .22s var(--v2b-ease);
}
.v2b-frame-loading.is-hidden { opacity: 0; pointer-events: none; }
.v2b-frame-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}
.v2b-frame-loading-inner i { font-size: 30px; }
.v2b-frame-loading-inner em { font-style: normal; font-size: 13px; color: var(--v2b-text-light); }

/* 标签页切换时内容淡入上移 */
.v2b-content-inner { animation: v2b-fade-up .22s var(--v2b-ease); }
@keyframes v2b-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 标签 */
.v2b-tab { transition: color .16s var(--v2b-ease), background .16s var(--v2b-ease); }
.v2b-tab:active { background: var(--v2b-primary-fade); }
.v2b-tab .v2b-tab-close { transition: background .16s var(--v2b-ease), color .16s var(--v2b-ease), transform .16s var(--v2b-ease); }
.v2b-tab .v2b-tab-close:active { transform: scale(.85); }

/* 统计磁贴（可点击的） */
.v2b-tile {
    transition: box-shadow .2s var(--v2b-ease), transform .18s var(--v2b-ease), border-color .2s var(--v2b-ease);
}
.v2b-tile.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.v2b-tile.clickable:active {
    transform: translateY(-1px) scale(.99);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .09);
}
.v2b-tile.clickable:hover .v2b-tile-icon { opacity: .2; transform: translateY(-50%) scale(1.06); }
.v2b-tile-icon { transition: opacity .2s var(--v2b-ease), transform .2s var(--v2b-ease); }

/* 客户端导入按钮 */
.v2b-client {
    transition: transform .18s var(--v2b-ease), border-color .18s var(--v2b-ease),
                box-shadow .18s var(--v2b-ease), background .18s var(--v2b-ease);
}
.v2b-client:hover {
    transform: translateY(-3px);
    border-color: var(--v2b-primary);
    box-shadow: 0 6px 16px var(--v2b-primary-soft);
}
.v2b-client:active {
    transform: translateY(-1px) scale(.96);
    background: var(--v2b-primary-soft);
}
.v2b-client:hover span { color: var(--v2b-primary); }

/* 套餐卡与可选项 */
.v2b-plan { transition: box-shadow .2s var(--v2b-ease), border-color .2s var(--v2b-ease), transform .2s var(--v2b-ease); }
.v2b-plan:active { transform: translateY(0) scale(.995); }
.v2b-period { transition: border-color .16s var(--v2b-ease), background .16s var(--v2b-ease), transform .14s var(--v2b-ease), box-shadow .16s var(--v2b-ease); }
.v2b-period:hover { box-shadow: 0 4px 12px var(--v2b-primary-soft); }
.v2b-period:active { transform: scale(.97); }
.v2b-period.active { box-shadow: inset 0 0 0 1px var(--v2b-primary); }
.v2b-payment { transition: border-color .16s var(--v2b-ease), background .16s var(--v2b-ease), transform .14s var(--v2b-ease), box-shadow .16s var(--v2b-ease); }
.v2b-payment:hover { box-shadow: 0 4px 12px var(--v2b-primary-soft); }
.v2b-payment:active { transform: scale(.97); }

/* 列表项（公告 / 知识库 / 钱包组成） */
.v2b-list-item { transition: background .16s var(--v2b-ease), padding-left .16s var(--v2b-ease); }
.v2b-list-item.clickable { position: relative; }
.v2b-list-item.clickable:hover { background: var(--v2b-primary-fade); }
.v2b-list-item.clickable:hover::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--v2b-primary);
}
.v2b-list-item.clickable:active { background: var(--v2b-primary-soft); }

/* 按钮 */
.layui-btn {
    transition: background-color .16s var(--v2b-ease), border-color .16s var(--v2b-ease),
                color .16s var(--v2b-ease), transform .12s var(--v2b-ease), box-shadow .16s var(--v2b-ease);
}
.layui-btn:active { transform: translateY(1px); }
.layui-btn.v2b-btn-primary:hover { box-shadow: 0 3px 10px var(--v2b-primary-soft); }
.layui-btn-sm:active, .layui-btn-xs:active { transform: translateY(1px) scale(.98); }

/* 表格行高亮（覆盖 layui 默认灰底） */
.layui-table-view .layui-table-hover,
.layui-table-view .layui-table-hover td,
.layui-table-view tbody tr:hover td { background-color: var(--v2b-primary-fade) !important; }
.layui-table-view .layui-table-hover.layui-table-click td { background-color: var(--v2b-primary-soft) !important; }
.layui-table-view .layui-table-cell { transition: color .16s var(--v2b-ease); }

/* 折叠按钮 */
.v2b-hamburger:active { background: rgba(0, 0, 0, .1); }
.v2b-tab-tools .v2b-tab-tool:active { background: var(--v2b-primary-fade); }

/* 开关与勾选 */
.layui-form-switch, .layui-form-checkbox, .layui-form-radio { transition: all .18s var(--v2b-ease); }

/* 尊重系统的「减少动态效果」偏好：关闭过渡与动画，直接呈现终态 */
@media (prefers-reduced-motion: reduce) {
    #v2b-app *, #v2b-app *::before, #v2b-app *::after,
    .v2b-page *, .v2b-page *::before, .v2b-page *::after,
    .v2b-auth *, .v2b-auth *::before, .v2b-auth *::after {
        animation-duration: .001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        transition-delay: 0ms !important;
    }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1200px) {
    .v2b-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .v2b-sidebar {
        transform: translateX(-100%);
        width: var(--v2b-sidebar-width) !important;
        box-shadow: 4px 0 16px rgba(0, 0, 0, .2);
    }
    body.v2b-sidebar-open .v2b-sidebar { transform: translateX(0); }
    body.v2b-sidebar-mini .v2b-sidebar { width: var(--v2b-sidebar-width) !important; }
    .v2b-body { margin-left: 0 !important; }
    .v2b-logo-box { width: auto; min-width: 0; }
    .v2b-logo-box .v2b-logo-text { display: none; }
    body.v2b-sidebar-mini .v2b-logo-box .v2b-logo-text { display: none; }
    .v2b-sidebar-mask {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 998;
        display: none;
    }
    body.v2b-sidebar-open .v2b-sidebar-mask { display: block; }
    .v2b-user-name { display: none; }
    .v2b-header-item { padding: 0 10px; }
  .v2b-hidden-sm { display: none !important; }
}

@media (min-width: 992px) {
    .v2b-sidebar-mask { display: none !important; }
}

@media (max-width: 768px) {
    .v2b-page { padding: 10px; }
    .v2b-tiles { grid-template-columns: 1fr; gap: 10px; }
    .v2b-card { margin-bottom: 10px; }
    .v2b-card-head { padding: 0 12px; font-size: 14px; }
    .v2b-card-body { padding: 12px; }
    .v2b-plans { grid-template-columns: 1fr; }
    .v2b-tile { padding: 14px 16px; }
    .v2b-tile-value { font-size: 20px; }
    .v2b-tile-icon { font-size: 32px; }
    .v2b-period { min-width: 0; flex: 1; padding: 8px 10px; }
    .v2b-period-price { font-size: 14px; }
    .v2b-payment { min-width: 0; flex: 1 1 calc(50% - 5px); }
    .v2b-chat-bubble { max-width: 82%; }
    .v2b-list-item { padding: 12px; }
    .v2b-list-meta { font-size: 11px; white-space: normal; text-align: right; }
    .v2b-list-item { flex-wrap: wrap; row-gap: 4px; }
    .v2b-auth-body, .v2b-auth-head { padding-left: 20px; padding-right: 20px; }
    .v2b-hide-xs { display: none !important; }
    .layui-table-cell { padding: 0 8px; }

    /* 布局修复：卡片头部按钮过多时自动换行，避免溢出 */
    .v2b-card-head {
        flex-wrap: wrap;
        height: auto;
        min-height: 48px;
        padding-top: 8px;
        padding-bottom: 8px;
        row-gap: 6px;
    }
    /* 按钮组自身也允许换行，防止多个按钮挤爆卡片头 */
    .v2b-card-tools {
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
        margin-left: 0;
    }
    .v2b-card-tools .layui-btn { margin-left: 0; }
    .v2b-card-tools .layui-btn + .layui-btn { margin-left: 0; }
    /* 布局修复：flex 双栏卡片在窄屏下不再受内联 min-width 撑破 */
    .v2b-flex > .v2b-card { min-width: 0 !important; width: 100%; }
    /* 布局修复：layui 标签页在窄屏下可横向滚动，不再截断 */
    .layui-tab-title {
        overflow-x: auto !important;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .layui-tab-title::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
    .v2b-tab { padding: 0 10px; font-size: 12px; }
    .v2b-header-item .v2b-header-text { display: none; }
}

/* ==========================================================================
   布局健壮性：弹层与长内容不允许撑破视口
   ========================================================================== */

/* layui 弹层默认按 area 固定宽度，窄屏下会超出视口 */
.layui-layer:not(.layui-layer-tips):not(.layui-layer-msg) {
    max-width: calc(100vw - 24px);
}
.layui-layer-content { overflow-wrap: break-word; word-break: break-word; }
.layui-layer-btn { text-align: center; }

/* 长 URL / 长单词在任意宽度下都不撑破容器 */
.v2b-page, .v2b-card, .v2b-card-body { min-width: 0; }

/* layui 组件主题色对齐 ---------------------------------------------------- */
.layui-btn.v2b-btn-primary { background-color: var(--v2b-primary); }
.layui-btn.v2b-btn-primary:hover { background-color: var(--v2b-primary-dark); }
.layui-btn-primary.v2b-btn-outline { border-color: var(--v2b-border); }
.layui-btn-primary.v2b-btn-outline:hover { border-color: var(--v2b-primary); color: var(--v2b-primary); }

.layui-form-onswitch { border-color: var(--v2b-primary); background-color: var(--v2b-primary); }
.layui-form-checked[lay-skin=primary] i { border-color: var(--v2b-primary) !important; background-color: var(--v2b-primary); }
.layui-form-radio > i:hover, .layui-form-radioed > i { color: var(--v2b-primary); }
.layui-tab-title .layui-this { color: var(--v2b-primary); }
.layui-tab-brief > .layui-tab-title .layui-this { color: var(--v2b-primary); }
.layui-tab-brief > .layui-tab-more li.layui-this:after,
.layui-tab-brief > .layui-tab-title .layui-this:after { border-bottom-color: var(--v2b-primary); }
.layui-laypage .layui-laypage-curr .layui-laypage-em { background-color: var(--v2b-primary); }
.layui-input:focus, .layui-textarea:focus { border-color: var(--v2b-primary) !important; }
.layui-form-select dl dd.layui-this { background-color: var(--v2b-primary); }
.layui-nav .layui-nav-bar { background-color: var(--v2b-primary); }

/* 打印 */
@media print {
    .v2b-header, .v2b-sidebar, .v2b-tabbar, .v2b-sidebar-mask { display: none !important; }
    .v2b-body { margin-left: 0 !important; padding-top: 0; }
}
